/* ==========================================================================
   Valerogarte · sistema visual
   Azul noche (negro marfil) pintado con la paleta del artista: el bermellón,
   el naranja y el amarillo cadmio del ojo del logotipo, más ultramar, ftalo,
   alizarina y tierra verde como colores de apoyo. Las tipografías se sirven
   desde la propia aplicación (licencia SIL OFL, ver static/fonts).
   ========================================================================== */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  /* Paleta del pintor */
  --vermilion: #ff4f2b;
  --orange: #ff8f1f;
  --cadmium: #ffd23c;
  --alizarin: #f0457a;
  --ultramarine: #6f7fff;
  --phthalo: #24cfc1;
  --terre-verte: #7fd1a3;
  --violet: #b48cff;
  /* Superficies: azul noche */
  --canvas: #090b15;
  --canvas-rgb: 9 11 21;
  --canvas-deep: #05060d;
  --canvas-raised: #0e1122;
  --canvas-raised-rgb: 14 17 34;
  --surface: #13172b;
  --surface-rgb: 19 23 43;
  --surface-2: #1b2039;
  --surface-3: #262c4c;
  --surface-raised: var(--surface-2);
  /* Tinta */
  --ink: #f6f1e9;
  --ink-rgb: 246 241 233;
  --muted: #b5b4ca;
  --faint: #8084a4;
  --line-rgb: 186 194 255;
  --line: rgb(var(--line-rgb) / .11);
  --line-strong: rgb(var(--line-rgb) / .22);
  --tint-rgb: 214 222 255;
  /* Semántica */
  --accent: #ff6a3d;
  --accent-rgb: 255 106 61;
  --accent-light: #ff9a76;
  --accent-light-rgb: 255 154 118;
  --accent-hover: #ff8456;
  --accent-ink: #1a0703;
  --sun: var(--cadmium);
  --sun-rgb: 255 210 60;
  --danger: var(--alizarin);
  --danger-rgb: 240 69 122;
  --success: var(--terre-verte);
  --success-rgb: 127 209 163;
  --info: var(--ultramarine);
  --info-rgb: 111 127 255;
  --violet-rgb: 180 140 255;
  --focus: var(--cadmium);
  --fire: linear-gradient(110deg, #ff3d2e 0%, #ff6a1f 40%, #ffa92b 74%, #ffd447 100%);
  --dusk: linear-gradient(120deg, #6f7fff 0%, #b48cff 48%, #f0457a 100%);
  /* Alias heredados: algunas vistas siguen nombrando así a los acentos. */
  --ochre: var(--accent);
  --ochre-light: var(--accent-light);
  --umber: #2a2f57;
  --red: var(--danger);
  --green: var(--success);
  --shadow: 0 24px 70px rgb(2 3 10 / .55);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-height: 74px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --serif-text: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(70rem 40rem at 94% -16rem, rgb(var(--accent-rgb) / .17), transparent 64%), radial-gradient(58rem 36rem at -8% -10rem, rgb(var(--info-rgb) / .15), transparent 66%), var(--canvas); background-repeat: no-repeat; font-family: var(--sans); line-height: 1.5; font-synthesis-weight: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Grano de lienzo muy tenue sobre el fondo; nunca encima de las obras. */
body::before { content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; opacity: .6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .87 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"); }
::selection { color: var(--accent-ink); background: var(--sun); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
svg { display: block; }
h1, h2, h3, h4 { text-wrap: balance; }

.skip-link { position: fixed; z-index: 1000; top: 1rem; left: 1rem; padding: .7rem 1rem; transform: translateY(-200%); background: var(--sun); color: var(--accent-ink); border-radius: .35rem; font-weight: 700; }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-media-picker-card][hidden] { display: none !important; }
.page-shell { width: min(1520px, calc(100% - 3rem)); margin-inline: auto; }

/* Cabecera ------------------------------------------------------------------ */
.site-header { position: sticky; z-index: 50; top: 0; height: var(--header-height); display: flex; align-items: center; justify-content: flex-end; gap: 1.25rem; padding: 0 max(1.5rem, calc((100vw - 1520px) / 2)); border-bottom: 1px solid var(--line); background: rgb(var(--canvas-rgb) / .74); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); }
.site-header::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / .7) 22%, rgb(var(--sun-rgb) / .55) 50%, rgb(var(--info-rgb) / .5) 78%, transparent); opacity: .7; pointer-events: none; }
.site-brand { display: inline-flex; align-items: center; gap: .75rem; margin-right: auto; color: var(--ink); text-decoration: none; border-radius: .7rem; }
.site-brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.site-brand-eye { width: 40px; height: 40px; flex: none; display: block; border-radius: 9px; box-shadow: 0 0 0 1px rgb(var(--line-rgb) / .22), 0 10px 26px -8px rgb(var(--accent-rgb) / .7); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.site-brand:hover .site-brand-eye { transform: rotate(-6deg) scale(1.06); box-shadow: 0 0 0 1px rgb(var(--sun-rgb) / .5), 0 14px 32px -8px rgb(var(--accent-rgb) / .9); }
.site-brand-text { display: grid; gap: .1rem; line-height: 1; }
.site-brand-signature { width: 138px; height: 30px; display: block; background: var(--fire); -webkit-mask: url("../img/marca/firma.svg") left center / contain no-repeat; mask: url("../img/marca/firma.svg") left center / contain no-repeat; }
.site-nav { display: flex; align-items: center; gap: .2rem; padding: .3rem; border: 1px solid var(--line); border-radius: 999px; background: rgb(var(--surface-rgb) / .55); box-shadow: inset 0 1px 0 rgb(var(--tint-rgb) / .05); }
.site-nav > a:not(.button) { position: relative; padding: .58rem 1rem; color: var(--muted); border-radius: 999px; font-size: .86rem; font-weight: 560; line-height: 1; text-decoration: none; transition: color .2s ease, background .25s ease, box-shadow .25s ease; }
.site-nav > a:not(.button):hover { color: var(--ink); background: rgb(var(--tint-rgb) / .07); }
.site-nav a[aria-current="page"]:not(.profile-nav-avatar) { color: var(--accent-ink); background: var(--fire); box-shadow: 0 8px 22px -8px rgb(var(--accent-rgb) / .8); }
.site-nav a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.site-nav > a.profile-nav-avatar { padding: 0; margin-inline: .25rem; }
.profile-nav-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; overflow: hidden; border: 2px solid rgb(var(--line-rgb) / .3); border-radius: 50%; background: var(--surface-2); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.profile-nav-avatar:hover, .profile-nav-avatar:focus-visible, .profile-nav-avatar[aria-current="page"] { border-color: var(--sun); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .35); transform: translateY(-1px); outline: none; }
.profile-nav-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
/* Menú móvil: un índice a pantalla completa que se despliega bajo la cabecera
   como un lienzo; cada sección lleva un color de la paleta. */
.site-menu { display: none; }
.site-menu-toggle { min-height: 44px; display: flex; align-items: center; gap: .7rem; padding: 0 1.05rem 0 .95rem; color: var(--ink); border: 1px solid var(--line-strong); background: rgb(var(--surface-rgb) / .8); border-radius: 999px; cursor: pointer; font-size: .76rem; font-weight: 650; letter-spacing: .02em; list-style: none; -webkit-user-select: none; user-select: none; transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .3s ease; }
.site-menu-toggle::-webkit-details-marker { display: none; }
.site-menu-toggle:hover { border-color: rgb(var(--accent-rgb) / .7); background: var(--surface-2); }
.site-menu-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.site-menu[open] .site-menu-toggle { color: var(--accent-ink); border-color: transparent; background: var(--fire); box-shadow: 0 10px 26px -10px rgb(var(--accent-rgb) / .9); }
.site-menu-icon { position: relative; width: 18px; height: 12px; flex: none; display: block; }
.site-menu-icon i { position: absolute; left: 0; width: 100%; height: 1.6px; display: block; background: currentColor; border-radius: 999px; transition: transform .4s var(--ease-out), width .4s var(--ease-out); }
.site-menu-icon i:first-child { top: 2px; }
.site-menu-icon i:last-child { bottom: 2px; width: 60%; }
.site-menu-toggle:hover .site-menu-icon i:last-child, .site-menu[open] .site-menu-icon i:last-child { width: 100%; }
.site-menu[open] .site-menu-icon i:first-child { transform: translateY(3.2px) rotate(45deg); }
.site-menu[open] .site-menu-icon i:last-child { transform: translateY(-3.2px) rotate(-45deg); }
.site-menu-label { display: grid; }
.site-menu-label > span { grid-area: 1 / 1; transition: opacity .2s ease, transform .35s var(--ease-out); }
.site-menu-label > span:last-child, .site-menu[open] .site-menu-label > span:first-child { opacity: 0; transform: translateY(.4em); }
.site-menu[open] .site-menu-label > span:last-child { opacity: 1; transform: none; }
/* La cabecera es el bloque contenedor (sticky): el panel ocupa el resto de la
   pantalla sin depender de position: fixed, que backdrop-filter rompería. */
.site-menu-panel { --menu-gutter: 1.5rem; position: absolute; top: 100%; right: 0; left: 0; height: calc(100vh - var(--header-height) + 1px); height: calc(100dvh - var(--header-height) + 1px); display: flex; flex-direction: column; gap: 2.4rem; padding: clamp(1.4rem, 5vh, 3rem) var(--menu-gutter) calc(1.5rem + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(36rem 28rem at 112% 106%, rgb(var(--accent-rgb) / .22), transparent 68%), radial-gradient(28rem 22rem at -16% 4%, rgb(var(--info-rgb) / .16), transparent 70%), var(--canvas); animation: site-menu-in .55s var(--ease-out); }
.site-menu:not([open]) .site-menu-panel { display: none; }
@keyframes site-menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes site-menu-item { from { opacity: 0; transform: translateY(18px); } }
.site-menu-sections { width: min(100%, 52rem); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.site-menu-sections li { --paint: var(--vermilion); border-bottom: 1px solid var(--line); animation: site-menu-item .65s var(--ease-out) .08s both; }
.site-menu-sections li:nth-child(2) { --paint: var(--cadmium); animation-delay: .14s; }
.site-menu-sections li:nth-child(3) { --paint: var(--phthalo); animation-delay: .2s; }
.site-menu-link { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.9rem minmax(0, 1fr) auto; align-items: center; column-gap: .8rem; padding: 1.3rem 0 1.4rem; color: var(--ink); text-decoration: none; }
.site-menu-link::before { content: ""; position: absolute; z-index: -1; inset: .35rem calc(var(--menu-gutter) * -1); background: linear-gradient(90deg, color-mix(in srgb, var(--paint) 16%, transparent), transparent 78%); opacity: 0; transition: opacity .3s ease; }
.site-menu-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: .5rem; }
.site-menu-index { align-self: start; padding-top: .9rem; color: var(--paint); font-size: .68rem; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.site-menu-copy { min-width: 0; }
.site-menu-copy strong { display: inline-block; padding-right: .12em; font-family: var(--serif); font-size: clamp(2.6rem, 12.5vw, 5.4rem); font-weight: 400; line-height: .95; letter-spacing: -.03em; transition: transform .45s var(--ease-out); }
.site-menu-copy small { display: block; margin-top: .4rem; color: var(--faint); font-size: clamp(.8rem, 1.8vw, 1rem); line-height: 1.3; }
.site-menu-arrow { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 50%; transition: color .25s ease, border-color .25s ease, background .25s ease, transform .45s var(--ease-out); }
.site-menu-arrow svg { width: 18px; height: 18px; }
.site-menu-link:hover::before, .site-menu-link:focus-visible::before { opacity: 1; }
.site-menu-link:hover strong, .site-menu-link:focus-visible strong { transform: translateX(.35rem); }
.site-menu-link:hover .site-menu-arrow, .site-menu-link:focus-visible .site-menu-arrow { color: var(--paint); border-color: var(--paint); transform: translateX(.2rem); }
.site-menu-link[aria-current="page"] strong { color: transparent; background: var(--fire); -webkit-background-clip: text; background-clip: text; font-style: italic; }
.site-menu-link[aria-current="page"] .site-menu-arrow { color: var(--accent-ink); border-color: transparent; background: var(--fire); box-shadow: 0 10px 24px -10px rgb(var(--accent-rgb) / .9); }
.site-menu-private { width: min(100%, 52rem); display: grid; gap: .85rem; margin-top: auto; animation: site-menu-item .65s var(--ease-out) .26s both; }
.site-menu-kicker { display: flex; align-items: center; gap: .45rem; margin: 0; color: var(--faint); font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.site-menu-kicker svg { width: 12px; height: 12px; }
.site-menu-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.site-menu-tile { min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem .7rem .7rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 1.1rem; background: rgb(var(--surface-rgb) / .72); text-decoration: none; transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.site-menu-tile > span:last-child { min-width: 0; }
.site-menu-tile strong, .site-menu-tile small { display: block; }
.site-menu-tile strong { font-size: .92rem; font-weight: 650; line-height: 1.2; }
.site-menu-tile small { margin-top: .15rem; color: var(--faint); font-size: .7rem; line-height: 1.3; }
.site-menu-tile img, .site-menu-tile-mark { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.site-menu-tile img { display: block; object-fit: cover; border: 2px solid rgb(var(--line-rgb) / .3); box-shadow: 0 8px 20px -8px rgb(var(--accent-rgb) / .8); }
.site-menu-tile-mark { display: grid; place-items: center; color: var(--ink); background: var(--dusk); box-shadow: 0 8px 20px -8px rgb(var(--violet-rgb) / .8); }
.site-menu-tile-mark svg { width: 20px; height: 20px; }
.site-menu-tile:hover, .site-menu-tile:focus-visible { border-color: rgb(var(--accent-rgb) / .6); background: var(--surface-2); outline: none; }
.site-menu-tile:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.site-menu-tile[aria-current="page"] { border-color: rgb(var(--sun-rgb) / .65); background: var(--surface-2); }
.site-menu-tile[aria-current="page"] img { border-color: var(--sun); }

/* Botones y enlaces ----------------------------------------------------------- */
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .72rem 1.15rem; color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .86rem; line-height: 1; text-decoration: none; transition: transform .25s var(--ease-out), background .25s ease, background-position .45s ease, border-color .25s ease, box-shadow .25s ease, color .2s ease; }
.button:hover { transform: translateY(-1px); border-color: rgb(var(--accent-rgb) / .6); }
.button:active { transform: translateY(0) scale(.98); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .scale-callout:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.button-primary { color: var(--accent-ink); border-color: transparent; background: var(--fire); background-size: 160% 100%; background-position: 0 0; box-shadow: 0 10px 26px -10px rgb(var(--accent-rgb) / .85), inset 0 1px 0 rgb(255 255 255 / .28); }
.button-primary:hover { color: var(--accent-ink); border-color: transparent; background-position: 100% 0; box-shadow: 0 16px 34px -12px rgb(var(--accent-rgb) / .95), inset 0 1px 0 rgb(255 255 255 / .32); }
.button-secondary { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); }
.button-secondary:hover { border-color: rgb(var(--accent-rgb) / .65); background: var(--surface-3); }
.button-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button-ghost:hover { color: var(--ink); background: rgb(var(--tint-rgb) / .05); }
.button-glass { color: var(--ink); background: rgb(var(--tint-rgb) / .07); border-color: rgb(var(--tint-rgb) / .2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.button-glass:hover { background: rgb(var(--tint-rgb) / .13); border-color: rgb(var(--tint-rgb) / .38); }
.button-danger { color: #ffd5e0; background: rgb(var(--danger-rgb) / .14); border-color: rgb(var(--danger-rgb) / .55); }
.button-danger:hover { border-color: var(--danger); background: rgb(var(--danger-rgb) / .22); }
.button-small { min-height: 38px; padding: .62rem .9rem; font-size: .78rem; }
.button-block { width: 100%; }
.text-link { color: var(--accent-light); text-decoration-thickness: 1px; text-underline-offset: .25em; }
.text-link:hover { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.3rem; color: var(--muted); font-size: .82rem; text-decoration: none; transition: color .2s ease, gap .3s var(--ease-out); }
.back-link:hover { color: var(--ink); gap: .65rem; }
.eyebrow { margin: 0 0 .6rem; color: var(--accent-light); font-size: .68rem; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }

.flash-stack { position: fixed; z-index: 80; top: calc(var(--header-height) + 14px); right: 1.5rem; display: grid; gap: .5rem; width: min(390px, calc(100% - 3rem)); }
.flash { padding: .85rem 1rem; border: 1px solid var(--line-strong); background: rgb(var(--surface-rgb) / .94); backdrop-filter: blur(14px); border-radius: .8rem; box-shadow: var(--shadow); font-size: .88rem; animation: flash-in .5s var(--ease-out); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
.flash-success { border-color: rgb(var(--success-rgb) / .7); }
.flash-error { border-color: rgb(var(--danger-rgb) / .8); }


.detail-header h1, .form-header h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(3.1rem, 7vw, 7.4rem); font-weight: 400; letter-spacing: -.025em; line-height: .92; }

.field > span, .museum-controls label > span { display: block; margin: 0 0 .35rem .15rem; color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
input, select, textarea { width: 100%; color: var(--ink); border: 1px solid var(--line-strong); background: rgb(var(--surface-rgb) / .9); border-radius: .55rem; }
input, select { min-height: 44px; padding: .65rem .75rem; }
textarea { resize: vertical; padding: .8rem; line-height: 1.6; }
.field-help { display: block; margin: .45rem .15rem 0; color: var(--faint); font-size: .66rem; }
input::placeholder, textarea::placeholder { color: #6f7392; }
select { padding-right: 2rem; }

.series-form { max-width: 760px; display: grid; gap: 1.25rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); background: var(--surface); border-radius: .85rem; }

.empty-state { min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h1, .empty-state h2 { margin: .5rem 0; font-family: var(--serif); font-size: 2rem; }
.empty-state p { margin: 0 0 1.5rem; color: var(--muted); }
.empty-glyph { color: var(--accent); font-family: var(--serif); font-size: 4rem; }

/* La ficha se tiñe con el color de la propia obra, como su tarjeta en Colección. */
.detail-page { --art-glow: var(--art-rgb, var(--accent-rgb)); background: radial-gradient(60rem 34rem at 28% 0%, rgb(var(--art-glow) / .17), transparent 70%); }
.detail-page .eyebrow { color: color-mix(in srgb, var(--art, var(--accent)) 60%, white); }
.detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.detail-header h1 { max-width: 1050px; font-size: clamp(3rem, 6vw, 6.7rem); }
.detail-subtitle { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin: 1.15rem 0 0; color: var(--muted); }
.detail-subtitle span:not(:first-child)::before { content: "·"; margin-right: .7rem; color: var(--faint); }
.detail-actions { display: flex; flex: none; gap: .65rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.viewer-column { min-width: 0; }
.viewer-frame { position: relative; overflow: hidden; border: 1px solid rgb(var(--art-glow, var(--line-rgb)) / .28); background: var(--canvas-deep); border-radius: .8rem; box-shadow: 0 40px 90px -50px rgb(var(--art-glow, var(--accent-rgb)) / .8); }
.osd-viewer { width: 100%; height: min(72vh, 850px); min-height: 520px; background: var(--canvas-deep); }
.viewer-hint { position: absolute; z-index: 5; right: .75rem; bottom: .75rem; left: .75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .75rem; pointer-events: none; color: rgba(255,255,255,.72); background: rgb(var(--canvas-rgb) / .74); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); border-radius: .45rem; font-size: .68rem; }
.viewer-hint button { padding: .2rem; pointer-events: auto; color: white; border: 0; background: none; cursor: pointer; }
.viewer-empty { min-height: 520px; display: grid; place-items: center; color: var(--faint); border: 1px solid var(--line); background: var(--surface); border-radius: .8rem; }
.image-strip { display: flex; gap: .65rem; padding-top: .75rem; overflow-x: auto; }
.image-thumb { width: 64px; height: 64px; flex: none; overflow: hidden; padding: 0; border: 2px solid transparent; background: var(--surface); border-radius: .4rem; cursor: pointer; }
.image-thumb.is-active { border-color: var(--accent-light); }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }

.artwork-facts { position: sticky; top: 94px; display: grid; gap: 1rem; padding: 1.2rem; border: 1px solid var(--line); background: var(--surface); border-radius: .8rem; }
.status-line { display: flex; align-items: center; gap: .55rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .77rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status, var(--faint)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status, var(--faint)) 18%, transparent); }
/* Un color por estado de la obra, compartido por la ficha y las tarjetas de Colección. */
.status-sold { --status: var(--alizarin); }
.status-available { --status: var(--terre-verte); }
.status-reserved, .status-studio { --status: var(--cadmium); }
.status-artist_collection { --status: var(--ultramarine); }
.status-private { --status: var(--violet); }
.status-heritage { --status: var(--orange); }
.status-institutional { --status: var(--phthalo); }
.status-gifted { --status: #ff8fb1; }
.artwork-facts dl { display: grid; gap: .85rem; margin: 0; }
.artwork-facts dl div { display: grid; grid-template-columns: 92px 1fr; gap: .6rem; }
.artwork-facts dt { color: var(--faint); font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; }
.artwork-facts dd { margin: 0; color: var(--ink); font-size: .8rem; text-align: right; }
.fact-link { color: var(--accent-light); text-underline-offset: .2em; }
.scale-callout { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; margin-top: .35rem; padding: .85rem; color: var(--ink); text-align: left; border: 1px solid rgb(var(--accent-rgb) / .35); background: rgb(var(--accent-rgb) / .08); border-radius: .6rem; cursor: pointer; text-decoration: none; }
.scale-callout strong, .scale-callout small { display: block; }
.scale-callout strong { font-size: .76rem; }
.scale-callout small { margin-top: .2rem; color: var(--muted); font-size: .62rem; line-height: 1.4; }
.scale-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--accent-light); border: 1px solid rgb(var(--accent-rgb) / .4); border-radius: 50%; }
.scale-missing { border-color: var(--line); background: rgba(255,255,255,.02); }

.story-section { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: clamp(3rem, 8vw, 9rem); padding-top: 5rem; padding-bottom: 7rem; }
.prose { color: #c8c6d4; font-family: var(--serif-text); font-size: clamp(1.12rem, 1.8vw, 1.4rem); line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent-light); }
.story-notes { align-self: start; padding: 1.25rem; border-top: 1px solid var(--accent); background: linear-gradient(rgb(var(--accent-rgb) / .06), transparent); }
.story-notes h2 { font-family: var(--serif); font-size: 1.2rem; }
.story-notes p { color: var(--muted); font-size: .82rem; white-space: pre-line; }

.form-page { padding-block: 3.5rem 6rem; }
.form-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.form-header h1 { font-size: clamp(2.8rem, 5vw, 5.2rem); }
.record-id { color: var(--faint); font-family: ui-monospace, monospace; font-size: .72rem; }
.artwork-form { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 1.2rem; align-items: start; }
.form-main { display: grid; gap: 1.2rem; }
.form-sidebar { position: sticky; top: 94px; display: grid; gap: 1.2rem; }
.form-section { padding: clamp(1.1rem, 2.5vw, 2rem); border: 1px solid var(--line); background: var(--surface); border-radius: .8rem; }
.form-section > h2 { margin: 0 0 1.2rem; font-family: var(--serif); font-size: 1.35rem; }
.form-section-title { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.65rem; }
.form-section-title > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--accent-light); border: 1px solid rgb(var(--accent-rgb) / .4); border-radius: 50%; font-family: var(--serif); font-size: .74rem; }
.form-section-title h2 { margin: 0; font-family: var(--serif); font-size: 1.5rem; }
.form-section-title p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; }
.dimension-ratio-notice { margin-top: 1rem; padding: .85rem 1rem; color: #ffd9c9; border: 1px solid rgb(var(--accent-rgb) / .55); border-left: 3px solid var(--accent-light); border-radius: .45rem; background: rgb(var(--accent-rgb) / .09); font-size: .74rem; }
.dimension-ratio-notice strong { display: block; color: var(--accent-light); }
.dimension-ratio-notice p { margin: .35rem 0 0; line-height: 1.55; }
.dimension-ratio-suggestion { color: var(--ink); font-weight: 650; }
.dimension-field-hint { display: block; margin: .45rem .15rem 0; color: var(--accent-light); font-size: .66rem; line-height: 1.4; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-wide { grid-column: 1 / -1; }
.field { display: block; margin-top: 1rem; }
.field-grid > .field { margin-top: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface-2); }
.artwork-story-field { --ck-color-base-background: var(--surface-2); --ck-color-base-foreground: var(--surface); --ck-color-base-border: rgb(var(--line-rgb) / .24); --ck-color-base-text: var(--ink); --ck-color-focus-border: var(--accent); --ck-color-button-default-hover-background: rgb(var(--accent-light-rgb) / .12); --ck-color-button-on-background: rgb(var(--accent-light-rgb) / .18); --ck-color-button-on-color: var(--accent-light); --ck-color-list-background: var(--surface-2); --ck-color-panel-background: var(--surface-2); --ck-color-input-background: var(--canvas-raised); --ck-color-input-text: var(--ink); --ck-color-shadow-drop: rgba(0, 0, 0, .5); }
.artwork-story-field .ck.ck-editor { margin-top: .1rem; }
.artwork-story-field .ck.ck-toolbar { border-radius: .55rem .55rem 0 0; }
.artwork-story-field .ck.ck-editor__main > .ck-editor__editable { min-height: 320px; padding: 1rem 1.25rem; color: var(--ink); background: rgb(var(--canvas-raised-rgb) / .96); border-radius: 0 0 .55rem .55rem; font-family: var(--serif-text); font-size: 1.04rem; line-height: 1.7; }
.artwork-story-field .ck.ck-editor__main > .ck-editor__editable.ck-focused { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.artwork-story-field .ck-content blockquote { color: #c6c5d2; border-left-color: var(--accent); }
.artwork-story-field .ck-content a { color: var(--accent-light); }
.artwork-story-field .ck-source-editing-area textarea { min-height: 320px; color: var(--ink); background: var(--canvas-deep); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.artwork-story-field.editor-fallback textarea { min-height: 320px; }
.upload-dropzone { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); background: rgba(255,255,255,.015); border-radius: .65rem; cursor: pointer; }
.upload-dropzone:hover { border-color: var(--accent); background: rgb(var(--accent-rgb) / .05); }
.upload-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-dropzone strong { color: var(--ink); font-size: .84rem; }
.upload-dropzone small { margin-top: .2rem; font-size: .65rem; }
.file-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .55rem; margin-top: .65rem; }
.file-preview-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .45rem; background: rgba(255,255,255,.025); }
.file-preview-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.file-preview-card figcaption { overflow: hidden; padding: .4rem; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-gallery-dialog { width: min(980px, calc(100vw - 2rem)); max-width: none; max-height: min(900px, calc(100dvh - 2rem)); margin: auto; padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .85rem; background: var(--surface); box-shadow: var(--shadow); }
.profile-gallery-dialog::backdrop { background: rgba(0, 0, 0, .84); backdrop-filter: blur(8px); }
.profile-gallery-inner { display: grid; gap: 1rem; padding: 1rem; }
.profile-gallery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.profile-gallery-head h2 { margin: .2rem 0 .25rem; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 500; }
.profile-gallery-head p:last-child { margin: 0; color: var(--muted); font-size: .7rem; }
.profile-gallery-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; min-height: min(68dvh, 650px); }
.profile-gallery-stage figure { display: grid; justify-items: center; gap: .55rem; min-width: 0; margin: 0; }
.profile-gallery-stage img { display: block; width: auto; max-width: 100%; max-height: min(68dvh, 650px); object-fit: contain; border-radius: .45rem; background: var(--canvas-deep); }
.profile-gallery-stage figcaption { max-width: 80%; color: var(--muted); font-size: .72rem; text-align: center; }
.profile-gallery-nav { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-raised); cursor: pointer; font-size: 1.35rem; }
.profile-gallery-nav:hover:not(:disabled), .profile-gallery-nav:focus-visible { color: var(--accent-light); border-color: var(--accent); }
.profile-gallery-nav:disabled { opacity: .35; cursor: default; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: .65rem; color: var(--accent-light); border: 1px solid rgb(var(--accent-rgb) / .4); border-radius: 50%; font-size: 1.25rem; }
[data-upload-name]:not(:empty) { margin-top: .6rem; color: var(--accent-light); font-size: .7rem; }
.existing-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.existing-image { overflow: hidden; border: 1px solid var(--line); border-radius: .45rem; }
.existing-image > a { display: block; }
.existing-image img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }
.existing-image span { display: flex; align-items: center; gap: .3rem; padding: .35rem; color: var(--muted); font-size: .62rem; }
.existing-image input { width: auto; min-height: auto; }
.switch-row { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; margin-top: 1rem; cursor: pointer; }
.switch-row > input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 40px; height: 23px; position: relative; display: inline-block; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 999px; transition: .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: var(--muted); border-radius: 50%; transition: .2s; }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { left: 20px; background: var(--accent-ink); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--focus); outline-offset: 3px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: .77rem; }
.switch-row small { margin-top: .15rem; color: var(--faint); font-size: .62rem; }
.form-actions { display: grid; gap: .55rem; }
.archive-zone { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding: 1.2rem 1.4rem; border: 1px solid rgb(var(--danger-rgb) / .35); border-radius: .8rem; }
.archive-zone h2 { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.archive-zone p { margin: .15rem 0 0; color: var(--muted); font-size: .74rem; }
.archive-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.artwork-process-editor { display: grid; gap: 1rem; margin-top: 2rem; }
.artwork-process-editor .form-section-title { margin-bottom: .25rem; }
.artwork-process-list { display: grid; gap: .8rem; }
.artwork-process-entry { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); background: rgba(255,255,255,.015); border-radius: .6rem; }
.artwork-process-entry > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.artwork-process-entry h3 { margin: .15rem 0 0; font-family: var(--serif); font-size: 1.15rem; }
.artwork-process-comment { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.55; white-space: pre-line; }
.artwork-process-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .55rem; }
.artwork-process-images a { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: .4rem; }
.artwork-process-images img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.artwork-process-images small { position: absolute; right: .25rem; bottom: .25rem; padding: .2rem .3rem; color: #d2f5e1; background: rgb(7 26 18 / .9); border-radius: .25rem; font-size: .55rem; }
.artwork-process-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.artwork-process-actions details { flex: 1 1 250px; border-top: 1px solid var(--line); }
.artwork-process-actions summary, .artwork-process-new > summary { padding: .65rem 0; color: var(--accent-light); cursor: pointer; font-size: .72rem; font-weight: 700; }
.artwork-process-actions form, .artwork-process-new form { display: grid; gap: .6rem; padding-top: .5rem; }
.artwork-process-empty { margin: 0; padding: .9rem; color: var(--muted); border: 1px dashed var(--line); border-radius: .5rem; font-size: .75rem; }
.artwork-process-new { padding: .8rem 1rem; border: 1px solid rgb(var(--accent-rgb) / .32); border-radius: .6rem; }

.fullscreen-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; color: var(--ink); border: 0; background: var(--canvas); }
.fullscreen-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.fullscreen-dialog[open] { display: grid; grid-template-rows: auto 1fr; }
.dialog-bar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); background: rgb(var(--canvas-rgb) / .95); }
.dialog-bar small, .dialog-bar strong { display: block; }
.dialog-bar small { color: var(--accent-light); font-size: .57rem; font-weight: 800; letter-spacing: .15em; }
.dialog-bar strong { margin-top: .15rem; font-family: var(--serif); font-size: 1rem; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; flex: none; color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 50%; cursor: pointer; font-size: 1.4rem; }
.osd-viewer-full { width: 100%; height: 100%; min-height: 0; }

.museum-dialog[open] { grid-template-rows: auto 1fr auto; }
.museum-bar { position: relative; z-index: 2; flex-wrap: wrap; background: rgb(var(--canvas-rgb) / .92); backdrop-filter: blur(18px); }
.museum-controls { display: flex; align-items: flex-end; gap: .7rem; }
.museum-controls label { min-width: 180px; }
.museum-controls select { min-height: 38px; padding-block: .45rem; font-size: .72rem; }
.museum-scene-reference { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.museum-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; isolation: isolate; padding: clamp(.35rem, 1.4vw, 1.15rem); background: radial-gradient(circle at 50% 42%, #1a1f3a 0, var(--canvas) 62%, var(--canvas-deep) 100%); }
.museum-stage::before { content: ""; position: absolute; z-index: -1; inset: 3% 2%; border: 1px solid rgb(var(--accent-light-rgb) / .07); border-radius: .5rem; box-shadow: inset 0 0 100px rgba(0,0,0,.48), 0 30px 90px rgba(0,0,0,.42); pointer-events: none; }
#museum-scene { width: 100%; height: 100%; max-width: 1680px; max-height: calc(100dvh - 145px); opacity: .82; filter: drop-shadow(0 30px 48px rgba(0,0,0,.42)); transform: scale(.996); transform-origin: center; transition: opacity .42s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
#museum-scene.is-rendered { opacity: 1; transform: none; }
.scale-3d-stage { isolation: isolate; }
.scale-3d-stage #museum-scene { max-width: none; max-height: none; opacity: 1; transform: none; filter: none; cursor: default; }
.scale-3d-stage #museum-scene:focus-visible { outline: 2px solid var(--focus); outline-offset: -5px; }
.scale-3d-fallback { position: absolute; inset: 1rem; display: grid; place-items: center; padding: 1rem; color: var(--muted); border: 1px solid rgb(var(--accent-rgb) / .25); background: rgb(var(--canvas-raised-rgb) / .88); border-radius: .6rem; text-align: center; }
.scale-3d-fallback[hidden] { display: none; }
.museum-plaque { cursor: help; outline: none; }
.museum-plaque-dialog { width: min(680px, calc(100vw - 2rem)); max-width: none; padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .7rem; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.museum-plaque-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.museum-plaque-dialog-content { display: grid; gap: 1rem; padding: 1.4rem 1.6rem 1.6rem; }
.museum-plaque-dialog-content h2 { margin: -.5rem 0 0; font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.museum-plaque-dialog-content dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; margin: 0; }
.museum-plaque-dialog-content dl div { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .35rem; background: rgba(255,255,255,.02); }
.museum-plaque-dialog-content dt { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
.museum-plaque-dialog-content dd { margin: .18rem 0 0; font-size: .82rem; }
.museum-legend { position: relative; z-index: 2; min-height: 48px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem 1.6rem; padding: .6rem 1rem; color: var(--muted); border-top: 1px solid var(--line); background: rgb(var(--surface-rgb) / .97); font-size: .64rem; }
.museum-legend i { width: 12px; height: 12px; display: inline-block; margin-right: .3rem; vertical-align: -2px; }
.legend-art { border: 2px solid var(--accent); }
.legend-eye { border: 1px solid var(--muted); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--surface); }

/* Pie ------------------------------------------------------------------------ */
.site-footer { position: relative; min-height: 120px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: 2rem max(1.5rem, calc((100vw - 1520px) / 2)); color: var(--faint); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgb(var(--accent-rgb) / .045)); font-size: .7rem; }
.site-footer-brand { display: inline-flex; align-items: center; gap: 1rem; }
.site-footer-signature { width: 150px; height: 34px; display: block; background: var(--fire); -webkit-mask: url("../img/marca/firma.svg") left center / contain no-repeat; mask: url("../img/marca/firma.svg") left center / contain no-repeat; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; }
.site-footer-nav a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.site-footer-nav a:hover { color: var(--accent-light); }

@media (max-width: 1180px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .artwork-form { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 1040px) {
  .site-nav { display: none; }
  .site-menu { display: block; }
  html:has(.site-menu[open]) { overflow: hidden; }
  .site-header:has(.site-menu[open]) { background: var(--canvas); }
}

@media (max-width: 820px) {
  :root { --header-height: 64px; }
  .page-shell { width: min(100% - 1.5rem, 1520px); }
  .site-header { padding-inline: .75rem; }
  .site-brand { gap: .6rem; }
  .site-brand-eye { width: 36px; height: 36px; }
  .site-brand-signature { width: 120px; height: 26px; }
  .site-menu-panel { --menu-gutter: .75rem; }
  .detail-header { align-items: flex-start; flex-direction: column; padding-top: 2rem; }
  .detail-actions { width: 100%; }
  .detail-actions .button { flex: 1; }
  .detail-layout { grid-template-columns: 1fr; }
  .osd-viewer { min-height: 55vh; height: 55vh; }
  .artwork-facts, .form-sidebar { position: static; }
  .story-section { grid-template-columns: 1fr; gap: 2rem; padding-top: 3.5rem; }
  .artwork-form { grid-template-columns: 1fr; }
  .form-sidebar { grid-row: 1; }
  .museum-bar > div:first-child { width: 100%; min-width: 0; display: block; }
  .museum-bar > div:first-child small { display: none; }
  .museum-bar > div:first-child strong { overflow: hidden; margin: 0; font-size: .76rem; white-space: nowrap; text-overflow: ellipsis; }
  .museum-bar { min-height: 64px; padding: .65rem .75rem; }
  .museum-controls { width: 100%; }
  .museum-controls label { min-width: 0; flex: 1; }
  .museum-stage { padding: .35rem; }
  #museum-scene { max-height: none; }
}

@media (max-width: 540px) {
  .detail-header h1 { font-size: 3.2rem; }
  .detail-actions { flex-direction: column; }
  .viewer-hint span { display: none; }
  .viewer-hint { left: auto; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .archive-zone, .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer { justify-content: center; gap: .8rem; padding-block: 1.6rem; }
  .artwork-process-entry > header { flex-direction: column; }
  .museum-controls { display: grid; grid-template-columns: 1fr 1fr auto; }
  .museum-controls select { padding-inline: .55rem 1.5rem; }
  .museum-stage::before { inset: .35rem; }
  .museum-legend span:last-child { display: none; }
}

@media (max-width: 460px) {
  .site-menu-tile { align-items: flex-start; flex-direction: column; gap: .6rem; padding: .8rem; }
}

@media (max-width: 359px) {
  .site-menu-label { display: none; }
  .site-menu-toggle { width: 44px; justify-content: center; padding: 0; }
}

@media (max-width: 720px) {
  .profile-gallery-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .profile-gallery-inner { padding: .65rem; }
  .profile-gallery-stage { grid-template-columns: 2rem minmax(0, 1fr) 2rem; gap: .3rem; min-height: 0; }
  .profile-gallery-stage img { max-height: 68dvh; }
  .profile-gallery-nav { width: 2rem; height: 2rem; font-size: 1rem; }
}

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