/* =========================================================
   CELL GAMES — styles
   Type: Tanker (display) + General Sans (text), Fontshare
   Look: ink black, paper white, organic "cell" shapes taken
   from the logo, one accent colour per game.
   ========================================================= */

:root {
  --ink: #0f0f0f;
  --ink-2: #202020;
  --ink-3: #2a2a2a;
  --paper: #f8f8f8;
  --mute: rgb(248 248 248 / 64%);
  --faint: rgb(248 248 248 / 50%);
  --line: rgb(248 248 248 / 13%);
  --green: #5dd62c;
  --green-rgb: 93 214 44;
  --green-deep: #337418;
  --live: var(--green);
  --game: 248 248 248;
  --font-display: "Tanker", Impact, "Arial Narrow Bold", sans-serif;
  --font-body: "General Sans", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pad: clamp(20px, 4vw, 56px);
  --cell: 58% 42% 55% 45% / 46% 56% 44% 54%;
  --font-serif: "Boska", Georgia, "Times New Roman", serif;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
html.smooth { scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }
body {
  background: var(--ink); color: var(--paper);
  font-family: var(--font-body); font-weight: 500; font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; position: relative; z-index: 1; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green); color: var(--ink); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* ---------- the cursor: a blade cut like the horn of the logo (pictures drawn by tools/cursors.py) ----------
   White on its own, green over anything that can be clicked. The two numbers after each picture are
   the pixel that does the clicking. The first line holds the ordinary cursors: they stay where a
   visitor's system asks for high-contrast colours, and on phones, which have no pointer to draw. */
:root { --cur: auto; --cur-link: pointer; --cur-text: text; --cur-aim: crosshair; --cur-zoom: zoom-in; }
@media (forced-colors: none) and (any-hover: hover) and (any-pointer: fine) {
  :root {
    --cur: url("../img/cursor/arrow.png") 6 5, auto;
    --cur-link: url("../img/cursor/link.png") 6 5, pointer;
    --cur-text: url("../img/cursor/text.png") 16 16, text;
    --cur-aim: url("../img/cursor/aim.png") 16 16, crosshair;
    --cur-zoom: url("../img/cursor/zoom.png") 6 5, zoom-in;
  }
  /* while the mouse button is held, the blade pulls in and burns brighter */
  html:active {
    --cur: url("../img/cursor/arrow-down.png") 6 5, auto;
    --cur-link: url("../img/cursor/link-down.png") 6 5, pointer;
  }
  /* sharper pictures on dense screens, in browsers that can pick between two sizes */
  @supports (cursor: image-set(url("a.png") 1x, url("b.png") 2x) 0 0, auto) {
    :root {
      --cur: image-set(url("../img/cursor/arrow.png") 1x, url("../img/cursor/arrow-2x.png") 2x) 6 5, auto;
      --cur-link: image-set(url("../img/cursor/link.png") 1x, url("../img/cursor/link-2x.png") 2x) 6 5, pointer;
      --cur-text: image-set(url("../img/cursor/text.png") 1x, url("../img/cursor/text-2x.png") 2x) 16 16, text;
      --cur-aim: image-set(url("../img/cursor/aim.png") 1x, url("../img/cursor/aim-2x.png") 2x) 16 16, crosshair;
      --cur-zoom: image-set(url("../img/cursor/zoom.png") 1x, url("../img/cursor/zoom-2x.png") 2x) 6 5, zoom-in;
    }
    html:active {
      --cur: image-set(url("../img/cursor/arrow-down.png") 1x, url("../img/cursor/arrow-down-2x.png") 2x) 6 5, auto;
      --cur-link: image-set(url("../img/cursor/link-down.png") 1x, url("../img/cursor/link-down-2x.png") 2x) 6 5, pointer;
    }
  }
}
html, label { cursor: var(--cur); }
a[href], button, select, summary, [role="button"] { cursor: var(--cur-link); }
button:disabled { cursor: var(--cur); }
input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="range"], [type="file"]), textarea { cursor: var(--cur-text); }

.container { position: relative; z-index: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--pad); }
.skip-link { position: fixed; top: 10px; left: -9999px; z-index: 2000; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 999px; }
.skip-link:focus { left: 10px; }

/* a slim dark scrollbar */
html { scrollbar-color: #343434 var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 10px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: #454545; }

/* a fine film grain over everything: takes the flatness out of the black */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2300; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.1 -0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (hover: none) { body::after { display: none; } }

/* ---------- intro: the logo draws itself, then eases away ---------- */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--ink);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loading-screen.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { position: relative; width: 150px; aspect-ratio: 234 / 287; transition: scale 0.9s var(--ease), opacity 0.5s; }
.loading-screen.is-out .loader-logo { scale: 1.1; opacity: 0; }
.loader-outline, .loader-fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-outline path {
  fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-stroke 0.9s ease-out 0.1s forwards;
}
.loader-fill { opacity: 0; animation: fill-fade 0.5s ease-out 0.75s forwards; }
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
@keyframes fill-fade { to { opacity: 1; } }

/* ---------- moving between pages: the studio's icon (black logo on its green) slides over, the logo draws
   itself as it does in the intro, then the screen lifts ---------- */
.pfx {
  --pfx-green: #65d829;
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center;
  background: var(--pfx-green); translate: 0 101%; border-radius: 48px 48px 0 0;
}
.pfx-logo {
  position: relative; width: clamp(84px, 6vw, 108px); aspect-ratio: 234 / 287;
  filter: drop-shadow(0 0 5px rgb(0 0 0 / 28%)); transition: scale 0.72s var(--ease), opacity 0.4s;
}
.pfx-outline, .pfx-fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.pfx-outline path {
  fill: none; stroke: #000; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.pfx-fill { filter: brightness(0); opacity: 0; }   /* the white logo file, shown black */
.pfx.is-in { translate: 0 0; border-radius: 0; transition: translate 0.46s cubic-bezier(0.65, 0, 0.2, 1), border-radius 0.46s; }
.pfx.is-in .pfx-outline path { animation: draw-stroke 0.4s ease-out 0.04s forwards; }   /* leaving: the outline draws */
.pfx.is-closed { translate: 0 0; border-radius: 0; }
.pfx.is-closed .pfx-outline path, .pfx.is-out .pfx-outline path { stroke-dashoffset: 0; }
.pfx.is-closed .pfx-fill { animation: fill-fade 0.3s ease-out 0.03s forwards; }          /* arriving: it fills in */
.pfx.is-out { translate: 0 -101%; border-radius: 0 0 48px 48px; transition: translate 0.72s cubic-bezier(0.65, 0, 0.2, 1), border-radius 0.72s; }
.pfx.is-out .pfx-fill { opacity: 1; }
.pfx.is-out .pfx-logo { scale: 1.1; opacity: 0; }                                          /* ... and eases away */

/* ---------- background + effect layers ---------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
/* the studio green: a glow in the top right and bottom left corners of the screen */
.bg-decor::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40vw 50vh at 100% 0%, rgb(var(--green-rgb) / 30%) 0, rgb(var(--green-rgb) / 11%) 46%, rgb(var(--green-rgb) / 0%) 100%),
    radial-gradient(ellipse 40vw 50vh at 0% 100%, rgb(var(--green-rgb) / 26%) 0, rgb(var(--green-rgb) / 9%) 46%, rgb(var(--green-rgb) / 0%) 100%);
}
.fx-field { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.fx-layer { position: fixed; inset: 0; z-index: 2400; overflow: hidden; pointer-events: none; }
.fx-sparks { position: fixed; inset: 0; z-index: 2450; width: 100%; height: 100%; pointer-events: none; }
.fx-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; transform: scaleX(0); transform-origin: 0 50%; background: var(--green); }
.fx-num { display: inline-block; font-variant-numeric: tabular-nums; }
.tilt { position: relative; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.5s var(--ease); }
.tilt.is-tilting { transition: none; }
.fx-spot { display: none; }

/* ---------- navigation: a floating capsule ---------- */
.nav {
  position: fixed; z-index: 1000; top: 14px; left: 14px; right: 14px; max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 7px 7px 7px 18px; border-radius: 999px;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgb(24 24 24 / 60%); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background 0.3s;
}
.nav.scrolled::before { background: rgb(24 24 24 / 88%); }
.nav-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.nav-brand img { width: 28px; height: auto; transition: rotate 0.6s var(--ease); }
.nav-brand:hover img { rotate: -8deg; }
.nav-name { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.03em; line-height: 1; white-space: nowrap; padding-top: 2px; }
.nav-menu { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  padding: 11px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1; color: var(--mute);
  transition: color 0.25s, background 0.25s;
}
.nav-link:hover { color: var(--paper); background: rgb(248 248 248 / 9%); }
.nav-link.active { color: var(--ink); background: var(--paper); }
.nav-social { display: flex; gap: 2px; padding-left: 8px; border-left: 1px solid var(--line); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--mute);
  transition: color 0.25s, background 0.25s;
}
.icon-btn:hover { color: var(--ink); background: var(--paper); }
/* sound on / off: four bars. They lie flat when the site is muted and jump when the page-change sound plays (assets/js/sound.js) */
.sound-btn { padding: 0; border: 0; background: none; }
.eq { display: flex; align-items: flex-end; gap: 2px; width: 15px; height: 14px; }
.eq i { flex: 1; height: 100%; border-radius: 1px; background: currentColor; transform-origin: 50% 100%; scale: 1 var(--h); transition: scale 0.45s var(--ease), opacity 0.3s; }
.eq i:nth-child(1) { --h: 0.46; --k: 1; }
.eq i:nth-child(2) { --h: 1; --k: 0.42; }
.eq i:nth-child(3) { --h: 0.62; --k: 0.96; }
.eq i:nth-child(4) { --h: 0.84; --k: 0.36; }
.sound-btn[aria-pressed="false"] .eq i { scale: 1 0.15; opacity: 0.6; }
.sound-btn.is-live .eq i { animation: eq-kick 0.36s var(--ease); }
@keyframes eq-kick { 38% { scale: 1 var(--k); } }
.nav-burger {
  display: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: var(--cur-link);
  background: var(--paper);
}
.nav-burger i { position: absolute; left: 13px; width: 18px; height: 2px; border-radius: 1px; background: var(--ink); transition: transform 0.35s var(--ease); }
.nav-burger i:first-child { top: 17px; }
.nav-burger i:last-child { top: 25px; }
.nav.is-open .nav-burger i:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav-burger i:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px; border-radius: 999px; cursor: var(--cur-link); white-space: nowrap; text-decoration: none;
  border: 1px solid var(--paper); background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; line-height: 1;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
/* the label rolls up on hover: a copy of it (drawn as a shadow below) slides into its place */
.btn > span { display: inline-flex; align-items: center; gap: 10px; line-height: 1.5; text-shadow: 0 2.6em 0 currentColor; transition: translate 0.5s var(--ease); }
.btn > span svg { flex: none; filter: drop-shadow(0 2.6em 0 currentColor); }
.btn:hover > span, .btn:focus-visible > span { translate: 0 -2.6em; }
.btn:hover { background: var(--green); border-color: var(--green); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgb(248 248 248 / 30%); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover { background: var(--green); color: var(--ink); border-color: var(--green); }
.btn-game { background: rgb(var(--game)); border-color: rgb(var(--game)); color: var(--ink); }
.btn-game:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 22px; font-size: 0.88rem; }

/* ---------- shared pieces ---------- */
.section { position: relative; padding: clamp(56px, 9vh, 104px) 0; }
.display { font-family: var(--font-display); font-size: clamp(2.1rem, 4.4vw, 3.9rem); line-height: 0.98; text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
.lede { max-width: 46ch; color: var(--mute); font-size: clamp(1.02rem, 1.3vw, 1.2rem); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.2; }
.eyebrow::before { content: ""; flex: none; width: 10px; height: 12px; border-radius: var(--cell); background: var(--green); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 100px); align-items: end; }
.split-side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--game)); }
.dot.live { background: var(--live); animation: live-pulse 2.6s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgb(var(--green-rgb) / 55%); } 70%, 100% { box-shadow: 0 0 0 9px rgb(var(--green-rgb) / 0%); } }

/* a row of plain numbers with hairlines between them */
.statline { display: flex; flex-wrap: wrap; margin-top: clamp(34px, 6vh, 70px); border-top: 1px solid var(--line); }
.stat-i { flex: 1 1 0; min-width: 150px; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 0 0; }
.stat-i + .stat-i { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-v { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1; letter-spacing: 0.01em; }
.stat-l { color: var(--mute); font-size: 0.9rem; line-height: 1.35; }

/* things that rise in: on load (.rise) and on scroll (.reveal) */
html.is-loading .rise, html.is-loading .page-title, html.is-loading .hero-mark { opacity: 0; }
html:not(.is-loading) .rise { animation: fx-rise 0.9s var(--ease) 0.35s backwards; }
html:not(.is-loading) .hero-actions.rise, html:not(.is-loading) .btn.rise { animation-delay: 0.45s; }
html:not(.is-loading) .statline.rise { animation-delay: 0.6s; }
.reveal, .reveal-stagger > * { opacity: 0; }
.reveal.in, .reveal-stagger.in > * { opacity: 1; animation: fx-rise 0.9s var(--ease) backwards; }
.reveal-stagger.in > *:nth-child(2) { animation-delay: 0.09s; }
.reveal-stagger.in > *:nth-child(3) { animation-delay: 0.18s; }
.reveal-stagger.in > *:nth-child(4) { animation-delay: 0.27s; }
.reveal-stagger.in > *:nth-child(5) { animation-delay: 0.36s; }
.reveal-stagger.in > *:nth-child(6) { animation-delay: 0.45s; }
@keyframes fx-rise { from { opacity: 0; translate: 0 30px; } }
@keyframes cell-morph {
  0% { border-radius: 58% 42% 55% 45% / 46% 56% 44% 54%; }
  50% { border-radius: 44% 56% 47% 53% / 57% 43% 57% 43%; }
  100% { border-radius: 52% 48% 60% 40% / 42% 60% 40% 58%; }
}

/* ---------- home: hero (poster headline left, living logo right) ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100svh; padding: clamp(88px, 12vh, 108px) 0 clamp(16px, 3.8vh, 34px);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: brightness(0.42); transition: opacity 1s; }
.hero-media video.ready { opacity: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: center; }
/* the headline is sized from the height of the screen as well as its width, so the numbers below it stay on the first screen */
.hero-title { font-family: var(--font-display); font-size: clamp(3.4rem, min(10.4vw, calc(23.2vh - 80px)), 10.6rem); line-height: 0.88; text-transform: uppercase; letter-spacing: 0.005em; }
.ht-line { display: block; overflow: hidden; padding: 0.05em 0.12em 0.05em; margin: -0.05em -0.12em -0.05em; }
.ht-in { display: block; translate: 0 114%; }
html:not(.is-loading) .ht-in { animation: line-up 1.05s var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms + 60ms); }
html:not(.is-loading) .ht-line:nth-child(2) .ht-in { animation-delay: 180ms; }
html:not(.is-loading) .ht-line:nth-child(3) .ht-in { animation-delay: 300ms; }
@keyframes line-up { from { translate: 0 114%; } to { translate: 0 0; } }
/* the highlighted word: an elegant italic serif in light green that glows green, like the logo */
.ht-line.is-cell { overflow: visible; margin-bottom: 0.03em; }
.ht-line.is-cell .ht-in { translate: none; }
html.is-loading .ht-line.is-cell .ht-in { opacity: 0; }
html:not(.is-loading) .ht-line.is-cell .ht-in { animation: word-in 1.1s var(--ease) 0.18s backwards; }
@keyframes word-in { from { opacity: 0; translate: 0 0.35em; } }
.ht-cell {
  display: inline-block; vertical-align: top; white-space: nowrap; font-family: "Boska", Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 500; font-size: 1.14em; line-height: 0.86; letter-spacing: -0.025em; text-transform: none;
  filter: drop-shadow(0 0 0.05em rgb(var(--green-rgb) / 85%)) drop-shadow(0 0 0.2em rgb(var(--green-rgb) / 55%)) drop-shadow(0 0 0.5em rgb(var(--green-rgb) / 30%));
}
/* the gradient sits on the word itself, with room for the slant of the italic */
.ht-word {
  display: inline-block; padding: 0.06em 0.14em 0.16em 0.02em; margin: -0.06em -0.14em -0.16em -0.02em; color: #c3f8a8;
  background: linear-gradient(180deg, #ecffe2 0%, #c3f8a8 50%, #9fef7c 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { max-width: 44ch; margin: clamp(12px, 3.4vh, 36px) 0 clamp(16px, 3vh, 28px); color: var(--mute); font-size: clamp(1.02rem, 1.35vw, 1.22rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-mark {
  position: relative; justify-self: center; display: grid; place-items: center;
  width: min(100%, 460px, 52vh); aspect-ratio: 1; translate: var(--px, 0px) var(--py, 0px);
}
html:not(.is-loading) .hero-mark { animation: mark-in 1.5s var(--ease) 0.2s backwards; }
@keyframes mark-in { from { opacity: 0; scale: 0.9; } }
/* the logo glows green: a tight glow on its outline and a soft pool of light behind it */
.hero-mark::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--green-rgb) / 13%) 0, rgb(var(--green-rgb) / 5%) 48%, rgb(var(--green-rgb) / 0%) 100%);
  animation: glow-breathe 5s ease-in-out infinite alternate;
}
@keyframes glow-breathe { from { opacity: 0.62; scale: 0.95; } to { opacity: 1; scale: 1.04; } }
.mark-logo {
  position: relative; width: 44%; height: auto; animation: mark-float 7s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px rgb(var(--green-rgb) / 34%)) drop-shadow(0 0 42px rgb(var(--green-rgb) / 22%));
}
@keyframes mark-float { from { translate: 0 -8px; } to { translate: 0 10px; } }

/* marquee band: speeds up and flips with the scroll direction */
.marquee { position: relative; z-index: 1; overflow: hidden; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-skew { transform: skewX(var(--skew, 0deg)); transition: transform 0.25s ease-out; }
.marquee-track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee-item {
  padding: 0 clamp(18px, 2.4vw, 40px); white-space: nowrap; line-height: 1; text-transform: uppercase;
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 4.2rem);
  color: transparent; -webkit-text-stroke: 1px rgb(248 248 248 / 46%);
}
.marquee-sep { flex: none; width: clamp(22px, 2.6vw, 38px); height: auto; opacity: 0.85; }

/* ---------- home: games (tall panels; the one you point at opens and shows its art in colour) ---------- */
.game-panels { display: flex; gap: 12px; height: clamp(440px, 64vh, 640px); margin-top: clamp(30px, 5vh, 54px); }
.game-panel {
  position: relative; isolation: isolate; overflow: hidden; flex: 1 1 0; min-width: 118px; border-radius: 28px;
  color: var(--paper); text-decoration: none; background: var(--ink-3); transition: flex-grow 0.8s var(--ease);
}
.game-panel.is-active { flex-grow: 6; }
.game-panel-art {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(0.42); scale: 1.06; transition: filter 0.7s, scale 1.5s var(--ease);
}
.game-panel.is-active .game-panel-art { filter: none; scale: 1; }
.game-panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.6s;
  background: linear-gradient(0deg, rgb(15 15 15 / 94%) 0, rgb(15 15 15 / 60%) 34%, rgb(15 15 15 / 0%) 74%);
}
.game-panel.is-active::after { opacity: 1; }
.game-panel-side {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0; writing-mode: vertical-rl; rotate: 180deg; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1; text-transform: uppercase; transition: opacity 0.3s;
}
.game-panel.is-active .game-panel-side { opacity: 0; }
.game-panel-info {
  position: absolute; left: clamp(22px, 3vw, 44px); bottom: clamp(22px, 3vw, 40px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: max-content; max-width: min(720px, 76vw);
  opacity: 0; translate: 0 16px; transition: opacity 0.3s, translate 0.6s var(--ease);
}
.game-panel.is-active .game-panel-info { opacity: 1; translate: 0 0; transition-delay: 0.22s; }
.game-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.game-name { font-family: var(--font-display); font-size: clamp(2.4rem, 5.6vw, 5.4rem); line-height: 0.92; text-transform: uppercase; }
.game-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--mute); font-size: 0.92rem; }
.game-facts b { font-weight: 600; color: var(--paper); }
.game-go {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; margin-top: 8px; padding: 0 22px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 0.92rem; font-weight: 600; white-space: nowrap; transition: background 0.25s;
}
.game-panel:hover .game-go { background: var(--green); }

/* ---------- cards: soft panels whose edge lights up green under the pointer ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(30px, 5vh, 54px); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .member, .form-card {
  border: 1px solid var(--line); background: linear-gradient(180deg, rgb(248 248 248 / 5%), rgb(248 248 248 / 1.5%));
  box-shadow: inset 0 1px 0 rgb(248 248 248 / 5%);
}
.card { padding: clamp(24px, 2.6vw, 36px); border-radius: var(--r-lg); transition: translate 0.5s var(--ease); }
/* any panel marked data-spot: fx.js tells it where the pointer is (--mx, --my) and its edge lights up there */
[data-spot] { position: relative; }
[data-spot]::before {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0px), rgb(var(--green-rgb) / 90%), rgb(var(--green-rgb) / 0%) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
[data-spot]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0px), rgb(var(--green-rgb) / 9%), rgb(var(--green-rgb) / 0%) 70%);
}
[data-spot]:hover::before, [data-spot]:hover::after { opacity: 1; }
.card:hover, .member:hover { translate: 0 -4px; }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: clamp(28px, 5vh, 56px); border-radius: 16px;
  color: var(--green); background: rgb(var(--green-rgb) / 10%); border: 1px solid rgb(var(--green-rgb) / 22%);
}
.card h3 { margin-bottom: 10px; font-family: var(--font-display); font-size: clamp(1.5rem, 2vw, 1.9rem); text-transform: uppercase; letter-spacing: 0.02em; }
.card p { color: var(--mute); font-size: 0.98rem; }
.note-bar {
  display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 18px 24px; border-radius: var(--r-md); text-decoration: none;
  border: 1px solid var(--line); background: rgb(248 248 248 / 2.5%); color: var(--mute); font-size: 0.95rem; line-height: 1.45;
  transition: border-color 0.3s, color 0.3s;
}
.note-bar > span { flex: 1; }
.note-bar strong { font-weight: 600; color: var(--paper); }
.note-bar svg { flex: none; color: var(--paper); transition: translate 0.4s var(--ease), color 0.3s; }
.note-bar:hover { border-color: rgb(var(--green-rgb) / 45%); color: var(--paper); }
.note-bar:hover svg:last-child { translate: 4px 0; color: var(--green); }

/* ---------- home: scoreboard ---------- */
.score-rows { margin-top: clamp(34px, 6vh, 64px); border-top: 1px solid var(--line); }
.score-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 20px 0 8px; border-bottom: 1px solid var(--line); }
.score-label { color: var(--mute); font-size: clamp(1rem, 1.4vw, 1.25rem); }
.score-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(3.4rem, 11vw, 9.6rem); line-height: 0.9; letter-spacing: 0.01em; }

/* ---------- home: affiliated groups (all members counted together, then one row per group) ---------- */
.groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 100px); align-items: center; margin-top: clamp(30px, 5vh, 54px); }
.groups-total { display: flex; flex-direction: column; gap: 12px; }
.groups-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(3.2rem, 8vw, 7.6rem); line-height: 0.9; letter-spacing: 0.01em; }
.groups-label { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: clamp(1rem, 1.4vw, 1.25rem); }
.groups-label::before { content: ""; flex: none; width: 10px; height: 12px; border-radius: var(--cell); background: var(--green); }
.group-rows { border-top: 1px solid var(--line); }
.group-row { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--paper); text-decoration: none; transition: padding 0.45s var(--ease); }
.group-row:hover { padding-left: 12px; }
.group-icon { flex: none; width: 64px; height: 64px; border-radius: 18px; object-fit: cover; background: var(--ink-3); }
.group-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.group-name { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; text-transform: uppercase; }
.group-count { color: var(--mute); font-size: 0.95rem; }
.group-count b { font-weight: 600; color: var(--paper); }
.group-go { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--mute); font-size: 0.9rem; font-weight: 600; transition: color 0.25s; }
.group-row:hover .group-go { color: var(--green); }

/* ---------- closing call: one clean white panel ---------- */
.cta-cell {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end;
  padding: clamp(36px, 6vw, 88px); border-radius: var(--r-xl); background: var(--paper); color: var(--ink);
}
.cta-cell::before {
  content: ""; position: absolute; right: -14%; bottom: -60%; width: 62%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--green-rgb) / 34%), rgb(var(--green-rgb) / 0%));
}
.cta-main, .cta-side { position: relative; }
.cta-cell .display { max-width: 15ch; font-size: clamp(2.4rem, 5.6vw, 5.4rem); line-height: 0.92; }
.cta-cell .eyebrow::before { background: var(--ink); }
.cta-side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cta-cell .lede { color: rgb(15 15 15 / 68%); }
.cta-cell :focus-visible { outline-color: var(--ink); }

/* ---------- inner pages: big title ---------- */
.page-head { position: relative; padding: clamp(150px, 22vh, 210px) 0 clamp(40px, 7vh, 80px); }
.page-title { font-family: var(--font-display); font-size: clamp(3.4rem, 12vw, 11rem); line-height: 0.88; text-transform: uppercase; letter-spacing: 0.005em; }
html:not(.is-loading) .page-title { animation: title-up 1.05s var(--ease) 0.05s backwards; }
@keyframes title-up { from { clip-path: inset(0 0 100% 0); translate: 0 40%; } to { clip-path: inset(-20% -5% -20% -5%); translate: 0 0; } }
.page-sub { max-width: 52ch; margin-top: 22px; color: var(--mute); font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
.page-head .btn { margin-top: 28px; }
/* a page that does not exist: the number stands behind the message as a large outline */
.page-head.is-lost { overflow: hidden; min-height: min(78vh, 760px); }
.nf-code {
  position: absolute; z-index: 0; right: var(--pad); bottom: clamp(20px, 6vh, 70px); pointer-events: none; -webkit-user-select: none; user-select: none;
  font-family: var(--font-display); font-size: clamp(9rem, 31vw, 28rem); line-height: 0.78; color: transparent; -webkit-text-stroke: 1.5px rgb(248 248 248 / 20%);
}
html:not(.is-loading) .nf-code { animation: fx-rise 1.2s var(--ease) 0.25s backwards; }
html.is-loading .nf-code { opacity: 0; }
.group-title { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- our work: a picture you can play with, console bar underneath ---------- */
.stages { position: relative; z-index: 1; display: flex; flex-direction: column; gap: clamp(48px, 9vh, 110px); width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--pad) 40px; }
.stage { position: relative; overflow: hidden; border-radius: 30px; background: var(--ink-2); border: 1px solid var(--line); scroll-margin-top: 96px; }
.stage-visual { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; max-height: 76vh; background: #000; cursor: var(--cur-aim); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; scale: 1.06; transition: scale 2.6s var(--ease); }
.stage.is-live .stage-bg { scale: 1; }
.stage-fx { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.stage-dark { position: absolute; inset: 0; z-index: 2; display: none; pointer-events: none; }
.stage-actors { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.stage-shade { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(0deg, var(--ink-2) 0, rgb(32 32 32 / 0%) 13%); }
.stage-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 48px); padding: clamp(22px, 3vw, 40px); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--mute); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.stage-title { font-family: var(--font-display); font-size: clamp(2.4rem, 4.4vw, 4.2rem); line-height: 0.92; text-transform: uppercase; }
.stage-desc { max-width: 44ch; margin-top: 12px; color: var(--mute); font-size: 0.98rem; }
.stage-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.stage-stats { display: grid; grid-template-columns: repeat(2, auto); justify-content: end; gap: 18px 40px; }
.fact strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 2.4vw, 2.4rem); line-height: 1; }
.fact > span { color: var(--mute); font-size: 0.82rem; }

/* damage numbers (anime stage) */
.dmg {
  position: absolute; z-index: 6; left: 0; top: 0; translate: -50% -50%; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(1.6rem, 2.8vw, 2.6rem); line-height: 1; color: #fff;
  text-shadow: 0 0 16px rgb(var(--game) / 90%), 0 2px 10px rgb(0 0 0 / 70%);
  animation: dmg 1.05s var(--ease) forwards;
}
.dmg.crit { font-size: clamp(2.2rem, 4vw, 3.6rem); color: rgb(var(--game)); text-shadow: 0 0 20px rgb(var(--game) / 60%), 0 2px 12px rgb(0 0 0 / 80%); }
.dmg small { margin-left: 0.35em; font-size: 0.5em; color: var(--paper); opacity: 0.85; }
@keyframes dmg {
  0% { opacity: 0; transform: translateY(8px) scale(0.8); }
  16% { opacity: 1; transform: translateY(0) scale(1.06); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0), -84px) scale(0.94); }
}

/* horror stage: rain over a dimmed picture; the pointer lights up the spot it is on */
@property --spot { syntax: "<length>"; inherits: true; initial-value: 0px; }
.stage[data-theme="horror"] { --spot: 0px; transition: --spot 0.6s var(--ease); }
.stage[data-theme="horror"].has-pointer { --spot: 250px; }
.stage[data-theme="horror"] .stage-fx { z-index: 4; }
.stage[data-theme="horror"] .stage-dark {
  display: block; background: rgb(2 4 6 / 68%);
  -webkit-mask-image: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), transparent 0, transparent calc(var(--spot) * 0.35), rgb(0 0 0 / 55%) var(--spot), #000 calc(var(--spot) * 1.6));
  mask-image: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), transparent 0, transparent calc(var(--spot) * 0.35), rgb(0 0 0 / 55%) var(--spot), #000 calc(var(--spot) * 1.6));
}
.stage[data-theme="horror"] .stage-shade {
  background:
    radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), rgb(255 252 244 / 11%) 0, transparent var(--spot)),
    linear-gradient(0deg, var(--ink-2) 0, rgb(32 32 32 / 0%) 13%);
}

/* ---------- insights: videos ---------- */
.videos, .team { padding-bottom: 40px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.video-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(30px, 4vw, 60px) clamp(20px, 3vw, 44px); }
.video { cursor: var(--cur-link); outline-offset: 8px; border-radius: 12px; }
.video.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.video-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink-3); border-radius: var(--r-lg); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease); }
.video:hover .video-thumb img { scale: 1.05; }
.video-play { position: absolute; left: 18px; bottom: 18px; display: grid; place-items: center; width: 58px; height: 58px; padding-left: 3px; border-radius: 50%; background: var(--paper); color: var(--ink); transition: scale 0.45s var(--ease), background 0.3s; }
.video:hover .video-play { scale: 1.08; background: var(--green); }
.video-time { position: absolute; right: 16px; bottom: 16px; padding: 5px 11px; border-radius: 999px; background: rgb(15 15 15 / 72%); font-size: 0.8rem; font-weight: 600; line-height: 1.3; }
.video-body { padding-top: 18px; }
.video.is-lead .video-body { padding-top: 0; }
.video-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; color: var(--mute); font-size: 0.84rem; }
.video-flag { padding: 2px 11px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; }
.video-title { font-family: var(--font-body); font-weight: 600; font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.25; }
.video.is-lead .video-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 0.96; text-transform: uppercase; }
.video-text { margin-top: 10px; color: var(--mute); }
.modal {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 24px;
  background: rgb(15 15 15 / 86%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-frame { position: relative; overflow: hidden; width: min(1100px, 100%); aspect-ratio: 16 / 9; border-radius: 24px; background: #000; scale: 0.97; transition: scale 0.4s var(--ease); }
.modal.open .modal-frame { scale: 1; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: var(--cur-link); background: var(--paper); color: var(--ink); font-size: 24px; line-height: 1; }

/* ---------- team ---------- */
.team-group + .team-group { margin-top: clamp(56px, 9vh, 100px); }
.team .group-title { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
/* one panel per person: a large portrait, then name, role, a few words and their links */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.member {
  display: grid; grid-template-columns: clamp(128px, 15vw, 216px) minmax(0, 1fr); align-items: center; gap: clamp(18px, 2.4vw, 36px);
  padding: clamp(14px, 1.5vw, 22px); border-radius: var(--r-lg); transition: translate 0.5s var(--ease);
}
.member-photo, .crew-photo { overflow: hidden; background: var(--ink-3); border-radius: var(--r-lg); }
.member-photo { width: 100%; aspect-ratio: 1; border-radius: 18px; }
.member-photo img, .crew-photo img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease), filter 0.6s; }
.member:hover .member-photo img, .crew-card:hover .crew-photo img { scale: 1.06; }
.member-photo img.is-blank, .crew-photo img.is-blank { object-fit: contain; padding: 26%; opacity: 0.8; }
.member-body { min-width: 0; padding: 4px 8px 4px 0; }
.member h3 { font-family: var(--font-display); font-size: clamp(1.9rem, 2.8vw, 2.7rem); text-transform: uppercase; letter-spacing: 0.01em; }
.member-role { margin-top: 8px; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(1.08rem, 1.35vw, 1.3rem); line-height: 1.2; }
.member-bio { max-width: 44ch; margin-top: 12px; color: var(--mute); font-size: 0.95rem; }
.member-links { display: flex; flex-wrap: wrap; gap: 2px; margin: 12px 0 0 -11px; }
/* the team as a strip of portraits on the home page: grey until you point at one */
.crew { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.crew-card { display: flex; flex-direction: column; gap: 6px; color: var(--paper); text-decoration: none; }
.crew-photo { display: block; aspect-ratio: 1 / 1.1; margin-bottom: 10px; }
.crew-photo img { filter: grayscale(1) contrast(1.05); }
.crew-card:hover .crew-photo img, .crew-card:focus-visible .crew-photo img { filter: none; }
.crew-name { font-family: var(--font-display); font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1; text-transform: uppercase; }
.crew-role { color: var(--mute); font-size: 0.92rem; }

/* ---------- contact ---------- */
/* left: the invitation and the other ways to reach the studio. right: the form */
.contact-split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 6vw, 100px); align-items: start; }
.contact-lead .display { margin-bottom: 16px; }
.form-intro { max-width: 46ch; margin-bottom: clamp(26px, 4vh, 40px); color: var(--mute); }
.form-intro a { color: var(--paper); }
.channels { list-style: none; border-top: 1px solid var(--line); }
.channel { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--paper); text-decoration: none; transition: padding 0.45s var(--ease); }
.channel:hover { padding-left: 12px; }
.channel-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgb(248 248 248 / 4%); }
.channel-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.channel-name { font-weight: 600; line-height: 1.3; }
.channel-handle { overflow: hidden; color: var(--mute); font-size: 0.9rem; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.channel > svg { flex: none; color: var(--mute); transition: color 0.25s, translate 0.4s var(--ease); }
.channel:hover > svg { color: var(--green); translate: 4px 0; }
.form-card { padding: clamp(22px, 3.4vw, 48px); border-radius: var(--r-xl); }
.form-card[data-spot]::after { display: none; }
#contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field-wide, .form-end { grid-column: 1 / -1; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.field label { display: block; margin-bottom: 8px; color: var(--mute); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 18px; border-radius: 16px; background: var(--ink); border: 1px solid var(--line); font-size: 1rem; transition: border-color 0.2s; }
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f8f8f8' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.field select option { background: var(--ink-2); color: var(--paper); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--paper); }
.send-btn { flex: none; }
.send-btn:disabled { opacity: 0.6; cursor: progress; }
.form-status { flex: 1 1 220px; color: var(--mute); font-size: 0.94rem; line-height: 1.45; }
.form-status.ok { color: #7be3ae; }
.form-status.err { color: #ff9c9c; }
/* a box the form came back for (an e-mail address that cannot exist, say): red until it is changed, the reason under it */
.field.is-wrong label { color: #ff9c9c; }
.field.is-wrong input, .field.is-wrong select, .field.is-wrong textarea,
.field.is-wrong input:focus, .field.is-wrong select:focus, .field.is-wrong textarea:focus { border-color: #ff5d5d; box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.18); }
.field-note { margin-top: 8px; color: #ff9c9c; font-size: 0.86rem; line-height: 1.45; }
.field-note:empty { display: none; }

/* a form box no person sees or reaches; robots fill it in, which is how the contact form spots them */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- legal ---------- */
.legal { max-width: 820px; padding-bottom: 40px; }
.legal-block { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-block h2 { font-family: var(--font-display); font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px; }
.legal-block p { color: var(--mute); line-height: 1.75; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; overflow: hidden; margin-top: clamp(30px, 5vh, 60px); border-top: 1px solid var(--line); }
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(30px, 6vw, 100px); padding-top: clamp(44px, 7vh, 80px); }
.footer-lead { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-text { max-width: 34ch; color: var(--mute); font-size: 0.98rem; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 14px; color: var(--paper); text-decoration: none;
  font-family: var(--font-display); font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: 0.03em;
}
.footer-brand img { width: 44px; height: auto; transition: rotate 0.6s var(--ease); }
.footer-brand:hover img { rotate: -8deg; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h3 { margin-bottom: 16px; color: var(--faint); font-family: var(--font-body); font-size: 0.86rem; font-weight: 500; line-height: 1.4; }
.footer-cols ul { display: grid; gap: 10px; list-style: none; }
.footer-cols a { display: inline-flex; align-items: center; gap: 9px; color: var(--paper); text-decoration: none; font-size: 1.02rem; transition: color 0.25s, translate 0.4s var(--ease); }
.footer-cols a:hover { color: var(--green); translate: 4px 0; }
/* the studio name as one outlined line, exactly as wide as the page (layout.js sizes it to fit) */
.footer-word { margin-top: clamp(40px, 8vh, 96px); pointer-events: none; -webkit-user-select: none; user-select: none; }
.footer-word span {
  display: inline-block; white-space: nowrap; font-family: var(--font-display); font-size: min(calc((100vw - 2 * var(--pad) - 18px) / 4.03), 21rem);
  line-height: 0.78; letter-spacing: 0; color: transparent; -webkit-text-stroke: 1.5px rgb(248 248 248 / 30%);
}
.footer-base { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: clamp(22px, 3.6vh, 38px); padding: 18px 0 26px; border-top: 1px solid var(--line); }
.copyright { color: var(--faint); font-size: 0.86rem; }
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: color 0.25s; }
.to-top svg { rotate: -90deg; transition: translate 0.4s var(--ease); }
.to-top:hover { color: var(--paper); }
.to-top:hover svg { translate: 0 -3px; }

/* ---------- blog: list of posts ---------- */
.blog { padding-bottom: 40px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter-row:empty { display: none; }
.filter {
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: none; cursor: var(--cur-link);
  color: var(--mute); font-size: 0.9rem; font-weight: 600; transition: color 0.25s, background 0.25s, border-color 0.25s;
}
.filter:hover { color: var(--paper); border-color: rgb(248 248 248 / 40%); }
.filter.is-active { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(30px, 4vw, 60px) clamp(20px, 3vw, 44px); }
.post-list.is-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: block; border-radius: 12px; outline-offset: 8px; color: var(--paper); text-decoration: none; }
.post-card.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.post-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 24px; background: var(--ink-3); }
.post-cover > img:not(.cover-logo) { width: 100%; height: 100%; object-fit: cover; transition: scale 1.1s var(--ease); }
.post-card:hover .post-cover > img:not(.cover-logo) { scale: 1.05; }
/* a post without a picture: the logo on a dark panel with a little of the studio green in one corner */
.post-cover.is-blank {
  display: grid; place-items: center; border: 1px solid var(--line);
  background: radial-gradient(ellipse 80% 110% at 100% 0%, rgb(var(--green-rgb) / 24%), rgb(var(--green-rgb) / 0%) 70%), var(--ink-2);
}
.cover-logo { width: 13%; height: auto; opacity: 0.92; transition: scale 0.8s var(--ease); }
.post-card:hover .cover-logo { scale: 1.12; }
.post-body { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.post-card.is-lead .post-body { padding-top: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--mute); font-size: 0.84rem; }
.post-meta a { color: var(--paper); }
.byline { display: inline-flex; align-items: center; gap: 8px; }
.byline img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
.byline-handle { opacity: 0.6; }
.byline.is-small { gap: 6px; }
.byline.is-small img { width: 20px; height: 20px; border-radius: 6px; }
.post-tag { padding: 2px 11px; border-radius: 999px; background: var(--green); color: var(--ink); font-weight: 600; letter-spacing: 0.03em; }
.post-title { font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 600; line-height: 1.25; }
.post-card.is-lead .post-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 0.98; text-transform: uppercase; }
.post-excerpt { color: var(--mute); }
.empty { grid-column: 1 / -1; color: var(--mute); }

/* ---------- game page ---------- */
.game-hero, .post { padding-top: clamp(104px, 14vh, 132px); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--mute); font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: color 0.25s; }
.back-link:hover { color: var(--paper); }
.back-link svg { rotate: 180deg; }
.game-banner { overflow: hidden; width: 100%; aspect-ratio: 21 / 9; max-height: 50vh; border-radius: 30px; background: var(--ink-3); }
.game-banner img { width: 100%; height: 100%; object-fit: cover; }
.game-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-top: clamp(26px, 4vh, 44px); }
.game-head .page-title { font-size: clamp(3rem, 8.6vw, 8rem); }
.game-cta { flex: none; display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 8px; }
.split-article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 6vw, 100px); align-items: start; }
/* Screenshots: three in a row (two on a tablet, one on a phone). Pictures left over never stand alone: they share
   full-width rows of two, so 5 pictures are 3 + 2, 4 are 2 + 2 and 7 are 3 + 2 + 2. The row is six columns wide:
   a picture takes two of them, or three (--wide) in a row of two. */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.gallery img, .article figure img { width: 100%; border-radius: 22px; cursor: var(--cur-zoom); }
.gallery img { grid-column: span var(--wide, 2); aspect-ratio: 16 / 9; object-fit: cover; }
.gallery img:nth-child(3n+1):nth-last-child(2), .gallery img:nth-child(3n+2):last-child,       /* two left over: one row of two */
.gallery img:nth-child(3n+1):nth-last-child(4), .gallery img:nth-child(3n+2):nth-last-child(3),
.gallery img:nth-child(3n):nth-last-child(2), .gallery img:nth-child(3n+1):last-child { --wide: 3; }   /* one left over: two rows of two */
.gallery img:first-child:last-child { --wide: 6; }   /* a single picture takes the whole row */
.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 26px; border-top: 1px solid var(--line); }
.fact-card { padding: 26px 26px 6px 0; }
.fact-card + .fact-card { padding-left: 26px; border-left: 1px solid var(--line); }
.fact-card strong { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.fact-card strong::before { content: ""; flex: none; width: 10px; height: 12px; border-radius: var(--cell); background: var(--green); }
.fact-card p { color: var(--mute); font-size: 0.98rem; }
.stage-title a { color: inherit; text-decoration: none; transition: color 0.25s; }
.stage-title a:hover { color: rgb(var(--game)); }

/* ---------- article text (blog posts and the "about" part of game pages) ---------- */
.article > * + * { margin-top: 1.15em; }
.article p, .article li { color: var(--mute); font-size: clamp(1.05rem, 1.25vw, 1.2rem); line-height: 1.7; }
.article h2 { margin-top: 1.7em; font-family: var(--font-display); font-size: clamp(1.7rem, 2.6vw, 2.4rem); text-transform: uppercase; letter-spacing: 0.02em; }
.article figure { margin: 2em 0; }
.article figcaption { margin-top: 10px; color: var(--faint); font-size: 0.88rem; }
.article blockquote { margin: 1.8em 0; padding-left: 24px; border-left: 3px solid var(--green); font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(1.6rem, 2.7vw, 2.5rem); line-height: 1.15; }
.article ul { padding-left: 1.2em; }
.article li + li { margin-top: 0.4em; }
.article li::marker { color: var(--green); }
.fact-box { margin: 2em 0; padding: 22px 26px; border-radius: 22px; background: rgb(var(--green-rgb) / 9%); border: 1px solid rgb(var(--green-rgb) / 30%); }
.fact-box strong { display: block; margin-bottom: 6px; color: var(--green); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em; }
.fact-box p { color: var(--paper); }

/* ---------- a single blog post ---------- */
.container.post-wrap { max-width: 900px; }
.page-title.post-h1 { margin-top: 14px; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 0.94; }
.post-lede { margin-top: 20px; color: var(--mute); font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
.post-hero { overflow: hidden; aspect-ratio: 16 / 9; margin-top: clamp(28px, 5vh, 48px); border-radius: 28px; background: var(--ink-3); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post .article { margin-top: clamp(28px, 5vh, 48px); }
.post-end { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.lightbox > img { max-width: min(1400px, 100%); max-height: 86vh; border-radius: 18px; }

/* ---------- finishing details ---------- */
/* small pills: what the studio is (hero) and where the numbers come from */
.hero-tag, .live-tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 15px 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgb(248 248 248 / 3.5%); color: var(--mute); font-size: 0.86rem; line-height: 1;
}
.hero-tag { margin-bottom: clamp(10px, 2.4vh, 26px); }
.hero .statline { margin-top: clamp(14px, 3.6vh, 48px); }
@media (min-width: 901px) { .hero .stat-i { padding-top: clamp(12px, 2.4vh, 22px); } }
/* headings rise in word by word (main.js wraps the words) */
.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.04em 0.1em; margin: -0.08em -0.04em -0.1em; }
.is-split .wi { display: inline-block; translate: 0 115%; }
.is-split.in .wi { animation: word-up 0.95s var(--ease) both; animation-delay: calc(var(--i) * 55ms + 80ms); }
@keyframes word-up { from { translate: 0 115%; } to { translate: 0 0; } }
/* the menu tucks away while scrolling down and returns on the way up */
.nav { transition: translate 0.55s var(--ease); }
.nav.is-away { translate: 0 -150%; }
.nav:focus-within { translate: none; }
.section-row .display { font-size: clamp(2rem, 4vw, 3.4rem); }
/* headlines break into even lines and paragraphs avoid a lonely last word (browsers that cannot do this ignore it) */
.page-title, .post-title, .video-title, .stage-title, .game-name, .member h3, .card h3 { text-wrap: balance; }
.lede, .page-sub, .post-lede, .hero-subtitle, .article p, .post-excerpt, .member-bio, .card p, .footer-text { text-wrap: pretty; }
/* shown only when the browser has scripts turned off */
.noscript { position: fixed; z-index: 9999; left: 14px; right: 14px; bottom: 14px; padding: 16px 20px; border-radius: 18px; background: var(--paper); color: var(--ink); text-align: center; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .nav-link { padding: 11px 12px; }
  .stage-bar { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 26px; }
  .stage-desc { margin-left: auto; margin-right: auto; }
  .stage-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .stage-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav { padding: 6px 6px 6px 16px; }
  .nav-burger { display: block; }
  .nav-menu {
    position: fixed; inset: 0; z-index: -2; flex-direction: column; align-items: flex-start; justify-content: center; gap: 34px;
    padding: 110px var(--pad) 40px; overflow-y: auto;
    background:
      radial-gradient(ellipse 80vw 34vh at 100% 0%, rgb(var(--green-rgb) / 22%) 0, rgb(var(--green-rgb) / 0%) 100%),
      radial-gradient(ellipse 80vw 34vh at 0% 100%, rgb(var(--green-rgb) / 18%) 0, rgb(var(--green-rgb) / 0%) 100%), var(--ink);
    opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
  }
  .nav.is-open .nav-menu { opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav-link, .nav-link.active, .nav-link:hover { padding: 4px 0; border-radius: 0; background: none; }
  .nav-link {
    color: var(--faint); font-family: var(--font-display); font-weight: 400; font-size: clamp(2.8rem, 13vw, 4.4rem); letter-spacing: 0.01em;
    opacity: 0; translate: 0 22px; transition: opacity 0.4s, translate 0.55s var(--ease), color 0.25s;
  }
  .nav-link.active, .nav-link:hover { color: var(--paper); }
  .nav.is-open .nav-link { opacity: 1; translate: 0 0; }
  .nav.is-open .nav-link:nth-child(2) { transition-delay: 0.05s; }
  .nav.is-open .nav-link:nth-child(3) { transition-delay: 0.1s; }
  .nav.is-open .nav-link:nth-child(4) { transition-delay: 0.15s; }
  .nav.is-open .nav-link:nth-child(5) { transition-delay: 0.2s; }
  .nav-social { gap: 6px; margin-left: -11px; padding: 0; border: 0; }

  .hero { padding: 116px 0 36px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(3.4rem, 17.5vw, 7rem); }
  .hero-mark { position: absolute; z-index: 0; top: -150px; right: -22%; width: min(78vw, 420px); opacity: 0.55; }
  .hero-copy { position: relative; z-index: 1; }
  .split, .video.is-lead, .post-card.is-lead, .split-article, .post-list, .post-list.is-small { grid-template-columns: 1fr; }
  .split { gap: 22px; align-items: start; }
  .statline { display: grid; grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .stat-i, .stat-i + .stat-i { min-width: 0; padding: 18px 12px 0 0; border-left: 0; }
  .stat-i:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  /* games: each one becomes a card, its picture on top and the details underneath */
  .game-panels { flex-direction: column; height: auto; gap: 14px; }
  .groups { grid-template-columns: 1fr; gap: 28px; }
  .game-panel, .game-panel.is-active { flex: none; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; border: 1px solid var(--line); background: var(--ink-2); }
  .game-panel-art, .game-panel.is-active .game-panel-art { position: relative; z-index: 0; height: auto; aspect-ratio: 16 / 9; filter: none; scale: 1; }
  .game-panel::after, .game-panel-side { display: none; }
  .game-panel-info, .game-panel.is-active .game-panel-info { position: static; width: auto; max-width: none; padding: 20px 20px 22px; opacity: 1; translate: none; }
  .game-go { margin-top: 10px; }
  .bg-decor::before {
    background:
      radial-gradient(ellipse 80vw 34vh at 100% 0%, rgb(var(--green-rgb) / 24%) 0, rgb(var(--green-rgb) / 8%) 46%, rgb(var(--green-rgb) / 0%) 100%),
      radial-gradient(ellipse 80vw 34vh at 0% 100%, rgb(var(--green-rgb) / 20%) 0, rgb(var(--green-rgb) / 7%) 46%, rgb(var(--green-rgb) / 0%) 100%);
  }
  .game-head { flex-direction: column; align-items: flex-start; }
  .game-banner { aspect-ratio: 16 / 9; border-radius: 22px; }
  .gallery img { grid-column: span 3; }                              /* two in a row */
  .gallery img:nth-child(odd):last-child { grid-column: span 6; }    /* an odd one out takes the whole row */
  .fact-grid { grid-template-columns: 1fr; }
  .fact-card, .fact-card + .fact-card { padding: 22px 0 18px; border-left: 0; }
  .fact-card + .fact-card { border-top: 1px solid var(--line); }
  .post-cover, .post-hero { border-radius: 18px; }

  .cards-3, .cards-4, .cta-cell, .footer-main, .contact-split { grid-template-columns: 1fr; }
  .nf-code { position: static; display: block; margin: 34px var(--pad) 0; text-align: right; }
  .page-head.is-lost { min-height: 0; }
  .card-icon { margin-bottom: 26px; }
  .note-bar { align-items: flex-start; }
  .cta-cell { align-items: start; border-radius: 30px; }
  .crew { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .score-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px 0 8px; }
  .score-num { font-size: clamp(3.6rem, 21vw, 7rem); }
  .stage { border-radius: 22px; }
  .video-list, .team-grid, #contact-form { grid-template-columns: 1fr; }
  .video-thumb, .crew-photo { border-radius: 20px; }
  .member { border-radius: 22px; }
  .member-photo { border-radius: 14px; }
  .form-card { border-radius: 28px; }
  .footer-base { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .nav-name { font-size: 1.25rem; }
  .btn { min-height: 50px; padding: 0 22px; }
  .hero-actions .btn, .stage-actions .btn { flex: 1 1 100%; }
  .stage-actions { width: 100%; }
  .stage-stats { gap: 14px 28px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .member { grid-template-columns: 92px minmax(0, 1fr); align-items: start; gap: 16px; }
  .member-body { padding: 2px 4px 2px 0; }
  .send-btn { flex: 1 1 100%; }
  .gallery img { grid-column: span 6; }   /* one in a row */
  .group-go { font-size: 0; gap: 0; }
  .group-icon { width: 54px; height: 54px; border-radius: 15px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; }
  .ht-in { translate: none; }
  .fx-sparks { display: none; }
}

/* ---------- on-page text editor ---------- */
html.cg-edit .reveal, html.cg-edit .reveal-stagger > *, html.cg-edit .rise, html.cg-edit .page-title, html.cg-edit .hero-mark { opacity: 1; animation: none; }
html.cg-edit .ht-in { translate: none; animation: none; }
html.cg-edit [data-t] { outline: 1px dashed rgb(255 214 109 / 0%); outline-offset: 3px; border-radius: 3px; cursor: var(--cur-text); transition: outline-color 0.15s, background 0.15s; }
html.cg-edit [data-t]:hover { outline-color: rgb(255 214 109 / 80%); background: rgb(255 214 109 / 8%); }
html.cg-edit [data-t]:focus { outline: 2px solid #ffd66d; background: rgb(255 214 109 / 12%); }
html.cg-edit [data-t].cg-changed { outline: 1px dashed rgb(110 231 183 / 75%); }

.cg-toolbar {
  position: fixed; left: 50%; bottom: 18px; z-index: 5000; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  max-width: calc(100vw - 24px); padding: 8px 8px 8px 20px; border-radius: 999px;
  background: rgb(22 22 27 / 95%); border: 1px solid rgb(255 214 109 / 40%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgb(0 0 0 / 60%); font-size: 0.9rem; line-height: 1.3;
}
.cg-toolbar .cg-status { margin-right: 6px; color: var(--mute); }
.cg-toolbar .cg-status b { color: #ffd66d; }
.cg-toolbar button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgb(248 248 248 / 8%); cursor: var(--cur-link); font-weight: 600; font-size: 0.85rem; }
.cg-toolbar button:hover { background: rgb(248 248 248 / 16%); }
.cg-toolbar button.cg-save { background: #ffd66d; color: #1a1400; border-color: #ffd66d; }
.cg-toolbar button.cg-save:hover { filter: brightness(1.08); }
.cg-toolbar button.cg-headline[aria-expanded="true"] { background: rgb(255 214 109 / 18%); border-color: rgb(255 214 109 / 50%); }
.cg-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 5001; transform: translate(-50%, 10px);
  max-width: calc(100vw - 30px); padding: 10px 18px; border-radius: 999px; text-align: center;
  background: var(--ink-3); border: 1px solid var(--line); font-size: 0.9rem;
  opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.cg-toast.show { opacity: 1; transform: translate(-50%, 0); }
/* the lock: shown over the page until the edit password is typed (editor.js) */
.cg-lock { position: fixed; inset: 0; z-index: 5200; display: grid; place-items: center; padding: 20px; background: rgb(10 10 12 / 78%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cg-lock[hidden] { display: none; }
.cg-lock-box {
  width: min(400px, 100%); padding: 26px; border-radius: 24px; font-size: 0.92rem;
  background: rgb(22 22 27 / 98%); border: 1px solid rgb(255 214 109 / 40%); box-shadow: 0 20px 50px rgb(0 0 0 / 60%);
}
.cg-lock-box h4 { font-family: var(--font-body); font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; }
.cg-lock-text { margin-bottom: 14px; color: var(--mute); line-height: 1.5; }
.cg-lock-input { display: block; width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.cg-lock-input:focus { outline: none; border-color: #ffd66d; }
.cg-lock-input[hidden], .cg-lock-go[hidden] { display: none; }
.cg-lock-note { min-height: 1.4em; margin: 8px 0 12px; color: #ffd66d; font-size: 0.84rem; line-height: 1.4; }
.cg-lock-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-lock-row button { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgb(248 248 248 / 8%); cursor: var(--cur-link); font-weight: 600; font-size: 0.86rem; }
.cg-lock-row button:hover { background: rgb(248 248 248 / 16%); }
.cg-lock-row .cg-lock-go { background: #ffd66d; color: #1a1400; border-color: #ffd66d; }
.cg-panel {
  position: fixed; left: 50%; bottom: 84px; z-index: 5001; transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px)); padding: 20px; border-radius: 24px;
  background: rgb(22 22 27 / 98%); border: 1px solid rgb(255 214 109 / 40%); box-shadow: 0 20px 50px rgb(0 0 0 / 60%);
  font-size: 0.9rem;
}
.cg-panel[hidden] { display: none; }
.cg-panel h4 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.cg-panel p { margin-bottom: 12px; color: var(--mute); font-size: 0.82rem; line-height: 1.5; }
.cg-panel label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 0.78rem; }
.cg-panel input, .cg-panel textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.cg-panel input:focus, .cg-panel textarea:focus { outline: none; border-color: #ffd66d; }
html.cg-edit .btn > span { translate: none; text-shadow: none; }
html.cg-edit .btn > span svg { filter: none; }
