/* Collection and editor refinements. Core layout remains in style.css. */
.gallery { max-width: 1440px; padding: 42px 48px 64px; }
.gallery-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
  align-items: center; gap: 44px; padding: 32px 0 38px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.gallery-welcome .kicker { color: var(--accent); letter-spacing: 1.6px; }
.gallery-intro h1 { font-size: clamp(30px, 3.3vw, 46px); margin: 14px 0 17px; }
.gallery-intro p { font-size: 13px; line-height: 1.9; }
.collection-stats { display: flex; gap: 24px; margin-top: 25px; color: var(--muted); font-size: 12px; }
.collection-stats strong { font-family: Georgia, serif; font-size: 23px; font-weight: 500; color: var(--ink); margin-right: 4px; }
.resume-card {
  min-width: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr);
  align-items: center; gap: 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); padding: 16px; text-decoration: none; box-shadow: 0 8px 28px #28302b06;
  transition: border-color .18s, box-shadow .18s;
}
.resume-card:hover { border-color: #c8ab98; box-shadow: var(--shadow); }
.resume-card h2 { margin: 10px 0 7px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resume-card p { font-size: 11px; }
.resume-action { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 12px; margin-top: 15px; }
.resume-action svg, .card-open svg, .gallery-search svg { width: 17px; height: 17px; flex: none; }
.gallery-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.gallery-heading h2 { font-size: 20px; margin: 0; }
.gallery-heading .icon-btn { margin-left: auto; }
.gallery-toolbar { gap: 16px; justify-content: space-between; border: 0; padding: 0; margin-bottom: 25px; }
.gallery-filters { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #e9e8df; flex: none; }
.gallery-filters .filter { border-radius: 7px; min-height: 35px; padding: 8px 13px; }
.gallery-filters .filter:not(.active):hover { background: #fff8; color: var(--ink); }
.gallery-tools { display: flex; gap: 10px; flex: 1; justify-content: flex-end; min-width: 0; }
.gallery-search { display: flex; align-items: center; gap: 8px; width: min(100%, 320px); padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); }
.gallery-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery-search input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 0; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 12px; }
.gallery-tools .gallery-sort { width: 122px; min-height: 43px; flex: none; }
.work-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
.work-card { border-radius: 12px; box-shadow: 0 3px 10px #28302b03; min-width: 0; }
.work-card { content-visibility: auto; contain-intrinsic-size: auto 420px; }
.work-card-image { height: auto; aspect-ratio: 1.12; padding: 13px; background: #e8e7de; gap: 12px; align-content: center; }
.work-card-image .thumb { object-fit: contain; width: 100%; height: 100%; min-height: 0; background: transparent; filter: drop-shadow(0 3px 5px #28302b14); }
.work-card-image > svg { justify-self: center; width: 34px; height: 34px; }
.cover-placeholder { font-size: 11px; text-align: center; }
.work-card-image.compact { height: 142px; width: 110px; border-radius: 8px; aspect-ratio: auto; padding: 8px; }
.compact .cover-placeholder { font-size: 9px; }
.work-card-info { padding: 16px 18px 15px; display: flex; flex-direction: column; flex: 1; }
.work-card-meta { margin-bottom: 11px; font-size: 10px; color: var(--muted); gap: 5px; flex-wrap: wrap; }
.work-card-meta .badge { font-size: 10px; background: #eeeee5; }
.work-card-info h2 { font-size: 15px; line-height: 1.65; margin-bottom: 7px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-card-info > p { font-size: 12px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-bottom: 16px; }
.card-open { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 11px; border-top: 1px solid #e8e8de; color: var(--accent); font-size: 11px; }
.gallery-more { display: flex; margin: 30px auto 0; min-width: 200px; }
#gallery-results > .empty { border: 1px dashed #c4c7b8; border-radius: 14px; background: #fffcf650; min-height: 300px; }
.gallery-skeleton { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; }
.skeleton-card { min-height: 340px; border-radius: 12px; background: linear-gradient(110deg, #e7e6dc 25%, #eeede5 45%, #e7e6dc 65%); background-size: 220% 100%; animation: collection-loading 1.8s ease-in-out infinite; }
@keyframes collection-loading { to { background-position: -220% 0; } }
.field > span:first-child { font-size: 12px; }
.field input, .field textarea, .field select { font-size: 13px; }
.field textarea.prompt-input { font-size: 13px; line-height: 1.8; }
.prompt-guide { border: 1px solid var(--line); padding: 12px 14px; border-radius: 9px; margin-top: 16px; background: #f6f5ed; }
.prompt-guide summary { font-size: 12px; cursor: pointer; color: #63755b; line-height: 1.6; }
.prompt-guide ol { padding-left: 19px; font-size: 12px; line-height: 1.85; margin: 12px 0; color: #5e6859; }
.prompt-guide li + li { margin-top: 8px; }
.prompt-guide p { font-size: 11px; color: var(--muted); margin: 0; }
.canvas-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 16px; }
.canvas-preset { background: transparent; border: 1px solid var(--line); padding: 10px 5px; min-width: 0; }
.canvas-preset[aria-pressed="true"] { background: var(--accent-pale); border-color: #cf947d; color: #984a35; }
.canvas-preset span { display: grid; gap: 4px; }
.canvas-preset strong { font-size: 12px; font-weight: 600; }
.canvas-preset small { font-size: 10px; font-weight: 400; }
.editor-guidance { border: 1px solid #dce2d2; background: #f0f3e9; border-radius: 9px; padding: 13px 14px; margin: 16px 0 0; font-size: 12px; color: #57654f; }
.guidance-heading { display: flex; gap: 7px; align-items: center; }
.guidance-heading svg { width: 16px; height: 16px; flex: none; }
.guidance-heading strong { font-weight: 600; }
.editor-guidance p { line-height: 1.7; margin: 8px 0 0; font-size: 11px; }
.editor-guidance .canvas-summary { font-variant-numeric: tabular-nums; font-size: 12px; }
.editor-guidance ul { padding-left: 17px; margin: 10px 0 0; line-height: 1.8; }
.editor-guidance li + li { margin-top: 6px; }
.editor-guidance .guidance-budget { color: #825f2d; border-top: 1px solid #dde1d3; padding-top: 8px; }
.version-note { font-size: 11px; }
.version-meta { font-size: 10px; }
.inspector-tabs .tab { min-height: 48px; }
.inspector-footer { padding-bottom: max(17px, env(safe-area-inset-bottom)); }
@media (min-width: 901px) {
  .work-layout { height: calc(100dvh - 76px); }
}
@media (max-width: 1100px) {
  .gallery { padding: 30px 30px 48px; }
  .gallery-intro { gap: 28px; grid-template-columns: minmax(0, 1fr) 300px; }
  .resume-card { grid-template-columns: 85px minmax(0, 1fr); gap: 14px; padding: 13px; }
  .work-card-image.compact { width: 85px; height: 125px; }
  .gallery-toolbar { flex-wrap: wrap; }
  .gallery-tools { flex: 1 1 320px; }
}
@media (max-width: 700px) {
  .gallery { padding: 24px 20px 40px; }
  .gallery-intro { grid-template-columns: 1fr; padding: 10px 0 26px; gap: 25px; margin-bottom: 25px; }
  .gallery-intro h1 { font-size: 34px; }
  .resume-card { grid-template-columns: 70px minmax(0, 1fr); padding: 12px 15px; }
  .work-card-image.compact { width: 70px; height: 90px; }
  .resume-card h2 { margin: 5px 0 2px; -webkit-line-clamp: 1; }
  .resume-card p { display: none; }
  .resume-action { margin-top: 7px; }
  .collection-stats { margin-top: 19px; }
  .gallery-tools { flex-basis: 100%; }
  .gallery-search { width: auto; flex: 1; }
  .gallery-filters { width: 100%; }
  .gallery-filters .filter { flex: 1; padding: 8px 5px; }
  .gallery-heading { margin-bottom: 12px; }
  .gallery-heading h2 { font-size: 18px; }
  .gallery-toolbar { gap: 12px; margin-bottom: 20px; }
  .gallery-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .skeleton-card { min-height: 230px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .work-card-image { height: auto; aspect-ratio: .9; padding: 8px; }
  .work-card-info { padding: 12px; }
  .work-card-info h2 { font-size: 13px; }
  .work-card-info > p { font-size: 11px; margin-bottom: 12px; }
  .work-card-meta { gap: 6px; margin-bottom: 8px; font-size: 9px; }
  .work-card-meta .badge { font-size: 9px; }
  .card-open { font-size: 10px; }
}
@media (max-width: 600px) {
  .app-header .wardrobe-link { font-size: 11px; padding: 8px; min-height: 40px; }
  .app-header .work-title { max-width: 27vw; }
  .app-header .brand small { display: none; }
  .gallery-search input, .gallery-tools .gallery-sort,
  .field input, .field textarea, .field select, .field textarea.prompt-input { font-size: 16px; }
  .gallery-tools .gallery-sort { width: 118px; }
  .inspector-tabs .tab { padding: 0 9px; }
  .inspector-footer .btn { min-height: 44px; }
}
.app-header > .btn.wardrobe-link { display: inline-flex; }
@media (max-width: 370px) {
  .gallery { padding-left: 14px; padding-right: 14px; }
  .gallery-intro h1 { font-size: 29px; }
  .app-header { padding: 0 10px; }
  .app-header .brand > span:last-child { display: none; }
  .work-card-info { padding: 10px; }
}
