/* Rollody — rollody.com
   Ground and chrome: a "golden middle" of steel blue-black and violet.
   The full rainbow lives only in the simulations and in one keyword per heading.
   Spacing follows Fibonacci steps; type steps by sqrt(phi), so every second step is x1.618. */

@font-face { font-family: "Lato"; src: url("assets/fonts/lato-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-heavy.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Lato"; src: url("assets/fonts/lato-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* ground and surfaces */
  --bg: #070B10;
  --bg-2: #0B1218;
  --s-1: #0E1820;
  --s-2: #16242F;
  --s-3: #1F3140;
  --line: #253745;
  --line-soft: rgba(155, 168, 171, .12);
  /* text */
  --fg: #F1F4F5;
  --fg-2: #CCD0CF;
  --muted: #9BA8AB;
  --faint: #7F8F98;
  /* action */
  --primary: #6A2FC8;
  --primary-hi: #7C42DA;
  --primary-soft: #9D71E8;
  --primary-ink: #D1B8FF;
  --danger: #FF5C7A;
  /* rainbow (HSV s .92, v 1) */
  --red: #FF2A2A;
  --orange: #FF9A14;
  --yellow: #FFE014;
  --green: #2BFF5A;
  --cyan: #14E8FF;
  --violet: #C84BFF;

  /* Fibonacci spacing */
  --s5: 5px; --s8: 8px; --s13: 13px; --s21: 21px; --s34: 34px; --s55: 55px; --s89: 89px; --s144: 144px;
  /* type, sqrt(phi) steps from 17px */
  --t-xs: 13.4px; --t-sm: 15px; --t-md: 17px; --t-lg: 21.6px; --t-xl: 27.5px; --t-2xl: 35px;
  --t-h2: clamp(35px, 4.2vw, 56.6px);
  --t-display: clamp(44.5px, 6.1vw, 89px);

  --r-sm: 8px; --r-md: 12px; --r-lg: 14px; --r-xl: 21px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-press: cubic-bezier(.33, 1, .68, 1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 8px 21px -5px rgba(0,0,0,.55), 0 2px 5px rgba(0,0,0,.35);
  --shadow-lg: 0 34px 55px -21px rgba(0,0,0,.75), 0 8px 21px -8px rgba(0,0,0,.5);
  --maxw: 1320px;
  --pad: clamp(21px, 4vw, 55px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 21px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--t-md)/1.62 "Lato", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 2px; border-radius: 6px; }
html { scrollbar-color: var(--s-3) var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--s-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line); }
.ico { width: 20px; height: 20px; flex: none; }

.skip { position: absolute; left: 13px; top: -60px; z-index: 100; padding: 8px 13px; background: var(--fg); color: var(--bg); border-radius: var(--r-sm); font-weight: 700; text-decoration: none; transition: top .2s var(--ease); }
.skip:focus { top: 13px; }

/* ---------- stage: near-black with a faint drifting grid ---------- */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 70% -10%, #0F1B26 0%, var(--bg) 55%); }
.stage-grid { position: absolute; inset: -55px;
  background-image:
    linear-gradient(to right, rgba(155,168,171,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(155,168,171,.055) 1px, transparent 1px);
  background-size: 55px 55px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 30%, #000 30%, transparent 85%);
          mask-image: radial-gradient(90% 70% at 50% 30%, #000 30%, transparent 85%);
  animation: drift 34s linear infinite; }
@keyframes drift { to { transform: translate3d(55px, 55px, 0); } }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-weight: 900; font-size: 21px; letter-spacing: -.02em; }
.orb { width: 26px; height: 26px; border-radius: 50%; position: relative; flex: none;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,.35) 18%, transparent 42%),
    radial-gradient(circle at 50% 120%, rgba(0,0,0,.55), transparent 60%),
    conic-gradient(from 200deg, var(--red), var(--orange), var(--yellow), var(--green), var(--cyan), #3D6BFF, var(--violet), var(--red));
  box-shadow: 0 0 13px rgba(124, 66, 218, .45), inset 0 -3px 6px rgba(0,0,0,.35); }
.brand-lg .orb { width: 34px; height: 34px; }
.brand-lg .brand-word { font-size: 27.5px; }

/* ---------- keyword colours ---------- */
.k { font-weight: inherit; }
.k-red { color: var(--red); } .k-orange { color: var(--orange); } .k-yellow { color: var(--yellow); }
.k-green { color: var(--green); } .k-cyan { color: var(--cyan); } .k-violet { color: var(--violet); }

/* ---------- buttons (HeroUI language) ---------- */
.btn {
  --h: 40px; position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r-md); border: 0;
  font-weight: 700; font-size: var(--t-sm); letter-spacing: .005em; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease-press), background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}
.btn:active, .btn.is-pressed { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-sm { --h: 34px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn-lg { --h: 50px; padding: 0 21px; font-size: var(--t-md); border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn-primary { background: var(--primary); color: #fff;
  box-shadow: 0 8px 21px -8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255,255,255,.16); }
.btn-primary:hover { background: var(--primary-hi); box-shadow: 0 13px 28px -8px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-bordered { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--line); }
.btn-bordered:hover { background: rgba(155,168,171,.06); box-shadow: inset 0 0 0 2px #3A5163; }
.btn-flat { background: rgba(155,168,171,.08); color: var(--fg-2); }
.btn-flat:hover { background: rgba(155,168,171,.14); color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: rgba(155,168,171,.1); color: var(--fg); }
.ripple { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .28; transform: scale(0);
  animation: ripple .62s var(--ease) forwards; }
.btn-primary .ripple { background: #fff; opacity: .3; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
.chip-code { background: rgba(255, 154, 20, .14); color: var(--orange); box-shadow: inset 0 0 0 1px rgba(255,154,20,.3); }

/* ---------- navbar ---------- */
.nav { position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: rgba(7, 11, 16, .62); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent; transition: transform .35s var(--ease), border-color .3s, background-color .3s; }
.nav.is-scrolled { border-bottom-color: var(--line-soft); background: rgba(7, 11, 16, .78); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 var(--pad);
  display: flex; align-items: center; gap: var(--s34); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { position: relative; padding: 8px 13px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: var(--t-sm); text-decoration: none; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--fg); background: rgba(155,168,171,.07); }
.nav-links a[aria-current="true"] { color: var(--fg); }
.nav-links a[aria-current="true"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--primary-soft); }
.nav-end { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }

/* mobile sheet */
.sheet { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(380px, 88vw); padding: var(--s21);
  background: var(--bg-2); color: var(--fg); border: 0; border-left: 1px solid var(--line);
  display: none; flex-direction: column; gap: var(--s34); }
.sheet[open] { display: flex; animation: sheet-in .4s var(--ease); }
.sheet::backdrop { background: rgba(3, 6, 9, .6); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes sheet-in { from { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-links { display: flex; flex-direction: column; }
.sheet-links a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--t-xl); font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.sheet .btn-block { margin-top: auto; }

/* ---------- hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: var(--s55) var(--pad) var(--s89);
  min-height: calc(100svh - var(--nav-h)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s55); align-items: center; }
.display { margin: 0; font-size: var(--t-display); line-height: 1.02; font-weight: 900; letter-spacing: -.035em; text-wrap: balance; max-width: 13ch; }
.lede { margin: var(--s34) 0 0; max-width: 46ch; font-size: var(--t-lg); line-height: 1.55; color: var(--fg-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s13); margin-top: var(--s34); }
.social-row { list-style: none; display: flex; gap: var(--s8); padding: 0; margin: var(--s34) 0 0; }
.social-row .btn { --h: 42px; border-radius: 50%; }

.hero-hall { position: relative; display: grid; grid-template-columns: 1fr 1.32fr 1fr; gap: var(--s21); align-items: end; }
.plinth { margin: 0; display: flex; flex-direction: column; gap: var(--s13); }
.plinth-side { padding-bottom: var(--s55); }
.screen { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(155,168,171,.16), var(--shadow-lg); }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.07), transparent 22%); }
.plinth-main .screen { box-shadow: 0 0 0 1px rgba(209,184,255,.3), var(--shadow-lg); }
.tag { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); padding: 0 0 0 10px; }
.tag-name { font-size: var(--t-sm); color: var(--fg); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-unit { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: var(--s89) var(--pad); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s13) var(--s34); margin-bottom: var(--s34); }
.h2 { margin: 0; font-size: var(--t-h2); line-height: 1.06; font-weight: 900; letter-spacing: -.03em; text-wrap: balance; max-width: 20ch; }
.h3 { margin: 0; font-size: var(--t-2xl); line-height: 1.1; font-weight: 900; letter-spacing: -.025em; }
.sub { margin: 0; max-width: 52ch; color: var(--muted); font-size: var(--t-md); }
.section-head .sub { padding-bottom: 6px; }

/* tabs (HeroUI tabs, solid variant) */
.tabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-lg); background: var(--s-1); box-shadow: inset 0 0 0 1px var(--line-soft); margin-bottom: var(--s34); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; font-size: var(--t-sm); cursor: pointer; white-space: nowrap; transition: color .25s var(--ease), transform .2s var(--ease-press); }
.tab:hover { color: var(--fg-2); }
.tab:active { transform: scale(.97); }
.tab[aria-selected="true"] { color: var(--fg); }
.tabs-cursor { position: absolute; z-index: 0; top: 4px; left: 0; height: 36px; width: 0; border-radius: 10px; background: var(--s-3); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.05); transition: transform .4s var(--ease), width .4s var(--ease); }

/* the hall */
.hall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s89) var(--s21); }
.exhibit { display: flex; flex-direction: column; gap: var(--s13); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.exhibit:nth-child(even) { transform: translateY(var(--s55)); }
.hall { padding-bottom: var(--s55); }
.exhibit.is-out { display: none; }
.exhibit-screen { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; background: #000 center / cover no-repeat; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(155,168,171,.14), var(--shadow-md);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.exhibit-screen video { width: 100%; height: 100%; object-fit: cover; transition: filter .45s var(--ease); filter: saturate(.85) brightness(.88); }
.exhibit-screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.06), transparent 20%); }
.exhibit:hover .exhibit-screen, .exhibit-screen:focus-visible { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(209,184,255,.4), var(--shadow-lg); }
.exhibit:hover video, .exhibit-screen:focus-visible video, .exhibit.is-playing video { filter: none; }
.exhibit-screen:active { transform: scale(.98); }
.exhibit-label h3 { margin: 0; font-size: var(--t-lg); line-height: 1.2; font-weight: 900; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exhibit-label p { margin: 4px 0 0; font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
.num { color: var(--fg); font-weight: 800; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); }

/* film */
.film-grid { display: grid; grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); gap: var(--s34); align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(155,168,171,.16), var(--shadow-lg); }
.player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player img { transition: transform .8s var(--ease), filter .5s; }
.player:hover img { transform: scale(1.02); }
.player-play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; flex-direction: row-reverse; gap: 13px; border: 0; padding: var(--s21); background: linear-gradient(0deg, rgba(7,11,16,.55), transparent 40%); cursor: pointer; color: #fff; }
.player-disc { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: rgba(106, 47, 200, .92); box-shadow: 0 21px 55px -8px rgba(0,0,0,.6); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.player-disc .ico { width: 28px; height: 28px; fill: #fff; margin-left: 4px; }
.player-hint { align-self: center; font-weight: 800; font-size: var(--t-sm); text-shadow: 0 1px 8px rgba(0,0,0,.7); opacity: 0; transform: translateX(5px); transition: opacity .3s, transform .3s var(--ease); }
.player-play:hover .player-disc { transform: scale(1.06); }
.player-play:hover .player-hint, .player-play:focus-visible .player-hint { opacity: 1; transform: none; }
.player-play:active .player-disc { transform: scale(.96); }
.chapters { list-style: none; margin: 0; padding: 8px; border-radius: var(--r-xl); background: var(--s-1); box-shadow: inset 0 0 0 1px var(--line-soft); counter-reset: ch; }
.chapters a { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; gap: 8px; padding: 9px 13px; border-radius: 10px; text-decoration: none; color: var(--fg-2); font-size: var(--t-sm); font-weight: 500; transition: background-color .2s, color .2s; }
.chapters a:hover { background: var(--s-2); color: var(--fg); }
.chapters .t { color: var(--green); font-weight: 800; font-variant-numeric: tabular-nums; font-size: var(--t-xs); }

/* code */
.code-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s55); align-items: center; }
.code-copy .sub { margin-top: var(--s21); }
.steps { list-style: none; margin: var(--s34) 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s21); counter-reset: st; }
.steps li { counter-increment: st; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.code-copy, .code-window { min-width: 0; }
.step-label { font-weight: 700; font-size: var(--t-sm); color: var(--fg-2); }
.step-label::before { content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--s-2); color: var(--orange); font-size: 12px; font-weight: 900; }
.snippet { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 5px 0 16px; border-radius: var(--r-md); background: var(--s-1); box-shadow: inset 0 0 0 1px var(--line); }
.snippet code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 500 14px/1.4 ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace; color: var(--fg-2); scrollbar-width: none; }
.snippet code::-webkit-scrollbar { display: none; }
.snippet code.is-cut { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
.snippet code::before { content: "$ "; color: var(--faint); }
.snippet .btn.is-done { color: var(--green); }

.code-window { border-radius: var(--r-xl); background: #0A1117; overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.cw-bar { display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); background: #0D161E; }
.dots { display: flex; gap: 6px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; } .dots i:nth-child(2) { background: #FEBC2E; } .dots i:nth-child(3) { background: #28C840; }
.cw-file { font: 600 13px ui-monospace, Menlo, Consolas, monospace; color: var(--fg-2); }
.cw-live { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); }
.cw-body { margin: 0; padding: 16px 0; overflow-x: auto; font: 500 13.5px/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #DCE3E6; counter-reset: ln; scrollbar-width: thin; }
.cw-body .ln { counter-increment: ln; display: inline-block; width: 44px; padding-right: 13px; text-align: right; color: #3E5260; user-select: none; }
.cw-body .ln::before { content: counter(ln); }
.kw { color: #C792FF; } .fn { color: #FFD166; } .nu { color: #FF9A14; } .op { color: #14E8FF; } .cm { color: #7D92A0; font-style: italic; }
.cw-out { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); }
.cw-out figure { margin: 0; position: relative; background: #000; }
.cw-out img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.cw-out figcaption { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(7,11,16,.75); backdrop-filter: blur(6px); font: 600 12px ui-monospace, Menlo, monospace; color: var(--fg-2); }

/* games */
.games-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s55); align-items: center; padding: var(--s55); border-radius: 28px;
  background: linear-gradient(160deg, rgba(37, 19, 77, .55), rgba(14, 24, 32, .6) 60%); box-shadow: inset 0 0 0 1px rgba(157, 113, 232, .22), var(--shadow-lg); }
.games-copy .sub { margin-top: var(--s21); }
.games-actions { margin-top: var(--s34); display: flex; gap: 13px; flex-wrap: wrap; }
.toy { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-xl); overflow: hidden; background: #05080C; cursor: crosshair; box-shadow: inset 0 0 0 1px var(--line); touch-action: manipulation; }
.toy canvas { width: 100%; height: 100%; }
.toy-count { position: absolute; top: 13px; left: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(7,11,16,.7); backdrop-filter: blur(6px); font-size: 12px; font-weight: 800; color: var(--muted); pointer-events: none; }
.toy-count span { color: var(--fg); font-variant-numeric: tabular-nums; }

/* follow */
.follow-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.follow-row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 34px; align-items: center; gap: var(--s21); padding: var(--s21) var(--s13); border-bottom: 1px solid var(--line); text-decoration: none; overflow: hidden; isolation: isolate; transition: padding .45s var(--ease); }
.follow-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%); opacity: 0; transition: opacity .45s var(--ease); }
.follow-row .ico { width: 28px; height: 28px; color: var(--fg-2); transition: color .3s; }
.fr-name { font-size: var(--t-2xl); font-weight: 900; letter-spacing: -.025em; }
.fr-handle { color: var(--muted); font-weight: 700; font-size: var(--t-md); }
.follow-row .fr-arrow { width: 24px; height: 24px; color: var(--faint); transition: transform .45s var(--ease), color .3s; }
.follow-row:hover { padding-left: var(--s34); }
.follow-row:hover::before { opacity: 1; }
.follow-row:hover .ico:first-child { color: var(--tint); }
.follow-row:hover .fr-arrow { color: var(--fg); transform: translate(3px, -3px); }

/* contact + form (HeroUI bordered inputs with floating labels) */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s55); align-items: start; }
.contact-copy .sub { margin-top: var(--s21); }
.mail-link { display: inline-flex; align-items: center; gap: 10px; margin-top: var(--s34); font-size: var(--t-lg); font-weight: 800; text-decoration: none; color: var(--fg); border-bottom: 2px solid var(--line); padding-bottom: 4px; transition: border-color .25s, color .25s; }
.mail-link:hover { border-color: var(--cyan); }
.mail-link .ico { color: var(--cyan); }
.form { display: grid; gap: var(--s21); padding: var(--s34); border-radius: 24px; background: rgba(14, 24, 32, .72); box-shadow: inset 0 0 0 1px var(--line-soft), var(--shadow-lg); backdrop-filter: blur(8px); }
.field { position: relative; }
.input { width: 100%; min-height: 58px; padding: 26px 14px 8px; border-radius: var(--r-md); border: 0; background: var(--s-2); color: var(--fg);
  box-shadow: inset 0 0 0 2px transparent; outline: none; transition: background-color .2s, box-shadow .2s var(--ease); caret-color: var(--primary-soft); font-size: var(--t-md); }
.input:hover { background: var(--s-3); }
.input:focus { background: var(--s-2); box-shadow: inset 0 0 0 2px var(--primary-soft); }
textarea.input { resize: vertical; min-height: 144px; line-height: 1.55; }
.field label { position: absolute; left: 14px; top: 18px; color: var(--muted); font-size: var(--t-md); font-weight: 500; pointer-events: none; transform-origin: left top; transition: transform .2s var(--ease), color .2s; }
.input:focus + label, .input:not(:placeholder-shown) + label, .field-select label { transform: translateY(-10px) scale(.78); }
.input:focus + label { color: var(--primary-ink); }
.field-select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-chev { position: absolute; right: 14px; top: 19px; color: var(--muted); pointer-events: none; }
.field-select option { background: var(--s-1); color: var(--fg); }
.field-help { margin: 6px 4px 0; font-size: 12px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.field-error { margin: 6px 4px 0; font-size: var(--t-xs); color: var(--danger); font-weight: 700; }
.field.is-invalid .input { box-shadow: inset 0 0 0 2px var(--danger); background: rgba(255, 92, 122, .07); }
.field.is-invalid label { color: var(--danger); }
.form-note { margin: -8px 0 0; text-align: center; font-size: var(--t-xs); color: var(--faint); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* footer */
.footer { margin-top: var(--s55); border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, transparent, rgba(11, 18, 24, .8)); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: var(--s55) var(--pad) var(--s34); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s34); }
.footer-brand p { margin: var(--s13) 0 0; color: var(--muted); max-width: 32ch; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.footer-col h3 { margin: 0 0 6px; font-size: var(--t-xs); font-weight: 800; color: var(--faint); letter-spacing: .04em; }
.footer-col a { color: var(--fg-2); text-decoration: none; font-weight: 500; width: fit-content; transition: color .2s; }
.footer-col a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--primary-soft); }
.footer-base { max-width: var(--maxw); margin: 0 auto; padding: var(--s21) var(--pad) var(--s34); display: flex; justify-content: space-between; gap: 13px; color: var(--faint); font-size: var(--t-xs); border-top: 1px solid var(--line-soft); }
.to-top { color: var(--muted); text-decoration: none; } .to-top:hover { color: var(--fg); }

/* modal (HeroUI modal: blurred backdrop, scale-in) */
.modal { width: min(920px, calc(100vw - 26px)); max-height: calc(100dvh - 34px); padding: 0; border: 0; border-radius: 24px; background: var(--s-1); color: var(--fg); box-shadow: 0 0 0 1px var(--line), 0 55px 144px -21px rgba(0,0,0,.85); overflow: hidden; }
.modal[open] { animation: pop .38s var(--ease); }
.modal::backdrop { background: rgba(3, 6, 9, .62); backdrop-filter: blur(8px); animation: fade .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(13px) scale(.96); } }
.modal-body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
.modal-screen { background: #000; aspect-ratio: 9 / 16; max-height: calc(100dvh - 34px); }
.modal-screen video { width: 100%; height: 100%; object-fit: cover; }
.modal-info { position: relative; padding: var(--s55) var(--s34) var(--s34); display: flex; flex-direction: column; }
.modal-close { position: absolute; top: 13px; right: 13px; }
.m-stat { margin: var(--s13) 0 0; }
.m-num { font-size: var(--t-2xl); font-weight: 900; letter-spacing: -.02em; color: var(--yellow); font-variant-numeric: tabular-nums; }
.m-unit { color: var(--muted); font-weight: 700; }
.m-desc { margin: var(--s21) 0 0; color: var(--fg-2); font-size: var(--t-md); line-height: 1.62; }
.m-actions { margin-top: auto; padding-top: var(--s34); display: grid; gap: var(--s13); }
.m-actions [hidden] { display: none; }

/* toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: 21px; display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: var(--r-lg); background: var(--s-2); color: var(--fg); font-weight: 700; font-size: var(--t-sm); box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); transform: translate(-50%, 150%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; pointer-events: none; }
.toast .ico { color: var(--green); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* entrance: content is visible by default; JS opts in */
.js .reveal { opacity: 0; transform: translateY(21px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .exhibit.reveal:nth-child(even) { transform: translateY(calc(var(--s55) + 21px)); }
.js .exhibit.reveal.is-in:nth-child(even) { transform: translateY(var(--s55)); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-end { margin-left: auto; }
  .hall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exhibit:nth-child(even) { transform: none; }
  .js .exhibit.reveal:nth-child(even) { transform: translateY(21px); }
  .js .exhibit.reveal.is-in:nth-child(even) { transform: none; }
  .exhibit:nth-child(3n+2) { transform: translateY(var(--s34)); }
  .js .exhibit.reveal.is-in:nth-child(3n+2) { transform: translateY(var(--s34)); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: var(--s34); gap: var(--s55); }
  .display { max-width: 15ch; }
  .hero-hall { max-width: 560px; }
  .film-grid, .code-grid, .contact-grid, .games-panel { grid-template-columns: 1fr; }
  .games-panel { padding: var(--s34); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-screen { aspect-ratio: 16 / 10; }
  .modal-info { padding: var(--s34) var(--s21) var(--s21); }
  .modal { overflow-y: auto; }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .section { padding: var(--s55) var(--pad); }
  .nav-end .btn-primary span { display: none; }
  .nav-end .btn-primary { width: 34px; padding: 0; }
  .lede { font-size: var(--t-md); }
  .hero-actions .btn { width: 100%; }
  .hero-hall { gap: var(--s13); }
  .tag-num { font-size: var(--t-lg); } .plinth-main .tag-num { font-size: var(--t-xl); }
  .plinth-side { padding-bottom: var(--s34); }
  .hall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s55) var(--s13); }
  .exhibit:nth-child(3n+2), .js .exhibit.reveal.is-in:nth-child(3n+2) { transform: none; }
  .exhibit:nth-child(even), .js .exhibit.reveal.is-in:nth-child(even) { transform: translateY(var(--s34)); }
  .hall { padding-bottom: var(--s34); }
  .exhibit-label h3 { font-size: var(--t-md); }
  .exhibit-label p { font-size: var(--t-xs); }
  .fr-name { font-size: var(--t-xl); }
  .follow-row { grid-template-columns: 28px minmax(0, 1fr) 24px; gap: var(--s13); }
  .fr-handle { grid-column: 2; grid-row: 2; font-size: var(--t-sm); margin-top: -8px; }
  .follow-row .fr-arrow { grid-column: 3; grid-row: 1 / 3; }
  .form { padding: var(--s21); }
  .chapters a { grid-template-columns: 44px 1fr; }
  .footer-base { flex-direction: column; }
}

@media (max-width: 640px) {
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1 1 auto; padding: 0 8px; font-size: 13.5px; }
  .player-disc { width: 55px; height: 55px; }
  .player-play { padding: var(--s13); }
}
@media (max-width: 480px) {
  .hero-hall { grid-template-columns: 1fr 2.8fr 1fr; margin-inline: calc(var(--pad) * -1); }
  .plinth-side { opacity: .75; }
  .plinth-side .tag { display: none; }
}

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