:root {

  --page-bg:      #0A0B0E;
  --panel-bg:     #121419;

  --ink:          #F3F4F7;
  --ink-dim:      #9BA2AE;
  --ink-faint:    #6B7280;

  --edge:         rgba(255, 255, 255, 0.12);
  --edge-strong:  rgba(255, 255, 255, 0.22);

  --flaguu-accent:      #8B6BF0;
  --flaguu-accent-soft: #A78BFA;
  --bay-accent:         #38BDF8;
  --bay-accent-soft:    #7DD3FC;
  --headways-accent:      #E24B4B;
  --headways-accent-soft: #F28B8B;

  --accent:      var(--flaguu-accent);
  --accent-soft: var(--flaguu-accent-soft);


  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;


  --page-width:  1120px;
  --gap:         1.5rem;
  --gap-lg:      3rem;
  --radius:      16px;
  --radius-lg:   24px;

  --account-slot: 370px;

  --header-h: 68px;
}

body.bay    { --accent: var(--bay-accent);    --accent-soft: var(--bay-accent-soft); }
body.flaguu { --accent: var(--flaguu-accent); --accent-soft: var(--flaguu-accent-soft); }


*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 600px at 50% -200px,
                    color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.15em 0.45em;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: fixed; left: 12px; top: -100px;
  z-index: 100;
  padding: 0.7em 1.1em;
  border-radius: 0 0 12px 12px;
  background: var(--accent); color: #0A0B0E;
  font-family: var(--font-display); font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }


.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--gap-lg) 0; }

.section-head { margin-bottom: var(--gap); max-width: 62ch; }
.section-head p { color: var(--ink-dim); margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.6rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }

.stack > * + * { margin-top: var(--gap); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-dim); max-width: 62ch; }
.muted { color: var(--ink-dim); }
.small { font-size: 0.9rem; }


.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.72em 1.35em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #0A0B0E;
}
.btn-primary:hover { background: var(--accent-soft); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--edge);
  color: var(--ink);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--edge-strong); }

.btn-pending {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--edge-strong);
  color: var(--ink-dim);
  cursor: default;
}
.btn-pending:hover { transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.btn:disabled, .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: saturate(0.6);
}
.btn:disabled:hover, .btn[disabled]:hover { transform: none; background: var(--accent); }
.btn-ghost:disabled:hover, .btn-ghost[disabled]:hover {
  background: rgba(255, 255, 255, 0.06); border-color: var(--edge);
}


.card {
  background: var(--panel-bg);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 0.7rem; display: block; }

.card .sf-step {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", var(--font-body, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}

a.card { color: inherit; display: block; transition: border-color 0.2s ease, transform 0.2s ease; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }


.section-head .price-free {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--accent-soft);
  margin: 0 0 0.4em;
}

.price-bar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--edge));
  border-radius: var(--radius);
  overflow: hidden;
}

.price-bar li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.55rem;
  padding: 1rem 1.25rem;
}

.price-bar li + li { border-left: 1px solid var(--edge); }

.price-tokens {
  flex-basis: 100%;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}

.price-note { font-size: 0.86rem; color: var(--ink-dim); }

.price-foot { margin: 0.8rem 0 0; }


.badge {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.badge-soon { background: rgba(255, 255, 255, 0.06); color: var(--ink-faint); border-color: var(--edge); }


.phone {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.phone img { width: 100%; height: auto; }

.shots {
  --shot-w: 240px;
  overflow: hidden;
  padding-block: 1rem 0.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.shots-track {
  display: flex;
  width: max-content;
  animation: shots-scroll 55s linear infinite;
}
.shots:hover .shots-track,
.shots:focus-within .shots-track { animation-play-state: paused; }

.shots figure { margin: 0 var(--gap) 0 0; width: var(--shot-w); flex: 0 0 auto; }
.shots figcaption { color: var(--ink-dim); font-size: 0.9rem; text-align: center; margin-top: 0.8rem; }

@keyframes shots-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .shots { overflow-x: auto; scroll-snap-type: x mandatory; }
  .shots-track { animation: none; }
  .shots figure { scroll-snap-align: center; }
}

.shot-todo {
  aspect-ratio: 1242 / 2688;
  border-radius: 30px;
  border: 2px dashed var(--edge-strong);
  background: linear-gradient(160deg,
              color-mix(in srgb, var(--accent) 14%, var(--panel-bg)), var(--panel-bg));
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1.5rem;
  color: var(--ink-faint); font-size: 0.85rem; line-height: 1.5;
}
.shot-todo code { display: block; margin-top: 0.5rem; color: var(--accent-soft); }


.steps { counter-reset: step; display: grid; gap: var(--gap); }
.steps > li { list-style: none; position: relative; padding-left: 3.5rem; }
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-soft);
  font-family: var(--font-display); font-weight: 600;
}
.steps h3 { margin-bottom: 0.2em; }
.steps p { color: var(--ink-dim); margin-bottom: 0; }
ol.steps { padding-left: 0; }


.faq { border-top: 1px solid var(--edge); }
.faq details { border-bottom: 1px solid var(--edge); }
.faq summary {
  cursor: pointer;
  padding: 1.1rem 2rem 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  color: var(--accent-soft); font-size: 1.4rem; font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent-soft); }
.faq .answer { padding: 0 2rem 1.4rem 0; color: var(--ink-dim); }
.faq .answer > *:last-child { margin-bottom: 0; }


.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--edge);
  background: color-mix(in srgb, var(--page-bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--header-h);
}
.wordmark {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 30px; height: 30px; border-radius: 8px; }

.nav-toggle {
  display: none;
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.nav-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); border-color: var(--edge-strong); }

.nav-toggle-bars { position: relative; display: block; width: 20px; height: 14px; }
.nav-toggle-bars span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.12s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav { display: flex; gap: 0.4rem; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45em 0.85em;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); text-decoration: none; }

.nav .nav-beta { display: none; }
.nav a.here { color: var(--ink); background: rgba(255, 255, 255, 0.1); }

.account-slot {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 0.75rem;
  flex: none;
  width: var(--account-slot);
  margin-left: 0.75rem;
}

.site-header [hidden] { display: none; }

.account-chip { position: relative; }

.chip-button {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.7rem 0.3rem 0.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink-dim);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer;
}
.chip-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.chip-button[aria-expanded="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--edge-strong);
}

.chip-avatar {
  width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}
.chip-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-caret { font-size: 0.8rem; color: var(--ink-dim); }

.chip-menu {
  position: absolute; right: 0; top: calc(100% + 0.45rem);
  z-index: 60;
  min-width: 170px;
  display: flex; flex-direction: column;
  padding: 0.35rem;
  background: var(--panel-bg);
  border: 1px solid var(--edge);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.chip-menu a, .chip-menu button {
  padding: 0.5em 0.7em;
  border: 0; border-radius: 9px;
  background: none;
  text-align: left;
  color: var(--ink-dim);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer;
}
.chip-menu a:hover, .chip-menu button:hover {
  color: var(--ink); background: rgba(255, 255, 255, 0.06); text-decoration: none;
}
.chip-menu .chip-signout {
  margin-top: 0.35rem; padding-top: 0.6em;
  border-top: 1px solid var(--edge); border-radius: 0 0 9px 9px;
}

.site-footer {
  border-top: 1px solid var(--edge);
  margin-top: var(--gap-lg);
  padding: 2.5rem 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer a { color: var(--ink-dim); }
.site-footer .spacer { margin-left: auto; }


.hero { padding: clamp(3rem, 8vw, 6rem) 0 var(--gap-lg); }
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--gap-lg);
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
.hero .lead { margin-bottom: 1.8rem; }
.hero-art { max-width: 300px; margin-left: auto; width: 100%; }

.hero-film {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(2rem, 7vh, 4rem)) 0 clamp(4.5rem, 13vh, 7rem);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--edge);
}

.hero-film-scrim { position: absolute; inset: 0; z-index: -1; background: rgba(10, 11, 14, 0.42); }
.hero-home .hero-film-scrim {
  background: radial-gradient(ellipse 70% 60% at 32% 55%,
              rgba(10, 11, 14, 0.72) 0%, rgba(10, 11, 14, 0.6) 55%, rgba(10, 11, 14, 0.42) 100%);
}

.hero-film-inner h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 16ch; margin-bottom: 0.4em; }
.hero-film-inner .lead { max-width: 52ch; margin-bottom: 1.8rem; color: rgba(255, 255, 255, 0.82); }

.hero-film-more {
  position: absolute; left: 50%; bottom: clamp(1.2rem, 4vh, 2.2rem);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;
}
.hero-film-more:hover { color: var(--ink); text-decoration: none; }

.hero-film-chevron {
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  animation: hero-nudge 2.2s ease-in-out infinite;
}
@keyframes hero-nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%      { transform: rotate(45deg) translate(3px, 3px); }
}

.hero-feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(420px, 62svh, 620px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(3rem, 8vw, 5rem) clamp(3rem, 8vw, 5rem);
  background: var(--panel-bg);
  border-bottom: 1px solid var(--edge);
}

.ff-map {
  position: absolute; inset: 0; z-index: -2;
  opacity: 0;
  transition: opacity .5s ease;
}
.ff-map.is-drawn { opacity: 1; }

.ff-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg,
      rgba(10, 11, 14, .93) 0%,
      rgba(10, 11, 14, .86) 34%,
      rgba(10, 11, 14, .60) 62%,
      rgba(10, 11, 14, .52) 100%);
}

.ff-hit {
  position: absolute; inset: 0; z-index: 0;
  border: 0; padding: 0; background: none;
  cursor: pointer;
}
.ff-hit:focus { outline: none; }

.ff-inner { position: relative; z-index: 1; pointer-events: none; }
.ff-inner > * { pointer-events: auto; }

.ff-inner h1 { max-width: 15ch; }
.ff-inner .lead { max-width: 46ch; margin-bottom: 1.5rem; }
.ff-inner .eyebrow { max-width: 12ch; }
.ff-now { width: fit-content; max-width: 100%; }

.ff-now { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin: 0; }

.ff-now-button {
  display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  font: inherit; text-align: left; cursor: pointer;
  padding: .5rem .9rem;
  border: 1px solid var(--edge); border-radius: 999px;
  background: rgba(18, 20, 25, .72);
  backdrop-filter: blur(10px);
  color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
}
.ff-now-button:hover { border-color: var(--accent); transform: translateY(-1px); }

.ff-now-title { font-weight: 600; }
.ff-now-where { font-size: .85rem; color: var(--ink-dim); }

.ff-dots { display: inline-flex; align-items: center; gap: .4rem; }

.ff-dot {
  position: relative;
  width: 6px; height: 6px; padding: 0; border: 0;
  border-radius: 999px;
  background: var(--edge-strong);
  cursor: pointer;
  transition: background .3s ease;
}
.ff-dot::after { content: ''; position: absolute; inset: -8px; border-radius: 999px; }
.ff-dot:hover { background: var(--ink-dim); }
.ff-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ff-dot.on {
  display: inline-flex;
  width: 30px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent-soft) 24%, transparent);
}

.ff-dot-fill {
  display: block; width: 100%; height: 100%;
  border-radius: inherit;
  background: var(--accent-soft);
  transform: scaleX(0); transform-origin: left center;
  animation: ff-fill var(--game-ms, 27s) linear forwards;
}

@keyframes ff-fill { to { transform: scaleX(1); } }

.hero-feature.is-held .ff-dot-fill { animation-play-state: paused; }

.ff-lane {
  position: absolute; top: 0; bottom: 0; right: 0; z-index: 2;
  width: 34%; min-width: 260px;
  --card-w: min(12rem, 58%);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}

.ff-slot {
  position: absolute;
  width: var(--card-w);
  left: calc(var(--x, .5) * (100% - var(--card-w)));
  will-change: top, opacity;
}

.ff-card {
  pointer-events: auto;
  display: grid; grid-template-rows: auto 1fr auto; gap: .45rem;
  width: 100%; aspect-ratio: 2.5 / 3.5;
  text-align: left; overflow: hidden;
  font: inherit; color: var(--ink); cursor: pointer;
  padding: .8rem .85rem;
  border: 1px solid var(--edge-strong);
  border-radius: calc(var(--radius) + 3px);
  background: rgba(18, 20, 25, .82);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ff-face { display: grid; align-content: center; gap: .3rem; min-height: 0; }

.ff-kind {
  font-family: var(--font-display); font-size: .62rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
}
.ff-card-challenge { border-top: 2px solid var(--accent); }
.ff-card-challenge .ff-kind { color: var(--accent-soft); }
.ff-card-item { border-top: 2px solid #38BDF8; }
.ff-card-item .ff-kind { color: #7DD3FC; }

.ff-title {
  font-weight: 600; font-size: .95rem; line-height: 1.28;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}

.ff-desc {
  font-size: .8rem; line-height: 1.4; color: var(--ink-dim);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
}

.ff-worth {
  justify-self: end; align-self: end;
  display: inline-flex; align-items: center; gap: .28rem;
  font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: .18em .5em .18em .36em; border-radius: 999px;
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.ff-coin { width: .95em; height: .95em; flex: none; }
.ff-card-item .ff-worth { color: #7DD3FC; background: rgba(56, 189, 248, .16); }

.ff-lane.is-held .ff-slot,
.ff-lane.is-held .ff-card { animation-play-state: paused; }

.ff-card:hover, .ff-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55);
}

.ff-leaving { animation: none !important; opacity: 0; transition: opacity .5s ease; }

.ff-slot { animation: ff-rise var(--dur, 20s) linear forwards; }

@keyframes ff-rise {
  0%   { top: 108%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: -24rem; opacity: 0; }
}

.ff-drift .ff-card { animation: ff-sway calc(var(--dur, 20s) / 3) ease-in-out infinite; }

@keyframes ff-sway {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50%      { transform: translateX(var(--sway, 14px)) rotate(var(--tilt, 3deg)); }
}

.ff-deal .ff-card { animation: ff-deal-card var(--dur, 20s) linear forwards; }

@keyframes ff-deal-card {
  0%   { transform: translateX(150%) rotate(18deg) scale(.9); }
  7%   { transform: translateX(-4%)  rotate(-3deg) scale(1.01); }
  12%  { transform: translateX(0)    rotate(0deg)  scale(1); }
  55%  { transform: translateX(var(--sway, 14px)) rotate(var(--tilt, 3deg)) scale(1); }
  100% { transform: translateX(0)    rotate(0deg)  scale(1); }
}

.ff-bob .ff-card { animation: ff-hop 2.4s cubic-bezier(.34, 1.3, .5, 1) infinite; }

@keyframes ff-hop {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 2deg)) scale(1); }
  40%      { transform: translateY(-14px) rotate(calc(var(--tilt, 2deg) * -1)) scale(1.02); }
  70%      { transform: translateY(2px) rotate(var(--tilt, 2deg)) scale(.995); }
}


.marquee {
  --marquee-fade: 13%;
  height: clamp(440px, 82vh, 820px);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(var(--marquee-columns, 3), var(--marquee-tile, 1fr));
  justify-content: center;
  gap: var(--gap);
  padding: 0 24px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0,
                      #000 var(--marquee-fade),
                      #000 calc(100% - var(--marquee-fade)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0,
                      #000 var(--marquee-fade),
                      #000 calc(100% - var(--marquee-fade)), transparent 100%);
}

.marquee-col {
  display: flex; flex-direction: column;
  will-change: transform;
  animation: marquee-drift linear infinite;
}

@keyframes marquee-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}

.marquee:hover .marquee-col { animation-play-state: paused; }

.marquee-tile {
  flex: none;
  margin-bottom: var(--gap);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  aspect-ratio: 1242 / 2688;
}
.marquee-tile.landscape { aspect-ratio: 16 / 9; border-radius: 16px; }
.marquee-tile img, .marquee-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }

.marquee.is-empty {
  display: block;
  height: auto;
  max-width: var(--page-width);
  margin: 0 auto;
  -webkit-mask-image: none;
          mask-image: none;
}
.marquee.is-empty code { display: block; margin-top: 0.6rem; color: var(--accent-soft); word-break: break-all; }


.modes-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.modes-track::-webkit-scrollbar { display: none; }
.modes-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.mode {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--mode) 38%, var(--panel-bg)) 0%,
      color-mix(in srgb, var(--mode) 10%, var(--panel-bg)) 45%,
      var(--panel-bg) 100%);
  border: 1px solid color-mix(in srgb, var(--mode) 45%, transparent);
}

.mode-text { min-width: 0; }
.mode-text h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 0.5rem; }
.mode-text p  { color: var(--ink-dim); margin: 0; max-width: 46ch; }

.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mode) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--mode) 55%, transparent);
}

.mode-shots {
  display: flex;
  flex: none;
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
}

.mode-shot {
  position: relative;
  height: clamp(280px, 40vh, 420px);
  aspect-ratio: 1242 / 2688;
  flex: none;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--mode) 50%, var(--edge-strong));
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
}
.mode-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modes-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.modes-arrow {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.modes-arrow:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--edge-strong); }
.modes-arrow[disabled] { opacity: 0.3; cursor: default; }
.modes-arrow[disabled]:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--edge); }

.modes-dots { display: flex; align-items: center; gap: 0.5rem; }

.modes-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--edge-strong);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.modes-dot:hover { background: var(--ink-dim); }
.modes-dot[aria-current="true"] { width: 26px; background: var(--mode, var(--accent)); }


.mode-shot img.is-zoomable { cursor: zoom-in; }
.mode-shot img.is-zoomable:focus-visible {
  outline: 2px solid var(--mode, var(--accent));
  outline-offset: -3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: clamp(0.75rem, 4vw, 3rem);
  background: rgba(0, 0, 0, 0.86);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: clamp(10px, 2vw, 20px);
  border: 1px solid var(--edge-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--edge-strong);
  background: rgba(20, 20, 20, 0.8);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(60, 60, 60, 0.9); }

html.lightbox-open, html.lightbox-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}

.community-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: var(--gap); }

.search-input, .select-input, .text-input, .textarea-input {
  font-family: var(--font-body); font-size: 0.98rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 0.7em 0.85em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  width: 100%;
}
.community-toolbar .search-input { flex: 1 1 240px; width: auto; }
.community-toolbar .select-input { width: auto; flex: none; }
.search-input::placeholder, .text-input::placeholder, .textarea-input::placeholder { color: var(--ink-faint); }

.search-input:focus, .select-input:focus, .text-input:focus, .textarea-input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.text-input:user-invalid, .textarea-input:user-invalid {
  border-color: rgba(255, 69, 58, 0.55);
}
.text-input:user-invalid:focus, .textarea-input:user-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.2);
}

.select-input {
  cursor: pointer;
  appearance: none;
  padding-right: 2.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%239BA2AE' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9em center;
}
.select-input option { background: var(--panel-bg); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--gap); }
.chip {
  font-family: var(--font-body); font-size: 0.88rem;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--edge-strong); }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
  color: var(--ink);
}
.chip:disabled { opacity: 0.45; cursor: default; }
.chip:disabled:hover { color: var(--ink-dim); border-color: var(--edge); }

.city-filter { margin-bottom: var(--gap); }
.city-filter .chips { margin-bottom: 0; }

.city-filter { position: relative; }
.city-picker { position: relative; }

.chip-drop { display: inline-flex; align-items: center; gap: 0.45em; }
.chip-drop .caret { font-size: 1.05em; line-height: 1; opacity: 0.8; }
.chip[aria-expanded="true"] { color: var(--ink); border-color: var(--edge-strong); }

.city-menu {
  position: absolute; z-index: 30;
  top: calc(100% + 0.45rem); left: 0;
  width: min(18rem, calc(100vw - 3rem));
  padding: 0.6rem;
  border: 1px solid var(--edge-strong);
  border-radius: 12px;
  background: var(--panel-bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.city-menu .search-input { font-size: 0.92rem; padding: 0.5em 0.7em; }

.city-menu-list { max-height: 15rem; overflow-y: auto; margin-top: 0.5rem; }

.city-option {
  display: block; width: 100%;
  font-family: var(--font-body); font-size: 0.92rem; text-align: left;
  padding: 0.45em 0.6em;
  border: 0; border-radius: 8px;
  background: none; color: var(--ink-dim);
  cursor: pointer;
}
.city-option:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.city-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
}
.city-menu-empty { margin: 0; padding: 0.6em; font-size: 0.9rem; color: var(--ink-faint); }

.city-note { margin: 0.55rem 0 0; font-size: 0.86rem; color: var(--ink-faint); }

@media (max-width: 560px) {
  .city-picker { position: static; }
  .city-menu { width: 100%; }
}

.game-card { display: flex; flex-direction: column; gap: 0.8rem; }
.game-card .game-top { display: flex; align-items: flex-start; gap: 0.75rem; justify-content: space-between; }
.game-card .game-top > div { min-width: 0; }
.game-card h3 { margin: 0; font-size: 1.12rem; }

.game-name {
  font: inherit; color: inherit; text-align: left;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  border-radius: 4px;
}
.game-name:hover { color: var(--accent-soft); }
.game-name::after {
  content: ""; display: block; height: 1px; margin-top: 2px;
  background: currentColor; opacity: 0; transition: opacity 0.15s ease;
}
.game-name:hover::after { opacity: 0.45; }

.game-card .byline,
.detail-titles .byline {
  display: flex; flex-wrap: wrap; column-gap: 0.35em;
  color: var(--ink-faint); font-size: 0.88rem; margin: 0;
}
.game-card .byline > span,
.detail-titles .byline > span {
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card .byline .where::after,
.detail-titles .byline .where::after { content: "\00a0·"; }
.game-card .blurb { color: var(--ink-dim); font-size: 0.94rem; margin: 0; }
.game-card .stats {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  color: var(--ink-faint); font-size: 0.84rem;
  border-top: 1px solid var(--edge); padding-top: 0.8rem; margin-top: auto;
}
.game-card .btn { align-self: flex-start; }
.game-card .btn-row .btn { align-self: auto; }

.save-note { font-size: 0.88rem; margin: 0; }
.save-note.ok { color: #A7F3B8; }
.save-note.error { color: #FFB4AE; }
.save-note a { color: inherit; text-decoration: underline; }

.detail {
  width: min(56rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  padding: 0;
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius);
  background: var(--panel-bg);
  color: var(--ink);
  overflow: hidden;
  flex-direction: column;
}
.detail[open] {
  display: flex;
}
.detail::backdrop { background: rgba(6, 7, 10, 0.72); backdrop-filter: blur(3px); }

.detail-head {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.5rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--edge);
}
.detail-titles { min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-start; }
.detail-titles h2 { margin: 0; font-size: 1.5rem; }
.detail-titles .byline { font-size: 0.92rem; }

.detail-close {
  flex: none; margin-left: auto;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1;
  color: var(--ink-dim);
  border: 1px solid var(--edge); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.detail-close:hover { color: var(--ink); border-color: var(--edge-strong); }

.detail-body { padding: 1.4rem 1.5rem 1.5rem; overflow-y: auto; }
.detail-blurb { color: var(--ink-dim); margin: 0 0 1.2rem; }

.detail-map {
  position: relative;
  height: clamp(260px, 42vh, 420px);
  margin-bottom: 1.4rem;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--ink-faint);
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

.detail-count { margin: 0 0 0.2rem; font-size: 0.84rem; color: var(--ink-faint); }

.detail-faq summary,
.admin-preview summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; }
.detail-faq .d-sub,
.admin-preview .d-sub { font-family: var(--font-body); font-size: 0.84rem; font-weight: 400; color: var(--ink-faint); }
.detail-faq .answer { padding-bottom: 1.1rem; }
.detail-faq .d-kind { margin: 0 0 0.8rem; font-size: 0.86rem; color: var(--ink-faint); }
.detail-faq .state-note { padding: 1.2rem; }

.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.card-list .c-top { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.card-list .c-title { color: var(--ink); font-weight: 500; }
.card-list .c-desc { margin: 0.15rem 0 0; font-size: 0.92rem; color: var(--ink-dim); }

.card-list .c-coins {
  flex: none;
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
  padding: 0.15em 0.5em; border-radius: 999px;
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.card-list .c-type { font-size: 0.78rem; color: var(--ink-faint); }
.card-list .c-swatch {
  flex: none; width: 0.7rem; height: 0.7rem; border-radius: 3px;
  align-self: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.detail-foot { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--edge); }
.detail-foot .save-note { margin-top: 0.7rem; }

@media (max-width: 560px) {
  .detail { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; border: 0; }
  .detail-head { padding: 1.1rem 1.1rem 0.9rem; }
  .detail-body { padding: 1.1rem; }
}

.state-note {
  padding: 3rem 1.5rem; text-align: center; color: var(--ink-dim);
  border: 1px dashed var(--edge); border-radius: var(--radius);
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.field .hint { font-size: 0.82rem; color: var(--ink-faint); }
.textarea-input { resize: vertical; min-height: 96px; font-family: var(--font-body); line-height: 1.55; }

.field .counted { display: flex; justify-content: space-between; gap: 1rem; }
.field .countdown { font-size: 0.82rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex: none; }
.field .countdown.close { color: var(--accent-soft); }

.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 1.6rem 1.2rem;
  text-align: center;
  border: 1.5px dashed var(--edge-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dropzone.dragging { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.dropzone.filled { border-style: solid; }
.dropzone.filled.ok { border-color: rgba(48, 209, 88, 0.45); background: rgba(48, 209, 88, 0.07); }
.dropzone.filled.bad { border-color: rgba(255, 69, 58, 0.45); background: rgba(255, 69, 58, 0.07); }

.dropzone input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone .dz-icon { font-size: 1.5rem; line-height: 1; }
.dropzone .dz-main { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.dropzone .dz-sub { font-size: 0.85rem; color: var(--ink-faint); }
.dropzone.filled.ok .dz-sub { color: #A7F3B8; }
.dropzone.filled.bad .dz-sub { color: #FFB4AE; }

.form-message { border-radius: 12px; padding: 0.85rem 1.1rem; font-size: 0.94rem; margin-top: 1rem; }
.form-message.ok    { background: rgba(48, 209, 88, 0.14); border: 1px solid rgba(48, 209, 88, 0.4); color: #A7F3B8; }
.form-message.error { background: rgba(255, 69, 58, 0.14); border: 1px solid rgba(255, 69, 58, 0.4); color: #FFB4AE; }

.docs {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 220px;
  gap: 0 3rem;
  width: min(96vw, 1820px);
  margin: 0 auto;
  padding: 2rem 24px 4rem;
  align-items: start;
}

.docs-sidebar, .docs-rail {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
}

.docs-sidebar { border-right: 1px solid var(--edge); padding-right: 1.25rem; }
.docs-sidebar a {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-dim);
  padding: 0.5rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
}
.docs-sidebar a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.docs-sidebar a.docs-active {
  color: var(--accent-soft);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.docs-showall-toggle {
  margin-top: 1.5rem; padding-top: 1rem;
  border-top: 1px solid var(--edge);
}
.docs-showall-toggle button {
  font-family: var(--font-body); font-size: 0.85rem;
  color: var(--ink-faint); background: none; border: 0;
  padding: 0.4rem 0.75rem; cursor: pointer; text-align: left;
}
.docs-showall-toggle button:hover { color: var(--accent-soft); }

.docs-article { max-width: 78ch; }
.docs-article h2 { margin-top: 0; }
.docs-article h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 3rem 0 0.3rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.subsection-meta { color: var(--ink-faint); font-size: 0.85rem; margin: 0 0 1rem; }
.subsection-body h4 { font-size: 1rem; margin: 1.6em 0 0.4em; color: var(--accent-soft); }
.subsection-body ol, .subsection-body ul { color: var(--ink-dim); padding-left: 1.3rem; }
.subsection-body li { margin-bottom: 0.5em; }
.subsection-body p { color: var(--ink-dim); }

.docs-showall .docs-article section + section {
  border-top: 1px solid var(--edge);
  margin-top: 3.5rem;
  padding-top: 2.5rem;
}

.docs-rail { font-size: 0.85rem; }
.docs-rail h2 {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}
.docs-rail a {
  display: block; color: var(--ink-faint);
  padding: 0.3rem 0; line-height: 1.4;
}
.docs-rail a:hover { color: var(--ink-dim); text-decoration: none; }
.docs-rail a.docs-active { color: var(--accent-soft); }

.docs-sections > summary { display: none; }

.callout {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1.2rem;
  margin: 1.4em 0;
  font-size: 0.94rem;
  color: var(--ink-dim);
}
.callout strong { color: var(--ink); }

.deftable { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.deftable th, .deftable td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--edge); vertical-align: top; }
.deftable th { font-family: var(--font-display); font-weight: 600; color: var(--ink); white-space: nowrap; }
.deftable td { color: var(--ink-dim); }
.table-scroll { overflow-x: auto; clear: right; }

@media (min-width: 1200px) {
  .table-scroll { clear: none; }
}

.doc-shot {
  float: right;
  width: 168px;
  margin: 0.2rem 0 1rem 1.75rem;
  clear: right;
}
.doc-shot figure,
figure.doc-shot { margin: 0; }

.doc-shot img,
.doc-shot video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1242 / 2688;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--edge-strong);
  background: rgba(0, 0, 0, 0.35);
}

.doc-shot[data-wide] {
  float: none;
  clear: both;
  width: 100%;
  margin: 1.6rem 0;
}
.doc-shot[data-wide] img { aspect-ratio: auto; }

.doc-shot figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-faint);
}

.doc-shot img.is-zoomable { cursor: zoom-in; }
.doc-shot img.is-zoomable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.docs-article h3 { clear: right; }


.effect-grid {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem 0.9rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.effect-grid li { margin: 0; }

.effect-grid figure { margin: 0; }

.effect-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.35);
}

.effect-grid img.is-zoomable { cursor: zoom-in; }
.effect-grid img.is-zoomable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.effect-grid figcaption {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--ink-dim);
}

.effect-grid img[hidden] + figcaption { color: var(--ink-faint); }


.learn {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.learn-head { max-width: 46ch; }
.learn-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}
.learn-head .lead { color: var(--ink-dim); margin: 0; }

.line { margin: clamp(1.8rem, 4vw, 2.6rem) 0 clamp(2.2rem, 5vw, 3.2rem); max-width: 620px; }

.line ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
}

.line ol::before {
  content: "";
  position: absolute;
  left: 8px;
  right: calc(33.333% - 8px);
  top: 7px;
  height: 2px;
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--accent) 65%, transparent),
              color-mix(in srgb, var(--accent) 25%, transparent));
}

.line a {
  display: grid;
  justify-items: start;
  gap: 0.15rem;
  padding-right: 1rem;
  text-decoration: none;
  color: var(--ink);
}

.line-stop {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--page-bg);
  border: 2px solid var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 0.7rem;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.line-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.line-count { color: var(--ink-faint); font-size: 0.85rem; }

.line a:hover .line-stop,
.line a:focus-visible .line-stop { background: var(--accent); transform: scale(1.15); }
.line a:hover .line-name { color: var(--accent-soft); }
.line a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }

.learn-section { margin-top: clamp(3rem, 6vw, 4.5rem); }
.line + .learn-section { margin-top: clamp(0.5rem, 1.5vw, 1rem); }
.learn-section > h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.section-note { color: var(--ink-dim); max-width: 62ch; margin: 0 0 1.75rem; }

.film-rail {
  list-style: none;
  margin: 0;
  padding: 0 24px 1rem 0;
  margin-right: -24px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 194px;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.film { scroll-snap-align: start; }

.film-link {
  display: grid;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

.film-screen {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--panel-bg);
}
.film-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.film-todo {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  gap: 0.4rem;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-faint);
  border-radius: 18px;
  border: 2px dashed var(--edge-strong);
  background: linear-gradient(160deg,
              color-mix(in srgb, var(--accent) 14%, var(--panel-bg)), var(--panel-bg));
}
.film-todo code { color: var(--accent-soft); word-break: break-all; }

.film-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
}
.film-blurb { color: var(--ink-dim); font-size: 0.85rem; line-height: 1.5; }

.film-link:hover .film-title { color: var(--accent-soft); }
.film-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 20px; }

.posts { list-style: none; margin: 0; padding: 0; }
.posts li + li { border-top: 1px solid var(--edge); }
.posts a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding: 1.15rem 0;
  text-decoration: none;
  color: var(--ink);
}
.post-text { display: grid; gap: 0.25rem; min-width: 0; }
.post-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.post-blurb { color: var(--ink-dim); font-size: 0.92rem; max-width: 70ch; }
.post-date { color: var(--ink-faint); font-size: 0.8rem; }
.posts a:hover .post-title { color: var(--accent-soft); }

.post-thumb {
  width: 132px; aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background:
    linear-gradient(90deg, transparent 0 18px, color-mix(in srgb, var(--accent) 55%, transparent) 18px) 0 50% / 100% 2px no-repeat,
    radial-gradient(circle at 18px 50%, var(--accent) 0 6px, transparent 7px),
    var(--panel-bg);
}
.post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.posts a:hover .post-thumb { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

.posts li.is-latest a {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 2rem;
  padding: 0 0 1.6rem;
}
.posts li.is-latest .post-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); order: 2; }
.posts li.is-latest .post-title { font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.15; }
.posts li.is-latest .post-blurb { font-size: 1rem; }
.post-new {
  justify-self: start;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-soft);
}

@media (max-width: 640px) {
  .posts a { grid-template-columns: 1fr 88px; gap: 0.25rem 1rem; }
  .post-thumb { width: 88px; }
  .posts li.is-latest a { grid-template-columns: 1fr; }
  .posts li.is-latest .post-thumb { order: -1; }
}

.post-empty {
  margin: 0;
  padding: 1.5rem 1.25rem;
  border: 2px dashed var(--edge-strong);
  border-radius: var(--radius);
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.post-empty code { color: var(--accent-soft); }

.post-page .docs-article,
.post-head { max-width: 72ch; }

.post-back { margin: 0 0 1.75rem; font-size: 0.9rem; }
.post-back a { color: var(--ink-faint); text-decoration: none; }
.post-back a:hover { color: var(--accent-soft); }

.post-head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.post-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem;
  margin: 0 0 1rem;
  color: var(--ink-faint); font-size: 0.85rem;
}
.post-tag {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-soft);
  padding: 0.28rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.post-head h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}
.post-lead { color: var(--ink-dim); margin: 0; max-width: 60ch; text-wrap: pretty; }
.post-lead:empty { display: none; }

.post-rail {
  position: relative;
  height: 16px;
  margin-top: clamp(1.6rem, 4vw, 2.2rem);
}
.post-rail::before {
  content: "";
  position: absolute; left: 8px; right: 0; top: 7px; height: 2px;
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--accent) 70%, transparent),
              color-mix(in srgb, var(--accent) 0%, transparent));
}
.post-rail span {
  position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.post-body > p { color: color-mix(in srgb, var(--ink) 88%, var(--ink-dim)); }
.post-body a { color: var(--accent-soft); text-underline-offset: 0.18em; }
.post-body code {
  font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 6px;
  background: rgba(255, 255, 255, 0.07); color: var(--ink);
}
.post-body strong { color: var(--ink); }
.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 2.8rem 0 0.7rem;
  clear: both;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.post-body > h2:first-child { margin-top: 0; }
.post-body .callout { display: flow-root; }
.post-body .doc-shot img { aspect-ratio: auto; border-radius: 14px; }

.post-body .doc-shot[data-side] {
  width: clamp(180px, 38%, 270px);
  margin-top: 0.35rem;
  margin-bottom: 1.4rem;
}
.post-body .doc-shot[data-side="right"] { float: right; clear: right; margin-left: 1.9rem; margin-right: 0; }
.post-body .doc-shot[data-side="left"]  { float: left;  clear: left;  margin-right: 1.9rem; margin-left: 0; }
.post-body .doc-shot[data-solo] {
  float: none; clear: both;
  width: min(100%, 320px);
  margin: 1.8rem auto;
}
.post-body .doc-shot[data-wide] img { width: auto; max-width: 100%; margin-inline: auto; }
.post-body .doc-shot[data-wide] figcaption,
.post-body .doc-shot[data-solo] figcaption { text-align: center; }
.post-body .doc-shot figcaption {
  font-size: 0.84rem;
  color: var(--ink-dim);
}

@media (max-width: 640px) {
  .post-body .doc-shot[data-side],
  .post-body .doc-shot[data-solo] {
    float: none;
    width: min(100%, 280px);
    margin: 1.5rem auto;
  }
  .post-body .doc-shot figcaption { text-align: center; }
}

.post-toc { display: none; }

@media (min-width: 1180px) {
  .post-layout {
    display: grid;
    grid-template-columns: minmax(0, 72ch) 220px;
    justify-content: space-between;
    gap: 3rem;
  }
  .post-toc:not([hidden]) {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    align-self: start;
  }
}
.post-toc-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint);
}
.post-toc ol {
  list-style: none; margin: 0; padding: 0;
  position: relative;
}
.post-toc ol::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px;
  background: color-mix(in srgb, var(--accent) 40%, transparent);
}
.post-toc li + li { margin-top: 0.15rem; }
.post-toc a {
  position: relative;
  display: block;
  padding: 0.35rem 0 0.35rem 1.4rem;
  font-size: 0.86rem; line-height: 1.35;
  color: var(--ink-faint);
  text-decoration: none;
}
.post-toc a::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--page-bg);
  border: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  box-sizing: border-box;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.post-toc a:hover { color: var(--ink); }
.post-toc a[aria-current] { color: var(--ink); }
.post-toc a[aria-current]::before { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.post-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.post-map {
  clear: both;
  margin: 2.2rem 0;
}
.post-map-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--edge-strong);
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(90% 80% at 85% 90%, rgba(56, 189, 248, 0.08), transparent 60%),
    var(--panel-bg);
  isolation: isolate;
}
.post-map-sketch,
.post-map-canvas { position: absolute; inset: 0; }
.post-map-sketch svg { display: block; width: 100%; height: 100%; }
.post-map-canvas {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.post-map.is-live .post-map-canvas { opacity: 1; }
.post-map-sketch { transition: opacity 0.2s ease; }
.post-map.is-live .post-map-sketch { opacity: 0; }

.sk-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.sk-boundary {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.5;
  stroke-dasharray: 10 8;
  stroke-linejoin: round;
}
.sk-zone { fill-opacity: 0.26; stroke-width: 2.5; stroke-linejoin: round; }
.sk-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sk-halo { opacity: 0.22; }
.sk-point { stroke: #fff; stroke-width: 2.5; }

@media (prefers-reduced-motion: no-preference) {
  .post-map.is-sketched .post-map-sketch svg { animation: sketch-in 0.7s ease both; }
}
@keyframes sketch-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.post-map-label {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.9rem;
  margin-top: 0.75rem;
}
.post-map-label:has(.post-map-title:empty) { display: none; }
.post-map-title {
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--ink);
}
.post-map-title:empty { display: none; }
.post-map-teams { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-map-team {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; color: var(--ink-dim);
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--edge);
}
.post-map-team i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.post-map-team.is-point i { box-shadow: 0 0 0 1.5px #fff; }

.post-map figcaption {
  display: grid; gap: 0.3rem;
  margin-top: 0.45rem;
  font-size: 0.84rem; line-height: 1.45; color: var(--ink-dim);
}
.post-map-open { justify-self: start; color: var(--accent-soft); text-decoration: none; }
.post-map-open:hover { text-decoration: underline; }

.post-map.is-missing .post-map-frame { aspect-ratio: auto; min-height: 7rem; display: grid; place-items: center; }
.post-map.is-missing .post-map-sketch { position: static; }
.post-map.is-missing .post-map-label { display: none; }
.post-map-note { margin: 0; padding: 1.5rem; text-align: center; color: var(--ink-faint); font-size: 0.9rem; }

.post-foot {
  clear: both;
  max-width: 72ch;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-top: 1.75rem;
}
.post-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; }
.post-pager::before {
  content: ""; position: absolute; left: 1.15rem; right: 1.15rem; top: -1.75rem; height: 2px;
  transform: translateY(-1px);
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--accent) 25%, transparent),
              color-mix(in srgb, var(--accent) 70%, transparent) 50%,
              color-mix(in srgb, var(--accent) 25%, transparent));
}
.post-pager::after {
  content: ""; position: absolute; left: 50%; top: -1.75rem;
  width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.post-pager-link {
  display: grid; gap: 0.3rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
a.post-pager-link:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.post-pager-link.is-older { text-align: right; }
.post-pager-link.is-empty { border: 0; background: none; }
.post-pager-dir { font-size: 0.78rem; color: var(--ink-faint); }
.post-pager-link { position: relative; }
.post-pager-link:not(.is-empty)::before {
  content: ""; position: absolute; top: calc(-1.75rem - 1px); width: 10px; height: 10px;
  border-radius: 50%; transform: translateY(-50%);
  background: var(--page-bg);
  border: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
}
.post-pager-link.is-newer::before { left: calc(1.15rem - 5px); }
.post-pager-link.is-older::before { right: calc(1.15rem - 5px); }
.post-pager-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.3; }
.post-foot-back { margin: 1.5rem 0 0; }

@media (max-width: 560px) {
  .post-pager { grid-template-columns: 1fr; }
  .post-pager-link.is-older { text-align: left; }
  .post-pager-link.is-empty { display: none; }
  .post-pager::before, .post-pager::after, .post-pager-link::before { display: none; }
  .post-foot { border-top: 1px solid var(--edge); }
}

.ref-card { display: grid; gap: 1.5rem; }

.ref-index {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.25rem 2rem;
}
.ref-index a {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--edge);
}
.ref-name { font-family: var(--font-display); font-weight: 600; }
.ref-what { color: var(--ink-faint); font-size: 0.82rem; line-height: 1.45; }
.ref-index a:hover .ref-name { color: var(--accent-soft); }

.ref-open { justify-self: start; }

@media (max-width: 600px) {
  .line { max-width: none; }
  .line ol { grid-template-columns: 1fr; gap: 1.25rem; }
  .line ol::before { content: none; }

  .line li { position: relative; }
  .line li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 16px;
    height: calc(100% + 1.25rem - 16px);
    width: 2px;
    background: color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .line a {
    grid-template-columns: 16px 1fr;
    justify-items: start;
    align-items: baseline;
    gap: 0 0.9rem;
    padding: 0;
  }
  .line-stop { margin-bottom: 0; grid-row: span 2; }
  .film-rail { grid-auto-columns: 156px; }
}


.admin-wrap { max-width: 880px; }

.admin-featured {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 0;
  border-top: 1px solid var(--edge);
}

.admin-featured .star {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .88rem; cursor: pointer;
  padding: .35rem .75rem;
  border: 1px solid var(--edge); border-radius: 999px;
  background: none; color: var(--ink-dim);
  transition: color .15s ease, border-color .15s ease;
}
.admin-featured .star:hover { color: var(--ink); border-color: var(--edge-strong); }
.admin-featured .star.on {
  color: var(--accent-soft);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.admin-featured .rank { display: inline-flex; align-items: center; gap: .5rem; }
.admin-featured .rank span { font-size: .82rem; color: var(--ink-faint); }
.admin-featured .rank input { width: 5rem; padding: .35rem .5rem; }
.admin-featured .rank input:disabled { opacity: .4; }

.game-card.is-featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--edge)); }

.btn-danger { color: #FCA5A5; border-color: rgba(252, 165, 165, .35); }
.btn-danger:hover { color: #FFFFFF; border-color: #F87171; background: rgba(248, 113, 113, .18); }

.admin-preview { margin-top: .5rem; }
.admin-preview .answer { padding: 0 1rem 1.1rem 0; }
.admin-preview .state-note { padding: 1.2rem; }


body.landing {
  height: 100dvh;
  overflow: hidden;
  background-image: none;
}

.split { display: flex; height: 100dvh; }

.half {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.half:hover { text-decoration: none; }
.half + .half { border-left: 1px solid var(--edge); }

.half-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: brightness(0.32) saturate(1.05) blur(7px);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.half::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              color-mix(in srgb, var(--accent) 26%, transparent) 0%,
              rgba(6, 7, 10, 0.72) 100%);
  transition: opacity 0.5s ease;
}

.half-inner {
  position: relative; z-index: 2; text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.half-inner img.app-icon {
  width: 92px; height: 92px; border-radius: 22px;
  margin: 0 auto 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.half-inner h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 0.35em; }
.half-inner p { color: rgba(255, 255, 255, 0.78); margin-bottom: 1.6rem; }

.half-go {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink);
}
.half-go .arrow { transition: transform 0.3s ease; }

@media (hover: hover) {
  .half:hover { flex: 1.18; }
  .half:hover .half-photo { transform: scale(1); filter: brightness(0.46) saturate(1.15) blur(4px); }
  .half:hover::after { opacity: 0.82; }
  .half:hover .half-go .arrow { transform: translateX(6px); }
  .split:hover .half:not(:hover)::after { opacity: 1; }
}
.half:focus-visible { outline-offset: -4px; }
.half:focus-visible .half-photo { filter: brightness(0.46) saturate(1.15) blur(4px); }

/* Headways' half: the app's own iPhone screens, fanned and tilted like the BayWidgets shot. */
.half-phones { overflow: hidden; perspective: 1600px; }
.phones {
  position: absolute; left: 50%; top: 50%;
  display: flex; gap: clamp(18px, 2.4vw, 34px); align-items: center;
  transform: translate(-50%, -50%) rotateX(18deg) rotateZ(-16deg) rotateY(8deg);
  transform-style: preserve-3d;
}
.phone {
  width: clamp(170px, 17vw, 260px);
  aspect-ratio: 1179 / 2556;
  border-radius: clamp(26px, 2.6vw, 40px);
  padding: clamp(5px, 0.5vw, 8px);
  background: linear-gradient(145deg, #3a3c42, #0d0e11 40%, #2a2c31);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.phone:nth-child(1) { transform: translateY(14%); }
.phone:nth-child(3) { transform: translateY(-12%); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: clamp(21px, 2.1vw, 32px); }

/* The wordmark opens a small menu of the other things here. */
:is(body.landing, body.about) .mark-menu {
  position: fixed; top: 22px; left: 22px; z-index: 12;
}
:is(body.landing, body.about) .mark-menu .landing-mark { position: static; max-width: none; }
.landing-mark .caret { font-size: 0.75em; opacity: 0.6; transition: transform 0.25s ease, opacity 0.25s ease; }
.landing-mark[aria-expanded="true"] .caret { transform: rotate(180deg); opacity: 1; }
.landing-mark:hover .caret { opacity: 1; }
.mark-dropdown {
  position: absolute; left: 0; top: calc(100% + 0.5rem);
  min-width: 280px;
  padding: 0.4rem;
  border-radius: 18px;
  background: rgba(18, 20, 25, 0.97);
  border: 1px solid var(--edge);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transform-origin: top left;
  animation: mark-pop 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mark-dropdown[hidden] { display: none; }
@keyframes mark-pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.mark-dropdown a {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  color: var(--ink); text-decoration: none;
}
.mark-dropdown a:hover, .mark-dropdown a:focus-visible { background: rgba(255, 255, 255, 0.07); text-decoration: none; outline: none; }
.mark-dropdown img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.mark-dropdown span { display: flex; flex-direction: column; }
.mark-dropdown b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.mark-dropdown small { color: var(--ink-dim); font-size: 0.8rem; }

:is(body.landing, body.about) .landing-mark {
  position: fixed; top: 22px; left: 22px;
  display: inline-flex; align-items: center; gap: 0.6rem;
  width: max-content;
  max-width: calc(100% - 32px);
  z-index: 10;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: 0.02em;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
:is(body.landing, body.about) .landing-mark-icon {
  width: 1.6em; height: 1.6em; border-radius: 0.4em;
  margin: -0.3em 0 -0.3em -0.6em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
body.about .landing-mark-icon { margin-left: 0; }
:is(body.landing, body.about) .landing-mark .arrow { opacity: 0.6; transition: transform 0.3s ease, opacity 0.3s ease; }
:is(body.landing, body.about) .landing-mark:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}
:is(body.landing, body.about) .landing-mark:hover .arrow { opacity: 1; transform: translateX(4px); }
body.about .landing-mark:hover .arrow { transform: translateX(-4px); }

body.about { min-height: 100dvh; }
.about-main { padding: 140px 24px 120px; }
.about-text { max-width: 680px; margin: 0 auto; }
.about-text h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.7em; }
.about-text h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 2.2em 0 0.6em; }
.about-text p { color: rgba(255, 255, 255, 0.78); font-size: 1.08rem; }
.about-text p + p { margin-top: 1.1em; }

.landing-foot {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 10; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5);
  text-align: center; width: 100%;
}


@media (max-width: 1080px) {

  .ff-lane { width: 32%; min-width: 230px; --card-w: min(10.5rem, 62%); }
  .ff-desc { -webkit-line-clamp: 4; }
  .account-slot [data-appstore-flaguu] { display: none; }
  .account-slot { width: 190px; }
}

@media (max-width: 1200px) {
  .docs { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-rail { display: none; }
}

@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; padding: 1.5rem 24px 3rem; }
  .docs-sidebar {
    position: static; max-height: none; overflow: visible;
    border-right: 0; padding-right: 0;
    border-bottom: 1px solid var(--edge);
    padding-bottom: 1rem; margin-bottom: 1.5rem;
  }
  .docs-sidebar nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .docs-sidebar a { border-left: 0; border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.9rem; }
  .docs-sidebar a.docs-active { border-left: 0; }

  .docs-sections > summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; padding: 0.6rem 0;
    font-family: var(--font-display); font-size: 0.95rem; color: var(--ink);
  }
  .docs-sections > summary::-webkit-details-marker { display: none; }
  .docs-sections > summary::after {
    content: "\25BE"; color: var(--accent-soft); font-size: 0.8rem;
  }
  .docs-sections[open] > summary::after { content: "\25B4"; }
  .docs-sections .docs-here { color: var(--ink-faint); font-size: 0.85rem; }
  .docs-sections nav { padding-top: 0.6rem; }
  .docs-article h3 { font-size: 1.25rem; margin-top: 2.25rem; }

  .doc-shot {
    float: none;
    width: 100%;
    max-width: 260px;
    margin: 0 0 1.25rem;
  }

  .doc-shot[data-wide] {
    float: none;
    width: 100%;
    max-width: none;
    margin: 1.25rem 0;
  }
}

@media (max-width: 860px) {

  .ff-lane { display: none; }
  .hero-feature {
    min-height: clamp(380px, 56svh, 480px);
    padding-block: clamp(2rem, 6vw, 3rem);
  }
  .ff-inner h1 { max-width: none; }
  .ff-inner .lead {
    max-width: none;
    font-size: 1rem; line-height: 1.55;
    margin-bottom: 1.1rem;
  }
  .ff-now { gap: .6rem; }
  .ff-now-button { row-gap: .15rem; }
  .ff-scrim {
    background: linear-gradient(180deg,
      rgba(10, 11, 14, .90) 0%, rgba(10, 11, 14, .86) 60%, rgba(10, 11, 14, .74) 100%);
  }
  body { font-size: 16px; }

  .grid-2, .grid-3, .form-grid, .hero-split { grid-template-columns: 1fr; }
  .price-bar { grid-template-columns: 1fr; }
  .price-bar li + li { border-left: 0; border-top: 1px solid var(--edge); }
  .mode { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .mode-text p { margin-inline: auto; }

  .mode-shots { width: 100%; max-width: 400px; }
  .mode-shot { flex: 1 1 0; min-width: 0; width: auto; height: auto; }
  .hero-art { margin: 0 auto; max-width: 240px; }

  body.landing { position: relative; height: auto; min-height: 100dvh; overflow: visible; background: #0A0B0E; }
  body.landing .mark-menu { position: absolute; top: 16px; left: 16px; }
  body.landing .landing-mark { font-size: 0.95rem; }
  .phone { width: clamp(120px, 30vw, 170px); }
  .split { flex-direction: column; height: auto; min-height: 100dvh; }
  .half { min-height: 50dvh; padding: 24px 16px; }
  .half:first-child { padding-top: 84px; }
  .half:last-child { padding-bottom: 64px; }
  .half + .half { border-left: 0; border-top: 1px solid var(--edge); }
  .half-inner { padding: 1.5rem 1.25rem; }
  .half-inner img.app-icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 0.9rem; }
  .half-inner p { font-size: 0.98rem; margin-bottom: 1.1rem; }
  .landing-foot { position: absolute; bottom: 20px; }

  .site-header .wrap { position: relative; gap: 0.6rem; }

  .site-header .wordmark    { order: 0; }
  .site-header .account-slot { order: 1; }
  .site-header .nav-toggle  { order: 2; }
  .site-header .nav         { order: 3; }

  .nav-toggle { display: grid; place-items: center; }

  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.5rem 24px 0.9rem;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.7em 0.8em; border-radius: 10px; font-size: 1rem; line-height: 1.4; }

  .nav .btn.nav-beta {
    display: flex; justify-content: center;
    margin-top: 0.5rem;
    padding: 0.75em 1.2em;
    border-radius: 999px;
    font-size: 0.98rem;
    color: #0A0B0E;
  }
  .nav .btn-pending.nav-beta { display: none; }

  .account-slot { width: auto; margin-left: auto; gap: 0.4rem; }
  .site-header .account-chip:not([hidden]) { display: block; }
  .site-header .nav-signin { padding: 0.55em 0.95em; font-size: 0.88rem; }
  .chip-button { padding: 0.25rem 0.55rem 0.25rem 0.25rem; font-size: 0.9rem; }

  .hero-film-inner .lead { font-size: 1rem; line-height: 1.55; }

  .marquee { height: clamp(340px, 56vh, 520px); }
  .marquee-tile { border-radius: 18px; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer .spacer { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .half:hover { flex: 1; }
  .hero-film-chevron { animation: none; transform: rotate(45deg); }
  .marquee-col { animation: none !important; }

  .ff-slot { animation: none !important; top: 32%; opacity: 1; }
  .ff-card { animation: none !important; }

  .ff-dot-fill { animation: none !important; transform: none; }
}


.marquee-bg {
  position: absolute; inset: 0; z-index: -2;
  height: 100%;
  padding: 0;
  pointer-events: none;
  filter: brightness(0.42) saturate(1.05);
}

.marquee-bg:hover .marquee-col { animation-play-state: running; }

body.signin {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body.signin > main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: min(560px, 62svh);
}
body.signin .site-footer {
  flex: none;
  margin-top: 0;
}

.signin-hero {
  flex: 1 0 auto;
  min-height: auto;
  justify-content: center;
  padding: calc(var(--header-h) + clamp(2rem, 6vh, 3.5rem)) 0 clamp(2.5rem, 7vh, 4rem);
}
.signin-hero .lead { color: rgba(255, 255, 255, 0.82); }

.page-map,
.page-map-scrim {
  position: fixed; inset: 0;
  pointer-events: none;
}
.page-map {
  z-index: -2;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.page-map.is-drawn { opacity: 1; }

.page-map-scrim { z-index: -1; background: rgba(10, 11, 14, 0.78); }

body.flaguu main { position: relative; isolation: isolate; }

.slot-meter {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.9rem 1.2rem;
  min-width: 15rem;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--panel-bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.slot-count { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; }
.slot-count .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  background: linear-gradient(180deg, var(--ink), var(--accent-soft));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.slot-count .of { color: var(--ink-dim); font-size: 0.92rem; }

.slot-track {
  height: 6px;
  margin: 0.7rem 0 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.slot-track > span {
  display: block; height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s ease, background-color 0.4s ease;
}
.slot-note { margin: 0; font-size: 0.86rem; color: var(--ink-faint); }

.slot-meter.is-close .slot-track > span { background: #E0A340; }
.slot-meter.is-full  .slot-track > span { background: #F87171; }
.slot-meter.is-full  .slot-note { color: #FCA5A5; }

.game-card > h3,
.game-card .game-top h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card .game-top { min-height: 4.4rem; }

.game-card .stats { gap: 0.4rem 1rem; padding-top: 0.8rem; margin-top: auto; }
.game-card .card-meta {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
}

.game-card .share-panel { position: relative; z-index: 1; }

@media (max-width: 560px) {
  .game-card .game-top { min-height: 0; }
  .slot-meter { display: block; min-width: 0; }
}


.cl-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.cl-row h3 { margin: 0; font-size: 1.12rem; line-height: 1.25; }
.cl-row-main { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.cl-thumb {
  flex: none; width: 64px; height: 48px;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--edge);
  background:
    radial-gradient(circle at 14px 50%, var(--accent) 0 4px, transparent 5px),
    linear-gradient(90deg, transparent 0 14px, color-mix(in srgb, var(--accent) 50%, transparent) 14px) 0 50% / 100% 2px no-repeat,
    var(--panel-bg);
}
.cl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cl-block[data-type="map"] { border-left: 3px solid #38BDF8; }
.cl-row .byline { margin: 0.3rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.86rem; color: var(--ink-dim); }
.cl-list [data-act="publish"],
.cl-list [data-act="unpublish"] { min-width: 7.5rem; justify-content: center; }
.cl-sub { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--ink-faint); overflow-wrap: anywhere; }
.cl-status-badge {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  color: #FFD27A; background: rgba(255, 184, 0, 0.12); border: 1px solid rgba(255, 184, 0, 0.35);
}
.cl-status-badge.is-live { color: #A7F3B8; background: rgba(48, 209, 88, 0.12); border-color: rgba(48, 209, 88, 0.35); }
@media (max-width: 560px) {
  .cl-row-main { align-items: flex-start; }
  .cl-list .cl-row .btn-row { width: 100%; }
}

.cl-meta { margin-top: 1rem; }

.cl-blocks { display: grid; gap: 0.9rem; margin-top: 1.5rem; }

.cl-block {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}
.cl-block-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.cl-kind {
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint);
}
.cl-tools { display: flex; gap: 0.35rem; }
.cl-tools button {
  font: inherit; font-size: 0.85rem; line-height: 1;
  min-width: 2.4rem; min-height: 2.4rem; padding: 0.4rem 0.5rem;
  border: 1px solid var(--edge); border-radius: 8px;
  background: none; color: var(--ink-dim); cursor: pointer;
}
.cl-tools button:hover:not(:disabled) { color: var(--ink); border-color: var(--edge-strong); }
.cl-tools button:disabled { opacity: 0.35; cursor: default; }

.cl-block .textarea-input { min-height: 7rem; }
.cl-block[data-type="callout"] { border-left: 3px solid var(--accent); }

.cl-image-fields { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.cl-preview {
  display: block; max-width: 100%; max-height: 280px;
  margin: 0.75rem auto 0; border-radius: 10px;
  border: 1px solid var(--edge);
}
.cl-check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-dim); }

.cl-add { margin-top: 1.25rem; }

.cl-savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem; padding: 0.9rem 0;
  border-top: 1px solid var(--edge);
  background: var(--panel-bg);
}
.cl-status { font-size: 0.9rem; color: var(--ink-faint); flex: 1 1 14rem; }
.cl-savebar > .btn-row { margin-left: auto; }
.cl-status.dirty { color: var(--accent-soft); }
.cl-status.is-error { color: #FFB4AE; }
.cl-block { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.cl-block.is-wrong { border-color: rgba(255, 69, 58, 0.7); box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.18); }

.cl-format {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem;
  margin-bottom: 0.45rem;
}
.cl-fmt {
  font: inherit; font-size: 0.85rem; line-height: 1;
  min-width: 2.4rem; min-height: 2.2rem; padding: 0.35rem 0.6rem;
  border: 1px solid var(--edge); border-radius: 8px;
  background: rgba(255, 255, 255, 0.03); color: var(--ink-dim); cursor: pointer;
}
.cl-fmt:hover { color: var(--ink); border-color: var(--edge-strong); }
.cl-fmt:focus-visible, .cl-layout:focus-visible, .cl-tools button:focus-visible,
.view-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-fmt.is-bold { font-weight: 800; }
.cl-fmt.is-italic { font-style: italic; font-family: Georgia, serif; }
.cl-fmt.is-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.cl-fmt-hint { margin-left: auto; font-size: 0.75rem; color: var(--ink-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 640px) { .cl-format .cl-fmt-hint { display: none; } }
.cl-image-fields > .cl-fmt-hint { margin: 0; font-family: inherit; }

.cl-layouts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 560px) {
  .cl-layouts { display: grid; grid-template-columns: 1fr 1fr; }
}
.cl-layout {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.35rem;
  font: inherit; font-size: 0.78rem; color: var(--ink-dim);
  padding: 0.5rem 0.6rem 0.45rem;
  border: 1px solid var(--edge); border-radius: 10px;
  background: rgba(255, 255, 255, 0.02); cursor: pointer;
}
.cl-layout:hover { color: var(--ink); border-color: var(--edge-strong); }
.cl-layout[aria-pressed="true"] {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.cl-layout-pic {
  position: relative; display: block;
  width: 48px; height: 34px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}
.cl-layout-pic i {
  position: absolute; top: 4px; bottom: 4px; width: 14px;
  border-radius: 2px; background: var(--accent-soft);
}
.cl-layout-pic.is-right i { right: 4px; }
.cl-layout-pic.is-left i { left: 4px; }
.cl-layout-pic.is-center i { left: 17px; }
.cl-layout-pic.is-wide i { left: 4px; right: 4px; width: auto; top: 4px; bottom: 12px; }
.cl-layout-pic b {
  position: absolute; left: 4px; right: 4px; height: 2px; border-radius: 1px;
  background: rgba(255, 255, 255, 0.35);
}
.cl-layout-pic b:nth-of-type(1) { top: 8px; }
.cl-layout-pic b:nth-of-type(2) { top: 16px; }
.cl-layout-pic b:nth-of-type(3) { top: 24px; }
.cl-layout-pic.is-right b { right: 22px; }
.cl-layout-pic.is-left b { left: 22px; }
.cl-layout-pic.is-center b, .cl-layout-pic.is-wide b:nth-of-type(-n+2) { display: none; }
.cl-layout-pic.is-wide b:nth-of-type(3) { top: 26px; }


.view-toggle {
  display: inline-flex;
  margin-top: 1rem;
  padding: 3px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.view-toggle[hidden] { display: none; }
.view-toggle button {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border: 0; border-radius: 999px;
  background: none; color: var(--ink-dim); cursor: pointer;
}
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.vt-icon { display: inline-grid; gap: 2px; }
.vt-icon i { display: block; background: currentColor; border-radius: 1px; opacity: 0.8; }
.vt-icon.is-cards { grid-template-columns: repeat(2, 5px); }
.vt-icon.is-cards i { width: 5px; height: 5px; }
.vt-icon.is-lines i { width: 12px; height: 2px; }
.vt-icon.is-lines { gap: 2.5px; }

.game-lines {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--panel-bg);
  overflow: hidden;
}
.game-line {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 1fr) auto auto;
  grid-template-areas: "name type stats feat actions";
  align-items: center;
  gap: 0.2rem 1.1rem;
  padding: 0.75rem 1rem;
}
.game-line + .game-line { border-top: 1px solid var(--edge); }
.game-line:hover { background: rgba(255, 255, 255, 0.02); }
.game-line.is-featured { box-shadow: inset 3px 0 0 var(--accent); }
.gl-name { grid-area: name; min-width: 0; }
.gl-name h3 {
  margin: 0; font-size: 0.98rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gl-name .byline { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-line .badge { grid-area: type; justify-self: start; }
.gl-stats { grid-area: stats; font-size: 0.8rem; line-height: 1.4; color: var(--ink-faint); text-wrap: balance; min-width: 11rem; }
.gl-actions { grid-area: actions; margin: 0; flex-wrap: nowrap; gap: 0.4rem; }
.gl-actions .btn { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.game-line .admin-featured { grid-area: feat; padding: 0; border-top: 0; gap: 0.4rem; flex-wrap: nowrap; }
.game-line .admin-featured .star { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.game-line .admin-featured .rank > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.game-line .admin-featured .rank input { width: 3.6rem; padding: 0.3rem 0.5rem; }
.game-line .admin-preview { grid-column: 1 / -1; margin-top: 0.6rem; }

@media (max-width: 980px) {
  .game-line {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "name  type  actions"
      "stats feat  actions";
  }
}
@media (max-width: 760px) {
  .game-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name    type"
      "stats   stats"
      "feat    feat"
      "actions actions";
    gap: 0.35rem 0.75rem;
  }
  .gl-actions { flex-wrap: wrap; margin-top: 0.25rem; }
}
