/* Skins live in these variable blocks. :root is Neon, used before JS and as the default.
   Add a skin by copying a block, then register it in scripts/build.mjs (see the README). */

:root,
[data-theme="neon"] {
  color-scheme: dark;
  --bg: #0b0714;
  --bg-spot: #2a1248;
  --ink: #f6f3ff;
  --muted: #ddd2f5;
  --card: #171222;
  --line: #8b74b8;
  --header-a: #100616;
  --header-b: #2a1058;
  --header-c: #062033;
  --header-ink: #f6f3ff;
  --header-link: #f6f3ff;
  --header-link-hover: #67e8f9;
  --nav-mark: #e879f9;
  --accent: #e879f9;
  --accent-2: #67e8f9;
  --play: #67f6ff;
  --play-ink: #061018;
  --play-glow: rgba(103, 246, 255, 0.55);
  --like: #f9a8d4;
  --like-ink: #2a001c;
  --like-fill: #ff6ec8;
  --focus: #67e8f9;
  --glow: rgba(232, 121, 249, 0.5);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --search-bg: #120a1e;
  --input-ink: #f6f3ff;
  --placeholder: #d2c4ee;
  --chip-bg: #120a1e;
  --note-bg: #2a1840;
  --note-line: #8b74b8;
  --kbd-bg: #241433;
  --footer-bg: #09060f;
  --footer-ink: #f6f3ff;
  --footer-muted: #cbbfe0;
  --footer-link: #67e8f9;
  --media-bg: #241433;
  --player-bg: #09060f;
  --player-shade: linear-gradient(to top, rgba(8, 4, 16, 0.62), rgba(8, 4, 16, 0.16));
  --logo-ring: #67e8f9;
  --logo-dot: #e879f9;
}

[data-theme="arena"] {
  color-scheme: dark;
  --bg: #140806;
  --bg-spot: #3a140e;
  --ink: #fff6f1;
  --muted: #f3d2c6;
  --card: #24110d;
  --line: #c4846a;
  --header-a: #1a0806;
  --header-b: #4a140c;
  --header-c: #3a1808;
  --header-ink: #fff6f1;
  --header-link: #fff6f1;
  --header-link-hover: #ffc48a;
  --nav-mark: #ff9a3c;
  --accent: #ffc48a;
  --accent-2: #ff9a3c;
  --play: #ff9a3c;
  --play-ink: #2a0d00;
  --play-glow: rgba(255, 154, 60, 0.55);
  --like: #ffb4a8;
  --like-ink: #2a0604;
  --like-fill: #ff7a66;
  --focus: #ffc48a;
  --glow: rgba(255, 90, 40, 0.5);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #1c0c09;
  --input-ink: #fff6f1;
  --placeholder: #f0cfc4;
  --chip-bg: #1c0c09;
  --note-bg: #3a1812;
  --note-line: #c4846a;
  --kbd-bg: #3a1812;
  --footer-bg: #100604;
  --footer-ink: #fff6f1;
  --footer-muted: #f0cfc4;
  --footer-link: #ffc48a;
  --media-bg: #3a1812;
  --player-bg: #100604;
  --player-shade: linear-gradient(to top, rgba(20, 6, 4, 0.62), rgba(20, 6, 4, 0.16));
  --logo-ring: #ff9a3c;
  --logo-dot: #ff5a36;
}

[data-theme="toxic"] {
  color-scheme: dark;
  --bg: #061109;
  --bg-spot: #0e2c16;
  --ink: #f3fff6;
  --muted: #c9f5d4;
  --card: #0d1c13;
  --line: #6fbf86;
  --header-a: #07140c;
  --header-b: #12331c;
  --header-c: #062018;
  --header-ink: #f3fff6;
  --header-link: #f3fff6;
  --header-link-hover: #d6ff7a;
  --nav-mark: #b6ff3b;
  --accent: #d6ff7a;
  --accent-2: #3dffb0;
  --play: #c8ff4d;
  --play-ink: #0c1404;
  --play-glow: rgba(200, 255, 77, 0.5);
  --like: #9dffc8;
  --like-ink: #042014;
  --like-fill: #3dffb0;
  --focus: #d6ff7a;
  --glow: rgba(61, 255, 140, 0.45);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #0a1810;
  --input-ink: #f3fff6;
  --placeholder: #c9f5d4;
  --chip-bg: #0a1810;
  --note-bg: #143222;
  --note-line: #6fbf86;
  --kbd-bg: #143222;
  --footer-bg: #041008;
  --footer-ink: #f3fff6;
  --footer-muted: #c9f5d4;
  --footer-link: #d6ff7a;
  --media-bg: #143222;
  --player-bg: #041008;
  --player-shade: linear-gradient(to top, rgba(4, 16, 8, 0.62), rgba(4, 16, 8, 0.16));
  --logo-ring: #c8ff4d;
  --logo-dot: #3dffb0;
}

[data-theme="ocean"] {
  color-scheme: dark;
  --bg: #061018;
  --bg-spot: #0c3050;
  --ink: #f4f8ff;
  --muted: #c9dff5;
  --card: #0d1b2a;
  --line: #6f9cc4;
  --header-a: #061424;
  --header-b: #0c2c4a;
  --header-c: #0a3040;
  --header-ink: #f4f8ff;
  --header-link: #f4f8ff;
  --header-link-hover: #9ae7ff;
  --nav-mark: #5cefff;
  --accent: #9ae7ff;
  --accent-2: #7eb6ff;
  --play: #5cefff;
  --play-ink: #04141c;
  --play-glow: rgba(92, 239, 255, 0.5);
  --like: #c4d4ff;
  --like-ink: #06101e;
  --like-fill: #8eb0ff;
  --focus: #9ae7ff;
  --glow: rgba(92, 200, 255, 0.48);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #0a1624;
  --input-ink: #f4f8ff;
  --placeholder: #c9dff5;
  --chip-bg: #0a1624;
  --note-bg: #123048;
  --note-line: #6f9cc4;
  --kbd-bg: #123048;
  --footer-bg: #040d14;
  --footer-ink: #f4f8ff;
  --footer-muted: #c9dff5;
  --footer-link: #9ae7ff;
  --media-bg: #123048;
  --player-bg: #040d14;
  --player-shade: linear-gradient(to top, rgba(4, 12, 20, 0.62), rgba(4, 12, 20, 0.16));
  --logo-ring: #5cefff;
  --logo-dot: #7eb6ff;
}

[data-theme="magenta"] {
  color-scheme: dark;
  --bg: #120610;
  --bg-spot: #3a1030;
  --ink: #fff5fb;
  --muted: #f6cce6;
  --card: #1c0a16;
  --line: #e08ab8;
  --header-a: #12060e;
  --header-b: #4a1038;
  --header-c: #2a0830;
  --header-ink: #fff5fb;
  --header-link: #fff5fb;
  --header-link-hover: #ffd0f2;
  --nav-mark: #ff4ec8;
  --accent: #ff7ad9;
  --accent-2: #ffd0f2;
  --play: #ff4ec8;
  --play-ink: #2a0018;
  --play-glow: rgba(255, 78, 200, 0.55);
  --like: #ffc2ea;
  --like-ink: #2a0014;
  --like-fill: #ff5ab8;
  --focus: #ff7ad9;
  --glow: rgba(255, 78, 200, 0.5);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #160812;
  --input-ink: #fff5fb;
  --placeholder: #f6cce6;
  --chip-bg: #160812;
  --note-bg: #321428;
  --note-line: #e08ab8;
  --kbd-bg: #321428;
  --footer-bg: #0c040a;
  --footer-ink: #fff5fb;
  --footer-muted: #f0c4de;
  --footer-link: #ff7ad9;
  --media-bg: #321428;
  --player-bg: #0c040a;
  --player-shade: linear-gradient(to top, rgba(18, 4, 12, 0.62), rgba(18, 4, 12, 0.16));
  --logo-ring: #ff4ec8;
  --logo-dot: #ffd0f2;
}

[data-theme="volt"] {
  color-scheme: dark;
  --bg: #110e06;
  --bg-spot: #3a2808;
  --ink: #fffaf0;
  --muted: #f6e4c4;
  --card: #1c160a;
  --line: #e0b06a;
  --header-a: #1a1206;
  --header-b: #3a2808;
  --header-c: #2a1606;
  --header-ink: #fffaf0;
  --header-link: #fffaf0;
  --header-link-hover: #ffb15a;
  --nav-mark: #ffe14a;
  --accent: #ffe14a;
  --accent-2: #ffb15a;
  --play: #ffe14a;
  --play-ink: #1a1204;
  --play-glow: rgba(255, 225, 74, 0.5);
  --like: #ffc56a;
  --like-ink: #2a1600;
  --like-fill: #ffb020;
  --focus: #ffe14a;
  --glow: rgba(255, 176, 32, 0.48);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #161208;
  --input-ink: #fffaf0;
  --placeholder: #f6e4c4;
  --chip-bg: #161208;
  --note-bg: #32260e;
  --note-line: #e0b06a;
  --kbd-bg: #32260e;
  --footer-bg: #0c0a04;
  --footer-ink: #fffaf0;
  --footer-muted: #f0d8b4;
  --footer-link: #ffe14a;
  --media-bg: #32260e;
  --player-bg: #0c0a04;
  --player-shade: linear-gradient(to top, rgba(16, 12, 4, 0.62), rgba(16, 12, 4, 0.16));
  --logo-ring: #ffe14a;
  --logo-dot: #ffb15a;
}

[data-theme="lime"] {
  color-scheme: dark;
  --bg: #061210;
  --bg-spot: #0e3330;
  --ink: #f3fffc;
  --muted: #c8f6ea;
  --card: #0c1c1a;
  --line: #6ed4b8;
  --header-a: #061410;
  --header-b: #0e3330;
  --header-c: #062420;
  --header-ink: #f3fffc;
  --header-link: #f3fffc;
  --header-link-hover: #d6ff4a;
  --nav-mark: #5dffd0;
  --accent: #7dffd8;
  --accent-2: #d6ff4a;
  --play: #5dffd0;
  --play-ink: #041410;
  --play-glow: rgba(93, 255, 208, 0.5);
  --like: #d6ff7a;
  --like-ink: #062010;
  --like-fill: #5dffd0;
  --focus: #d6ff4a;
  --glow: rgba(214, 255, 74, 0.42);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #0a1816;
  --input-ink: #f3fffc;
  --placeholder: #c8f6ea;
  --chip-bg: #0a1816;
  --note-bg: #12322c;
  --note-line: #6ed4b8;
  --kbd-bg: #12322c;
  --footer-bg: #04100e;
  --footer-ink: #f3fffc;
  --footer-muted: #c8f6ea;
  --footer-link: #d6ff4a;
  --media-bg: #12322c;
  --player-bg: #04100e;
  --player-shade: linear-gradient(to top, rgba(4, 16, 14, 0.62), rgba(4, 16, 14, 0.16));
  --logo-ring: #5dffd0;
  --logo-dot: #d6ff4a;
}

[data-theme="ice"] {
  color-scheme: dark;
  --bg: #070b12;
  --bg-spot: #16324c;
  --ink: #f7fbff;
  --muted: #d5e8f8;
  --card: #101826;
  --line: #8eb8d4;
  --header-a: #070c14;
  --header-b: #16324c;
  --header-c: #0a2030;
  --header-ink: #f7fbff;
  --header-link: #f7fbff;
  --header-link-hover: #ffffff;
  --nav-mark: #d7f6ff;
  --accent: #d7f6ff;
  --accent-2: #ffffff;
  --play: #e8f7ff;
  --play-ink: #061018;
  --play-glow: rgba(232, 247, 255, 0.45);
  --like: #e7f4ff;
  --like-ink: #061018;
  --like-fill: #b9e6ff;
  --focus: #d7f6ff;
  --glow: rgba(183, 230, 255, 0.45);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --search-bg: #0c1420;
  --input-ink: #f7fbff;
  --placeholder: #d5e8f8;
  --chip-bg: #0c1420;
  --note-bg: #16324c;
  --note-line: #8eb8d4;
  --kbd-bg: #16324c;
  --footer-bg: #05080e;
  --footer-ink: #f7fbff;
  --footer-muted: #d5e8f8;
  --footer-link: #d7f6ff;
  --media-bg: #16324c;
  --player-bg: #05080e;
  --player-shade: linear-gradient(to top, rgba(5, 8, 14, 0.62), rgba(5, 8, 14, 0.16));
  --logo-ring: #d7f6ff;
  --logo-dot: #ffffff;
}

[data-theme="navy"],
[data-theme="plum"],
[data-theme="charcoal"],
[data-theme="royal"],
[data-theme="crimson"] {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-spot: #fffaf3;
  --ink: #1c1915;
  --muted: #5c564c;
  --card: #fffdf8;
  --line: #8a7d68;
  --header-ink: #f6f1e6;
  --header-link: #f6f1e6;
  --play-ink: #1c1915;
  --like-ink: #1c1915;
  --shadow: 0 10px 28px rgba(28, 25, 21, 0.12);
  --search-bg: #fffdf8;
  --input-ink: #1c1915;
  --placeholder: #5c564c;
  --chip-bg: #fffdf8;
  --note-bg: #f7f1e4;
  --note-line: #8a7d68;
  --kbd-bg: #f3efe6;
  --footer-ink: #f6f1e6;
  --footer-muted: #f3ead4;
  --footer-link: #f6f1e6;
  --media-bg: #e7e0d2;
  --player-bg: #1c1915;
  --player-shade: linear-gradient(to top, rgba(28, 25, 21, 0.55), rgba(28, 25, 21, 0.12));
}

[data-theme="navy"] {
  --header-a: #0e2240;
  --header-b: #1a3a62;
  --header-c: #0c1c33;
  --header-link-hover: #f0b84a;
  --nav-mark: #e0a12e;
  --accent: #7a4b00;
  --accent-2: #e0a12e;
  --play: #e0a12e;
  --like: #7a4b00;
  --like-fill: #e0a12e;
  --focus: #7a4b00;
  --glow: rgba(224, 161, 46, 0.35);
  --footer-bg: #0e2240;
  --logo-ring: #e0a12e;
  --logo-dot: #f0b84a;
}

[data-theme="plum"] {
  --header-a: #2a1248;
  --header-b: #4a2278;
  --header-c: #1c0c34;
  --header-link-hover: #d6ff4a;
  --nav-mark: #c6e04a;
  --accent: #4c1d6e;
  --accent-2: #c6e04a;
  --play: #c6e04a;
  --like: #4c1d6e;
  --like-fill: #c6e04a;
  --focus: #4c1d6e;
  --glow: rgba(198, 224, 74, 0.4);
  --footer-bg: #2a1248;
  --logo-ring: #c6e04a;
  --logo-dot: #d6ff4a;
}

[data-theme="charcoal"] {
  --header-a: #161616;
  --header-b: #2c2c2c;
  --header-c: #111111;
  --header-link-hover: #ffb15a;
  --nav-mark: #e07a1a;
  --accent: #8a3200;
  --accent-2: #e07a1a;
  --play: #e07a1a;
  --like: #8a3200;
  --like-fill: #e07a1a;
  --focus: #8a3200;
  --glow: rgba(224, 122, 26, 0.35);
  --footer-bg: #161616;
  --logo-ring: #e07a1a;
  --logo-dot: #ffb15a;
}

[data-theme="royal"] {
  --header-a: #102456;
  --header-b: #16327a;
  --header-c: #0c1c44;
  --header-link-hover: #ffe56a;
  --nav-mark: #f0c400;
  --accent: #1e3a8a;
  --accent-2: #f0c400;
  --play: #f0c400;
  --like: #1e3a8a;
  --like-fill: #f0c400;
  --focus: #1e3a8a;
  --glow: rgba(240, 196, 0, 0.4);
  --footer-bg: #102456;
  --logo-ring: #f0c400;
  --logo-dot: #ffe56a;
}

[data-theme="crimson"] {
  --header-a: #5c1018;
  --header-b: #8f2434;
  --header-c: #3e0c12;
  --header-link-hover: #f0b84a;
  --nav-mark: #e0a12e;
  --accent: #7a4b00;
  --accent-2: #e0a12e;
  --play: #e0a12e;
  --like: #7a4b00;
  --like-fill: #e0a12e;
  --focus: #7a4b00;
  --glow: rgba(224, 161, 46, 0.35);
  --footer-bg: #5c1018;
  --logo-ring: #e0a12e;
  --logo-dot: #f0b84a;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbfe;
  --bg-spot: #e4d8ff;
  --ink: #140c22;
  --muted: #3c3352;
  --card: #ffffff;
  --line: #5c5370;
  --header-a: #efe8ff;
  --header-b: #f7f2ff;
  --header-c: #e7f7ff;
  --header-ink: #160b28;
  --header-link: #160b28;
  --header-link-hover: #5b21b6;
  --nav-mark: #5b21b6;
  --accent: #5b21b6;
  --accent-2: #0e7490;
  --play: #5b21b6;
  --play-ink: #ffffff;
  --play-glow: rgba(91, 33, 182, 0.35);
  --like: #9d174d;
  --like-ink: #ffffff;
  --like-fill: #9d174d;
  --focus: #5b21b6;
  --glow: rgba(91, 33, 182, 0.28);
  --shadow: 0 10px 28px rgba(20, 12, 34, 0.12);
  --search-bg: #ffffff;
  --input-ink: #140c22;
  --placeholder: #4a4060;
  --chip-bg: #ffffff;
  --note-bg: #f3e8ff;
  --note-line: #5c5370;
  --kbd-bg: #efe8ff;
  --footer-bg: #efe8ff;
  --footer-ink: #160b28;
  --footer-muted: #3c3352;
  --footer-link: #5b21b6;
  --media-bg: #efe8ff;
  --player-bg: #140c22;
  --player-shade: linear-gradient(to top, rgba(12, 8, 22, 0.55), rgba(12, 8, 22, 0.12));
  --logo-ring: #5b21b6;
  --logo-dot: #9d174d;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 280px at 0% -10%, var(--bg-spot), transparent 55%),
    var(--bg);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

img { max-width: 100%; }

a { color: var(--accent); }

a:hover { color: var(--accent-2); }

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--play);
  color: var(--play-ink);
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 8px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(105deg, var(--header-a), var(--header-b) 48%, var(--header-c));
  color: var(--header-ink);
  box-shadow: inset 0 -2px 0 var(--accent-2);
}

.bar {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  gap: 16px 22px;
  align-items: center;
  min-height: 76px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--header-ink);
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: min(240px, 62vw);
}

.brand-logo[data-logo="esports"] {
  height: 46px;
  max-width: min(280px, 70vw);
}

/* The cyan half of the controller mark sits near the pale header. A dark edge keeps those letters separate. Other skins are unchanged. */
[data-theme="light"] .brand-logo {
  filter: drop-shadow(0 0 1px #160b28) drop-shadow(0 0 2.5px rgba(22, 11, 40, 0.75));
}

h1.tagline {
  margin: 0;
  max-width: 28ch;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--header-link);
}

.home-cats-sticky {
  position: sticky;
  top: var(--header-h, 120px);
  z-index: 8;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 18px color-mix(in srgb, var(--bg) 55%, transparent);
  padding: 8px 0 10px;
}

.home-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.home-cats a {
  display: inline-block;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.home-cats a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.home-close {
  margin-top: 40px;
  max-width: 68ch;
}

.home-close p { margin: 0; }

.brand svg { width: 32px; height: 32px; flex: none; }

.brand-ring { color: var(--logo-ring); }

.brand-dot { fill: var(--logo-dot); }

.wordmark {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  font-weight: 600;
  white-space: nowrap;
}

.site-search {
  display: flex;
  width: min(100%, 460px);
  justify-self: center;
  background: var(--search-bg);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.site-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--input-ink);
  padding: 0.72rem 1rem;
  font-size: 1rem;
  border-radius: 999px 0 0 999px;
}

.site-search input::placeholder { color: var(--placeholder); }

.site-search button {
  border: 0;
  background: var(--play);
  color: var(--play-ink);
  font-weight: 700;
  padding: 0 1rem;
  cursor: pointer;
  border-radius: 0 999px 999px 0;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 16px;
}

.cat-menu { position: relative; }

.cat-menu summary {
  color: var(--header-ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  padding: 6px 0;
}

.cat-menu summary::-webkit-details-marker { display: none; }

.cat-menu summary:hover { color: var(--header-link-hover); }

.cat-panel a {
  display: block;
  color: var(--header-ink);
  text-decoration: none;
  font-weight: 650;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.cat-panel a:hover,
.cat-panel a:focus-visible {
  background: color-mix(in srgb, var(--header-ink) 14%, transparent);
  color: var(--header-ink);
}

.cat-panel a[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--nav-mark);
}

@media (min-width: 861px) {
  .cat-menu[open] .cat-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 220px;
    margin: 0;
    padding: 6px;
    background: var(--header-b);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  }
}

.skin { position: relative; }

.skin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--header-link);
  background: transparent;
  color: var(--header-ink);
  cursor: pointer;
}

.skin-btn svg { width: 20px; height: 20px; display: block; }

.skin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 268px;
  max-height: min(70vh, 640px);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 0 24px var(--glow);
}

.skin-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  cursor: pointer;
}

.skin-option[aria-checked="true"] {
  background: var(--note-bg);
  box-shadow: inset 3px 0 0 var(--accent);
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 0 0 1px var(--line);
}

.swatch[data-swatch="neon"] { background: linear-gradient(135deg, #e879f9, #67e8f9); }
.swatch[data-swatch="arena"] { background: linear-gradient(135deg, #ff5a36, #ffb020); }
.swatch[data-swatch="toxic"] { background: linear-gradient(135deg, #39ff88, #d6ff4a); }
.swatch[data-swatch="light"] { background: linear-gradient(135deg, #ffffff, #5b21b6); }
.swatch[data-swatch="volt"] { background: linear-gradient(135deg, #ffe14a, #ff9a3c); }
.swatch[data-swatch="ice"] { background: linear-gradient(135deg, #e8f7ff, #7ec8ff); }
.swatch[data-swatch="navy"] { background: linear-gradient(135deg, #0e2240, #e0a12e); }
.swatch[data-swatch="royal"] { background: linear-gradient(135deg, #102456, #f0c400); }
.swatch[data-swatch="crimson"] { background: linear-gradient(135deg, #5c1018, #e0a12e); }

main { padding: 28px 0 12px; }

.lede h1,
.page-intro h1,
.game-head h1 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.lede h1 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 16ch; }

.page-intro h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

.lede p,
.page-intro p { max-width: 68ch; }

.lede p { font-size: 1.05rem; }

.band { margin-top: 34px; }

.band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.band-head h2,
.prose h2 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0;
}

.band-head a { font-weight: 700; text-decoration: none; }

.home-note { margin: 0 0 12px; color: var(--muted); }

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.tile-hero { grid-column: span 2; }

.tile-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tile-link:hover { color: inherit; }

.tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--media-bg);
  overflow: hidden;
}

.hq-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  background: var(--play);
  color: var(--play-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-title {
  display: block;
  padding: 8px 10px 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  min-height: 2.7em;
}

.tile-hero .tile-title { font-size: 1.2rem; min-height: 0; }

.tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tile-meta p { margin: 0; }

.like-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  min-height: 36px;
  cursor: pointer;
}

.like-btn {
  border-color: var(--like);
  color: var(--like);
}

.like-btn.is-liked {
  background: var(--like-fill);
  border-color: var(--like-fill);
  color: var(--like-ink);
}

.heart {
  width: 0.95em;
  height: 0.95em;
  fill: currentColor;
  vertical-align: -0.15em;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.crumbs a { color: var(--muted); }

.crumbs a:hover { color: var(--accent); }

.player-wrap { margin: 8px 0 16px; }

.player {
  position: relative;
  width: 100%;
  background: var(--player-bg);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.player .cover,
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  background: var(--player-bg);
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--player-shade);
  pointer-events: none;
  z-index: 1;
}

.player.is-started::after { display: none; }

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  border: 0;
  background: var(--play);
  color: var(--play-ink);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 24px var(--play-glow);
}

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.game-head h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.game-actions .plays { margin: 0; font-weight: 700; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
}

.chips a,
.chips span {
  display: inline-block;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
}

.note,
.draft-flag {
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-radius: 12px;
  padding: 10px 12px;
}

.draft-flag { font-weight: 700; }

.prose { max-width: 72ch; }

.prose h2 { margin: 1.4rem 0 0.4rem; font-size: 1.45rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 1rem;
  font-size: 0.95rem;
}

.prose caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.prose th { font-weight: 700; }

.controls {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
}

.controls li {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

kbd {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.86em;
  background: var(--kbd-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.12em 0.45em;
}

.credit { color: var(--muted); }

.site-footer {
  margin-top: 48px;
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 28px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

.site-footer .wordmark { color: var(--footer-ink); display: block; margin-bottom: 6px; }

.site-footer a { color: var(--footer-link); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-content: start;
}

.legal {
  width: min(1120px, calc(100% - 32px));
  margin: 18px auto 0;
  color: var(--footer-muted);
  font-size: 0.88rem;
}

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

@media (prefers-reduced-motion: no-preference) {
  .tile,
  .play-btn,
  .like-btn,
  .ghost-btn,
  .site-search button,
  .skin-btn,
  .skin-option {
    transition: box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
  }
  .tile-media img { transition: transform 180ms ease; }
  .tile:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--glow);
  }
  .tile-link:hover img { transform: scale(1.04); }
  .play-btn:hover,
  .site-search button:hover {
    box-shadow: 0 0 28px var(--play-glow);
  }
  .like-btn:hover,
  .ghost-btn:hover,
  .skin-btn:hover {
    box-shadow: 0 0 16px var(--glow);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 22px var(--glow);
  }
}

@media (max-width: 980px) {
  .row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr; padding-bottom: 12px; }
  .site-search { width: 100%; }
  .nav-main { justify-content: flex-start; width: 100%; }
  .cat-menu[open] { flex: 1 1 100%; }
  .cat-menu[open] .cat-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 4px;
  }
  .cat-panel a {
    background: color-mix(in srgb, var(--header-ink) 10%, transparent);
  }
}

@media (max-width: 700px) {
  .wrap { width: min(1120px, calc(100% - 20px)); }
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-hero { grid-column: span 2; }
  .tile-title { min-height: 2.6em; font-size: 0.92rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .controls li { grid-template-columns: 1fr; gap: 2px; }
  .player-wrap:not(:has(.is-portrait)) {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .player-wrap:not(:has(.is-portrait)) .player { border-radius: 0; }
  .game-head h1 { font-size: 1.7rem; }
}

@media (max-width: 420px) {
  .tile-meta { font-size: 0.75rem; }
  .like-btn { padding-inline: 0.45rem; }
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--header-link);
  text-decoration: none;
  font-weight: 600;
}

.profile-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--header-ink) 12%, transparent);
  border: 1px solid var(--header-link);
  font-size: 16px;
  line-height: 1;
}

.profile-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 28px;
  background: var(--card);
  border-color: var(--line);
}

.profile-page h1,
.profile-public h1 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.profile-page form,
.account-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.profile-page label,
.account-card label { display: grid; gap: 4px; font-weight: 600; }

.profile-page input[type="text"],
.profile-page input[type="password"],
.profile-page input:not([type]) {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.profile-page button,
.account-card button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: var(--play);
  color: var(--play-ink);
  font-weight: 700;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.avatar-row { display: flex; flex-wrap: wrap; gap: 8px; }

.avatar-choice {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
}

.avatar-choice input { position: absolute; opacity: 0; }

.avatar-choice:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.account-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.account-card h2 { margin: 0; font-size: 1.15rem; }

.profile-page ul { padding-left: 1.1rem; }

@media (max-width: 800px) {
  .profile-layout { grid-template-columns: 1fr; }
}

.player.ratio-960-600{aspect-ratio:960 / 600;}
.player.ratio-800-450{aspect-ratio:800 / 450;}
.player.ratio-1000-562{aspect-ratio:1000 / 562;}
.player.ratio-720-1280{aspect-ratio:720 / 1280;width:min(100%, calc(78vh * 720 / 1280));margin-inline:auto;}
.player.ratio-420-700{aspect-ratio:420 / 700;width:min(100%, calc(78vh * 420 / 700));margin-inline:auto;}
.player.ratio-1280-720{aspect-ratio:1280 / 720;}
.player.ratio-720-405{aspect-ratio:720 / 405;}
.player.ratio-535-710{aspect-ratio:535 / 710;width:min(100%, calc(78vh * 535 / 710));margin-inline:auto;}
.player.ratio-900-506{aspect-ratio:900 / 506;}
.player.ratio-600-900{aspect-ratio:600 / 900;width:min(100%, calc(78vh * 600 / 900));margin-inline:auto;}
.player.ratio-800-600{aspect-ratio:800 / 600;}
.player.ratio-1152-648{aspect-ratio:1152 / 648;}
.player.ratio-600-800{aspect-ratio:600 / 800;width:min(100%, calc(78vh * 600 / 800));margin-inline:auto;}
.player.ratio-1080-1920{aspect-ratio:1080 / 1920;width:min(100%, calc(78vh * 1080 / 1920));margin-inline:auto;}
.player.ratio-900-600{aspect-ratio:900 / 600;}
.player.ratio-800-500{aspect-ratio:800 / 500;}
.player.ratio-854-480{aspect-ratio:854 / 480;}
.player.ratio-400-600{aspect-ratio:400 / 600;width:min(100%, calc(78vh * 400 / 600));margin-inline:auto;}
