:root {
  --ivory: oklch(95.2% 0.022 82);
  --paper: oklch(98% 0.012 84);
  --charcoal: oklch(25.6% 0.014 74);
  --muted: oklch(49.5% 0.018 78);
  --terracotta: oklch(55.8% 0.103 43);
  --terracotta-dark: oklch(47.3% 0.096 40);
  --olive: oklch(51.2% 0.043 115);
  --warm-panel: oklch(91.6% 0.032 80);
  --stone: oklch(84.7% 0.026 76);
  --danger: oklch(48% 0.13 28);
  --line: color-mix(in oklch, var(--charcoal) 16%, transparent);
  --shadow: 0 18px 50px color-mix(in oklch, var(--charcoal) 10%, transparent);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ivory); color: var(--charcoal); }
body { margin: 0; font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
body::before {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; content: ""; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 14px; background: var(--charcoal); color: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.wordmark { margin: 0; font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; font-size: 19px; font-weight: 500; text-transform: uppercase; }
.eyebrow { margin: 0 0 9px; color: var(--terracotta-dark); font-size: 11px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.button { min-height: 46px; padding: 0 19px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font-size: 14px; font-weight: 680; transition: background 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: .58; transform: none; }
.button.primary { background: var(--terracotta); color: oklch(98% .01 82); }
.button.primary:hover { background: var(--terracotta-dark); }
.button.secondary { border-color: var(--charcoal); background: transparent; }
.button.secondary:hover { background: var(--charcoal); color: var(--paper); }

.access-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(340px, 1.08fr) minmax(420px, .92fr); background: var(--paper); }
.access-art { position: relative; min-height: 100vh; overflow: hidden; background: var(--stone) url("../public/art/hero-paisaje.webp") center/cover no-repeat; }
.access-art::after { position: absolute; inset: 0; content: ""; background: linear-gradient(to top, color-mix(in oklch, var(--charcoal) 43%, transparent), transparent 58%); }
.access-art span { position: absolute; left: 46px; bottom: 40px; z-index: 1; color: var(--paper); font-family: Georgia, serif; font-size: 15px; font-style: italic; }
.access-panel { display: flex; min-height: 100vh; flex-direction: column; padding: clamp(32px, 5vw, 76px); }
.access-copy { width: min(100%, 540px); margin: auto 0 34px; }
.access-copy h1 { max-width: 520px; margin: 0 0 20px; font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; font-size: clamp(43px, 4vw, 64px); font-weight: 400; line-height: 1; }
.access-copy > p:last-child { max-width: 58ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.access-form { width: min(100%, 480px); }
.access-form label, .work-form label { display: block; color: var(--muted); font-size: 12px; font-weight: 670; }
.access-form input, .work-form input, .work-form select, .work-form textarea { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--charcoal); transition: border-color 180ms ease-out, box-shadow 180ms ease-out; }
.access-form input { min-height: 50px; margin-bottom: 17px; padding: 0 14px; }
.access-form small { display: block; margin: -9px 0 17px; color: var(--muted); font-weight: 450; }
.access-form input:focus, .work-form input:focus, .work-form select:focus, .work-form textarea:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px color-mix(in oklch, var(--terracotta) 13%, transparent); outline: 0; }
.access-form .button { width: 100%; }
.form-message { min-height: 22px; margin: 0 0 8px; color: var(--danger); font-size: 13px; }
.access-note { margin: auto 0 0; padding-top: 34px; color: var(--muted); font-size: 11px; }

.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; justify-content: space-between; padding: 34px 27px 28px; border-right: 1px solid var(--line); background: var(--warm-panel); }
.sidebar-caption { margin: 6px 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 13px; font-style: italic; }
.sidebar nav { display: grid; gap: 8px; margin-block: 60px auto; }
.sidebar nav a { display: grid; min-height: 52px; align-items: center; grid-template-columns: 29px 1fr; padding: 9px 10px; color: var(--muted); text-decoration: none; font-size: 14px; transition: color 180ms ease-out, background 180ms ease-out; }
.sidebar nav a span { color: var(--terracotta); font-family: Georgia, serif; font-size: 11px; }
.sidebar nav a small { grid-column: 2; margin-top: -8px; font-size: 9px; font-weight: 500; text-transform: uppercase; }
.sidebar nav a.active, .sidebar nav a:hover { background: color-mix(in oklch, var(--paper) 64%, transparent); color: var(--charcoal); }
.sidebar-footer { display: grid; gap: 15px; padding-top: 22px; border-top: 1px solid var(--line); }
.sidebar-footer a, .sidebar-footer button { display: flex; min-height: 44px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; text-decoration: none; }
.sidebar-footer a:hover, .sidebar-footer button:hover { color: var(--terracotta-dark); }
.admin-shell main { min-width: 0; }
.topbar { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 24px; padding: 25px clamp(28px, 4.2vw, 70px); border-bottom: 1px solid var(--line); background: color-mix(in oklch, var(--ivory) 93%, transparent); }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 32px; font-weight: 400; }
.menu-toggle { display: none; }
.catalog-view, .editor-view, .management-view { padding: clamp(30px, 4.2vw, 68px); }
.summary { display: flex; gap: clamp(32px, 6vw, 96px); padding-bottom: 33px; border-bottom: 1px solid var(--line); }
.summary p { display: grid; margin: 0; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
.summary strong { font-family: Georgia, serif; font-size: 31px; font-weight: 400; }
.summary span { color: var(--muted); font-size: 12px; }
.storage-usage { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line); background: color-mix(in oklch, var(--paper) 60%, transparent); }
.storage-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.storage-heading h2 { margin: 0; font-size: 13px; font-weight: 700; }
.storage-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.storage-heading > strong { font-size: 12px; font-weight: 700; }
.storage-usage progress { display: block; width: 100%; height: 5px; margin-top: 14px; border: 0; border-radius: 100px; overflow: hidden; background: var(--stone); accent-color: var(--olive); }
.storage-usage progress::-webkit-progress-bar { background: var(--stone); }
.storage-usage progress::-webkit-progress-value { background: var(--olive); transition: width 220ms var(--ease), background 180ms ease-out; }
.storage-usage progress::-moz-progress-bar { background: var(--olive); transition: background 180ms ease-out; }
.storage-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.storage-alert { margin: 14px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--terracotta-dark); font-size: 11px; font-weight: 650; line-height: 1.5; animation: upload-status-in 220ms var(--ease) both; }
.storage-usage[data-level="warning"] progress::-webkit-progress-value,
.storage-usage[data-level="warning"] progress::-moz-progress-bar { background: var(--terracotta); }
.storage-usage[data-level="critical"] progress::-webkit-progress-value,
.storage-usage[data-level="critical"] progress::-moz-progress-bar { background: var(--danger); }
.storage-usage[data-level="critical"] .storage-alert { color: var(--danger); }
.storage-usage[data-level="unavailable"] progress { opacity: .45; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 0 22px; }
.search-field { width: min(100%, 360px); }
.search-field input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); background: var(--paper); }
.segmented { display: flex; gap: 5px; }
.segmented button { min-height: 44px; padding: 0 13px; border: 1px solid transparent; border-radius: 100px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.segmented button:hover, .segmented button.active { border-color: var(--charcoal); background: var(--charcoal); color: var(--paper); }
.catalog-status { min-height: 20px; color: var(--muted); font-size: 12px; }
.works-list { border-top: 1px solid var(--line); }
.work-row { display: grid; min-height: 116px; align-items: center; grid-template-columns: 78px minmax(210px, 1fr) auto 82px; gap: 22px; padding: 17px 3px; border-bottom: 1px solid var(--line); transition: background 180ms ease-out, transform 180ms ease-out; }
.work-row:hover { background: color-mix(in oklch, var(--paper) 58%, transparent); }
.work-thumb { display: flex; width: 78px; height: 82px; align-items: center; justify-content: center; overflow: hidden; background: var(--stone); color: var(--muted); font-size: 9px; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease); }
.work-row:hover .work-thumb img { transform: scale(1.018); }
.work-details { display: grid; align-items: center; grid-template-columns: minmax(180px, .8fr) 1fr; gap: 18px; }
.work-category { margin: 0 0 5px; color: var(--terracotta-dark); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.work-details h2 { margin: 0; font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.work-meta { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status-chip { padding: 6px 9px; border-radius: 100px; background: var(--warm-panel); color: var(--muted); font-size: 10px; font-weight: 680; white-space: nowrap; }
.status-chip.published { background: color-mix(in oklch, var(--olive) 14%, var(--paper)); color: color-mix(in oklch, var(--olive) 82%, var(--charcoal)); }
.row-action { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 670; }
.row-action span { color: var(--terracotta); transition: transform 180ms ease-out; }
.row-action:hover span { transform: translateX(3px); }
.empty-state { max-width: 480px; margin: 70px auto; text-align: center; }
.empty-state > span { color: var(--terracotta); font-family: Georgia, serif; font-size: 38px; }
.empty-state h2 { margin: 12px 0; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.empty-state p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.6; }

.editor-view { animation: view-in 220ms var(--ease) both; }
.editor-heading { display: grid; align-items: end; grid-template-columns: 180px 1fr auto; gap: 20px; margin-bottom: 34px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.editor-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 35px; font-weight: 400; }
.back-button { min-height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; font-size: 12px; text-align: left; }
.save-status { margin: 0; color: var(--olive); font-size: 12px; }
.draft-notice { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -10px 0 30px; padding: 15px 17px; border: 1px solid color-mix(in oklch, var(--olive) 34%, var(--line)); background: color-mix(in oklch, var(--olive) 7%, var(--paper)); animation: upload-status-in 220ms var(--ease) both; }
.draft-notice strong { font-size: 12px; }
.draft-notice p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.draft-notice button { min-height: 38px; flex: 0 0 auto; padding: 0 11px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 680; transition: border-color 180ms ease-out, color 180ms ease-out, background 180ms ease-out; }
.draft-notice button:hover { border-color: var(--charcoal); background: var(--paper); color: var(--charcoal); }
.work-form { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) 288px; gap: clamp(30px, 5vw, 76px); }
.form-main { display: grid; gap: 45px; }
.work-form fieldset { margin: 0; padding: 0; border: 0; }
.work-form legend { width: 100%; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-family: Georgia, serif; font-size: 21px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.field-grid .span-2 { grid-column: span 2; }
.work-form input, .work-form select { min-height: 47px; padding: 0 12px; }
.work-form textarea { min-height: 120px; padding: 12px; resize: vertical; line-height: 1.55; }
.field-help { margin: -12px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.upload-zone { display: flex !important; min-height: 155px; align-items: center; justify-content: center; flex-direction: column; border: 1px dashed color-mix(in oklch, var(--terracotta) 60%, var(--line)); background: color-mix(in oklch, var(--warm-panel) 46%, transparent); color: var(--charcoal) !important; cursor: pointer; text-align: center; transition: background 180ms ease-out, border-color 180ms ease-out; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--terracotta); background: color-mix(in oklch, var(--warm-panel) 76%, transparent); }
.upload-zone.has-files { border-style: solid; border-color: color-mix(in oklch, var(--olive) 70%, var(--line)); background: color-mix(in oklch, var(--olive) 8%, var(--paper)); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-symbol { color: var(--terracotta); font-family: Georgia, serif; font-size: 28px; }
.upload-zone strong { margin: 4px 0; font-size: 13px; }
.upload-zone small { color: var(--muted); font-size: 10px; font-weight: 450; }
.selected-image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.selected-image-preview { position: relative; display: grid; min-width: 0; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--line); background: color-mix(in oklch, var(--paper) 72%, transparent); animation: selected-preview-in 220ms var(--ease) var(--preview-delay, 0ms) both; overflow: hidden; }
.selected-image-frame { width: 64px; aspect-ratio: 1; overflow: hidden; background: var(--stone); }
.selected-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.selected-image-preview > div:last-child { min-width: 0; }
.selected-image-preview strong, .selected-image-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-image-preview strong { color: var(--charcoal); font-size: 10px; }
.selected-image-preview small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.selected-image-list[data-state="uploading"] .selected-image-preview,
.selected-image-list[data-state="processing"] .selected-image-preview { opacity: .66; }
.selected-image-list[data-state="uploading"] .selected-image-preview::after,
.selected-image-list[data-state="processing"] .selected-image-preview::after { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg, transparent 28%, color-mix(in oklch, var(--paper) 52%, transparent) 48%, transparent 68%); transform: translateX(-100%); animation: preview-processing 1.1s ease-in-out infinite; }
.selected-image-remainder { display: grid; min-height: 82px; place-items: center; margin: 0; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
.upload-status { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); background: color-mix(in oklch, var(--paper) 72%, transparent); animation: upload-status-in 220ms var(--ease) both; }
.upload-status-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.upload-status-side { display: flex; align-items: center; gap: 8px; }
.upload-status-side > strong { color: var(--charcoal); font-size: 10px; font-weight: 700; }
.upload-status-side button { min-height: 32px; padding: 0 10px; border: 1px solid currentColor; border-radius: 2px; background: transparent; color: var(--danger); cursor: pointer; font-size: 10px; font-weight: 700; transition: background 180ms ease-out, color 180ms ease-out; }
.upload-status-side button:hover { background: var(--danger); color: var(--paper); }
.upload-status-icon { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--terracotta); font-size: 11px; }
.upload-status-icon::before { content: "·"; }
.upload-status[data-state="uploading"] .upload-status-icon::before { content: "↑"; }
.upload-status[data-state="processing"] .upload-status-icon::before { content: "…"; }
.upload-status[data-state="success"] { border-color: color-mix(in oklch, var(--olive) 38%, var(--line)); background: color-mix(in oklch, var(--olive) 8%, var(--paper)); }
.upload-status[data-state="success"] .upload-status-icon { color: var(--olive); animation: upload-confirm 220ms var(--ease) both; }
.upload-status[data-state="success"] .upload-status-icon::before { content: "✓"; }
.upload-status[data-state="error"] { border-color: color-mix(in oklch, var(--danger) 42%, var(--line)); }
.upload-status[data-state="error"] .upload-status-icon { color: var(--danger); }
.upload-status[data-state="error"] .upload-status-icon::before { content: "!"; }
.upload-status progress { width: 100%; height: 5px; margin-top: 10px; border: 0; border-radius: 100px; overflow: hidden; background: var(--stone); accent-color: var(--terracotta); }
.upload-status progress::-webkit-progress-bar { background: var(--stone); }
.upload-status progress::-webkit-progress-value { background: var(--terracotta); transition: width 180ms ease-out; }
.upload-status progress::-moz-progress-bar { background: var(--terracotta); }
.upload-status[data-state="success"] progress::-webkit-progress-value { background: var(--olive); }
.upload-status[data-state="success"] progress::-moz-progress-bar { background: var(--olive); }
.image-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.image-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--stone); }
.image-item img { width: 100%; height: 100%; object-fit: cover; }
.image-item-actions { position: absolute; right: 6px; bottom: 6px; left: 6px; display: flex; justify-content: space-between; gap: 5px; }
.image-item button { min-height: 30px; padding: 0 8px; border: 0; background: color-mix(in oklch, var(--paper) 94%, transparent); cursor: pointer; font-size: 9px; }
.publish-panel { position: sticky; top: 28px; padding: 24px; background: var(--warm-panel); box-shadow: var(--shadow); }
.publish-panel label { margin-bottom: 17px; }
.check-field { display: flex !important; align-items: center; gap: 10px; color: var(--charcoal) !important; }
.check-field input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--terracotta); }
.publish-actions { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.publish-actions .button { width: 100%; }
.delete-button { min-height: 40px; border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 12px; }
.management-view { animation: view-in 220ms var(--ease) both; }
.management-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.management-intro h2 { margin: 0; font-family: Georgia, serif; font-size: 35px; font-weight: 400; }
.management-intro > p { max-width: 48ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.inline-create { display: grid; align-items: end; grid-template-columns: minmax(220px, 1fr) 110px auto; gap: 14px; margin-bottom: 15px; padding: 22px; background: var(--warm-panel); }
.inline-create label, .settings-form label, .category-row label { display: block; color: var(--muted); font-size: 12px; font-weight: 670; }
.inline-create input, .settings-form input, .settings-form textarea, .category-row input { width: 100%; min-height: 46px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--charcoal); }
.settings-form textarea { min-height: 150px; padding-block: 12px; resize: vertical; line-height: 1.55; }
.inline-create input:focus, .settings-form input:focus, .settings-form textarea:focus, .category-row input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px color-mix(in oklch, var(--terracotta) 13%, transparent); outline: 0; }
.section-message { min-height: 20px; margin: 0 0 12px; color: var(--olive); font-size: 12px; }
.category-list { border-top: 1px solid var(--line); }
.category-row { display: grid; align-items: center; grid-template-columns: minmax(180px, 1fr) 100px 140px auto; gap: 16px; min-height: 86px; padding: 15px 3px; border-bottom: 1px solid var(--line); }
.category-row .work-count { margin: 0; color: var(--muted); font-size: 12px; }
.category-actions { display: flex; align-items: center; gap: 4px; }
.category-actions button { min-width: 44px; min-height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 12px; font-weight: 660; }
.category-actions .remove-category { color: var(--danger); }
.category-actions .category-in-use { color: var(--muted); cursor: not-allowed; font-weight: 520; }
.settings-form { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(30px, 5vw, 76px); }
.settings-main { display: grid; gap: 44px; }
.settings-form fieldset { margin: 0; padding: 0; border: 0; }
.settings-form legend { width: 100%; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-family: Georgia, serif; font-size: 21px; }
.settings-form label { margin-bottom: 18px; }
.settings-form label small { display: block; margin-top: 7px; font-weight: 450; }
.profile-panel { position: sticky; top: 28px; padding: 24px; background: var(--warm-panel); box-shadow: var(--shadow); }
.profile-panel h3 { margin: 0 0 16px; font-family: Georgia, serif; font-size: 21px; font-weight: 400; }
.profile-preview { display: flex; aspect-ratio: 4 / 5; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 14px; background: var(--stone); color: var(--muted); font-size: 11px; }
.profile-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-upload { display: flex; width: 100%; align-items: center; justify-content: center; }
.profile-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-panel > small { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-actions .button { width: 100%; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes upload-status-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes upload-confirm { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes selected-preview-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes preview-processing { to { transform: translateX(100%); } }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; width: min(82vw, 290px); transform: translateX(-105%); transition: transform 220ms var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { position: relative; z-index: 32; display: flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 0; background: transparent; }
  .menu-toggle span:not(.sr-only) { width: 21px; height: 1px; background: var(--charcoal); }
  .topbar { justify-content: flex-start; }
  .topbar .button { margin-left: auto; }
  .work-form { grid-template-columns: 1fr; }
  .publish-panel { position: static; }
  .settings-form { grid-template-columns: 1fr; }
  .profile-panel { position: static; }
  .sidebar-backdrop { position: fixed; inset: 0 0 0 min(82vw, 290px); z-index: 29; display: block; border: 0; background: color-mix(in oklch, var(--charcoal) 24%, transparent); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 220ms ease-out; }
  .sidebar.open + .sidebar-backdrop { opacity: 1; pointer-events: auto; }
}

@media (min-width: 901px) {
  .sidebar-backdrop { display: none; }
}

@media (max-width: 680px) {
  .access-shell { display: block; }
  .access-art { min-height: 230px; }
  .access-art span { left: 22px; bottom: 20px; }
  .access-panel { min-height: calc(100vh - 230px); padding: 28px 22px; }
  .access-copy { margin-top: 70px; }
  .topbar { min-height: 88px; padding: 16px 18px; }
  .topbar h1 { font-size: 25px; }
  .topbar .eyebrow { display: none; }
  .topbar .button { min-height: 44px; padding-inline: 13px; }
  .catalog-view, .editor-view, .management-view { padding: 28px 18px 50px; }
  .summary { gap: 20px; }
  .summary p { display: block; }
  .summary strong, .summary span { display: block; }
  .summary strong { font-size: 27px; }
  .storage-usage { padding: 16px; }
  .storage-heading { align-items: flex-start; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .segmented { overflow-x: auto; }
  .work-row { grid-template-columns: 64px 1fr auto; gap: 13px; }
  .work-thumb { width: 64px; height: 72px; }
  .work-details { display: block; }
  .work-meta { margin-top: 6px; }
  .status-chip { grid-column: 2; justify-self: start; }
  .row-action { grid-column: 3; grid-row: 1 / span 2; justify-content: center; font-size: 0; }
  .row-action span { font-size: 18px; }
  .editor-heading { grid-template-columns: 1fr; }
  .editor-heading > div { grid-row: 1; }
  .editor-heading .save-status { grid-row: 2; }
  .editor-heading .back-button { grid-row: 3; }
  .draft-notice { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: -8px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .span-2 { grid-column: auto; }
  .image-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-intro { align-items: flex-start; flex-direction: column; gap: 16px; }
  .inline-create { grid-template-columns: 1fr; }
  .category-row { grid-template-columns: 1fr 85px; }
  .category-row .work-count { grid-column: 1; }
  .category-actions { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
