/* =========================================================
   DRIFFFYNS — styles
   Change the brand colours here (one place):
   ========================================================= */
:root {
  /* Palette taken from the griffin logo */
  --bg: #070605;         /* page background (logo black, slightly warm) */
  --bg-2: #0f0c09;
  --surface: #17120d;    /* cards, panels */
  --surface-2: #211a12;
  --line: #3a2e20;
  --text: #f9edd1;       /* logo cream */
  --muted: #b5a68b;
  --gold: #cfa151;       /* main accent — logo gold */
  --gold-hi: #e3bb6d;    /* gold, hover */
  --bronze: #976029;     /* logo bronze */
  --slate: #7fa2c2;      /* second accent — logo blue, lightened for dark bg */
  --slate-deep: #3e5e7a; /* logo blue */
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.pad-xl { padding-top: 120px; padding-bottom: 120px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow {
  font-family: var(--font-body); font-weight: 700;
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--slate); margin: 0 0 .6em;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1208; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px;
  font-family: var(--font-body); font-size: .92rem; font-weight: 700; letter-spacing: .02em;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #1a1208; }
.btn-primary:hover { background: var(--gold-hi); color: #1a1208; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: 71px;
  background: rgba(7, 6, 5, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(58, 46, 32, .7);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo { gap: 8px; }
.logo .logo-mark { width: 44px; height: 44px; }
.logo .logo-word { width: auto; height: 22px; }
.site-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--text); cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: currentColor; margin: 0 auto; position: relative; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 12px 20px 20px; }
  .site-nav a { padding: 12px 14px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 110px) 0 clamp(64px, 10vw, 120px);
  background:
    radial-gradient(50% 65% at 78% 45%, rgba(207, 161, 81, .16), transparent 70%),
    radial-gradient(45% 55% at 0% 100%, rgba(62, 94, 122, .22), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6)); animation: perch 7s ease-in-out infinite; }
@keyframes perch { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-art { order: -1; max-width: 340px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.page-head { padding: 72px 0 36px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }

/* ---------- game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.game-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--text); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 40px -18px rgba(207, 161, 81, .4); color: var(--text); }
.game-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; }
.game-card__body { padding: 20px 22px 24px; }
.game-card__body h3 { margin-bottom: .3em; }
.game-card__body p { color: var(--muted); margin-bottom: .6em; }
.game-card .meta { font-size: .85rem; margin: 0; }
.badge {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  font-family: var(--font-body); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--text); color: #1a1208;              /* coming soon / in development */
}
.badge.is-released { background: var(--gold); color: #1a1208; }
.badge.is-early { background: var(--slate); color: #0b1620; }
.game-card__media .badge { position: absolute; top: 12px; left: 12px; }
.play-chip {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(7, 6, 5, .82); color: var(--text); font-size: .78rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
}
.empty { color: var(--muted); padding: 40px 0; }

/* ---------- platforms (PC / Android) ---------- */
.platform-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: .8rem; font-weight: 500; color: var(--text); line-height: 1.4;
}
.platform-chip svg { width: 15px; height: 15px; color: var(--slate); flex: none; }
.game-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.platforms-box { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.side-title { font-family: var(--font-body); font-size: .74rem !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px !important; }
.platform-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.platform-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.platform-tile svg { width: 26px; height: 26px; color: var(--gold); flex: none; }
.platform-tile > span { display: flex; flex-direction: column; line-height: 1.25; }
.platform-tile strong { font-weight: 700; }
.platform-tile small { color: var(--muted); font-size: .82rem; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-bottom: 30px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters__label { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.filters button {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer;
}
.filters button.is-active, .filters button:hover { color: var(--text); border-color: var(--gold); }

/* ---------- about / pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 36px; }
.pillar { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pillar .num { font-family: var(--font-display); color: var(--gold); font-size: 1.6rem; font-weight: 700; display: block; margin-bottom: 10px; }
.pillar p { color: var(--muted); margin: 0; }

.contact-box {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 26px;
  background: linear-gradient(135deg, rgba(207, 161, 81, .16), rgba(62, 94, 122, .18)), var(--surface);
  border: 1px solid var(--line);
}
.contact-box h2 { margin-bottom: .3em; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 760px) {
  .contact-box { grid-template-columns: 1fr; }
  .contact-actions { justify-content: flex-start; }
}

/* ---------- game detail ---------- */
.game-hero { padding: 40px 0 10px; background: radial-gradient(70% 60% at 50% 0%, rgba(207, 161, 81, .13), transparent 70%); }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 26px; }
.back-link:hover { color: var(--text); }
.game-hero__head { margin-bottom: 28px; }
.game-hero__head h1 { margin-bottom: .2em; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.video-frame iframe, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.game-body { display: grid; grid-template-columns: 1fr 320px; gap: 48px; padding-top: 56px; padding-bottom: 100px; }
.game-body__main h2 { font-size: 1.35rem; margin-top: 1.6em; }
.game-body__main h2:first-child { margin-top: 0; }
.game-body__main p { color: #e2d6bc; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 28px; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 3px; background: var(--gold); transform: rotate(45deg); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--surface-2); aspect-ratio: 16 / 9; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.shot:hover img { transform: scale(1.05); }
.game-body__side { align-self: start; position: sticky; top: 94px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.facts { margin: 0 0 22px; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 500; }
.store-buttons { display: grid; gap: 10px; margin-bottom: 16px; }
@media (max-width: 860px) {
  .game-body { grid-template-columns: 1fr; gap: 32px; }
  .game-body__side { position: static; }
}
.lightbox { position: fixed; inset: 0; background: rgba(5, 4, 3, .94); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; cursor: zoom-out; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 90vh; border-radius: var(--radius-sm); }
.lightbox__close { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }

/* ---------- legal page ---------- */
.legal { padding: 64px 0 110px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; padding-top: .6em; border-top: 1px solid var(--line); }
.legal h3 { font-size: 1.02rem; margin-top: 1.4em; }
.legal p, .legal li { color: #e2d6bc; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal .updated { color: var(--muted); }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.legal .toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 30px; }
@media (max-width: 600px) { .legal .toc ol { columns: 1; } }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; }


/* =========================================================
   v2 additions — sections, web games, player, tools
   ========================================================= */
.btn-icon svg { width: 18px; height: 18px; flex: none; }
.btn-block { width: 100%; }
.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.count { opacity: .6; font-size: .8em; margin-left: 2px; }

/* header: Discord button */
.site-nav ul { align-items: center; }
.nav-cta {
  display: inline-flex !important; align-items: center; gap: 8px;
  margin-left: 6px; padding: 7px 14px !important;
  border: 1.5px solid var(--slate-deep); color: var(--text) !important; background: rgba(62, 94, 122, .18) !important;
  border-radius: 999px; font-weight: 700; font-size: .92rem;
}
.nav-cta svg { width: 18px; height: 18px; color: var(--slate); }
.nav-cta:hover { border-color: var(--slate); background: rgba(62, 94, 122, .32) !important; }
@media (max-width: 1100px) {
  .site-nav ul { align-items: stretch; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}

/* image fallback (when an itch.io image can't load) */
.img-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--text);
  background: radial-gradient(80% 90% at 30% 20%, rgba(207, 161, 81, .28), transparent 70%), linear-gradient(135deg, var(--surface-2), var(--slate-deep));
}
.video-frame .img-fallback { font-size: clamp(1.6rem, 5vw, 3rem); }

/* platform chip "soon" tag */
.chip-soon { font-style: normal; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--text); color: #1a1208; padding: 1px 6px; border-radius: 999px; margin-left: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text); margin-right: 6px; vertical-align: 1px; }
.dot.is-released { background: #6fcf7f; }
.dot.is-early { background: var(--slate); }
.dot.is-soon { background: var(--gold); }

/* home: segment tiles */
.segments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -48px; position: relative; z-index: 2; }
.segment {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8);
  transition: transform .2s ease, border-color .2s ease;
}
.segment:hover { transform: translateY(-4px); border-color: var(--gold); color: var(--text); }
.segment__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); margin-bottom: 8px; }
.segment__icon svg { width: 22px; height: 22px; }
.segment h3 { margin: 0; font-size: 1.15rem; }
.segment p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.segment .segment__meta { margin-top: auto; padding-top: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
@media (max-width: 960px) { .segments { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .segments { grid-template-columns: 1fr; margin-top: -32px; } }

/* home: android spotlight */
.spotlight {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 26px; background: var(--surface);
}
.spotlight__media { position: relative; display: block; min-height: 300px; background: var(--surface-2); }
.spotlight__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spotlight__body { padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.spotlight__body h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: .25em; letter-spacing: .02em; }
.spotlight .hero-actions { margin-top: 20px; }
.platform-tiles--row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 8px; }
@media (max-width: 820px) { .spotlight { grid-template-columns: 1fr; } .spotlight__media { aspect-ratio: 16 / 9; min-height: 0; } }

/* discord band */
.discord-band {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  padding: clamp(26px, 4vw, 44px); border-radius: 26px;
  background: radial-gradient(60% 120% at 0% 0%, rgba(127, 162, 194, .28), transparent 70%), linear-gradient(135deg, #18222d, var(--surface));
  border: 1px solid #2c3d4f;
}
.discord-band__icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(127, 162, 194, .18); color: var(--slate); }
.discord-band__icon svg { width: 34px; height: 34px; }
.discord-band h2 { margin: 0 0 .2em; }
.discord-band p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .discord-band { grid-template-columns: 1fr; } }

/* web game cards */
.badge svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 4px; }
.badge.is-ai { background: linear-gradient(135deg, #a98bff, var(--slate)); color: #0d0b1a; }
.badge.is-new { background: var(--gold); color: #1a1208; }
.game-card__media .badge.is-new { left: auto; right: 12px; }
.play-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0;
  background: rgba(7, 6, 5, .45); transition: opacity .2s ease;
}
.play-overlay svg { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: var(--gold); color: #1a1208; }
.web-card:hover .play-overlay, .web-card:focus-visible .play-overlay { opacity: 1; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: .9rem; }
.card-cta svg { width: 14px; height: 14px; }
.info-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 36px; }
.info-strip > div { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.info-strip strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.info-strip span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .info-strip { grid-template-columns: 1fr; } }

/* game page: itch widget + side note */
.itch-widget { max-width: 552px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.itch-widget iframe { display: block; width: 100%; height: 167px; border: 0; }
.side-note { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-note p { margin-bottom: 10px; color: var(--muted); }
.game-body__side .btn-block + * { margin-top: 10px; }
.game-body__side > .btn-block { margin-top: 6px; }

/* toggle checkbox */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); font-size: .92rem; user-select: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

/* play page */
.player-section { padding: 34px 0 10px; background: radial-gradient(70% 60% at 50% 0%, rgba(127, 162, 194, .14), transparent 70%); }
.player-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.player-head h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.player-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn svg { width: 20px; height: 20px; }
.player-frame {
  position: relative; width: 100%; max-height: calc(100vh - 140px); margin: 0 auto;
  border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.player-frame.is-portrait { max-width: 480px; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.player-frame:fullscreen { max-height: none; border-radius: 0; border: 0; aspect-ratio: auto !important; width: 100vw; height: 100vh; }
.player-frame:-webkit-full-screen { max-height: none; border-radius: 0; width: 100vw; height: 100vh; }
.rotate-hint { display: none; margin-top: 10px; }
@media (max-width: 760px) and (orientation: portrait) { .rotate-hint { display: block; } }

/* tools */
.tools-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; padding-bottom: 110px; }
.tool-nav { position: sticky; top: 94px; display: grid; gap: 6px; }
.tool-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; border: 1px solid transparent; font-weight: 500;
}
.tool-nav a svg { width: 20px; height: 20px; color: var(--slate); flex: none; }
.tool-nav a:hover { color: var(--text); background: var(--surface); }
.tool-nav a[aria-current="true"] { color: var(--text); background: var(--surface); border-color: var(--gold); }
.tool-nav a[aria-current="true"] svg { color: var(--gold); }
.tool-panel { display: none; padding: clamp(20px, 3.5vw, 34px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tool-panel.is-active { display: block; }
.tool-panel > h2 { margin-bottom: .2em; }
.tool-panel > .muted { margin-bottom: 1.4em; }
.tool-panel h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin: 1.6em 0 .7em; }
@media (max-width: 900px) {
  .tools-layout { grid-template-columns: 1fr; }
  .tool-nav { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: thin; }
  .tool-nav a { flex: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; }
}

.field-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.input, .select {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; width: 100%;
}
.input:focus, .select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(207, 161, 81, .2); }
.input[type="number"] { width: 130px; }
.input[type="color"] { width: 64px; height: 46px; padding: 4px; cursor: pointer; }
.btn-sm { padding: .55em 1em; font-size: .85rem; }
.result-big { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; color: var(--gold); line-height: 1.1; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.stat { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); }
.stat small { display: block; color: var(--muted); font-size: .78rem; }
.stat strong { font-size: 1.05rem; word-break: break-word; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 500; font-size: .85rem; }
.data-table td.num { font-variant-numeric: tabular-nums; }
.data-table tr.is-clickable { cursor: pointer; }
.data-table tr.is-clickable:hover td { background: var(--surface-2); }
.copyable { cursor: copy; border-bottom: 1px dashed var(--line); }
.copyable:hover { color: var(--gold); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text); color: #1a1208; font-weight: 700; padding: 10px 18px; border-radius: 999px;
  transition: opacity .2s ease, transform .2s ease; z-index: 300; pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* palette tool */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }
.swatch { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-width: 0; }
.swatch__color { height: 120px; position: relative; cursor: copy; }
.swatch__lock {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff;
}
.swatch__lock svg { width: 16px; height: 16px; }
.swatch__lock[aria-pressed="true"] { background: #fff; color: #111; }
.swatch__info { padding: 10px 10px 12px; font-size: .78rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.swatch__info strong { display: block; font-size: .95rem; letter-spacing: .03em; }
.swatch__info span { display: block; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .swatches { grid-template-columns: 1fr; }
  .swatch { flex-direction: row; }
  .swatch__color { height: auto; width: 96px; flex: none; }
}
.export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.code-out {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere; color: #e2d6bc; max-height: 220px; overflow: auto;
}

/* aspect preview */
.aspect-preview { margin-top: 18px; display: grid; place-items: center; height: 180px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px dashed var(--line); }
.aspect-box { background: linear-gradient(135deg, rgba(207, 161, 81, .35), rgba(62, 94, 122, .45)); border: 2px solid var(--gold); border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; transition: width .2s ease, height .2s ease; }

/* dice tool */
.dice-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.dice-quick button {
  min-width: 58px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
}
.dice-quick button:hover { border-color: var(--gold); color: var(--gold); }
.dice-result { margin-top: 18px; padding: 20px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); text-align: center; }
.dice-total { font-family: var(--font-display); font-size: clamp(2.6rem, 8vw, 4rem); font-weight: 800; color: var(--gold); line-height: 1; }
.dice-total.roll { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.6) rotate(-8deg); opacity: .3; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.dice-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.die { min-width: 38px; height: 38px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; }
.die.is-max { border-color: #6fcf7f; color: #6fcf7f; }
.die.is-min { border-color: #e57373; color: #e57373; }
.die.is-dropped { opacity: .35; text-decoration: line-through; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--bg-2); font-size: .9rem; }
.history li span { color: var(--muted); }

/* tools preview on home */
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.tool-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--text); }
.tool-card svg { width: 26px; height: 26px; color: var(--gold); flex: none; margin-top: 2px; }
.tool-card strong { display: block; }
.tool-card span { color: var(--muted); font-size: .88rem; line-height: 1.4; display: block; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; color: var(--muted); font-size: .92rem; background: var(--bg-2); min-height: 200px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { margin-top: 14px; max-width: 32ch; }
.footer-title { font-family: var(--font-body); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; display: block; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player-poster__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--gold); color: #1a1208; font: 700 1rem var(--font-body); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.player-poster__btn svg { width: 18px; height: 18px; }

/* =========================================================
   MOTION (v2.1) — page transitions, reveals, hover life
   All of it turns off with the OS "reduce motion" setting.
   ========================================================= */

/* --- page-to-page transitions (Chrome, Edge, Safari 18+) --- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out .2s ease-in both; }
::view-transition-new(root) { animation: vt-in .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); filter: blur(2px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* --- fallback for browsers without it (Firefox) --- */
html.no-vt main { animation: page-in .5s cubic-bezier(.2, .7, .2, 1) both; }
html.is-leaving main, html.is-leaving .site-footer { opacity: 0; transform: translateY(-10px); transition: opacity .17s ease, transform .17s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }

/* --- scroll reveal --- */
html.js .reveal {
  opacity: 0; transform: translateY(28px) scale(.985);
  transition: opacity .7s ease var(--d, 0ms), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* --- header --- */
.site-header { transition: background .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled { background: rgba(7, 6, 5, .95); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .8); }
.site-nav a { transition: color .2s ease, background .2s ease; }

/* --- hero --- */
.hero > .container { position: relative; z-index: 1; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -140px; background: rgba(207, 161, 81, .16); animation: drift-a 16s ease-in-out infinite alternate; }
.hero::after { width: 460px; height: 460px; left: -160px; bottom: -220px; background: rgba(62, 94, 122, .32); animation: drift-b 19s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-140px, 90px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(160px, -70px) scale(1.2); } }
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > *:nth-child(2) { animation-delay: .08s; }
.hero-copy > *:nth-child(3) { animation-delay: .16s; }
.hero-copy > *:nth-child(4) { animation-delay: .26s; }
.hero-art { animation: art-in 1.1s cubic-bezier(.2, .7, .2, 1) backwards .1s; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes art-in { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.hero h1 em { background: linear-gradient(90deg, var(--gold), #f4d48e, var(--gold)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite; padding-right: .06em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- buttons --- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-play { box-shadow: 0 0 0 0 rgba(207, 161, 81, .55); animation: pulse-ring 2.4s ease-out infinite; }
.btn-play svg { width: 16px; height: 16px; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(207, 161, 81, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(207, 161, 81, 0); } }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6fcf7f; margin-right: 8px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; box-shadow: 0 0 10px #6fcf7f; }
@keyframes blink { 50% { opacity: .35; } }

/* --- cards: tilt + light that follows the mouse --- */
.game-card, .segment, .tool-card { position: relative; will-change: transform; }
.game-card.is-tilting { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-4px); transition: transform .08s linear, border-color .2s ease, box-shadow .2s ease; }
.segment.is-tilting, .tool-card.is-tilting { transform: perspective(700px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-4px); transition: transform .08s linear, border-color .2s ease; }
.game-card::after, .segment::after, .tool-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(227, 187, 109, .15), transparent 45%);
}
.game-card:hover::after, .segment:hover::after, .tool-card:hover::after { opacity: 1; }
.game-card__media { overflow: hidden; }
.game-card__media img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.game-card:hover .game-card__media img { transform: scale(1.07); }
.segment__icon { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .3s ease; }
.segment:hover .segment__icon { transform: rotate(-8deg) scale(1.12); background: rgba(207, 161, 81, .16); }
.play-overlay svg { transform: scale(.7); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.web-card:hover .play-overlay svg { transform: scale(1); }
.spotlight__media { overflow: hidden; }
.spotlight__media img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.spotlight:hover .spotlight__media img { transform: scale(1.05); }

/* --- play-now section on home --- */
.section--play { position: relative; background: radial-gradient(60% 80% at 15% 0%, rgba(111, 207, 127, .08), transparent 70%), radial-gradient(50% 70% at 100% 100%, rgba(127, 162, 194, .12), transparent 70%); }
.section--play .game-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* --- tools: panel switch --- */
.tool-panel.is-active { animation: panel-in .4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }
.tool-nav a { transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.tool-nav a:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero::before, .hero::after { animation: none; }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* =========================================================
   v2.2 — ads, support / donations
   ========================================================= */
.ad-slot { max-width: var(--max); margin: 36px auto; padding: 0; text-align: center; min-height: 0; }
.ad-slot.is-on { min-height: 120px; }
.container > .ad-slot, .tools-layout .ad-slot { padding: 0; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); opacity: .7; margin-bottom: 6px; }
.ad-preview { display: grid; place-items: center; min-height: 110px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem; background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,.02) 12px 24px); }
.ad-slot--side { margin: 18px 0 0; }
main > .ad-slot { padding: 0 20px; }

.nav-support { display: inline-flex !important; align-items: center; gap: 6px; color: #ff8fa0 !important; }
.nav-support svg { width: 15px; height: 15px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.nav-support:hover svg { transform: scale(1.25); }

.support-head { text-align: center; }
.heart-badge { width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; color: #ff6f86; background: rgba(255, 111, 134, .12); border: 1px solid rgba(255, 111, 134, .3); animation: heartbeat 1.8s ease-in-out infinite; }
.heart-badge svg { width: 38px; height: 38px; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.support-card {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease;
}
a.support-card:hover { transform: translateY(-4px); border-color: var(--gold); color: var(--text); }
.support-card.is-main { background: linear-gradient(135deg, rgba(255, 111, 134, .12), rgba(207, 161, 81, .12)), var(--surface); border-color: rgba(255, 111, 134, .4); }
.support-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #ff6f86; background: rgba(255, 111, 134, .12); }
.support-card__icon svg { width: 20px; height: 20px; }
.support-card strong { font-size: 1.15rem; }
.support-card > span:not(.support-card__icon) { color: var(--muted); font-size: .92rem; line-height: 1.45; flex: 1; }
.support-card em { font-style: normal; margin-top: 6px; }
.support-empty { grid-column: 1 / -1; padding: 28px; border-radius: var(--radius); border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.support-empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }
.game-body__side .btn-block { margin-top: 10px; }

/* =========================================================
   v2.3 — HOME HUB (every section at a glance)
   ========================================================= */
.hub-hero { position: relative; overflow: hidden; padding: clamp(26px, 4.5vh, 60px) 0 clamp(26px, 4vh, 50px); border-bottom: 1px solid var(--line); }
.hub-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 45% at 50% 62%, rgba(207, 161, 81, .16), transparent 70%),
    radial-gradient(45% 50% at 12% 20%, rgba(62, 94, 122, .30), transparent 70%),
    radial-gradient(40% 45% at 90% 85%, rgba(141, 125, 255, .14), transparent 70%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(80% 80% at 50% 50%, #000 40%, transparent 100%);
}
.hub-head { position: relative; z-index: 2; text-align: center; }
.hub-eyebrow { font-family: ui-monospace, Consolas, monospace; letter-spacing: .28em; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hub-title { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: .2em; animation: rise .8s cubic-bezier(.2,.7,.2,1) .06s both; }
.hub-title em { font-style: italic; background: linear-gradient(90deg, var(--gold), #f4d48e, var(--slate), var(--gold)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite; padding-right: .08em; }
.hub-lead { margin: 0 auto; max-width: 52ch; animation: rise .8s cubic-bezier(.2,.7,.2,1) .12s both; }
.hub-actions { justify-content: center; margin-top: 18px; animation: rise .8s cubic-bezier(.2,.7,.2,1) .18s both; }

.hub { position: relative; z-index: 1; width: min(1060px, 100%); height: clamp(360px, calc(100vh - 330px), 540px); margin: 4px auto 0; padding: 0 20px; }
.hub-lines { position: absolute; inset: 0 20px; width: calc(100% - 40px); height: 100%; overflow: visible; }
.hub-lines line { stroke: rgba(207, 161, 81, .28); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 4 7; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.hub-core { position: absolute; left: 50%; top: 50%; width: clamp(150px, 19vw, 210px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(207,161,81,.25), rgba(15,12,9,.9) 70%); border: 1px solid rgba(207,161,81,.45);
  box-shadow: 0 0 60px rgba(207,161,81,.25), inset 0 0 40px rgba(207,161,81,.12); }
.hub-core img { position: absolute; left: -14%; top: -22%; width: 128%; height: auto; max-width: none; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); animation: perch 7s ease-in-out infinite; }
.hub-ring { position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(207,161,81,.35); animation: spin 26s linear infinite; }
.hub-ring--2 { inset: -34px; border-style: solid; border-color: rgba(127,162,194,.16); animation: pulse-ring2 3.2s ease-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring2 { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }

.node {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) translate(var(--px, 0), var(--py, 0));
  width: 200px; padding: 12px 15px 13px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(30, 25, 19, .92), rgba(17, 14, 10, .92)); border: 1px solid rgba(var(--c), .35);
  box-shadow: 0 16px 40px -18px rgba(var(--c), .65), 0 0 0 1px rgba(0,0,0,.3);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .2s ease, box-shadow .25s ease;
  animation: node-in .7s cubic-bezier(.2,.7,.2,1) both, bob 6s ease-in-out infinite;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.node:nth-of-type(1) { animation-delay: .25s, 0s; } .node:nth-of-type(2) { animation-delay: .32s, -1s; } .node:nth-of-type(3) { animation-delay: .39s, -2s; }
.node:nth-of-type(4) { animation-delay: .46s, -3s; } .node:nth-of-type(5) { animation-delay: .53s, -4s; } .node:nth-of-type(6) { animation-delay: .6s, -5s; }
@keyframes node-in { from { opacity: 0; filter: blur(6px); } }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -7px; } }
.node:hover { border-color: rgba(var(--c), .9); box-shadow: 0 22px 50px -16px rgba(var(--c), .9), 0 0 0 1px rgba(var(--c), .3); color: var(--text); transform: translate(-50%, -50%) translate(var(--px, 0), var(--py, 0)) scale(1.05); }
.node strong { display: block; font-size: 1.15rem; margin: 6px 0 2px; }
.node small { display: block; font-family: ui-monospace, Consolas, monospace; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.node small b { color: rgb(var(--c)); font-weight: 700; }
.node__status { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, Consolas, monospace; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.node__status i { width: 7px; height: 7px; border-radius: 50%; background: #6fcf7f; box-shadow: 0 0 8px #6fcf7f; animation: blink 1.8s ease-in-out infinite; }
.node__status.is-soon i { background: #ff9f43; box-shadow: 0 0 8px #ff9f43; }
.node__arrow { position: absolute; top: 12px; right: 14px; color: var(--muted); transition: transform .25s ease, color .2s; }
.node:hover .node__arrow { color: rgb(var(--c)); transform: translate(2px, -2px); }

@media (max-width: 860px) {
  .hub { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
  .hub-lines { display: none; }
  .hub-core { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; justify-self: center; width: 120px; margin: 30px 0 8px; order: 10; }
  .hub { margin-top: 22px; }
  .node { position: relative; left: auto; top: auto; transform: none; width: auto; animation: node-in .6s cubic-bezier(.2,.7,.2,1) both; }
  .node:hover { transform: scale(1.02); }
}
@media (max-width: 380px) { .hub { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hub-lines line, .hub-ring, .node, .hub-core img { animation: none !important; } }

/* ---------- Focus Timer (tools.html#focus) ---------- */
.ft { --m: 207, 161, 81; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.1fr); gap: 28px; align-items: start; }
.ft[data-mode="short"] { --m: 111, 207, 127; }
.ft[data-mode="long"] { --m: 127, 162, 194; }
.ft-main { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; border-radius: var(--radius); background: radial-gradient(70% 60% at 50% 30%, rgba(var(--m), .12), transparent 70%), var(--bg-2); border: 1px solid var(--line); transition: background .4s ease; }
.ft-modes { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; justify-content: center; }
.ft-modes button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .88rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.ft-modes button.is-on { background: rgb(var(--m)); color: #14100a; font-weight: 700; }
.ft-dial { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 22px 0 14px; }
.ft-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ft-track { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 9; }
.ft-prog { fill: none; stroke: rgb(var(--m)); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .4s ease; filter: drop-shadow(0 0 8px rgba(var(--m), .55)); }
.ft-readout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ft-time { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ft.is-running .ft-time { color: rgb(var(--m)); }
.ft-label { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.ft-dots { display: flex; gap: 6px; margin-top: 12px; }
.ft-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.12); transition: background .3s; }
.ft-dots i.on { background: rgb(var(--m)); box-shadow: 0 0 8px rgba(var(--m), .7); }
.ft-controls { display: flex; align-items: center; gap: 14px; }
.ft-start { min-width: 140px; font-size: 1rem; padding: .9em 1.6em; background: rgb(var(--m)) !important; color: #14100a !important; }
.ft-current { margin: 16px 0 6px; font-size: .95rem; min-height: 1.5em; }
.ft-today { font-size: .88rem; color: var(--muted); padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.ft-today span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; margin-right: 8px; color: var(--slate); }
.ft-today b { color: var(--text); }

.ft-add { display: flex; gap: 8px; align-items: center; }
.ft-add .input[type="text"] { flex: 1; }
.ft-est { display: inline-flex; align-items: center; gap: 4px; }
.ft-est .input { width: 64px !important; padding: 10px 8px; }
.ft-tasks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.ft-empty { color: var(--muted); font-size: .92rem; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); text-align: center; }
.ft-task { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.ft-task.is-active { border-color: rgba(207,161,81,.7); background: rgba(207,161,81,.07); }
.ft-task input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); flex: none; cursor: pointer; }
.ft-task__text { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; padding: 2px 0; overflow-wrap: anywhere; }
.ft-task.is-done .ft-task__text { text-decoration: line-through; color: var(--muted); }
.ft-task__count { font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ft-task__btns { display: flex; gap: 2px; opacity: .5; transition: opacity .2s; }
.ft-task:hover .ft-task__btns, .ft-task:focus-within .ft-task__btns { opacity: 1; }
.ft-task__btns button { width: 28px; height: 28px; border-radius: 8px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .95rem; }
.ft-task__btns button:hover:not([disabled]) { background: var(--surface-2); color: var(--text); }
.ft-task__btns button[disabled] { opacity: .3; cursor: default; }
.ft-edit { flex: 1; padding: 6px 8px; font-size: .92rem; }
.ft-edit-est { width: 60px !important; padding: 6px; }
.ft-task-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; min-height: 24px; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--text); }
.ft-settings { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--bg-2); }
.ft-settings summary { cursor: pointer; font-weight: 700; font-size: .95rem; }
.ft-settings[open] summary { margin-bottom: 14px; }
.ft-settings .input[type="number"] { width: 100px; }
.ft-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ft-presets button { background: var(--surface); border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: .82rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.ft-presets button:hover, .ft-presets button.is-on { color: var(--text); border-color: var(--gold); }
.ft-toggles { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; }
@media (max-width: 960px) { .ft { grid-template-columns: 1fr; } }

/* v2.4 — compact AI games header */
.page-head--tight { padding: 40px 0 22px; }
.page-head--tight h1 { margin-bottom: .15em; }
.ai-note { color: var(--muted); margin: 0 0 14px; font-size: 1rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.chips a { color: #ff8fa0; text-decoration: none; }
#webgames-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* v2.4 — tools fullscreen */
.tool-panel { position: relative; }
.tool-fs { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; z-index: 2; }
.tool-fs:hover { color: var(--text); border-color: var(--gold); }
.tool-fs svg { width: 15px; height: 15px; }
.tool-panel:fullscreen { overflow-y: auto; border-radius: 0; border: 0; padding: clamp(24px, 4vw, 56px); background: radial-gradient(60% 50% at 50% 0%, rgba(207,161,81,.08), transparent 70%), var(--bg); }
.tool-panel:-webkit-full-screen { overflow-y: auto; padding: 40px; background: var(--bg); }
.tool-panel:fullscreen > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.tool-panel:fullscreen > .tool-fs { position: fixed; top: 18px; right: 22px; margin: 0; }
.tool-panel:fullscreen .ft-dial { width: min(420px, 60vh); }
.tool-panel:fullscreen .ft-time { font-size: clamp(3.4rem, 8vh, 5.4rem); }
.tool-panel:fullscreen .ft-tasks { max-height: 52vh; }
@media (max-width: 600px) { .tool-fs span { display: none; } .tool-panel > h2 { padding-right: 50px; } }
.tool-panel > h2 { padding-right: 140px; }

/* =========================================================
   v2.5 — home choice buttons, hub click counter, tools in folders
   ========================================================= */
/* two doors: AI Games (left) / Organic Games (right) */
.hub-choice { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; animation: rise .8s cubic-bezier(.2,.7,.2,1) .18s both; }
.choice { --c: 169, 139, 255; position: relative; display: flex; align-items: center; gap: 12px; min-width: 250px; padding: 12px 18px 12px 12px; border-radius: 999px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(var(--c), .2), rgba(var(--c), .07)); border: 1.5px solid rgba(var(--c), .6);
  box-shadow: 0 14px 34px -16px rgba(var(--c), .8); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; text-align: left; }
.choice:hover { color: var(--text); transform: translateY(-3px); border-color: rgb(var(--c)); box-shadow: 0 20px 44px -16px rgba(var(--c), .95); }
.choice--organic { --c: 207, 161, 81; }
.choice__icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgb(var(--c)); color: #120d07; }
.choice--ai .choice__icon { background: linear-gradient(135deg, #a98bff, var(--slate)); }
.choice__icon svg { width: 22px; height: 22px; }
.choice__text strong { display: block; font-size: 1.08rem; line-height: 1.2; }
.choice__text small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.choice__go { margin-left: auto; font-size: .8rem; color: rgb(var(--c)); transition: transform .2s ease; }
.choice:hover .choice__go { transform: translateX(3px); }
@media (max-width: 600px) { .hub-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .choice { min-width: 0; border-radius: 18px; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } .choice__go { position: absolute; top: 14px; right: 14px; } .choice__icon { width: 36px; height: 36px; } }
@media (max-width: 340px) { .hub-choice { grid-template-columns: 1fr; } }

/* click counter on hub cards */
.node__clicks { position: absolute; right: 36px; top: 10px; display: inline-flex; align-items: center; gap: 4px; font-family: ui-monospace, Consolas, monospace; font-size: .68rem; color: rgb(var(--c)); background: rgba(var(--c), .12); border: 1px solid rgba(var(--c), .3); padding: 1px 7px 1px 5px; border-radius: 999px; animation: rise .5s ease both; }
.node__clicks svg { width: 12px; height: 12px; }
.hub-choice + .hub, .hub-head + .hub { margin-top: 22px; }

/* tools hub + cards */
.tools-group + .tools-group { margin-top: 46px; }
.tools-group .section-head { margin-bottom: 18px; }
.tool-cards--big { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tool-cards--big .tool-card { padding: 22px; }
.tool-cards--big .tool-card svg { width: 34px; height: 34px; }
.tool-cards--big .tool-card strong { font-size: 1.15rem; }
.tool-card--ue { border-color: rgba(127, 162, 194, .45); background: linear-gradient(160deg, rgba(127, 162, 194, .1), transparent 60%), var(--surface); }
.tool-card--ue svg { color: var(--slate); }
.tool-card__tag { display: inline-block; margin-top: 8px; font-family: ui-monospace, Consolas, monospace; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.tag-new { font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: #1a1208; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; margin-left: 4px; }
.badge.is-ue { background: linear-gradient(135deg, var(--slate), #d9e6f2); color: #0b1620; }

/* tool.html — the tool inside the site */
.tool-tagline { margin: 4px 0 0; }
.tool-frame { position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.tool-frame iframe { display: block; width: 100%; height: 640px; border: 0; background: transparent; }
.tool-frame.is-tall iframe { height: max(560px, calc(100vh - 150px)); }
.tool-frame:fullscreen { border: 0; border-radius: 0; overflow: auto; }
.tool-frame:fullscreen iframe { height: 100vh !important; }
.tool-frame:-webkit-full-screen iframe { height: 100vh !important; }

/* tools/<name>/index.html — a tool on its own */
body.tool-solo { min-height: 100vh; background: radial-gradient(60% 40% at 50% 0%, rgba(207,161,81,.07), transparent 70%), var(--bg); }
.tool-solo__main { max-width: 1240px; margin: 0 auto; padding: clamp(14px, 3vw, 32px); }
.tool-solo__back { display: inline-block; margin-bottom: 12px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.tool-solo__back:hover { color: var(--gold); }
.in-frame body.tool-solo { min-height: 0; background: transparent; }
.in-frame .tool-solo__main { padding: 0; max-width: none; }
.in-frame .tool-solo__back { display: none; }
.in-frame .tool-solo .tool-panel { border: 0; border-radius: 0; }
.in-frame .tool-solo .tool-panel > h2 { padding-right: 0; }
.tools-group--dev .tool-cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.in-frame .tool-solo .tool-panel > h2 { display: none; }
/* v2.6 — one fullscreen control: small exit button only while the game/tool frame is fullscreen */
.frame-exit { display: none; position: absolute; left: 12px; bottom: 12px; z-index: 5; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(7,6,5,.72); color: var(--text); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; opacity: .55; transition: opacity .2s; }
.frame-exit:hover, .frame-exit:focus-visible { opacity: 1; }
.player-frame:fullscreen .frame-exit, .tool-frame:fullscreen .frame-exit { display: block; }
.player-frame:-webkit-full-screen .frame-exit, .tool-frame:-webkit-full-screen .frame-exit { display: block; }

/* v2.6 — calmer tool cards: each tool has its own soft accent, quieter text */
.tool-card { --tc: 207, 161, 81; background: linear-gradient(160deg, rgba(var(--tc), .06), transparent 55%), var(--surface); border-color: rgba(255, 255, 255, .06); gap: 14px; }
.tool-card:hover { border-color: rgba(var(--tc), .55); }
.tool-card .tool-card__icon { flex: none; margin: 0; font-size: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--tc), .12); border: 1px solid rgba(var(--tc), .22); }
.tool-card .tool-card__icon svg, .tool-cards--big .tool-card .tool-card__icon svg { width: 22px; height: 22px; margin: 0; color: rgb(var(--tc)); }
.tool-card strong { font-size: 1rem; font-weight: 600; color: #efe4cc; letter-spacing: .005em; }
.tool-card span:not(.tool-card__icon) { color: rgba(181, 166, 139, .82); font-size: .85rem; margin-top: 2px; }
.tool-card--ue { --tc: 143, 193, 255; background: linear-gradient(160deg, rgba(143, 193, 255, .07), transparent 55%), var(--surface); border-color: rgba(143, 193, 255, .14); }
.tool-card--ue svg { color: rgb(var(--tc)); }
.tool-card__tag { color: rgba(143, 193, 255, .8); }
.tag-new { background: transparent; color: #4fe3c1; border: 1px solid rgba(79, 227, 193, .45); font-size: .58rem; padding: 1px 6px; }
.tools-group .section-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.tools-group .section-head .eyebrow { color: var(--muted); opacity: .75; }
.tools-group--unreal { margin-top: 54px; padding-top: 34px; border-top: 1px solid rgba(255, 255, 255, .06); }
.tool-cards--big .tool-card strong { font-size: 1.08rem; }

/* v2.6 — online leaderboards (AI games page + play page) */
.lb-section { padding-bottom: 34px; }
.lb-section .section-head { margin-bottom: 14px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.lb-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); background: linear-gradient(170deg, rgba(207,161,81,.07), transparent 50%), var(--surface); border: 1px solid rgba(255,255,255,.07); }
.lb-card header { display: flex; flex-direction: column; gap: 4px; }
.lb-card header a { color: var(--text); text-decoration: none; }
.lb-card header a:hover strong { color: var(--gold); }
.lb-card header strong { font-size: 1.02rem; font-weight: 700; }
.lb-board { font-family: ui-monospace, Consolas, monospace; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lb-select { font: inherit; font-size: .8rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; max-width: 100%; }
.lb-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; flex: 1; }
.lb-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.05); }
.lb-list li:first-child { border-top: 0; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e9dec6; }
.lb-list b { color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 700; }
.lb-list b small { color: var(--muted); font-weight: 500; font-size: .72rem; }
.lb-list .lb-empty { display: block; color: var(--muted); font-size: .85rem; padding: 8px 0; }
.lb-play { font-size: .82rem; font-weight: 700; text-decoration: none; align-self: flex-start; }
.lb-side { margin-bottom: 16px; }
.lb-side .lb-card { padding: 14px; }

/* v2.7 — leaderboard page, menu button, play/open counters, stats page */
.site-nav .nav-lb svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; color: var(--gold); }
.lb-grid--page { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.lb-card--big { padding: 0 0 16px; overflow: hidden; }
.lb-card--big > * { margin-left: 18px; margin-right: 18px; }
.lb-card--big header { margin: 0; position: relative; }
.lb-cover { width: 100%; height: 110px; object-fit: cover; opacity: .45; mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); }
.lb-card--big { border-top: 3px solid rgba(207,161,81,.55); }
.lb-card--big .lb-head { display: flex; flex-direction: column; gap: 6px; padding: 0 18px; margin-top: 18px; position: relative; }
.lb-card--big .lb-head strong { font-family: var(--font-display); font-size: 1.45rem; }
.lb-card--big .lb-list li { padding: 8px 0; }
.lb-card--big .lb-name small { display: block; font-size: .72rem; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-loading { min-height: 120px; opacity: .6; }
.lb-msg { padding: 16px 18px; border-radius: var(--radius); border: 1px solid rgba(207,161,81,.4); background: rgba(207,161,81,.07); color: var(--muted); }
.lb-msg strong { color: var(--text); }
.card-count { font-style: normal; margin-left: auto; padding-left: 10px; font-size: .78rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.card-cta { display: flex; align-items: center; }
.tool-card .tool-card__count { display: block; margin-top: 6px; font-family: ui-monospace, Consolas, monospace; font-size: .68rem; letter-spacing: .06em; color: rgba(181,166,139,.7); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.stats-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(255,255,255,.07); }
.stats-card h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 10px; }
.stats-card h2 span { color: var(--gold); font-variant-numeric: tabular-nums; }
.stats-card ul { list-style: none; margin: 0; padding: 0; }
.stats-card li { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.05); font-size: .9rem; }
.stats-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.stats-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #4fe3c1); }
.stats-card b { font-variant-numeric: tabular-nums; }
.support-grid:has(> :only-child) { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- live stats (stats.html) + online count in the menu ---------- */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: live-ping 1.8s ease-out infinite; vertical-align: 1px; margin-right: 6px; }
@keyframes live-ping { 70% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.nav-online { font-style: normal; font-size: .72em; font-weight: 800; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(74,222,128,.15); color: #86efac; vertical-align: 1px; }
.stats-live { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin-bottom: 28px; }
.live-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(255,255,255,.07); }
.live-card h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.live-card--big { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, rgba(74,222,128,.12), var(--surface) 60%); }
.live-card--big strong { display: block; font-size: 1.05rem; }
.live-num { font-family: var(--font-display, inherit); font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-num .live-dot { width: 12px; height: 12px; vertical-align: 10px; margin-right: 10px; }
.status-pill { font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: rgba(74,222,128,.18); color: #86efac; }
.status-busy .status-pill { background: rgba(250,204,21,.18); color: #fde047; }
.status-full .status-pill { background: rgba(248,113,113,.2); color: #fca5a5; }
.load-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; margin: 12px 0 6px; }
.load-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4ade80, #facc15 70%, #f87171); background-size: 300px 100%; }
.stats-card a { color: inherit; }
.stats-more { margin-top: 30px; }
.stats-more > summary { cursor: pointer; font-weight: 700; color: var(--gold); margin-bottom: 16px; }
/* the menu has 8 items now: keep each on one line, tighter spacing on smaller laptops, hamburger a bit earlier */
.site-nav a { white-space: nowrap; }
@media (min-width: 1181px) { .site-nav ul { gap: 2px; } .site-nav a { padding: 8px 10px; } .site-nav .nav-cta { padding-left: 12px; padding-right: 12px; } }
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 12px 20px 20px; align-items: stretch; }
  .site-nav a { padding: 12px 14px; }
}
/* the logo never shrinks; if the menu doesn't fit next to it (any screen size, zoom or font), js/main.js adds
   .nav-collapsed and the menu folds into the ☰ button instead of sliding over the logo */
.site-header .logo { flex-shrink: 0; }
.site-header.nav-collapsed .nav-toggle { display: block; }
.site-header.nav-collapsed .site-nav { position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
.site-header.nav-collapsed .site-nav.is-open { display: block; }
.site-header.nav-collapsed .site-nav ul { flex-direction: column; padding: 12px 20px 20px; align-items: stretch; }
.site-header.nav-collapsed .site-nav a { padding: 12px 14px; }
.site-header.nav-measure .site-nav { visibility: hidden; }
.words-bar i { background: linear-gradient(90deg, #f87171, #facc15 30%, #4ade80 60%); background-size: 100% 100%; }
.live-card--visits { grid-column: 1 / -1; text-align: center; padding: 26px 18px; background: radial-gradient(70% 120% at 50% 0%, rgba(207,161,81,.18), var(--surface) 70%); border-color: rgba(207,161,81,.3); }
.live-card--visits .muted { display: block; font-size: 1rem; letter-spacing: .02em; }
.visits-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1.05; color: var(--gold); font-variant-numeric: tabular-nums; margin: 4px 0; }

/* ---------- "Games" dropdown in the menu ---------- */
.site-nav .has-sub { position: relative; }
.site-nav .caret { display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; opacity: .7; }
.site-nav .sub { list-style: none; margin: 0; padding: 8px; display: none; flex-direction: column; gap: 2px; }
.site-nav .sub a { display: block; padding: 9px 14px; border-radius: 12px; white-space: nowrap; }
.site-nav .sub a small { display: block; font-size: .78em; color: var(--muted); opacity: .8; font-weight: 400; }
@media (min-width: 1181px) {
  .site-header:not(.nav-collapsed) .site-nav .sub { position: absolute; top: calc(100% + 6px); left: -8px; min-width: 220px; z-index: 60;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(0,0,0,.8); }
  .site-header:not(.nav-collapsed) .site-nav .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* keeps the menu open while moving down */
  .site-header:not(.nav-collapsed) .site-nav .has-sub:hover .sub,
  .site-header:not(.nav-collapsed) .site-nav .has-sub:focus-within .sub,
  .site-header:not(.nav-collapsed) .site-nav .has-sub.open .sub { display: flex; }
}
/* phone / folded menu: the four game pages are listed under "Games" */
@media (max-width: 1180px) { .site-nav .sub { display: flex; padding: 0 0 6px 14px; } .site-nav .sub a { padding: 9px 14px; } .site-nav .has-sub > a .caret { display: none; } }
.site-header.nav-collapsed .site-nav .sub { display: flex; padding: 0 0 6px 14px; position: static; border: 0; box-shadow: none; background: none; }
.site-header.nav-collapsed .site-nav .has-sub > a .caret { display: none; }

/* ---------- 3D games ---------- */
.badge.is-3d { background: linear-gradient(135deg, #5ec8ff, #7b6bff); color: #06101f; font-weight: 800; }
.badge.is-aiassist { left: auto; right: auto; top: auto; bottom: 12px; background: rgba(0,0,0,.6); color: #d8ccff; font-size: .68rem; }
.card-3d .game-card__media .badge.is-aiassist { position: absolute; left: 12px; }
.card-meta { font-size: .82rem; color: var(--muted); margin: -4px 0 10px; }
.player-nogl { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px; background: radial-gradient(60% 60% at 50% 40%, #12202c, #05080b); }
.player-nogl strong { font-size: 1.2rem; } .player-nogl span { color: var(--muted); max-width: 460px; margin: 0 auto; }
.player-poster__note { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: .8rem; background: rgba(0,0,0,.6); padding: 4px 12px; border-radius: 99px; }
.game-hero__tags .badge.is-aiassist { position: static; }
.site-nav .sub { align-items: stretch; }

/* ---------- game categories (Originals · Web Games (AI) · Grinding · Reimagined Classics) — js/categories-data.js ---------- */
.game-card__media .badge-row { position: absolute; top: 12px; left: 12px; right: 64px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.game-card .game-card__media .badge-row .badge { position: static; }
.game-card__media .badge-row .badge.is-aiassist { background: rgba(0,0,0,.62); }
.badge.is-flagship { background: linear-gradient(135deg, #ffe39a, var(--gold) 55%, #b9822f); color: #1a1208; font-weight: 800; letter-spacing: .04em; box-shadow: 0 4px 14px -4px rgba(207,161,81,.8); }
.badge.is-mp { background: rgba(111,207,127,.16); color: #8fe0a2; border: 1px solid rgba(111,207,127,.45); font-size: .66rem; vertical-align: middle; position: static; }
.game-grid--flagship { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 26px; margin-bottom: 26px; }
.card-flagship { border-color: rgba(207,161,81,.45); box-shadow: 0 0 0 1px rgba(207,161,81,.18), 0 26px 60px -30px rgba(207,161,81,.55); }
.card-flagship:hover { border-color: rgba(207,161,81,.85); }
.card-flagship .game-card__body { padding: 22px 26px 26px; }
.card-flagship .game-card__body h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: .02em; }
.card-flagship .game-card__body p { font-size: 1.02rem; }
.cat-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 34px 0 16px; }
.cat-sub:first-child { margin-top: 0; }
.cat-sub h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 0; }
.cat-sub p { margin: 0; font-size: .92rem; }
.cat-block { padding: 10px 0 56px; }
.cat-block + .cat-block { border-top: 1px solid var(--line); padding-top: 46px; }
.home-cat + .home-cat { margin-top: 0; }
/* home hub: the two main categories are bigger and bolder; Originals is the hero */
.node--big { width: 268px; padding: 16px 18px 17px; border-width: 1.5px; border-color: rgba(var(--c), .7);
  background: linear-gradient(160deg, rgba(var(--c), .2), rgba(17, 14, 10, .94) 58%); box-shadow: 0 22px 54px -18px rgba(var(--c), .85), 0 0 0 1px rgba(var(--c), .25); }
.node--big strong { font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; }
.node--big .node__status { color: rgb(var(--c)); font-weight: 700; }
.node--hero { width: 300px; z-index: 5; border-width: 2px; border-color: rgba(var(--c), .95);
  box-shadow: 0 0 0 4px rgba(var(--c), .12), 0 26px 70px -16px rgba(var(--c), 1), 0 0 60px -10px rgba(var(--c), .55); }
.node--hero strong { font-family: var(--font-display); font-size: 2rem; color: #ffe7b0; text-shadow: 0 0 22px rgba(var(--c), .55); }
.node__main { display: block; color: inherit; text-decoration: none; }
.node__main:focus-visible { outline: 2px solid rgb(var(--c)); outline-offset: 4px; border-radius: 10px; }
.node__pop { position: absolute; left: -2px; right: -2px; top: 100%; padding-top: 10px; display: flex; gap: 8px;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.node--hero:hover .node__pop, .node--hero:focus-within .node__pop { opacity: 1; transform: none; pointer-events: auto; }
.node__pop a { flex: 1; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 12px; text-decoration: none;
  font-weight: 800; font-size: .95rem; letter-spacing: .06em; color: #1a1208; background: linear-gradient(135deg, #ffe39a, var(--gold) 60%, #b9822f);
  box-shadow: 0 12px 26px -10px rgba(207,161,81,.9); transition: transform .15s ease, filter .15s; }
.node__pop a span { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.node__pop a:hover { transform: translateY(-2px); filter: brightness(1.08); }
@media (max-width: 860px), (hover: none) {
  .node__pop { position: static; opacity: 1; transform: none; pointer-events: auto; padding-top: 12px; }
}
@media (max-width: 860px) { .node--big, .node--hero { width: auto; grid-column: 1 / -1; } .node--hero { order: -2; } .node--web { order: -1; } .node--big strong { font-size: 1.4rem; } .node--hero strong { font-size: 1.7rem; } }
/* leaderboard: wider page so big screens get more columns */
.container--wide { max-width: 1760px; }
.lb-grid--page { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }

.badge.is-plat { background: rgba(0,0,0,.62); color: #f3e7cc; border: 1px solid rgba(255,255,255,.18); display: inline-flex; align-items: center; gap: 4px; }
.badge.is-plat svg { width: 12px; height: 12px; margin: 0; }
.badge.is-unity { background: linear-gradient(135deg, #f2f2f2, #9da3ab); color: #111; }
.game-hero__tags .badge.is-ue, .game-hero__tags .badge.is-unity { position: static; }

/* ---------- R&D (rnd.html + menu) — js/research-data.js ---------- */
.site-nav .sub li.sub-paper { display: flex; align-items: stretch; gap: 4px; }
.site-nav .sub li.sub-paper > a:first-child { flex: 1; }
.site-nav .sub a.sub-pdf { flex: none; align-self: center; padding: 6px 10px !important; border-radius: 8px; border: 1px solid rgba(94,214,208,.45); color: #8fe6e0; font-size: .74rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.site-nav .sub a.sub-pdf:hover { background: rgba(94,214,208,.14); color: #d9fbf8; }
.paper { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: start; padding: 26px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(94,214,208,.08), transparent 45%), var(--surface); border: 1px solid rgba(94,214,208,.25); scroll-margin-top: 90px; }
.paper + .paper { margin-top: 28px; }
.paper__cover { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; background: #06121a; box-shadow: 0 24px 60px -28px rgba(94,214,208,.6); }
.paper__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.paper__cover:hover img { transform: scale(1.03); }
.paper__open { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 10px; background: rgba(4,12,18,.8); color: #d9fbf8; font-weight: 800; font-size: .88rem; border: 1px solid rgba(94,214,208,.5); }
.paper__body h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 4px 0 10px; }
.paper__sub { font-style: italic; color: var(--text); opacity: .85; }
.paper__body p { color: var(--muted); }
.paper__tags { list-style: none; padding: 0; margin: 14px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.paper__tags li { font: 700 .72rem ui-monospace, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; color: #bfeeea; border: 1px solid rgba(94,214,208,.35); background: rgba(94,214,208,.08); padding: 5px 9px; border-radius: 7px; }
.paper__meta { font-size: .85rem; }
@media (max-width: 860px) { .paper { grid-template-columns: 1fr; padding: 16px; gap: 18px; } }

/* ---------- site search (js/search.js) ---------- */
.site-header .container { gap: 10px; }
.site-header .logo { order: 0; margin-right: auto; }
.site-header .site-nav { order: 1; }
.search-btn { order: 2; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .2s, color .2s; }
.search-btn:hover, .search-btn:focus-visible { color: var(--text); border-color: var(--gold); }
.search-btn svg { width: 18px; height: 18px; }
.search-btn kbd, .srch kbd { font: 600 .7rem/1 var(--font-body); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.site-header .nav-toggle { order: 3; }
.site-header:not(.nav-collapsed) .search-btn span { display: none; }
.site-header.nav-collapsed .search-btn kbd { display: none; }
@media (max-width: 520px) { .search-btn span { display: none; } .search-btn { width: 44px; justify-content: center; padding: 0; } }

html.srch-open { overflow: hidden; }
.srch { position: fixed; inset: 0; z-index: 200; background: rgba(4, 3, 2, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start; padding: 8vh 16px 16px; }
.srch[hidden] { display: none; }
.srch__panel { width: min(760px, 100%); max-height: 84vh; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; animation: srchIn .18s ease-out; }
@keyframes srchIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } }
.srch__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.srch__bar svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.srch__bar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 1.15rem var(--font-body); }
.srch__bar input::-webkit-search-cancel-button { display: none; }
.srch__x { background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 4px 9px; font: 600 .75rem var(--font-body); cursor: pointer; }
.srch__chips { padding: 10px 16px 4px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.srch__row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-bottom: 6px; }
.srch__row span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.srch__row button { background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 11px; font: 500 .84rem var(--font-body); cursor: pointer; }
.srch__row button small { opacity: .65; margin-left: 2px; }
.srch__row button:hover { color: var(--text); border-color: var(--bronze); }
.srch__row button.on { background: var(--gold); border-color: var(--gold); color: #1a1208; font-weight: 700; }
.srch__row--sub button { font-size: .8rem; padding: 3px 10px; }
.srch__row button.clr { border-style: dashed; }
.srch__list { list-style: none; margin: 0; padding: 6px 8px 10px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.srch__grp { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: 12px 10px 4px; }
.srch__list li[data-i] { position: relative; border-radius: 12px; }
.srch__list li[data-i] > a:first-child { display: flex; gap: 14px; align-items: center; padding: 9px 10px; color: var(--text); text-decoration: none; border-radius: 12px; }
.srch__list li.on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.srch__list li.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--gold); }
.srch__list img, .srch__list li > a > i { width: 76px; height: 46px; flex: none; border-radius: 8px; object-fit: cover; background: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 1.3rem; }
.srch__txt { min-width: 0; display: grid; gap: 1px; }
.srch__txt b { font-weight: 700; font-size: 1rem; }
.srch__txt > span { color: var(--muted); font-size: .86rem; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.srch__txt .srch__snip { font-size: .8rem; font-style: italic; opacity: .85; }
.srch__meta { display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.srch__meta small { color: var(--slate); font-size: .74rem; font-weight: 600; }
.srch__meta em { font-style: normal; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.srch__meta em.t-flag { color: var(--gold); border-color: rgba(207,161,81,.5); }
.srch__meta em.t-new { color: #8fd18a; border-color: rgba(143,209,138,.45); }
.srch mark { background: rgba(207,161,81,.28); color: var(--gold-hi); border-radius: 3px; padding: 0 1px; }
.srch__pdf { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; }
.srch__none { padding: 26px 12px; text-align: center; color: var(--muted); }
.srch__none button { margin-left: 6px; background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 3px 12px; cursor: pointer; font: inherit; }
.srch__foot { display: flex; gap: 16px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.srch__foot .srch__n { margin-left: auto; }
@media (max-width: 640px) {
  .srch { padding: 0; }
  .srch__panel { max-height: none; height: 100%; border-radius: 0; border: 0; }
  .srch__foot span:not(.srch__n) { display: none; }
  .srch__list img, .srch__list li > a > i { width: 58px; height: 40px; }
  .srch__chips { max-height: 30vh; overflow-y: auto; }
}

/* ---------- category bar (game pages) — sticks under the header ---------- */
.catbar { position: sticky; top: 71px; z-index: 40; background: rgba(7, 6, 5, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; margin-bottom: 18px; transition: border-color .2s, box-shadow .2s; }
.catbar.is-stuck { border-bottom-color: var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.catbar__in { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.catbar__links { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 24px; }
.catbar__links::-webkit-scrollbar { display: none; }
.catbar__links a { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.catbar__links a small { opacity: .6; font-weight: 500; margin-left: 2px; }
.catbar__links a:hover { color: var(--text); border-color: var(--bronze); }
.catbar__links a[aria-current] { background: var(--gold); border-color: var(--gold); color: #1a1208; }
.catbar__links a[data-k="originals"]:not([aria-current]) { color: var(--gold); border-color: rgba(207,161,81,.45); }
.catbar__search { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 .88rem var(--font-body); cursor: pointer; }
.catbar__search:hover { color: var(--text); border-color: var(--gold); }
.catbar__search svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .catbar__search span { display: none; } .catbar__search { width: 36px; justify-content: center; padding: 0; } .catbar__links a { padding: 6px 12px; font-size: .86rem; } }
.cat-block { scroll-margin-top: 150px; }

/* ---------- Fyn Engine page (engine.html) ---------- */
.eng { --eng: 94, 234, 212; --eng2: 56, 189, 248; --coral: 240, 112, 82; }
.eng-hero { position: relative; overflow: hidden; padding: 56px 0 40px;
  background: radial-gradient(800px 500px at 0% 0%, rgba(var(--eng), .14), transparent 70%), radial-gradient(700px 500px at 100% 20%, rgba(var(--eng2), .14), transparent 70%), linear-gradient(180deg, #071a24, var(--bg)); }
.eng-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: linear-gradient(#000, transparent 85%); mask-image: linear-gradient(#000, transparent 85%); pointer-events: none; }
.eng-hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 40px; align-items: center; }
.eng-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: rgb(var(--eng)); }
.eng-dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--eng)); box-shadow: 0 0 10px rgb(var(--eng)); }
.eng-title { font-size: clamp(3rem, 7.5vw, 5.6rem); line-height: .92; letter-spacing: -.02em; margin: .1em 0 .25em; }
.eng-title span { background: linear-gradient(90deg, rgb(var(--eng)), rgb(var(--eng2))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eng-lead { font-size: 1.12rem; color: #e2d6bc; max-width: 54ch; }
.eng-btn { background: rgb(var(--eng)); color: #04222a; }
.eng-btn:hover { background: #99f6e4; color: #04222a; }
.eng .btn small { opacity: .7; font-weight: 500; margin-left: 4px; }
.eng-facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.eng-facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; }
.eng-facts b { font-family: var(--font-display); font-size: 1rem; white-space: nowrap; color: var(--text); }
.eng-facts span { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.eng-hero__shot { margin: 0; }
.eng-hero__shot img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid rgba(var(--eng), .35); box-shadow: 0 40px 90px -30px rgba(var(--eng), .45), 0 0 0 1px rgba(0,0,0,.4); transform: perspective(1600px) rotateY(-6deg); }
.eng-hero__shot figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; text-align: center; }
.eng-nav { position: sticky; top: 71px; z-index: 40; background: rgba(7, 6, 5, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eng-nav__in { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.eng-nav__links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.eng-nav__links::-webkit-scrollbar { display: none; }
.eng-nav .eng-nav__dl { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: rgb(var(--eng)); color: #04222a; font-weight: 800; font-size: .9rem; box-shadow: 0 6px 18px -6px rgba(var(--eng), .8); }
.eng-nav .eng-nav__dl:hover { background: #99f6e4; color: #04222a; }
.eng-nav__dl em { font-style: normal; font-size: .74rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(4,34,42,.18); }
.eng-nav__dl em:empty { display: none; }
@media (max-width: 600px) { .eng-nav__dl span { display: none; } }
.eng-actions { gap: 10px; }
.eng-actions .btn { white-space: nowrap; }
.eng-btn2 { border-color: rgba(var(--coral), .6); color: #ffc2b2; }
.eng-btn2:hover { border-color: rgb(var(--coral)) !important; }
.eng-btn2:hover { border-color: rgb(var(--eng)); color: #fff; }
.eng-count { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.eng-count li { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: .9rem; }
.eng-count b { font: 800 1.35rem var(--font-body); color: rgb(var(--eng)); font-variant-numeric: tabular-nums; }
.eng-nav a { flex: none; padding: 6px 13px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.eng-nav a:hover { color: var(--text); background: var(--surface); }
.eng-nav a.on { color: #04222a; background: rgb(var(--eng)); }
.eng-sec { padding-top: 64px; scroll-margin-top: 130px; }
.eng-head { max-width: 760px; margin-bottom: 24px; }
.eng-head h2, .eng-sec h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: .1em 0 .3em; }
.eng kbd { font: 600 .78em var(--font-body); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg-2); color: var(--text); margin: 0 1px; }
.eng code { font-size: .9em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: #ccfbf1; }
.eng-demo { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; border: 1px solid rgba(var(--eng), .35); background: #04121a; box-shadow: 0 30px 80px -40px rgba(var(--eng), .6); }
.eng-demo__start { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #070a08; }
.eng-demo__start img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.55) saturate(1.1); transition: filter .3s, transform .6s; }
.eng-demo__start:hover img { filter: brightness(.7) saturate(1.2); transform: scale(1.02); }
.eng-demo__btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px; padding: 16px 26px; border-radius: 999px; background: rgb(var(--coral)); color: #fff; font: 800 1.15rem var(--font-body); box-shadow: 0 16px 40px -10px rgba(var(--coral), .8); white-space: nowrap; }
.eng-demo__btn i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: rgb(var(--coral)); display: grid; place-items: center; font-size: .9rem; }
.eng-demo__btn small { font-weight: 600; opacity: .7; font-size: .8rem; }
.eng-demo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.eng-demo__bar { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 2; opacity: .55; transition: opacity .2s; }
.eng-demo__bar:hover { opacity: 1; }
.eng-demo__bar .btn { background: rgba(7,6,5,.75); }
.eng-demo__links { margin-top: 10px; font-size: .9rem; }
.eng-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.eng-card { background: linear-gradient(180deg, rgba(var(--c), .09), rgba(var(--c), .02) 60%), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.eng-card:hover { border-color: rgba(var(--c), .6); transform: translateY(-2px); }
.eng-card i { font-style: normal; font-size: 1.5rem; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--c), .14); border: 1px solid rgba(var(--c), .35); }
.eng-card h3 { margin: 12px 0 6px; font-size: 1.12rem; }
.eng-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.eng-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.eng-map { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .9rem; }
.eng-map th, .eng-map td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.eng-map th { color: var(--muted); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.eng-map td:first-child { color: rgb(var(--eng)); font-weight: 700; }
.eng-split .btn { margin: 4px 6px 4px 0; }
.eng-code { margin: 0; background: #06141b; border: 1px solid rgba(var(--eng), .25); border-radius: 16px; padding: 22px 24px; overflow-x: auto; font: 500 .9rem/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; color: #e6efe6; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.eng-code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.eng-code .c { color: #6b8a93; } .eng-code .k { color: #ff9f8a; } .eng-code .f { color: #7dd3fc; } .eng-code .n { color: #ffc45c; } .eng-code .s { color: #5eead4; }
.eng-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.eng-gal a { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.eng-gal img { width: 100%; height: auto; display: block; transition: transform .5s; }
.eng-gal a:hover img { transform: scale(1.04); }
.eng-gal span { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(7,6,5,.8); color: var(--text); font-size: .8rem; font-weight: 700; }
.eng-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.eng-steps li { counter-increment: s; position: relative; padding: 16px 16px 16px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: #e2d6bc; font-size: .94rem; }
.eng-steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--eng), .15); color: rgb(var(--eng)); font-weight: 800; border: 1px solid rgba(var(--eng), .4); }
.eng-time { list-style: none; padding: 0 0 0 22px; margin: 0; border-left: 2px solid var(--line); display: grid; gap: 16px; }
.eng-time li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 12px; color: var(--muted); }
.eng-time li::before { content: ""; position: absolute; left: -29px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.eng-time li.now::before { background: rgb(var(--eng)); border-color: rgb(var(--eng)); box-shadow: 0 0 12px rgb(var(--eng)); }
.eng-time li > b { font-family: var(--font-display); color: var(--text); font-size: 1.1rem; }
.eng-time li.now > b { color: rgb(var(--eng)); }
.eng-road { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.eng-road li { padding: 9px 15px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--line); color: #e2d6bc; font-weight: 600; font-size: .92rem; }
.eng-dl { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: 30px; margin-bottom: 110px; border-radius: 22px; border: 1px solid rgba(var(--eng), .35);
  background: radial-gradient(600px 300px at 0% 0%, rgba(var(--eng), .14), transparent 70%), var(--surface); }
.eng-dl h2 { margin-top: 0; }
.eng-dl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.eng-dl__list li { display: grid; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.eng-dl__list b { font: 600 .92rem ui-monospace, Consolas, monospace; color: #ccfbf1; }
.eng-dl__list span { font-size: .82rem; color: var(--muted); }
@media (max-width: 960px) {
  .eng-hero__in, .eng-split, .eng-dl { grid-template-columns: 1fr; }
  .eng-hero__shot img { transform: none; }
  .eng-gal { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .eng-hero { padding-top: 34px; }
  .eng-facts { grid-template-columns: 1fr 1fr; }
  .eng-gal { grid-template-columns: 1fr; }
  .eng-steps { grid-template-columns: 1fr; }
  .eng-demo { aspect-ratio: 4 / 3; }
  .eng-demo__btn { padding: 12px 18px; font-size: 1rem; }
  .eng-dl { padding: 20px; }
  .eng-time li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Fyn Engine guides (engine/docs/*.html) ---------- */
.eng-doc { padding: 40px 0 110px; }
.eng-doc__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; font-size: .9rem; }
.eng-doc__top a { color: var(--muted); text-decoration: none; } .eng-doc__top a:hover { color: rgb(94,234,212); }
.eng-doc__grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.eng-doc__toc { position: sticky; top: 94px; max-height: calc(100vh - 110px); overflow: auto; font-size: .86rem; border-left: 2px solid var(--line); padding-left: 14px; }
.eng-doc__toc a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.eng-doc__toc a:hover { color: var(--text); }
.eng-doc__toc .h3 { padding-left: 12px; font-size: .82rem; }
.md h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; }
.md h2 { font-size: 1.45rem; margin-top: 1.8em; padding-top: .6em; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.md h3 { font-size: 1.12rem; margin-top: 1.4em; scroll-margin-top: 90px; }
.md p, .md li { color: #e2d6bc; }
.md hr { border: 0; }
.md table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; display: block; overflow-x: auto; }
.md th, .md td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.md th { background: var(--surface); }
.md code { font: .88em ui-monospace, Consolas, monospace; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; color: #ccfbf1; }
.md pre { background: #06141b; border: 1px solid rgba(94,234,212,.25); border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
.md pre code { background: none; border: 0; padding: 0; font-size: .88rem; line-height: 1.55; color: #e6efe6; }
@media (max-width: 860px) { .eng-doc__grid { grid-template-columns: 1fr; } .eng-doc__toc { position: static; max-height: none; border-left: 0; padding: 12px 14px; background: var(--surface); border-radius: 12px; } }
.site-nav .nav-engine { color: #5eead4; }
.site-nav .nav-engine:hover, .site-nav .nav-engine[aria-current="page"] { color: #99f6e4; }
/* header search button: icon only beside the full menu (keeps room for every menu item) */
.site-header:not(.nav-collapsed) .search-btn { width: 40px; padding: 0; justify-content: center; }
.site-header:not(.nav-collapsed) .search-btn kbd { display: none; }
.eng-new { font-style: normal; display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; font-size: .7rem; font-weight: 800; color: #04222a; background: rgb(94,234,212); vertical-align: 1px; }
.eng-time .eng-patch { font-size: .7rem; font-weight: 800; color: #04222a; background: rgb(var(--eng)); border-radius: 999px; padding: 0 7px; margin-left: 6px; vertical-align: 2px; font-family: var(--font-body); }
.eng-time__more { margin: 14px 0 0; }
@media (max-width: 600px) { .eng-gal { grid-template-columns: 1fr; } }

/* "how it was made" strip on a game page (Diecast Dash track making) */
.making { margin-top: 28px; }
.making__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin: 14px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted, #a99f8c); }
.making__row { margin: 16px 0 22px; }
.making__row h3 { font-size: 15px; margin: 0 0 8px; }
.making__imgs { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.making figure { margin: 0; border-radius: 12px; overflow: hidden; background: #14161b; border: 1px solid rgba(255,255,255,.08); aspect-ratio: 4 / 3; position: relative; }
.making figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.making__imgs figure:first-child img { object-fit: contain; }
.making figcaption { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; }
.making__none { display: grid; place-items: center; color: var(--text-muted, #a99f8c); font-size: 13px; text-align: center; padding: 10px; }
.making__arrow { font-style: normal; font-size: 22px; color: var(--accent, #cfa151); }
@media (max-width: 640px) { .making__steps { display: none; } .making__imgs { grid-template-columns: 1fr; } .making__arrow { transform: rotate(90deg); justify-self: center; } }
