/* THE INFRANET — base. Black & white. The site is the work. */
@import url("https://fonts.googleapis.com/css2?family=Michroma&family=JetBrains+Mono:wght@300;400;500;700&display=swap");

:root {
  --bg: #000000;
  --fg: #f2f2f2;
  --dim: #7a7a7a;
  --dimmer: #3a3a3a;
  --line: rgba(242, 242, 242, 0.14);
  --line-soft: rgba(242, 242, 242, 0.07);
  --title: "Michroma", "Archivo Black", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --gut: clamp(18px, 4vw, 64px);
  --wrap: 1600px;
  /* extra space left/right of the wrap box on wide screens (0 until >1600px) */
  --wrap-edge: max(0px, calc((100% - var(--wrap)) / 2));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

::selection { background: var(--fg); color: var(--bg); }

/* custom page scrollbar (window) — more visible than the faint panel ones */
/* auto-hide: the scrollbar only shows while actively scrolling (.scrolling on
   <html>, toggled in app.js), then fades away when idle. */
html { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html.scrolling { scrollbar-color: rgba(242, 242, 242, 0.28) transparent; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: transparent; border: 2px solid var(--bg); }
html.scrolling::-webkit-scrollbar-thumb { background: rgba(242, 242, 242, 0.28); }
html.scrolling::-webkit-scrollbar-thumb:hover { background: rgba(242, 242, 242, 0.55); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--mono); color: var(--fg); background: none; border: none; cursor: pointer; letter-spacing: 0.12em; }

/* ---------- persistent overlays (grain / scanlines / letterbox / HUD) ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 9000; }

#grain {
  z-index: 9001;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1%); }
  66% { transform: translate(1%, -2%); }
  100% { transform: translate(0, 0); }
}

#scanlines {
  z-index: 9002;
  opacity: 0.5;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0, 0, 0, 0.28) 3px, transparent 4px);
  mix-blend-mode: multiply;
}

.letterbox { position: fixed; left: 0; right: 0; height: 26px; background: var(--bg); z-index: 8800; pointer-events: none; }
.letterbox.top { top: 0; border-bottom: 1px solid var(--line-soft); }
.letterbox.bot { bottom: 0; border-top: 1px solid var(--line-soft); }

/* corner HUD ticks */
.hud { position: fixed; z-index: 8810; font-size: 9.5px; letter-spacing: 0.22em; color: var(--dim); pointer-events: none; }
.hud.tl { top: 34px; left: calc(var(--wrap-edge) + var(--gut)); }
.hud.tr { top: 34px; right: calc(var(--wrap-edge) + var(--gut)); text-align: right; }
.hud.bl { bottom: 34px; left: calc(var(--wrap-edge) + var(--gut)); }
.hud.br { bottom: 34px; right: calc(var(--wrap-edge) + var(--gut)); text-align: right; }
@media (max-width: 720px) { .hud.bl, .hud.br { display: none; } }

/* ---------- liquid flow canvas (above content, below nav/overlays) ---------- */
#flow { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

/* ---------- top nav ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8600;
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gut) 14px;
  mix-blend-mode: difference;
}
.nav-left { display: flex; align-items: center; min-width: 0; }
.brand { font-family: var(--title); font-size: clamp(11px, 1vw, 14px); letter-spacing: 0.18em; color: #fff; white-space: nowrap; }
.boot-code { margin-left: 16px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.3em; color: var(--dim); white-space: nowrap; opacity: 0; transition: opacity 0.25s var(--ease); }
.boot-code.on { opacity: 1; }
@media (max-width: 620px) { .boot-code { display: none; } }
.brand .dot { display: inline-block; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.nav-right { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 28px); }
.nav-links { display: flex; gap: clamp(10px, 1.6vw, 26px); font-size: 10.5px; letter-spacing: 0.16em; color: #fff; }
.nav-links a { position: relative; padding: 4px 0; opacity: 0.6; transition: opacity 0.4s var(--ease); }
.nav-links a .num { color: #fff; opacity: 0.5; margin-right: 5px; font-size: 9px; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: #fff; }

.nav-toggle { display: none; font-size: 11px; letter-spacing: 0.2em; color: #fff; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }

  /* MENU = solid-black panel anchored at the top, under the fixed nav bar.
     Closed: pulled up out of view. Open: drops to top:0 and PUSHES the whole
     page down by its own height (no overlay — the content slides, doesn't hide). */
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; z-index: 8550;
    flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 26px;
    padding: 78px var(--gut) 40px;
    background: #000;
    font-size: 15px;
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    mix-blend-mode: normal;
  }
  body.menu-open .nav-links { transform: translateY(0); }

  /* the push: page content glides down by the menu's measured height */
  #app { transition: transform 0.6s var(--ease); will-change: transform; }
  body.menu-open #app { transform: translateY(var(--menu-h, 60vh)); }
}

/* ---------- audio bar ---------- */
#audiobar { display: flex; align-items: center; color: #fff; }
#audiobar .a-btn { display: flex; align-items: center; gap: 9px; font-size: 9.5px; letter-spacing: 0.18em; }
.bars { display: flex; align-items: center; gap: 2px; height: 14px; }
.bars i { width: 2px; height: 3px; background: #fff; display: block; transition: height 0.18s var(--ease), opacity 0.6s var(--ease); }
/* resting EQ silhouette — a peaked shape (not flat dots) so a muted bar still
   reads as "sound lives here". When playing, the analyser sets inline heights
   that override these; when muted/idle the JS clears them so this shows. */
.bars i:nth-child(1) { height: 4px; }
.bars i:nth-child(2) { height: 8px; }
.bars i:nth-child(3) { height: 5px; }
.bars i:nth-child(4) { height: 12px; }
.bars i:nth-child(5) { height: 6px; }
.bars i:nth-child(6) { height: 9px; }
.bars i:nth-child(7) { height: 4px; }
/* the class just dims the silhouette over the same 0.6s as MUTE_FADE. */
#audiobar.off .bars i { opacity: 0.4; }

/* ---------- page transition veil ---------- */
#veil {
  position: fixed; inset: 0; z-index: 8500; background: #000;
  pointer-events: none; opacity: 0;
  display: flex; align-items: center; justify-content: center;
}
#veil .v-code { font-size: 11px; letter-spacing: 0.3em; color: var(--dim); }

/* ---------- page container ---------- */
#app { position: relative; z-index: 10; min-height: 100vh; will-change: transform; }
/* liquid: content shares the header's gutter, capped to the wrap box and centred */
.page { padding: 92px var(--gut) 110px; max-width: var(--wrap); margin: 0 auto; }
.page.is-enter { animation: pageIn 0.7s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- typography helpers ---------- */
.kicker { font-size: 10px; letter-spacing: 0.34em; color: var(--dim); text-transform: uppercase; }
.display { font-family: var(--title); font-weight: 400; line-height: 1.02; text-transform: uppercase; }
.h1 { font-size: clamp(34px, 7vw, 104px); letter-spacing: 0.01em; }
.h2 { font-size: clamp(22px, 3.4vw, 48px); letter-spacing: 0.02em; }
.h3 { font-family: var(--title); font-size: clamp(15px, 1.7vw, 24px); letter-spacing: 0.04em; line-height: 1.2; }
.lead { font-size: clamp(14px, 1.25vw, 18px); line-height: 1.85; color: #d8d8d8; max-width: 62ch; font-weight: 300; }
.body { font-size: 13.5px; line-height: 1.85; color: var(--dim); max-width: 64ch; font-weight: 300; }
.meta { font-size: 10px; letter-spacing: 0.2em; color: var(--dim); text-transform: uppercase; }
.rule { height: 1px; background: var(--line); border: 0; }

/* glitch text spans (set by glitch.js) */
.gl { display: inline-block; }
.scramble { font-variant-ligatures: none; }

/* ---------- INDEX / portal-terminal ---------- */
.portal {
  position: relative; min-height: 100vh; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(96px, 13vh, 150px) var(--gut) clamp(56px, 8vh, 90px);
  display: flex; flex-direction: column; justify-content: space-between; gap: clamp(28px, 5vh, 70px);
}
.portal-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.portal-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; transform: scale(1.06); }
.portal-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0.2), rgba(0,0,0,0.86) 75%); }

.portal-head { position: static; }
.portal-title { font-family: var(--title); font-size: clamp(20px, 7.5vw, 92px); line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.portal-title span { display: inline; }
.portal-tag { margin-top: 20px; font-size: clamp(9.5px, 1vw, 12px); letter-spacing: 0.32em; color: var(--dim); }

.portal-menu { position: static; }
.portal-menu .pm-rule { margin-bottom: 8px; }
.pm-item {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: baseline; gap: 18px;
  padding: 15px 0; border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.45s var(--ease), background 0.45s var(--ease);
}
.pm-item:hover { padding-left: 20px; }
.pm-item .pm-n { font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.pm-item .pm-label { font-family: var(--title); font-size: clamp(15px, 2.3vw, 30px); letter-spacing: 0.03em; text-transform: uppercase; transition: letter-spacing 0.45s var(--ease); }
.pm-item:hover .pm-label { letter-spacing: 0.1em; }
.pm-item .pm-sub { font-size: 9.5px; letter-spacing: 0.24em; color: var(--dimmer); text-transform: uppercase; }
.pm-item:hover .pm-sub { color: var(--dim); }

/* ---------- INDEX / archive list under the portal ---------- */
.portal-archive { position: relative; background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.92) 22%); }
.portal-archive > .rule { margin: 18px 0 28px; }
.pa-head { display: flex; align-items: center; gap: 14px; }
.pa-head .pm-n { font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.pa-head > .meta { margin: 0; }
.pa-head .pa-all { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 10px; letter-spacing: 0.18em; color: var(--dim); transition: color 0.3s var(--ease); }
.pa-head .pa-all:hover { color: var(--fg); }
.portal-archive .arch-section { margin-bottom: 0; }

/* ---------- generic page header ---------- */
.phead { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 56px; }
.phead .h1 { margin-top: 6px; }
.phead .lead { margin-top: 16px; max-width: 92ch; }

/* media block with warp hook */
.media { position: relative; overflow: hidden; background: #0a0a0a; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s var(--ease); }
.warp.warping .media img { visibility: hidden; }   /* OGL draws it while hovered */

/* ---------- glitch image loader ---------- */
/* wrapper injected around images that have no .media/.portal-bg container */
.img-load { position: relative; display: block; overflow: hidden; background: #0a0a0a; }
.post-gallery .img-load { break-inside: avoid; margin: 0 0 30px; }
.post-gallery .img-load .post-photo { margin: 0; }
/* hide the image until it has decoded; fade in on reveal */
.loading img { opacity: 0; }
.img-load img { transition: opacity 0.6s var(--ease); }
.portal-bg img { transition: opacity 0.8s var(--ease); }
/* the overlay of rapid white bars */
.img-glitch {
  position: absolute; inset: 0; z-index: 3; overflow: hidden;
  pointer-events: none; background: #0a0a0a;
}
.img-glitch.gone { opacity: 0; transition: opacity 0.4s var(--ease); }
.img-glitch i {
  position: absolute; display: block; left: 0; width: 100%; height: 1px;
  background: #fff; opacity: 0;   /* pure 1px lines, no glow */
}
/* failed load: glitch stays, faintly desaturated so it reads as an error */
.failed .img-glitch i { background: #d8d8d8; }

/* TEMP — YouTube vs Cloudinary comparison block */
.vid-compare { margin-bottom: 24px; }
.vid-compare .meta { margin-bottom: 10px; }
.yt-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #000; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- fulldome movie ---------- */
.post-hero .media, .fulldome .post-hero .media { aspect-ratio: 16 / 9; }
.fd-specs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  margin: 28px 0 4px;
}
.fd-spec {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(16px, 2.2vw, 28px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.fd-spec .fd-k { font-size: 9.5px; letter-spacing: 0.24em; color: var(--dim); }
.fd-spec .fd-v { font-family: var(--title); font-size: clamp(15px, 1.7vw, 24px); line-height: 1; letter-spacing: 0.01em; }
@media (max-width: 760px) { .fd-specs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .fd-specs { grid-template-columns: 1fr; } }

/* description — three columns, one paragraph each (para 1 = column 1) */
.fd-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 52px); margin-top: clamp(30px, 4vw, 52px); align-items: start; }
.fd-cols .lead, .fd-cols .body { margin: 0; }
@media (max-width: 900px) { .fd-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .fd-cols { grid-template-columns: 1fr; } }

/* dome master gallery — two large columns */
.frames-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.5vw, 22px); }
.frames-grid .media, .frame .media { aspect-ratio: 1 / 1; }
@media (max-width: 620px) { .frames-grid { grid-template-columns: 1fr; } }

/* ---------- shared list layouts (driven by UI-kit cards) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 18px); }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .card-grid { grid-template-columns: 1fr; } }
.live-list { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 84px); }

/* ---------- research lab ---------- */
/* fractal as a full-bleed header band (no visible panel) */

/* fractal left (tall), config panel as a right-hand column */
.lab { position: relative; margin: 12px 0 56px; -webkit-user-select: none; user-select: none; }
/* re-enable selection only where copying is useful: the live formula / code */
.lab-code, .lab-code *, .fx-line, .fx-line code, .fx-input { -webkit-user-select: text; user-select: text; }
/* normal camera = 16:9 at full width; fulldome stays full-width with the dome centred inside */
.lab-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); overflow: hidden; background: #000; }
.lab-stage.is-fulldome { aspect-ratio: auto; height: 72vh; }      /* full-width, dome centred inside */
.lab-stage.is-equirect { aspect-ratio: 2 / 1; }                   /* 360° panorama */
#fractal-mount { position: absolute; inset: 0; }

/* performance HUD — bottom-left readout (fps / frame time / resolution). Monochrome to
   stay inside the b/n aesthetic; brightness encodes health instead of colour. */
.lab-perf {
  position: absolute; left: 11px; bottom: 9px; z-index: 6;
  display: flex; gap: 13px; align-items: baseline;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; pointer-events: none; user-select: none;
  color: rgba(255,255,255,.5); text-shadow: 0 0 5px rgba(0,0,0,.95);
}
.lab-perf:empty { display: none; }
.lab-perf .lp-ok    { color: rgba(255,255,255,.85); }
.lab-perf .lp-mid   { color: rgba(255,255,255,.62); }
.lab-perf .lp-low   { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.lab-perf .lp-dim   { color: rgba(255,255,255,.35); }
.lab-perf .lp-pause { color: #fff; }

/* live formula code — lives inside the FORMULA panel (left column) */
.lab-code {
  margin: 0; padding: 0; border: 0; background: transparent;
  max-height: 38vh; overflow: auto;
  font-family: var(--mono); font-size: 10px; line-height: 1.5;
  color: #4dffa0; text-shadow: none;
  white-space: pre; letter-spacing: 0.02em; tab-size: 2;
}
.lab-code::-webkit-scrollbar { width: 4px; height: 4px; }
.lab-code::-webkit-scrollbar-thumb { background: var(--line); }

/* live per-line formula editor (Mandelbulb / de0) */
.fx-editor { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow: auto; }
.fx-editor::-webkit-scrollbar { width: 4px; height: 4px; }
.fx-editor::-webkit-scrollbar-thumb { background: var(--line); }
.fx-head { display: flex; align-items: center; gap: 8px; }
.fx-name { font-size: 9px; letter-spacing: 0.2em; color: var(--dim); margin-right: auto; }
.fx-reset { flex: 0 0 auto; width: 22px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--dim); border: 1px solid var(--line); transition: 0.2s var(--ease); }
.fx-reset:hover { color: var(--bg); background: var(--fg); border-color: var(--fg); }
/* full-textarea editor: transparent <textarea> over a highlighted <pre>.
   Both layers MUST share identical font/size/line-height/padding/white-space so
   the (visible) caret lands exactly on the (highlighted) glyphs underneath. */
.fx-code { position: relative; height: 42vh; }
.fx-hl, .fx-ta {
  position: absolute; inset: 0; margin: 0; border: 0; padding: 8px 10px;
  font-family: var(--mono); font-size: 11px; line-height: 1.55; letter-spacing: 0;
  white-space: pre; tab-size: 2; -moz-tab-size: 2; box-sizing: border-box;
  width: 100%; height: 100%; overflow: auto;
}
.fx-hl { z-index: 0; pointer-events: none; background: transparent; }
.fx-hl code { font: inherit; white-space: pre; color: #4dffa0; }
.fx-ta {
  z-index: 1; resize: none; background: transparent; outline: none;
  color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--fg);
}
.fx-ta::selection { background: rgba(255, 255, 255, 0.18); }
.fx-code ::-webkit-scrollbar { width: 4px; height: 4px; }
.fx-code ::-webkit-scrollbar-thumb { background: var(--line); }
/* GLSL syntax — verde base + acentos: tipos en GRIS, números en VERDE FLÚOR */
.fx-hl .g-cm, .lab-code .g-cm { color: #2c6a4a; font-style: italic; }   /* comentario — apagado */
.fx-hl .g-op, .lab-code .g-op { color: #3f9e6e; }                       /* operadores */
.fx-hl .g-ty, .lab-code .g-ty { color: #9aa39d; }                       /* tipos — gris */
.fx-hl .g-fn, .lab-code .g-fn { color: #39d9b0; }                       /* funciones — teal */
.fx-hl .g-kw, .lab-code .g-kw { color: #9affd0; }                       /* keywords — verde claro */
.fx-hl .g-kwlo, .lab-code .g-kwlo { color: #8fae9c; }                    /* break/continue/discard */
.fx-hl .g-nu, .lab-code .g-nu { color: #fff; }                          /* números — blanco */
.fx-msg { flex: 0 1 auto; min-width: 0; max-width: 72%; font-family: var(--mono); font-size: 9px; line-height: 1.45; letter-spacing: 0.04em; color: #6fcf97; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.fx-msg.is-err { color: #ff6b6b; }
.fx-msg[hidden] { display: none; }
.lab-code .t { color: #d6ffe8; text-shadow: none; }
.lab-code .c { color: #6fcf97; text-shadow: none; }
.lab-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 0.3em; color: var(--fg); z-index: 6; background: rgba(0, 0, 0, 0.72); }

/* floating control overlay — panels sit on top of the visualiser */
.lab-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
/* mobile-only sheet chrome — hidden on desktop, activated in the narrow media query */
.lab-edit-toggle { display: none; }
.lab-sheet-head { display: none; }
.lab-col {
  position: absolute; top: 12px; display: flex; flex-direction: column; gap: 10px;
  width: clamp(196px, 20vw, 236px); max-height: calc(100% - 24px);
}
.lab-col-left { left: 12px; }
.lab-col-right { right: 12px; }
/* FORMULA lives in its own column, set right beside the left column (FRACTAL) */
.lab-col-formula { left: calc(12px + clamp(196px, 20vw, 236px) + 10px); }
.lab-float {
  pointer-events: auto; position: relative; width: 100%;
  border: 0; background: rgba(0, 0, 0, 0.82);
}
/* left/formula columns anchor left (grow right); right column anchors right (grows left) */
.lab-col-left > .lab-float, .lab-col-formula > .lab-float { align-self: flex-start; }
.lab-col-right > .lab-float { align-self: flex-end; }
/* FORMULA panel — wide enough for the longest GLSL lines without wrapping/scrolling */
.lab-float[data-panel="formula"] { width: 620px; }
/* horizontal resize grip — right edge (left/formula columns) / left edge (right column) */
.lf-resize { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 4; touch-action: none; }
.lab-col-left .lf-resize, .lab-col-formula .lf-resize { right: -4px; }
.lab-col-right .lf-resize { left: -4px; }
.lf-resize::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: transparent; transition: background 0.2s var(--ease); }
.lab-col-left .lf-resize::after, .lab-col-formula .lf-resize::after { right: 4px; }
.lab-col-right .lf-resize::after { left: 4px; }
.lf-resize:hover::after, .lab-float.is-resize .lf-resize::after { background: var(--fg); }
.lab-float.is-resize { z-index: 60; }
/* panel being dragged — lift above the rest, no text selection */
.lab-float.is-drag { z-index: 60; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55); }
.lab-float.is-drag .lf-head { background: rgba(255, 255, 255, 0.16); }
/* magnetic snap guide — thin lane/top line, or a solid bar where a panel will dock */
.lab-snapline { position: absolute; z-index: 58; pointer-events: none; display: none; }
.lab-snapline.is-v { border-left: 1px dotted rgba(242, 242, 242, 0.32); }
.lab-snapline.is-h { border-top: 1px dotted rgba(242, 242, 242, 0.32); }
/* app logo — same typeface as the site h1 */
.lab-logo {
  position: absolute; left: 16px; bottom: 14px; z-index: 2;
  pointer-events: none; color: var(--fg); text-transform: uppercase;
  font-size: clamp(13px, 1.6vw, 16px); letter-spacing: 0.06em; line-height: 1; white-space: nowrap;
}
/* hidden in the embedded (iframe) version */
.lab-embed .lab-logo { display: none; }
.lf-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 6px 6px 11px; cursor: move; user-select: none; touch-action: none;
  font-size: 9px; letter-spacing: 0.24em; color: var(--fg);
  background: rgba(255, 255, 255, 0.08); border-bottom: 0;
}
.lf-head:hover { background: rgba(255, 255, 255, 0.12); }
.lf-min {
  background: transparent; border: 0; color: var(--dim); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 6px; transition: color 0.2s var(--ease);
}
.lf-min:hover { color: var(--fg); }
.lf-body { padding: 11px; display: flex; flex-direction: column; gap: 8px; max-height: 64vh; overflow: auto; }
.lf-body::-webkit-scrollbar { width: 4px; }
.lf-body::-webkit-scrollbar-thumb { background: var(--line); }
.lab-float.is-min .lf-body { display: none; }

.lab-section { display: flex; flex-direction: column; gap: 8px; padding: 0 11px 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); }
.ls-head {
  display: block; margin: 0 -11px 6px; padding: 5px 11px;
  font-size: 9px; letter-spacing: 0.24em; color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--line);
}
.lab-sub { font-size: 9px; letter-spacing: 0.22em; color: var(--dim); margin-top: 3px; }

/* combined MATERIAL / CAMERA / SHADING / OUTPUT panel with tabs */
.lab-tabs { border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); }
.lt-bar { display: grid; grid-template-columns: repeat(3, 1fr); }
/* reusable dropdown select — options deploy as an overlay above the UI */
.lab-select { position: relative; }
.lab-select-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lab-select-caret { font-size: 8px; transition: transform 0.2s var(--ease); }
.lab-select.is-open .lab-select-caret { transform: rotate(180deg); }
.lab-select.is-open .lab-select-btn { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.lab-select-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
  display: flex; flex-direction: column; gap: 2px; padding: 4px;
  background: var(--fg); border: 1px solid var(--fg);
  border-top: 1px solid var(--dim);   /* gray divider between the selector and the menu */
}
.lab-select-menu[hidden] { display: none; }
.lab-select-opt {
  width: 100%; text-align: left; font-size: 9px; letter-spacing: 0.22em;
  padding: 8px 10px; border: 1px solid transparent; color: var(--bg); transition: 0.18s var(--ease);
}
.lab-select-opt:hover { color: var(--fg); background: var(--bg); border-color: var(--bg); }
/* let the OUTPUT panel's dropdown overflow the panel box instead of being clipped */
.lf-output { overflow: visible; }
.joy-status { font-size: 8px; letter-spacing: 0.04em; color: var(--dim); max-width: 56%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joy-params { display: flex; flex-direction: column; gap: 8px; }
.joy-params[hidden] { display: none; }

/* RENDER panel — the tab bar is the draggable header (no redundant title) */
.lf-head--tabs { padding: 0; align-items: stretch; }
.lf-head--tabs .lt-bar { flex: 1 1 auto; }
.lf-head--tabs .lt-bar button { border-bottom: 0; }
.lf-grip { display: flex; align-items: center; padding: 0 7px; cursor: move; color: var(--dim); font-size: 10px; border-right: 1px solid var(--line); }
.lf-head--tabs .lf-min { padding: 0 8px; border-left: 1px solid var(--line); }
.lf-render { padding: 0; }
.lf-render .lt-body { border: 0; }

/* interactive post embeds the standalone /webglfractal app via <iframe> */
.post-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 12px 0 24px; border: 1px solid var(--line); background: #000; overflow: hidden; }
.post-embed-frame { display: block; width: 100%; height: 100%; border: 0; }
.embed-app-link {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-decoration: none;
  color: var(--fg); background: rgba(0, 0, 0, 0.7); border: 1px solid var(--line);
  padding: 7px 12px; transition: 0.25s var(--ease);
}
.embed-app-link:hover { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.lt-bar button { font-size: 8px; letter-spacing: 0.04em; padding: 8px 2px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--dim); background: transparent; transition: 0.2s var(--ease); }
.lt-bar button:last-child { border-right: 0; }
.lt-bar button:hover { color: var(--fg); }
.lt-bar button.on { background: rgba(255, 255, 255, 0.08); color: var(--fg); }
.lt-body { padding: 11px; }
.lt-panel { display: flex; flex-direction: column; gap: 8px; }
.lt-panel[hidden] { display: none; }

.lab-ctrl { display: flex; flex-direction: column; gap: 2px; }
.lab-ctrl .lc-row { display: flex; justify-content: space-between; align-items: baseline; }
.lab-ctrl .lc-name { font-size: 9px; letter-spacing: 0.2em; color: var(--dim); }
.lab-ctrl .lc-val { font-size: 10px; color: var(--fg); }
.lc-check {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px;
  border: 1px solid var(--dim); background: transparent; cursor: pointer;
  vertical-align: middle; margin-right: 6px; position: relative; top: -1px;
}
.lc-check:checked { background: var(--fg); border-color: var(--fg); }
.lc-check:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 7px;
  border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* chunky, easy-to-grab range sliders */
.lab-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 15px;
  background: transparent; outline: none; cursor: pointer; margin: 0;
}
.lab-ctrl input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 2px; }
.lab-ctrl input[type="range"]::-moz-range-track { height: 4px; background: var(--line); border-radius: 2px; }
.lab-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 9px; height: 15px; margin-top: -6px;
  background: var(--fg); border: 0; border-radius: 0; cursor: pointer; transition: background 0.2s var(--ease);
}
.lab-ctrl input[type="range"]::-moz-range-thumb {
  width: 9px; height: 15px; background: var(--fg); border: 0; border-radius: 0; cursor: pointer;
}
.lab-ctrl input[type="range"]:hover::-webkit-slider-thumb { background: #fff; }

/* color swatch + popover — square chip opens a black, hard-edged popover (no blur) */
.lab-swatch-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lab-swatch-row .lc-name { font-size: 9px; letter-spacing: 0.2em; color: var(--dim); }
.lab-swatch {
  width: 22px; height: 22px; padding: 0; border-radius: 0;
  border: 1px solid rgba(242, 242, 242, 0.4); background: #888;
  cursor: pointer; transition: border-color 0.2s var(--ease);
}
.lab-swatch:hover, .lab-swatch.on { border-color: #fff; }
/* native colour input reused as a lab swatch (container BACKGROUND control) */
input[type="color"].lab-swatch { -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="color"].lab-swatch::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].lab-swatch::-webkit-color-swatch { border: none; border-radius: 0; }
input[type="color"].lab-swatch::-moz-color-swatch { border: none; border-radius: 0; }
/* bold section title with its colour swatch to the left (blank spacer keeps
   colourless sections' titles aligned with the coloured ones) */
.lab-sub--swatch { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--fg); }
.lab-sub--swatch .lab-swatch { flex: 0 0 auto; }
.lab-swatch--blank { visibility: hidden; }
/* colored heading enclosed as one bordered button — chip + label, big click area */
.lab-swatch-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px;
  font: inherit; font-weight: inherit; letter-spacing: inherit; color: var(--fg);
  background: transparent; border: 1px solid rgba(242, 242, 242, 0.4); cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.lab-swatch-btn:hover, .lab-swatch-btn.on { border-color: #fff; background: rgba(242, 242, 242, 0.06); }
.lab-swatch-chip {
  flex: 0 0 auto; width: 16px; height: 16px;
  border: 1px solid rgba(242, 242, 242, 0.4); background: #888;
}
.lab-swatch-name { font: inherit; letter-spacing: inherit; }

/* hover tooltip — concise docs for a technical term */
.lab-tip {
  position: fixed; z-index: 9998; pointer-events: none; max-width: 252px;
  background: #000; border: 1px solid var(--line); padding: 9px 11px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  font-family: var(--mono); color: var(--dim);
}
.lab-tip[hidden] { display: none; }
.lab-tip .lt-t { font-size: 9px; letter-spacing: 0.22em; font-weight: 700; color: var(--fg); margin-bottom: 5px; }
.lab-tip .lt-d { font-size: 10px; line-height: 1.5; color: #d2d2d2; }
.lab-tip .lt-row { display: flex; gap: 8px; margin-top: 5px; font-size: 9px; line-height: 1.45; }
.lab-tip .lt-k { flex: 0 0 32px; color: var(--dim); letter-spacing: 0.1em; }
.lab-tip .lt-row code { color: #4dffa0; font-size: 9px; word-break: break-word; }
.lab-tip .lt-warn .lt-k, .lab-tip .lt-warn span:last-child { color: #ffb84d; }

/* LIGHT tab — illuminator chip grid (2 cols × 3 rows) + the selected light's controls */
.ll-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.ll-chip {
  display: flex; align-items: center; gap: 7px; text-align: left;
  padding: 8px 8px; border: 1px solid var(--line); color: var(--dim);
  transition: 0.25s var(--ease); cursor: pointer;
}
.ll-chip:hover { color: var(--fg); border-color: var(--fg); }
.ll-chip.on { color: var(--fg); border-color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.ll-dot {
  width: 11px; height: 11px; flex: 0 0 auto; border-radius: 0;
  border: 1px solid rgba(242, 242, 242, 0.4); background: #888;
}
.ll-dot.is-mono { background: repeating-linear-gradient(45deg, #4a4a4a 0 2px, #111 2px 4px); }
.ll-name { font-size: 8.5px; letter-spacing: 0.12em; }
.ll-stack { margin-top: 9px; display: flex; flex-direction: column; gap: 8px; }
.ll-detail { display: flex; flex-direction: column; gap: 8px; }
.ll-detail[hidden] { display: none; }
.lab-pop {
  display: flex; flex-direction: column; gap: 8px;
  background: #000; border: 1px solid var(--line); border-radius: 0; padding: 11px;
}
.lab-pop[hidden] { display: none; }

/* visual color picker inside the popover — square, hard-edged, no blur */
.lab-picker.is-sv { display: flex; flex-direction: column; gap: 7px; }
.lp-sv {
  position: relative; height: 132px; cursor: crosshair; touch-action: none; border: 1px solid var(--dimmer);
  background-color: #f00;   /* hue base, set via JS */
  background-image: linear-gradient(to bottom, rgba(0,0,0,0), #000), linear-gradient(to right, #fff, rgba(255,255,255,0));
}
.lp-hue { position: relative; height: 18px; cursor: crosshair; touch-action: none; border: 1px solid var(--dimmer); background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.lp-hmark { position: absolute; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); border: 1px solid #fff; box-shadow: 0 0 0 1px #000; pointer-events: none; }
.lab-picker.is-hs { position: relative; height: 100px; border: 1px solid var(--dimmer); cursor: crosshair; touch-action: none; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.lab-picker.is-hs .lp-tint { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); }
.lab-picker.is-1d { position: relative; height: 18px; border: 1px solid var(--dimmer); cursor: crosshair; touch-action: none; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.lp-mark { position: absolute; width: 10px; height: 10px; transform: translate(-50%, -50%); border: 1.5px solid #fff; box-shadow: 0 0 0 1px #000; pointer-events: none; }
.lab-picker.is-1d .lp-mark { width: 4px; height: 100%; }

/* button rows (formula / material / output) */
.lm-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; }
.lm-row.lm-4 { grid-template-columns: repeat(4, 1fr); }
.lm-row.lm-3 { grid-template-columns: repeat(3, 1fr); }
.lm-row.lm-3 button { font-size: 8px; letter-spacing: 0.02em; padding: 7px 2px; }
.lm-row button { font-size: 8.5px; letter-spacing: 0.1em; padding: 7px 4px; border: 1px solid var(--line); color: var(--dim); transition: 0.25s var(--ease); }
.lm-row.lm-4 button { font-size: 8px; letter-spacing: 0.04em; padding: 7px 2px; }
.lm-row button:hover { color: var(--fg); border-color: var(--fg); }
.lm-row button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.lab-reset { width: 100%; margin-top: 2px; font-size: 9px; letter-spacing: 0.22em; padding: 9px 4px; border: 1px solid var(--line); color: var(--dim); transition: 0.25s var(--ease); }
.lab-reset:hover { color: var(--bg); background: var(--fg); border-color: var(--fg); }
/* RESET ALL — sits first in the OUTPUT panel, with a leading icon */
.lab-reset--all { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 0; margin-bottom: 4px; }
.lab-reset--all .lr-ico { font-size: 12px; line-height: 1; }

/* narrow screens — the fractal owns the full portrait viewport and the controls
   become a bottom sheet (drawer) that slides up to 50% height from the EDITAR button. */
@media (max-width: 820px) {
  /* stage = hero: fill the vertical viewport, whatever the camera aspect */
  .lab-stage, .lab-stage.is-fulldome, .lab-stage.is-equirect { aspect-ratio: auto; height: 100dvh; }

  /* overlay → bottom sheet: half the viewport, hidden (translated down) until opened */
  .lab-overlay {
    position: fixed; inset: auto 0 0 0; top: auto; z-index: 40;
    height: 50dvh; max-height: 50dvh; margin: 0;
    padding: 0 10px calc(22px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 10px;
    background: rgba(0, 0, 0, 0.94); border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; pointer-events: auto;
    transform: translateY(100%); transition: transform 0.32s var(--ease);
  }
  .lab-overlay.is-open { transform: translateY(0); }

  /* sticky sheet header: centred grip (tap to close) + CERRAR */
  .lab-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 3; margin: 0 -10px 2px;
    padding: 13px 14px 9px; background: rgba(0, 0, 0, 0.94);
    border-bottom: 1px solid var(--line);
  }
  .lsh-grip {
    position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 2px; background: var(--line);
    cursor: pointer;
  }
  .lsh-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.24em; color: var(--dim); }
  .lsh-close {
    background: transparent; border: 0; color: var(--fg); cursor: pointer;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; padding: 2px 4px;
  }

  /* columns/panels just stack inside the scrolling sheet (accordion rows) */
  .lab-col { position: static; width: auto; max-height: none; gap: 10px; }
  .lab-col-formula { left: auto; }
  .lab-float, .lab-float[data-panel="formula"] { transform: none !important; width: auto; align-self: stretch; }
  .lf-resize { display: none; }
  .lf-head { cursor: pointer; }
  .lf-body { max-height: none; }
  .lab-code { max-height: 44vh; }

  /* EDITAR launcher — bottom-centre, fixed; hides while the sheet is open */
  .lab-edit-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 45;
    min-width: 130px; padding: 11px 30px;
    background: rgba(0, 0, 0, 0.82); color: var(--fg);
    border: 1px solid var(--line); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; cursor: pointer;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .lab-edit-toggle:active { background: rgba(255, 255, 255, 0.12); }
  .lab-overlay.is-open ~ .lab-edit-toggle { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
}

/* ---------- process (making) ---------- */
.proc-step { display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line-soft); }
.proc-step .ps-n { font-family: var(--title); font-size: clamp(24px, 3vw, 44px); color: var(--dimmer); line-height: 1; }
.proc-step .ps-tool { font-size: 10px; letter-spacing: 0.2em; color: var(--dim); margin: 10px 0 14px; }
.proc-closing { margin-top: 48px; max-width: 88ch; }
/* making — four-column grid of steps (one per column) */
.fd-steps { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: clamp(20px, 2.4vw, 40px); }
.fd-steps .proc-step { grid-template-columns: 1fr; gap: 14px; padding: 24px 0 30px; }
@media (max-width: 900px) { .fd-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .fd-steps { grid-template-columns: 1fr; } }

/* integrated sections inside the Fulldome Movie page */
.fd-section { margin-top: clamp(64px, 9vw, 120px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.fd-shead { margin-bottom: 30px; }
.fd-shead .kicker { display: block; margin-bottom: 12px; }
@media (max-width: 620px) { .proc-step { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- archive ---------- */
.arch-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.arch-tab {
  font-size: 10px; letter-spacing: 0.18em; color: var(--dim);
  border: 1px solid var(--line); padding: 8px 13px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.arch-tab .at-n { font-size: 8px; color: var(--dimmer); margin-left: 4px; }
.arch-tab:hover { color: var(--fg); border-color: var(--fg); }
.arch-tab.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.arch-tab.on .at-n { color: var(--bg); opacity: 0.6; }

.arch-section { margin-bottom: 64px; }
.arch-section > .meta { margin-bottom: 14px; }
.arch-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 20px; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--line-soft);
  transition: padding-left 0.4s var(--ease);
}
.arch-row:hover { padding-left: 14px; }
.arch-row .ar-year { font-size: 11px; color: var(--dim); }
.arch-row .ar-title { font-family: var(--title); font-size: clamp(13px, 1.5vw, 19px); letter-spacing: 0.03em; }
.arch-row .ar-note { font-size: 9.5px; letter-spacing: 0.16em; color: var(--dimmer); margin-top: 4px; }
.arch-row .ar-place { font-size: 10px; letter-spacing: 0.14em; color: var(--dim); text-align: right; }
/* unified category tag — same look in every component (rows, cards, post detail) */
.ar-cat, .card-cat, .post-cat { display: inline-block; font-family: var(--title); font-weight: 400; text-transform: uppercase; font-size: 8px; letter-spacing: 0.16em; line-height: 1; color: var(--dim); border: 1px solid var(--line); padding: 4px 7px; vertical-align: middle; white-space: nowrap; }
.ar-cat { margin-left: 8px; }
.arch-row:hover .ar-cat:not(.is-next), .list-row:hover .ar-cat:not(.is-next), .card:hover .card-cat:not(.is-next) { color: var(--fg); border-color: var(--fg); }
@media (max-width: 620px) { .arch-row { grid-template-columns: 50px 1fr auto; } .arch-row .ar-place { display: none; } }

.role-box { border: 1px solid var(--line); padding: clamp(20px, 3vw, 40px); margin-top: 20px; }

/* ---------- post detail ---------- */
.post-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
/* tag at the start of the meta row (just before the year) — larger LG variant */
.post-cat--lg { font-size: 11px; letter-spacing: 0.18em; padding: 6px 11px; color: var(--fg); border-color: rgba(242, 242, 242, 0.35); }
.post-meta-tag { display: inline-flex; flex-wrap: wrap; gap: 7px; }
.post-meta-tag:empty { display: none; }
.post-title { margin-bottom: 16px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; font-size: clamp(12px, 1.4vw, 15px); letter-spacing: 0.16em; color: var(--fg); margin-bottom: 26px; }
.post-hero .media { aspect-ratio: 16 / 9; }                 /* fulldome page hero (kept) */
/* post detail hero: full width, native aspect ratio, never cropped */
.post-hero .post-photo { display: block; width: 100%; height: auto; }

/* ---- FULLDOME film player (custom controls, no YouTube chrome) ---- */
.fd-player { position: relative; width: 100%; background: #000; border: 1px solid var(--line); overflow: hidden; }
.fdp-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #050505 var(--poster) center / cover no-repeat; }
.fdp-frame iframe, .fdp-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }  /* all interaction goes through our overlay */
.fdp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; pointer-events: none; }  /* 16:9 in 16:9 frame → no crop */
.fd-player[data-state="ready"] .fdp-frame { background-image: none; }
.fdp-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; color: var(--dim); }
.fd-player[data-state="ready"] .fdp-loading { display: none; }

/* transparent click-catcher over the iframe */
.fdp-surface { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: 0; cursor: pointer; }

/* sound-off hint pill */
.fdp-hint { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: var(--fg); background: rgba(0,0,0,0.55); border: 1px solid var(--line); cursor: pointer; transition: opacity 0.4s var(--ease); }
.fdp-hint .fdp-ico { width: 14px; height: 14px; }
.fdp-hint.is-hidden { opacity: 0; pointer-events: none; }

/* control bar — fades in on hover / when paused */
.fdp-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0)); opacity: 0; transition: opacity 0.35s var(--ease); }
.fd-player:hover .fdp-controls, .fd-player[data-playing="0"] .fdp-controls { opacity: 1; }
.fdp-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; color: var(--fg); background: transparent; border: 0; cursor: pointer; opacity: 0.78; transition: opacity 0.25s var(--ease); }
.fdp-btn:hover { opacity: 1; }
.fdp-ico { width: 20px; height: 20px; display: block; }
/* play/pause + mute icon swaps */
.fdp-i-pause, .fdp-i-on { display: none; }
.fd-player[data-playing="1"] .fdp-i-play { display: none; }
.fd-player[data-playing="1"] .fdp-i-pause { display: inline-flex; }
.fd-player[data-muted="0"] .fdp-i-on { display: inline-flex; }
.fd-player[data-muted="0"] .fdp-i-off { display: none; }
/* seek */
.fdp-seek { position: relative; flex: 1; height: 14px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.fdp-seek-track { position: absolute; left: 0; right: 0; height: 2px; background: var(--line); }
.fdp-seek-fill { position: absolute; left: 0; height: 2px; width: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.fdp-time { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--fg); white-space: nowrap; opacity: 0.85; }
.fd-player:fullscreen { display: flex; align-items: center; justify-content: center; }
.fd-player:fullscreen .fdp-frame { height: 100%; width: auto; aspect-ratio: 16 / 9; max-width: 100vw; max-height: 100vh; }
@media (max-width: 620px) { .fdp-time { display: none; } .fdp-hint span { display: none; } }

/* center play — shown only when the player is ready but paused (e.g. autoplay blocked) */
.fdp-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; align-items: center; justify-content: center; width: 64px; height: 64px; color: var(--fg); background: rgba(0,0,0,0.45); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: background 0.25s var(--ease); }
.fdp-big:hover { background: rgba(0,0,0,0.7); }
.fdp-big .fdp-ico { width: 26px; height: 26px; }
.fd-player[data-state="ready"][data-playing="0"] .fdp-big { display: inline-flex; }

/* fallback — only when the embed is blocked or errors out */
.fdp-fallback { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; padding: 12px 18px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--fg); background: rgba(0,0,0,0.6); border: 1px solid var(--line); text-align: center; }
.fd-player[data-state="error"] .fdp-frame { background-image: var(--poster); }
.fd-player[data-state="error"] .fdp-loading,
.fd-player[data-state="error"] .fdp-big,
.fd-player[data-state="error"] .fdp-hint,
.fd-player[data-state="error"] .fdp-controls { display: none; }
.fd-player[data-state="error"] .fdp-fallback { display: inline-block; }
.post-content { max-width: 70ch; margin: 40px 0; }
.post-content .lead { margin-bottom: 22px; }
/* gallery: native aspect ratios, no crop — masonry handles mixed vertical/horizontal */
.post-gallery { column-count: 2; column-gap: 30px; margin-top: 10px; }
.post-gallery .post-photo { display: block; width: 100%; height: auto; margin: 0 0 30px; break-inside: avoid; }
@media (max-width: 620px) { .post-gallery { column-count: 1; } }
.post-more { display: inline-block; margin-top: 18px; font-size: 10px; letter-spacing: 0.2em; color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: color 0.3s var(--ease); }
.post-more:hover { color: var(--fg); border-color: var(--fg); }
/* primary post action — solid white block, no radius, no glow, minimal */
.post-btn { display: inline-flex; align-items: center; gap: 14px; margin-top: 30px; padding: 15px 24px; background: var(--fg); color: var(--bg); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; border: 0; border-radius: 0; box-shadow: none; transition: opacity 0.25s var(--ease); }
.post-btn:hover { opacity: 0.82; }
.post-btn .ico-arrow { width: 28px; }
.post-btn:hover .ico-arrow .head { transform: translateX(5px); }
.post-btn:hover .ico-arrow .shaft { transform: scaleX(1.16); }

/* clickable iter / topic cards */
a.iter, a.topic { color: inherit; }

/* ---------- custom arrow icon ---------- */
.ico-arrow { width: 34px; height: 11px; display: inline-block; vertical-align: middle; overflow: visible; }
.ico-arrow .shaft, .ico-arrow .head { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; stroke-linejoin: miter; }
.ico-arrow .shaft { transition: transform 0.4s var(--ease); transform-origin: left center; }
.ico-arrow .head { transition: transform 0.4s var(--ease); }
/* on hover (any card / row / link): head advances, shaft stretches to meet it */
.post-more:hover .ico-arrow .head,
.card:hover .ico-arrow .head,
.card-wide:hover .ico-arrow .head,
.arch-row:hover .ico-arrow .head { transform: translateX(5px); }
.post-more:hover .ico-arrow .shaft,
.card:hover .ico-arrow .shaft,
.card-wide:hover .ico-arrow .shaft,
.arch-row:hover .ico-arrow .shaft { transform: scaleX(1.16); }
.post-more .ico-arrow { margin-left: 10px; }

/* inline arrows, no background */
.card-foot { display: inline-block; margin-top: 14px; color: var(--dim); }
.card:hover .card-foot { color: var(--fg); }
.cw-go { display: inline-block; margin-top: 16px; color: var(--fg); }
.ar-go { color: var(--dimmer); justify-self: end; }
.arch-row:hover .ar-go { color: var(--fg); }

/* ---------- generic cards (card / large / full-width) ---------- */
.card { position: relative; display: block; color: inherit; border: 1px solid var(--line-soft); transition: border-color 0.4s var(--ease); }
.card:hover { border-color: var(--line); }
.card .media { aspect-ratio: 16 / 9; overflow: hidden; }
.card .media img { transition: transform 0.6s var(--ease); }
.card:hover .media img { transform: none; }
.card-body { padding: 14px 14px 16px; }
/* card bajada (the .meta descriptor line) reads as a sentence, not a label —
   tighten the wide tracking that .meta uses elsewhere. */
.card-body .meta, .cw-overlay .meta { letter-spacing: 0.06em; }
.card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }

/* special highlighted tag — "NEXT EXHIBITION" */
.card-cat.is-next, .post-cat.is-next, .ar-cat.is-next {
  color: var(--bg); background: var(--fg); border-color: var(--fg);
  font-weight: 500; animation: nextPulse 2.4s var(--ease) infinite;
}
@keyframes nextPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.card-lg { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gut); align-items: center; border: 0; }
.card-lg .media { aspect-ratio: 16 / 9; border: 1px solid var(--line-soft); }
.card-lg .card-body { padding: 0; }
@media (max-width: 760px) { .card-lg { grid-template-columns: 1fr; } }

.card-wide { position: relative; display: block; color: inherit; overflow: hidden; border: 1px solid var(--line-soft); }
.card-wide .media { aspect-ratio: 24 / 8; }
.card-wide .media img { transition: transform 0.7s var(--ease); }
.card-wide:hover .media img { transform: none; }
.card-wide .cw-overlay { position: absolute; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 34px); right: clamp(16px, 3vw, 40px); text-shadow: 0 2px 30px rgba(0,0,0,0.9); }
.card-wide .cw-overlay::before { content: ""; position: absolute; inset: -40px -40px -40px -40px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); z-index: -1; }

/* ---------- card SM (compact) ---------- */
/* SM = same typography as MD; only the thumbnail is smaller (sits in a 4-col grid). */
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.4vw, 18px); }
@media (max-width: 980px) { .card-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .card-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px)  { .card-grid-4 { grid-template-columns: 1fr; } }

/* ---------- featured strip: MD cards, 2 columns ---------- */
/* Reusable highlight grid — spotlights a couple of posts before a full list. */
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.4vw, 18px); }
@media (max-width: 620px) { .card-grid-2 { grid-template-columns: 1fr; } }
/* spacing modifier: separate the featured strip from the list that follows it */
.fd-featured { margin-bottom: clamp(18px, 2.6vw, 32px); }

/* ---------- contained process still (inside THE MAKING) ---------- */
.proc-figure { margin: clamp(20px, 3vw, 38px) auto; max-width: 620px; }
.proc-figure .warp { width: 100%; }

/* ---------- list row with thumbnail ---------- */
.list-row { display: grid; grid-template-columns: 168px 1fr auto auto; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); transition: padding-left 0.3s var(--ease); color: inherit; }
.list-row:hover { padding-left: 10px; }
.list-row .lr-thumb .media { aspect-ratio: 16 / 9; border: 1px solid var(--line-soft); }
.list-row .lr-thumb .media img { transition: transform 0.6s var(--ease); }
.list-row:hover .lr-thumb .media img { transform: none; }
.list-row .lr-cats { margin-bottom: 8px; }
.list-row .ar-title { font-family: var(--title); font-size: clamp(13px, 1.5vw, 18px); letter-spacing: 0.03em; }
.list-row .lr-meta { margin-top: 6px; }
.list-row .ar-place { font-size: 10px; letter-spacing: 0.14em; color: var(--dim); text-align: right; align-self: center; }
.list-row .ar-go { color: var(--dimmer); justify-self: end; }
.list-row:hover .ar-go { color: var(--fg); }
.list-row:hover .ico-arrow .head { transform: translateX(5px); }
.list-row:hover .ico-arrow .shaft { transform: scaleX(1.16); }
@media (max-width: 620px) { .list-row { grid-template-columns: 110px 1fr; gap: 14px; } .list-row .ar-go, .list-row .ar-place { display: none; } }
/* locked "currently viewing" row */
.list-row.is-current { pointer-events: none; opacity: 0.4; padding-left: 0; }
.list-row.is-current .lr-thumb .media img { filter: grayscale(1); }
.list-row.is-current .ar-title { color: var(--dim); }
.lr-lock { justify-self: end; font-family: var(--title); text-transform: uppercase; font-size: 8px; letter-spacing: 0.2em; line-height: 1; color: var(--dim); border: 1px solid var(--line); padding: 4px 8px; white-space: nowrap; }

/* ---------- 404 ---------- */
.nf { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; }
.nf-wrap { max-width: 70ch; }
.nf-code { font-size: clamp(80px, 22vw, 260px); line-height: 0.9; letter-spacing: 0.02em; margin: 10px 0 18px; }
.nf .lead { margin-bottom: 26px; }
.nf-home { margin-bottom: 40px; }
.nf-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; border-top: 1px solid var(--line-soft); padding-top: 22px; }
.nf-link { font-size: 11px; letter-spacing: 0.16em; color: var(--dim); transition: color 0.3s var(--ease); }
.nf-link:hover { color: var(--fg); }
.nf-link .nf-n { color: var(--dimmer); font-size: 9px; margin-right: 4px; }

/* ---------- /uikit ---------- */
.uikit .uk-section { margin: 0 0 56px; border-top: 1px solid var(--line-soft); padding-top: 26px; }
.uikit .uk-label { font-size: 11px; letter-spacing: 0.26em; color: var(--fg); margin-bottom: 4px; }
.uikit .uk-attrs { font-size: 10px; letter-spacing: 0.08em; color: var(--dimmer); margin-bottom: 20px; }
.uikit .uk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.uikit .h1, .uikit .h2, .uikit .h3 { margin: 6px 0; }
.uikit code { font-size: 11px; color: var(--fg); background: rgba(242,242,242,0.08); padding: 1px 5px; }
@media (max-width: 820px) { .uikit .uk-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .uikit .uk-grid { grid-template-columns: 1fr; } }

/* ---------- /sounds · sound library + controls ---------- */
.snd-cat { margin: 0 0 38px; }
.snd-cat-head { display: flex; align-items: baseline; gap: 14px; border-top: 1px solid var(--line-soft); padding-top: 14px; margin-bottom: 14px; }
.snd-cat-label { font-family: var(--title); font-size: 13px; letter-spacing: 0.14em; color: var(--fg); }
.snd-cat-desc { font-size: 9.5px; letter-spacing: 0.06em; color: var(--dim); }
.snd-cat-n { margin-left: auto; font-size: 9px; letter-spacing: 0.1em; color: var(--dimmer); }

.snd-grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 1400px) { .snd-grid-6 { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .snd-grid-6 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px)  { .snd-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .snd-grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .snd-grid-6 { grid-template-columns: 1fr; } }

.snd-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 15px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.snd-card:hover { border-color: rgba(242,242,242,0.3); }
.snd-card-head { display: flex; flex-direction: column; gap: 6px; }
.snd-card .snd-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.snd-card .snd-name { font-family: var(--title); font-size: 12px; letter-spacing: 0.06em; color: var(--fg); }
.snd-card .snd-tag {
  flex: none; font-size: 7.5px; letter-spacing: 0.18em;
  color: var(--bg); background: var(--dim); padding: 2px 5px;
}
.snd-card.is-core .snd-tag { background: none; color: var(--dimmer); border: 1px solid var(--line); }
.snd-card .snd-desc { font-size: 9.5px; line-height: 1.5; color: var(--dim); min-height: 2.6em; }

.snd-card .snd-play {
  display: inline-flex; align-items: center; gap: 9px; align-self: flex-start;
  font-size: 9px; letter-spacing: 0.2em; color: var(--fg);
  border: 1px solid var(--line); padding: 8px 13px;
  transition: 0.25s var(--ease);
}
.snd-card .snd-play:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.snd-card .snd-play:hover .ico-arrow { stroke: var(--bg); }
.snd-card .snd-play .ico-arrow { width: 22px; }

.snd-params { display: flex; flex-direction: column; gap: 11px; border-top: 1px solid var(--line-soft); padding-top: 13px; }
.snd-ctrl { display: flex; flex-direction: column; gap: 5px; }
.snd-ctrl .sc-row { display: flex; justify-content: space-between; align-items: baseline; }
.snd-ctrl .sc-name { font-size: 8.5px; letter-spacing: 0.18em; color: var(--dim); }
.snd-ctrl .sc-val { font-size: 9.5px; color: var(--fg); }
.snd-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 1px;
  background: var(--line); outline: none; cursor: pointer;
}
.snd-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 9px; height: 9px;
  background: var(--fg); border-radius: 50%;
}
.snd-ctrl input[type="range"]::-moz-range-thumb {
  width: 9px; height: 9px; background: var(--fg); border: 0; border-radius: 50%;
}

/* fired flash — left edge bar + brief tint */
.snd-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--fg); transform: scaleY(0); transform-origin: center;
}
.snd-card.is-firing::before { animation: sndBar 0.5s var(--ease) both; }
.snd-card.is-firing { animation: sndFlash 0.5s var(--ease) both; }
@keyframes sndBar { 0% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
@keyframes sndFlash { 0% { background: rgba(242,242,242,0.07); } 100% { background: transparent; } }

/* ---------- statement ---------- */
.state-wrap { display: grid; grid-template-columns: 260px 1fr; gap: var(--gut); align-items: start; }
.state-portrait .media { aspect-ratio: 3 / 4; }
.state-text p { margin-bottom: 22px; }
.state-text .body { max-width: 70ch; }
.state-sig { font-family: var(--title); letter-spacing: 0.1em; margin-top: 10px; font-size: 14px; }
@media (max-width: 820px) { .state-wrap { grid-template-columns: 1fr; } .state-portrait { max-width: 220px; } }

.contact { margin-top: 80px; border-top: 1px solid var(--line); padding-top: 40px; }
.contact a { font-family: var(--title); font-size: clamp(18px, 3.2vw, 44px); letter-spacing: 0.02em; display: inline-block; transition: opacity 0.4s var(--ease); }
.contact a:hover { opacity: 0.5; }
.contact .c-row { display: flex; flex-direction: column; gap: 14px; }

/* shared site footer: next-page nav + contact (present on every page) */
.pf-label { font-size: 9.5px; letter-spacing: 0.24em; color: var(--dim); }
.site-foot { margin-top: 90px; border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 22px; }
.sf-next { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.sf-next a { font-family: var(--title); font-size: clamp(16px, 2.4vw, 30px); letter-spacing: 0.04em; transition: letter-spacing 0.4s var(--ease); }
.sf-next a:hover { letter-spacing: 0.12em; }
.sf-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.sf-contact a { font-size: 11px; letter-spacing: 0.14em; color: var(--dim); transition: color 0.3s var(--ease); }
.sf-contact a:hover { color: var(--fg); }
.sf-copy { font-size: 9.5px; letter-spacing: 0.2em; color: var(--dimmer); margin-left: auto; }

/* contact line on the portal/home */
.portal-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 20px; padding-top: 14px; }
.portal-contact a { font-size: 10.5px; letter-spacing: 0.16em; color: var(--dim); transition: color 0.3s var(--ease); }
.portal-contact a:hover { color: var(--fg); }
.portal-contact .sf-copy { margin-left: auto; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- post body: always two columns, optimal horizontal use ----------
   with a gallery → text | image(s) · without → text flows into two columns */
.post-body2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 40px 0; align-items: start; }
.post-body2 .pb2-text { display: flex; flex-direction: column; min-width: 0; }
.post-body2 .pb2-text .lead { margin: 0 0 18px; }
.post-body2 .pb2-text .body { margin: 0 0 18px; }
.post-body2 .pb2-media { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.post-body2 .pb2-fig { margin: 0; }
.post-body2 .pb2-fig .post-photo { display: block; width: 100%; height: auto; }
/* text-only posts: split the body across three columns (drops to 2 / 1 as it narrows) */
.post-content--cols { max-width: none; column-count: 3; column-gap: 40px; }
.post-content--cols .lead { margin-top: 0; margin-bottom: 18px; }
.post-content--cols .body { margin-bottom: 18px; }
@media (max-width: 1024px) { .post-content--cols { column-count: 2; column-gap: 48px; } }
@media (max-width: 760px) {
  .post-body2 { grid-template-columns: 1fr; gap: 26px; }
  .post-content--cols { column-count: 1; }
}

/* ===== direction-aware elastic "stretch" reveal =================================
   Blocks ease into place as they scroll into view — from below when scrolling
   down, from above when scrolling up — with a gummy overshoot + vertical stretch.
   !important so per-element transition/transform rules can't suppress the motion.
   Placed last so it also wins by cascade order. */
.rv {
  transition: opacity 0.7s var(--ease),
              transform 0.9s cubic-bezier(0.22, 1.15, 0.3, 1) !important;
  will-change: transform, opacity;
}
.rv-hidden { opacity: 0 !important; transform: translateY(48px) scaleY(1.07) !important; transform-origin: top center; }
.rv-hidden.rv-up { transform: translateY(-48px) scaleY(1.07) !important; transform-origin: bottom center; }
.rv-in { opacity: 1 !important; transform: translateY(0) scaleY(1) !important; }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv-hidden, .rv-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}
