/* site.css — tyttoot.com design system. Tokens → base → layout → components → pages → themes.
   Light/dark follows the device unless the visitor picks one (html[data-mode]); holiday themes override --brand/--accent/--tint
   through an inline :root block. Every image/embed/ad has reserved space (width/height or aspect-ratio) → no layout shift. */

/* ------------------------------------------------------------------ tokens */
:root {
  --brand: #0f766e;
  --brand-ink: #0b5d57;
  --on-brand: #ffffff;
  --accent: #f59e0b;
  --tint: #ecfdf8;
  --bg: #ffffff;
  --bg-soft: #f6f8f8;
  --card: #ffffff;
  --ink: #12201f;
  --ink-soft: #4b5b59;
  --line: #dde5e4;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --focus: #2563eb;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 14px rgb(16 24 40 / 6%);
  --shadow-h: 0 2px 4px rgb(16 24 40 / 8%), 0 12px 28px rgb(16 24 40 / 12%);
  --wrap: 1180px;
  --narrow: 780px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-cjk: "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", var(--font);
  --head-h: 64px;
  --banner-h: 40px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --ok: #4ade80; --warn: #fbbf24; --danger: #f87171;
    --bg: #0d1413; --bg-soft: #131c1b; --card: #17211f; --ink: #e7efed; --ink-soft: #a3b3b0; --line: #26332f;
    --tint: #10241f; --brand-ink: #5eead4; --shadow: 0 1px 2px rgb(0 0 0 / 40%); --shadow-h: 0 8px 26px rgb(0 0 0 / 45%);
  }
}
:root[data-mode="dark"] {
  --ok: #4ade80; --warn: #fbbf24; --danger: #f87171;
  --bg: #0d1413; --bg-soft: #131c1b; --card: #17211f; --ink: #e7efed; --ink-soft: #a3b3b0; --line: #26332f;
  --tint: #10241f; --brand-ink: #5eead4; --shadow: 0 1px 2px rgb(0 0 0 / 40%); --shadow-h: 0 8px 26px rgb(0 0 0 / 45%);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); text-rendering: optimizeLegibility; }
:lang(zh-Hans), :lang(zh-Hant), :lang(ja) { font-family: var(--font-cjk); line-height: 1.75; }
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--brand-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.center { text-align: center; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap.narrow, .narrow { max-width: var(--narrow); }
main { min-height: 60vh; outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ buttons, chips, forms */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 2px solid var(--brand); border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font: 600 1rem/1.2 inherit; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--brand-ink); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn .i { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn.store { background: #111; border-color: #111; color: #fff; border-radius: 12px; padding: 8px 16px; }
.btn.store small { display: block; font-size: .7rem; font-weight: 500; opacity: .85; }
.btn.store span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn.store.soon { background: transparent; color: var(--ink-soft); border: 2px dashed var(--line); }
.btn.play { font-size: 1.05rem; padding-inline: 22px; }
.linkish { background: none; border: 0; padding: 4px 2px; color: var(--brand-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--brand-ink); font-size: .8rem; font-weight: 600; }
.chip.now { background: var(--accent); color: #231400; }
.plat { font-size: .75rem; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 8px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn .i { width: 22px; height: 22px; fill: currentColor; }

.form { display: grid; gap: 14px; }
.card-pad { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-s); }
textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 25%, transparent); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; margin: 2px 0 0; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.4em; margin: 0; color: var(--danger); font-weight: 500; }
.form-msg:empty { min-height: 0; }
.notice { padding: 12px 16px; border-radius: var(--radius-s); background: var(--bg-soft); border-left: 4px solid var(--brand); }
.notice.ok, .ok { color: var(--ok); }
.notice.ok { border-color: var(--ok); }
.notice.warn { border-color: var(--warn); color: inherit; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ header / nav / footer */
.theme-banner { min-height: var(--banner-h); display: flex; align-items: center; background: var(--brand); color: var(--on-brand); font-size: .92rem; overflow: hidden; position: relative; }
.theme-banner a { color: inherit; font-weight: 700; }
.theme-banner .wrap { position: relative; z-index: 1; padding: 8px 0; }
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 16px; height: var(--head-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.main-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.main-nav a:hover { background: var(--bg-soft); }
.main-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--tint); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang-code { font-size: .75rem; font-weight: 700; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-h); }
.lang ul a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang ul a:hover, .lang ul a[aria-current] { background: var(--tint); }
.account-link { position: relative; }
.account-link.signed-in::after { content: attr(data-initial); position: absolute; inset: 7px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .85rem; }
.account-link.signed-in .i { visibility: hidden; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .main-nav { position: fixed; inset: var(--head-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-h); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .16s; }
  .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px; font-size: 1.05rem; }
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 14px auto 0; padding: 0; font-size: .88rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--ink-soft); }

.site-foot { margin-top: 72px; padding: 48px 0 28px; background: var(--bg-soft); border-top: 1px solid var(--line); font-size: .94rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; }
.foot-links { list-style: none; margin: 0; padding: 0; columns: 2; gap: 24px; }
.foot-links li { margin-bottom: 6px; break-inside: avoid; }
.foot-links a, .foot-links .linkish { color: var(--ink); text-decoration: none; padding: 0; }
.foot-links a:hover { text-decoration: underline; }
.social { display: flex; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.social .i { width: 20px; height: 20px; fill: currentColor; }
.foot-company { font-style: normal; color: var(--ink-soft); font-size: .86rem; }
.copyright { margin-top: 28px; color: var(--ink-soft); font-size: .85rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ sections, grids, cards */
.band { margin-top: 48px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.band-head h2 { margin: 0; }
.page-head { padding: 28px 0 8px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.count { color: var(--ink-soft); font-size: .9rem; }
.empty { padding: 32px; text-align: center; color: var(--ink-soft); background: var(--bg-soft); border-radius: var(--radius); }
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.grid.posts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.videos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-media { aspect-ratio: 3 / 2; background: var(--bg-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.card-text { color: var(--ink-soft); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: auto 0 0; padding-top: 6px; }
.card-kicker { font-size: .82rem; color: var(--ink-soft); margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.filters a { padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.filters a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 32px 0 0; }
.pager ol { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager ol a, .pager ol span { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pager ol a:hover { background: var(--bg-soft); }
.pager [aria-current] { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.pager .gap { display: grid; place-items: center; min-width: 24px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ home */
.hero-home { background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), linear-gradient(180deg, var(--tint), var(--bg)); padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero-stack { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; min-height: 160px; }
.hero-stack li { width: 128px; height: 128px; margin-left: -22px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-h); background: var(--card); transform: rotate(-6deg); }
.hero-stack li:nth-child(2) { transform: translateY(-18px) rotate(3deg); z-index: 1; }
.hero-stack li:nth-child(3) { transform: rotate(8deg); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-stack { justify-content: flex-start; padding-left: 22px; } }
.event-band { padding: 20px 24px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ game page */
.game-hero { background: linear-gradient(180deg, var(--tint), var(--bg)); padding: 24px 0 8px; }
.game-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.game-hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-h); aspect-ratio: 3 / 2; background: var(--bg-soft); }
.game-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.game-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 12px; }
.subtitle { font-size: 1.15rem; font-weight: 600; color: var(--ink-soft); margin-top: -6px; }
.game-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--ink-soft); font-size: .92rem; }
.fav { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.fav .i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav[aria-pressed="true"] .i { fill: #e11d48; stroke: #e11d48; }
.game-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 32px; }
.game-side { align-self: start; position: sticky; top: calc(var(--head-h) + 16px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.side-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.platforms { list-style: none; margin: 0 0 14px; padding: 0; }
.platforms li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.platforms em { color: var(--ink-soft); font-style: normal; }
.side-link { font-weight: 600; }
@media (max-width: 900px) { .game-hero-grid, .game-body { grid-template-columns: 1fr; } .game-side { position: static; } }
.shots { display: flex; gap: 14px; overflow-x: auto; list-style: none; margin: 0; padding: 4px 2px 14px; scroll-snap-type: x mandatory; }
.shots li { flex: 0 0 min(80vw, 360px); scroll-snap-align: start; }
.shots a { display: block; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-soft); box-shadow: var(--shadow); }
.shots img { width: 100%; height: 100%; object-fit: cover; }
.updates { padding-left: 1.1em; }

/* ------------------------------------------------------------------ prose (articles, legal, game text) */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose img { border-radius: var(--radius-s); margin: 1em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 4px solid var(--brand); color: var(--ink-soft); }
.prose code { background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose details { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 10px; background: var(--card); }
.prose summary { cursor: pointer; font-weight: 600; }
.post-head { padding: 28px 0 12px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand-ink); margin-bottom: 8px; }
.byline { color: var(--ink-soft); font-size: .92rem; }
.post-cover { border-radius: var(--radius); overflow: hidden; margin: 8px 0 24px; aspect-ratio: 3 / 2; background: var(--bg-soft); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ timeline, videos, events, search */
.timeline { list-style: none; margin: 18px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding: 0 0 26px 16px; }
.tl-item::before { content: ""; position: absolute; left: -31px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); }
.tl-item.src-youtube::before { border-color: #dc2626; }
.tl-item.src-game::before, .tl-item.src-app::before { border-color: var(--accent); }
.tl-item time { font-size: .85rem; color: var(--ink-soft); }
.tl-card { margin-top: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); }
.tl-card h3 { margin: 0 0 4px; }
.tl-card p { margin: 0 0 6px; color: var(--ink-soft); }
.tl-card img { border-radius: 8px; margin-top: 8px; width: 320px; aspect-ratio: 16 / 9; object-fit: cover; }
.tl-src { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.follow { display: flex; flex-wrap: wrap; gap: 8px; }
.follow .i { width: 20px; height: 20px; fill: currentColor; }
.video { margin: 0; }
.video .yt, .video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; padding: 0; border-radius: var(--radius-s); overflow: hidden; background: #000; cursor: pointer; }
.video.is-short .yt, .video.is-short iframe { aspect-ratio: 9 / 16; max-height: 560px; }
.video .yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play .i { width: 64px; height: 64px; padding: 16px 14px 16px 18px; border-radius: 18px; background: #dc2626; fill: #fff; box-shadow: 0 6px 18px rgb(0 0 0 / 35%); transition: transform .12s; }
.yt:hover .yt-play .i { transform: scale(1.08); }
.video figcaption { font-size: .9rem; margin-top: 8px; color: var(--ink-soft); }
.video-game { margin: 4px 0 0; font-weight: 600; }
.gallery-game { margin-top: 32px; }
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.event-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.event-row h2 { font-size: 1.15rem; margin: 0 0 2px; }
.event-row p { margin: 0; color: var(--ink-soft); }
.event-row.is-now { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.search-form { display: flex; gap: 8px; margin: 12px 0; }
.search-form input { flex: 1; }
.search-form .btn { flex: none; }
.search-form .btn .i { width: 20px; height: 20px; fill: currentColor; }
.search-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.result { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.result img { border-radius: 10px; flex: none; }
.result a { font-weight: 700; }
.result p { margin: 2px 0 0; color: var(--ink-soft); font-size: .92rem; }

/* ------------------------------------------------------------------ community: ratings + comments */
.community h2 { margin-bottom: 12px; }
.rating { margin-bottom: 18px; min-height: 100px; }
.rating-sum { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--line); cursor: pointer; border-radius: 8px; }
.stars button.on, .stars:hover button { color: var(--accent); }
.stars button:hover ~ button { color: var(--line); }
.comments { min-height: 180px; }
.composer { display: grid; gap: 8px; margin: 0 0 18px; }
.composer-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.counter { margin-right: auto; }
.comment-list, .replies { list-style: none; margin: 0; padding: 0; }
.comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment.reply { padding: 10px 0 0 16px; border-top: 0; border-left: 2px solid var(--line); margin-top: 10px; }
.c-head { margin: 0 0 4px; font-size: .92rem; }
.c-author { font-weight: 700; color: var(--ink); text-decoration: none; }
.c-body p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-actions { display: flex; gap: 12px; margin: 0; font-size: .88rem; }
.c-actions .linkish { color: var(--ink-soft); }
.signin-hint a { font-weight: 700; }
.signin-cta { margin-bottom: 12px; }
.signin-cta .signin-hint { margin: 0 0 4px; }

/* ------------------------------------------------------------------ async states: skeleton, error + retry (no layout shift) */
.skeleton { display: grid; gap: 10px; padding: 4px 0; }
.sk-line { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--bg-soft) 0%, var(--line) 50%, var(--bg-soft) 100%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
.sk-line.short { width: 60%; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.state-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--bg-soft); border-left: 4px solid var(--warn); }
.state-error p { margin: 0; }
.state-error.compact { padding: 8px 12px; font-size: .92rem; }
li.state { list-style: none; }
/* client-rendered views differ in height: reserve most of a screen so the footer starts below the fold (no CLS) */
.app-mount { min-height: 80vh; }
[aria-busy="true"] .skeleton { min-height: inherit; }

/* ------------------------------------------------------------------ dialogs, cookie bar */
dialog { border: 0; border-radius: var(--radius); padding: 0; color: var(--ink); background: var(--card); box-shadow: var(--shadow-h); max-width: min(560px, 94vw); }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
dialog legend { font-weight: 600; margin-bottom: 6px; }
.consent-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.consent-row span { display: grid; }
.consent-row small { color: var(--ink-soft); }
.lightbox { max-width: 96vw; max-height: 94vh; background: #000; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox button { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 85%); font-size: 1.8rem; cursor: pointer; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-close { top: 26px !important; right: 10px; }
.cookie-bar { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; max-width: 720px; margin-inline: auto; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-h); }
.cookie-bar p { margin: 0 0 6px; font-size: .94rem; }
.cookie-bar .cta-row { margin: 0; }

/* ------------------------------------------------------------------ staff console (/console/) — wide shell, dense tables */
.app-shell:has(> #console) { max-width: var(--wrap); }
.con-pane { display: grid; gap: 18px; }
.con-who { margin: 0; }
.con-sec { display: grid; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.con-sec h2 { margin: 0; font-size: 1.2rem; }
.con-sec h3 { margin: 8px 0 0; font-size: 1rem; }
.con-tools, .con-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.con-row { align-items: start; }
.con-row > .field { flex: 1 1 180px; }
.con-pane .form > .btn, .con-pane .form > .check, .con-pane > .con-sec > .btn { justify-self: start; }
.con-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.con-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.con-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.con-table th, .con-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.con-table th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.con-table tr:last-child td { border-bottom: 0; }
.con-table code { font-size: .8rem; word-break: break-all; }
.con-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.con-stat { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius-s); background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.con-stat b { font-size: 1.6rem; color: var(--brand-ink); }
.con-stat span { color: var(--ink-soft); font-size: .88rem; }
.con-stat.hot { background: var(--tint); outline: 2px solid var(--accent); }
.con-trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.con-trends h3 { margin: 0 0 6px; }
.con-bars { display: flex; align-items: end; gap: 2px; height: 90px; padding: 4px; background: var(--bg-soft); border-radius: var(--radius-s); }
.con-bars span { flex: 1; min-width: 2px; background: var(--brand); border-radius: 2px 2px 0 0; }
.con-item { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.con-item:last-child { border-bottom: 0; }
.con-meta { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.con-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--bg-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.con-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.con-thread li { padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg-soft); max-width: 85%; }
.con-thread li.us { justify-self: end; background: var(--tint); }
.con-thread p { margin: 0; }
.con-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.con-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.con-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.con-card h3 { margin: 0; }
.con-scopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.acc-tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* ------------------------------------------------------------------ account */
.app-shell { padding-top: 28px; }
.app-mount { display: grid; gap: 20px; }
.oauth { display: grid; gap: 10px; }
.oauth .btn { justify-content: center; }
.oauth-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.oauth-apple { background: #000; border-color: #000; color: #fff; }
.acc-tabs { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: var(--head-h); z-index: 5; background: var(--bg); padding: 8px 0; }
.acc-tabs a { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.acc-sec { display: grid; gap: 12px; }
.acc-sec h2 { margin: 0; }
.acc-sec h3 { margin: 12px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; }
.big-num { font-size: 2.6rem; font-weight: 800; margin: 0; color: var(--brand-ink); }
.ledger, .notes, .sessions, .catalog, .owned, .linked, .fav-list, .standing { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ledger li, .notes li, .sessions li, .owned li, .linked li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.notes li.unread { font-weight: 600; }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--danger); font-weight: 700; }
.cat-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fav-list li { display: flex; align-items: center; gap: 10px; }
.fav-list img { border-radius: 9px; }
.secret { font-size: 1rem; letter-spacing: .08em; padding: 4px 8px; }
.codes { background: var(--bg-soft); padding: 12px 16px; border-radius: var(--radius-s); font-size: 1.05rem; line-height: 1.9; column-count: 2; }
.bio { font-size: 1.1rem; }

/* ------------------------------------------------------------------ ads (reserved height → no CLS) */
.ad { position: relative; margin: 28px 0; min-height: 280px; padding-top: 18px; display: grid; place-items: center; background: var(--bg-soft); border-radius: var(--radius-s); }
.ad::before { content: "Advertisement"; position: absolute; top: 4px; left: 10px; font-size: .7rem; color: var(--ink-soft); }
.ad ins { width: 100%; }

/* ------------------------------------------------------------------ holiday decorations (pure CSS, aria-hidden by construction) */
.theme-banner::before, .theme-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-repeat: repeat-x; background-size: 120px 40px; }
.deco-snow::before { background-image: radial-gradient(circle at 10px 10px, #fff 2px, transparent 3px), radial-gradient(circle at 70px 26px, #fff 1.5px, transparent 2.5px), radial-gradient(circle at 40px 32px, #fff 1px, transparent 2px); animation: tyt-fall 9s linear infinite; }
.deco-lantern::before { background-image: radial-gradient(ellipse 7px 9px at 20px 20px, #fde047 70%, transparent 75%), radial-gradient(ellipse 6px 8px at 90px 18px, #fca5a5 70%, transparent 75%); }
.deco-hearts::before { background-image: radial-gradient(circle at 18px 16px, #fecdd3 4px, transparent 5px), radial-gradient(circle at 26px 16px, #fecdd3 4px, transparent 5px); }
.deco-pumpkin::before { background-image: radial-gradient(ellipse 9px 7px at 30px 22px, #fb923c 75%, transparent 80%); }
.deco-diya::before { background-image: radial-gradient(ellipse 4px 7px at 30px 16px, #fde68a 70%, transparent 75%), radial-gradient(ellipse 4px 7px at 92px 20px, #fdba74 70%, transparent 75%); animation: tyt-flicker 2.4s ease-in-out infinite; }
.deco-sakura::before { background-image: radial-gradient(circle at 20px 12px, #fbcfe8 3px, transparent 4px), radial-gradient(circle at 80px 28px, #f9a8d4 2.5px, transparent 3.5px); animation: tyt-fall 12s linear infinite; }
.deco-moon::before { background-image: radial-gradient(circle at 60px 20px, #fef3c7 8px, transparent 9px); }
.deco-leaves::before { background-image: radial-gradient(ellipse 5px 3px at 24px 14px, #f59e0b 80%, transparent 85%), radial-gradient(ellipse 5px 3px at 84px 26px, #b45309 80%, transparent 85%); animation: tyt-fall 14s linear infinite; }
.deco-eggs::before { background-image: radial-gradient(ellipse 5px 7px at 30px 20px, #c4b5fd 75%, transparent 80%), radial-gradient(ellipse 5px 7px at 90px 20px, #a7f3d0 75%, transparent 80%); }
.deco-confetti::before { background-image: radial-gradient(circle at 14px 10px, #fde047 2px, transparent 3px), radial-gradient(circle at 54px 30px, #93c5fd 2px, transparent 3px), radial-gradient(circle at 96px 16px, #f9a8d4 2px, transparent 3px); animation: tyt-fall 10s linear infinite; }
@keyframes tyt-fall { from { background-position: 0 -40px, 0 -40px, 0 -40px; } to { background-position: 60px 40px, -40px 40px, 20px 40px; } }
@keyframes tyt-flicker { 50% { opacity: .25; } }

/* leaderboard (game pages) — panel keeps a fixed minimum so loading → rows/empty doesn't shift the page */
.board h2 { margin-bottom: 6px; }
.board-mode { margin: 0 0 10px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; border-bottom: 1px solid var(--line); }
.board-tab { min-height: 44px; padding: 8px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-soft); font: inherit; font-weight: 600; cursor: pointer; }
.board-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.board-tab:focus-visible, .board-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.board-panel { min-height: 22rem; }
.board-scroll { overflow-x: auto; }
.board-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table th, .board-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.board-table thead th { font-size: .85rem; color: var(--ink-soft); font-weight: 600; }
.board-table tbody th { font-weight: 500; overflow-wrap: anywhere; }
.board-rank, .board-score { white-space: nowrap; }
.board-score { font-weight: 700; }
.board-date { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.board-table tr.you { background: var(--bg-soft); box-shadow: inset 4px 0 0 var(--brand); }
.board-you { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; }
.board-yourrank { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg-soft); font-weight: 600; }
.board-count { margin: 10px 0 0; }
.board-more { margin: 12px 0 0; }
.board-empty .cta-row { justify-content: center; margin-bottom: 0; }
.board-note { margin-top: 12px; }
@media (max-width: 560px) { .board-date { display: none; } }

@media print { .site-head, .site-foot, .theme-banner, .community, .board, .ad, .cookie-bar { display: none !important; } }
