/* Zecay — site styles. One dark theme, one accent (the yellow of the avatar's bolt). */

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #121215;
  --raised: #18181c;
  --hover: #1f1f24;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --text: #ededef;
  --text-2: #a3a3ab;
  --muted: #74747c;
  --accent: #f4c542;
  --accent-ink: #1b1505;
  --accent-soft: rgb(244 197 66 / 0.12);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --r1: 6px; --r2: 10px; --r3: 14px;
  --wrap: 1200px;
  --pad: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }
strong { font-weight: 600; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 18px; height: 18px; flex: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 100; padding: var(--s2) var(--s4); background: var(--accent); color: var(--accent-ink); border-radius: var(--r1); font-weight: 600; }
.skip:focus { top: var(--s4); }

/* Small uppercase label used for section numbers, genres and meta */
.kicker, .label {
  font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.kicker { color: var(--accent); margin-bottom: var(--s4); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 44px; padding: 0 var(--s5); border-radius: var(--r2);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffd35e; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: rgb(255 255 255 / 0.02); }
.btn-ghost:hover { background: var(--hover); border-color: rgb(255 255 255 / 0.22); }
.btn-quiet { color: var(--text-2); }
.btn-quiet:hover { color: var(--text); background: var(--hover); }
.btn-small { height: 36px; padding: 0 var(--s4); font-size: 14px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r2);
  color: var(--text-2); border: 1px solid var(--line); background: rgb(11 11 13 / 0.6);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--hover); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg use { stroke: none; }
.text-link { display: inline-flex; align-items: center; gap: var(--s1); font-size: 14px; color: var(--text-2); transition: color 0.15s; }
.text-link:hover { color: var(--accent); }
.text-link svg { width: 14px; height: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgb(11 11 13 / 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.nav-inner { max-width: var(--wrap); height: 100%; margin: 0 auto; padding: 0 var(--pad); display: flex; align-items: center; gap: var(--s5); }
.logo { display: flex; align-items: center; gap: var(--s3); font-weight: 600; letter-spacing: -0.01em; margin-right: auto; }
.logo img { border-radius: 7px; }
.nav nav { display: flex; gap: var(--s1); }
.nav nav a { padding: var(--s2) var(--s3); border-radius: var(--r1); font-size: 14px; color: var(--text-2); transition: color 0.15s, background 0.15s; }
.nav nav a:hover { color: var(--text); }
.nav nav a.active { color: var(--text); background: rgb(255 255 255 / 0.06); }
@media (max-width: 760px) { .nav nav { display: none; } }

/* ---------------------------------------------------------------- hero + black hole */
#bh {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2;
  opacity: 0; transition: opacity 1.2s ease;
}
#bh.ready { opacity: 1; }
body.past-hero #bh { opacity: 0; transition-duration: 0.6s; }
/* Keeps the left side (and the bottom) dark enough for text, and blends the render into the page. */
.hero-scrim {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(11 11 13 / 0.9) 0%, rgb(11 11 13 / 0.55) 38%, rgb(11 11 13 / 0) 65%),
    linear-gradient(0deg, var(--bg) 0%, rgb(11 11 13 / 0) 35%);
}
@media (max-aspect-ratio: 9/10) {
  .hero-scrim { background: linear-gradient(0deg, var(--bg) 8%, rgb(11 11 13 / 0.85) 45%, rgb(11 11 13 / 0.1) 75%); }
}

.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px 0 var(--s6); }
.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); letter-spacing: -0.035em; line-height: 1.02; max-width: 12ch; text-wrap: balance; }
.hero .lede { margin-top: var(--s5); max-width: 52ch; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); }
.hero .cta { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-foot { margin-top: var(--s8); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s6); flex-wrap: wrap; }
.stats { margin: 0; display: flex; gap: var(--s7); flex-wrap: wrap; padding-top: var(--s5); border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; gap: var(--s1); }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 0; font: 500 28px/1 var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.render-note { display: flex; align-items: center; gap: var(--s3); max-width: 300px; }
.render-note p { font-size: 13px; line-height: 1.45; color: var(--muted); }
/* On tall screens the black hole is aimed into the top half, so the text sits low. */
@media (max-aspect-ratio: 9/10) {
  .hero { padding-top: 40svh; }
  .hero-inner { justify-content: flex-end; }
}
@media (max-width: 640px) {
  .stats { gap: var(--s5) var(--s6); display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .stats dd { font-size: 24px; }
  .hero-foot { margin-top: var(--s7); }
}

/* ---------------------------------------------------------------- sections */
.section { padding: var(--s10) 0 0; }
.section-head { max-width: 640px; margin-bottom: var(--s7); }
.section-head h2, .about h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.section-sub { margin-top: var(--s4); color: var(--text-2); font-size: 17px; }
@media (max-width: 640px) { .section { padding-top: var(--s9); } }

.meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: 14px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- spotlight */
.spotlight {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s5);
  padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3);
}
.spot-stage { position: relative; }
.spot-media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r2); background: #000;
}
.spot-media > img, .spot-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spot-blur { filter: blur(28px) brightness(0.5); transform: scale(1.2); opacity: 0; }
.spot-media.portrait .spot-blur { opacity: 1; }
.spot-media.portrait .spot-poster, .spot-media.portrait video { object-fit: contain; }
.spot-media video { opacity: 0; transition: opacity 0.5s; }
.spot-media.playing video { opacity: 1; }
.spot-media.swap .spot-poster { animation: fadein 0.45s var(--ease); }
@keyframes fadein { from { opacity: 0; } }
.play-badge {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; background: rgb(11 11 13 / 0.7); color: var(--text);
  border: 1px solid var(--line-2); opacity: 0; scale: 0.9; transition: opacity 0.2s, scale 0.2s var(--ease);
}
.play-badge svg { width: 20px; height: 20px; margin-left: 3px; }
.play-badge.big { width: 72px; height: 72px; }
.play-badge.big svg { width: 26px; height: 26px; }
.spot-media:hover .play-badge, .spot-media:focus-visible .play-badge { opacity: 1; scale: 1; }
.spot-media:not(.playing) .play-badge.big { opacity: 1; scale: 1; }
.spot-sound { position: absolute; right: var(--s3); bottom: var(--s3); }

.spot-info { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4) var(--s3) 0 0; min-width: 0; }
.spot-title { display: flex; align-items: center; gap: var(--s3); }
.spot-title img { width: 48px; height: 48px; border-radius: var(--r2); }
.spot-title h3 { font-size: 24px; margin-top: 2px; }
#spot-desc { color: var(--text-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.spot-info .actions { margin-top: auto; }

.spot-list { list-style: none; margin: 0; padding: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.spot-item {
  position: relative; width: 100%; display: flex; align-items: center; gap: var(--s3); padding: var(--s2);
  border-radius: var(--r2); text-align: left; overflow: hidden; transition: background 0.15s;
}
.spot-item:hover { background: var(--raised); }
.spot-item[aria-current="true"] { background: var(--raised); }
.spot-item img { width: 40px; height: 40px; border-radius: 8px; }
.spot-item div { min-width: 0; display: flex; flex-direction: column; }
.spot-item strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-item span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-item .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.spot-item[aria-current="false"] .progress { display: none; }

@media (max-width: 1000px) {
  .spotlight { grid-template-columns: 1fr; }
  .spot-stage { grid-row: auto; }
  .spot-info { padding: 0 var(--s2); }
  .spot-list { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .spot-list::-webkit-scrollbar { display: none; }
  .spot-list li { flex: 0 0 200px; scroll-snap-align: start; }
}

/* ---------------------------------------------------------------- all games */
.see-all-row { display: flex; justify-content: center; margin-top: var(--s6); }
.see-all-row .count { color: var(--muted); font-weight: 400; }
.chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.2s; }
#see-all[aria-expanded="true"] .chev { transform: rotate(180deg); }
.all-games { margin-top: var(--s6); }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: var(--s2); height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--r2); background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.sort { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); overflow-x: auto; }
.sort button { height: 36px; padding: 0 var(--s3); border-radius: 7px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.sort button:hover { color: var(--text); }
.sort button[aria-checked="true"] { background: var(--hover); color: var(--text); }
.genres { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.genres button {
  height: 32px; padding: 0 var(--s3); border-radius: 999px; font-size: 13px; color: var(--text-2);
  border: 1px solid var(--line); transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.genres button:hover { color: var(--text); border-color: var(--line-2); }
.genres button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.genres .count { opacity: 0.6; margin-left: 2px; }
.result-count { margin: var(--s5) 0 var(--s4); font-size: 13px; color: var(--muted); font-family: var(--mono); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s5) var(--s4); }
.card { min-width: 0; }
.card .media {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line);
}
.card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .media .cover { transition: scale 0.4s var(--ease); }
.card:hover .media .cover { scale: 1.03; }
.card .media .blur { filter: blur(20px) brightness(0.5); scale: 1.2; }
.card .media.portrait .cover, .card .media.icon-only .cover { object-fit: contain; }
.card .media video { opacity: 0; transition: opacity 0.3s; }
.card .media.playing video { opacity: 1; }
.card:hover .play-badge, .card .media:focus-visible .play-badge { opacity: 1; scale: 1; }
.rank, .new-tag, .no-trailer {
  position: absolute; top: var(--s2); padding: 2px 8px; border-radius: 6px;
  font: 500 11px/1.6 var(--mono); letter-spacing: 0.04em; background: rgb(11 11 13 / 0.78); color: var(--text-2);
}
.rank { left: var(--s2); }
.rank.gold { color: var(--accent); }
.new-tag { right: var(--s2); background: var(--accent); color: var(--accent-ink); }
.no-trailer { left: auto; right: var(--s2); top: auto; bottom: var(--s2); }
.card-body { padding: var(--s3) 2px 0; }
.card-title { display: flex; align-items: center; gap: var(--s3); }
.card-title img { width: 32px; height: 32px; border-radius: 7px; }
.card-title div { min-width: 0; }
.card h3 { font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .genre { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { margin-top: var(--s2); font-size: 13px; }
.empty { grid-column: 1 / -1; padding: var(--s7) 0; text-align: center; color: var(--muted); }
/* Plain crawler list (replaced by cards on first open) */
.seo-list { grid-column: 1 / -1; columns: 3 220px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.seo-list li { padding: 2px 0; }
.seo-list span { color: var(--muted); }

/* ---------------------------------------------------------------- software */
.repos { display: grid; gap: var(--s5); }
.repo {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s6);
  padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface);
}
.repo:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.repo:nth-child(even) .repo-gallery { order: 2; }
.repo-gallery { position: relative; align-self: start; }
.repo-shot { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r2); background: #000; }
.repo-soon { display: grid; place-items: center; border: 1px dashed var(--line); background: repeating-linear-gradient(135deg, #0b0b0f 0 14px, #101016 14px 28px); }
.repo-soon span { font-family: "Geist Mono", monospace; font-size: 0.85rem; opacity: 0.55; letter-spacing: 0.04em; }
.repo-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.repo-shot img.on { opacity: 1; }
.car-btn {
  position: absolute; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(11 11 13 / 0.75); color: var(--text);
  border: 1px solid var(--line-2); opacity: 0; transition: opacity 0.2s;
}
.car-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.car-prev { left: var(--s3); }
.car-next { right: var(--s3); }
.repo-gallery:hover .car-btn, .car-btn:focus-visible { opacity: 1; }
@media (hover: none) { .car-btn { opacity: 1; } }
.repo-body { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4) var(--s4) var(--s4) 0; }
.repo:nth-child(even) .repo-body { padding: var(--s4) 0 var(--s4) var(--s4); }
.repo-title { display: flex; align-items: center; gap: var(--s3); }
.repo-title img { width: 44px; height: 44px; border-radius: var(--r2); }
.repo-title h3 { font-size: 24px; margin-top: 2px; }
.repo-body > p { color: var(--text-2); font-size: 15px; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); font-size: 14px; color: var(--text-2); }
.facts li { position: relative; padding-left: var(--s5); }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 10px; height: 1px; background: var(--accent); }
.repo-body > p.stack { font: 500 12px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.repo-body .actions { margin-top: auto; padding-top: var(--s2); }
@media (max-width: 900px) {
  .repo, .repo:nth-child(even) { grid-template-columns: 1fr; gap: var(--s4); }
  .repo:nth-child(even) .repo-gallery { order: 0; }
  .repo-body, .repo:nth-child(even) .repo-body { padding: var(--s2) var(--s3) var(--s3); }
}

/* ---------------------------------------------------------------- platforms */
.plat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.plat { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); display: flex; flex-direction: column; gap: var(--s5); }
.plat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.plat-name { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: 17px; }
.plat-name svg { width: 18px; height: 18px; color: var(--text-2); }
.plat-feature { position: relative; display: block; border-radius: var(--r2); overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.plat-feature img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.4s var(--ease); }
.plat-feature:hover img { scale: 1.03; }
.plat-feature-text {
  position: absolute; inset: auto 0 0; padding: var(--s8) var(--s4) var(--s4); display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0));
}
.plat-feature-text .label { color: var(--accent); }
.plat-feature-text strong { font-size: 20px; letter-spacing: -0.01em; }
.plat-feature-text span:last-child { font-size: 14px; color: #c9c9cf; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s1); border-radius: var(--r1); transition: background 0.15s; }
.rows a:hover { background: var(--raised); }
.rows img { width: 40px; height: 40px; border-radius: 8px; }
.rows span { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; }
.rows b { font: 400 13px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }

.astro-sum { display: flex; align-items: center; gap: var(--s5); }
.astro-sum img { width: 48px; height: 48px; border-radius: 50%; }
.astro-sum dl { margin: 0; display: flex; gap: var(--s6); }
.astro-sum div { display: flex; flex-direction: column-reverse; }
.astro-sum dt { font-size: 13px; color: var(--muted); }
.astro-sum dd { margin: 0; font: 500 24px/1.1 var(--mono); }
.astro-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.astro-games a { display: block; border-radius: var(--r2); overflow: hidden; background: var(--raised); transition: background 0.15s; }
.astro-games a:hover { background: var(--hover); }
.astro-games img { width: 100%; aspect-ratio: 2 / 3; max-height: 210px; object-fit: cover; }
.astro-games span { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); }
.astro-games strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.astro-games small { font: 400 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { .plat-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .plat { padding: var(--s4); } }

/* ---------------------------------------------------------------- about */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s8); align-items: start; }
.about-text { max-width: 62ch; }
.about-text h2 { margin-bottom: var(--s5); }
.about-text p:not(.kicker) { color: var(--text-2); font-size: 17px; }
.about-text p + p { margin-top: var(--s4); }
.about-side { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); }
.avatar { width: 64px; height: 64px; border-radius: var(--r2); margin-bottom: var(--s5); }
.kv { margin: 0; display: grid; gap: var(--s4); }
.kv div { display: grid; grid-template-columns: 120px 1fr; gap: var(--s3); font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: var(--s6); } }
@media (max-width: 420px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------------------------------------------------------------- contact + footer */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.link-row {
  display: flex; align-items: center; gap: var(--s4); min-height: 64px; padding: var(--s3) var(--s4); text-align: left;
  border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); transition: background 0.15s, border-color 0.15s;
}
.link-row:hover { background: var(--raised); border-color: var(--line-2); }
.link-row > svg:first-child { width: 20px; height: 20px; color: var(--text-2); }
.link-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-row strong { font-size: 15px; }
.link-row span span { font-size: 13px; color: var(--muted); }
.link-row .go { width: 14px; height: 14px; color: var(--muted); transition: color 0.15s, translate 0.15s; }
.link-row:hover .go { color: var(--accent); translate: 2px -2px; }
#discord { border-color: rgb(244 197 66 / 0.35); }

.footer { margin-top: var(--s10); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: var(--s4); padding-top: var(--s5); padding-bottom: var(--s5); font-size: 14px; color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------------------------------------------------------------- toast + modal */
.toast {
  position: fixed; left: 50%; bottom: var(--s5); z-index: 80; translate: -50% 16px; opacity: 0; pointer-events: none;
  padding: var(--s3) var(--s4); border-radius: var(--r2); background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  transition: opacity 0.2s, translate 0.2s var(--ease); box-shadow: var(--shadow);
}
.toast.show { opacity: 1; translate: -50% 0; }

dialog#modal {
  width: min(1200px, 100vw - 32px); max-width: none; height: min(780px, 100dvh - 32px); max-height: none; padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--r3); background: var(--surface); color: var(--text);
  display: none; flex-direction: column; overflow: hidden; box-shadow: 0 24px 80px rgb(0 0 0 / 0.6);
}
dialog#modal[open] { display: flex; animation: pop 0.22s var(--ease); }
dialog#modal.portrait { width: min(520px, 100vw - 32px); }
dialog::backdrop { background: rgb(0 0 0 / 0.72); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; scale: 0.98; } }
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.modal-name { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.modal-name img { width: 32px; height: 32px; border-radius: 7px; }
.modal-name div { display: flex; flex-direction: column; min-width: 0; }
.modal-name strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-name span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-actions { display: flex; gap: var(--s2); }
.modal-stage { position: relative; flex: 1; background: #000; overflow: hidden; }
.modal-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.3s; }
.modal-stage iframe.crop { left: -64px; width: calc(100% + 64px); }
.modal-stage iframe.loaded { opacity: 1; }
.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s3); color: var(--muted); font-size: 14px; }
.loader img { width: 64px; height: 64px; border-radius: var(--r2); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.5; scale: 0.96; } }
@media (max-width: 640px) {
  dialog#modal, dialog#modal.portrait { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .modal-actions .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
