/* 00-base.css */
/* Dark game-portal look, mobile first. System fonts only. */
:root {
  color-scheme: dark;
  --bg: #0e1015;
  --panel: #161a22;
  --line: #262b36;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #8ea8ff;
  --play: #5eead4;
  --r: 12px;
  --pad: 16px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: radial-gradient(1100px 420px at 50% -180px, #1a2134 0%, #0e101500 70%) no-repeat, var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { position: relative; z-index: 40; border-bottom: 1px solid var(--line); background: #0b0d12e8; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top-in { display: flex; align-items: center; max-width: 1120px; margin: 0 auto; padding: 10px var(--pad); }
@media (min-width: 700px) { .top { position: sticky; top: 0; } }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; font-size: 1.08rem; letter-spacing: .3px; }
.brand:hover { text-decoration: none; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: var(--pad); flex: 1; }
.foot { color: var(--muted); font-size: .88rem; padding: 22px var(--pad) calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #0b0d12; margin-top: 32px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; max-width: 1088px; margin: 0 auto; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); text-decoration: none; }
.foot-lang { margin-left: auto; }
.lang-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; }
.lang-link:hover { border-color: #3b4456; }

h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); line-height: 1.15; margin: .2em 0; }
h2 { font-size: 1.15rem; margin: 1.6em 0 .6em; }
.page-title { margin-top: .4em; }
.lead { color: var(--muted); margin: 0 0 20px; }
.crumbs { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: #3b4456; box-shadow: 0 14px 34px #0009; }
.card-media { position: relative; display: block; overflow: hidden; }
.card-media .cover { transition: transform .35s ease; }
.card:hover .card-media .cover { transform: scale(1.04); }
.card-play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--play); color: #06231e; box-shadow: 0 6px 18px #000a; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
@media (hover: none) { .card-play { display: none; } }
.card .cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card .ph { display: grid; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card-body .chips { margin-top: auto; padding-top: 4px; }
.card-title { font-size: 1.05rem; margin: 0; color: var(--text); }
.card-sum { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-block; font-size: .78rem; line-height: 1.6; padding: 1px 9px; border-radius: 99px; background: #222839; color: #c8cee2; }
a.chip:hover { background: #2d3550; text-decoration: none; }
.count { color: var(--muted); margin-left: 2px; }
.tag-nav h2 { margin-top: 2em; }

/* placeholder cover (no cover file yet) */
.ph { display: grid; place-items: center; padding: 12px; text-align: center; color: #fff; font-weight: 800; font-size: clamp(1.1rem, 4vw, 1.7rem); text-shadow: 0 2px 10px #000a;
  background: radial-gradient(circle at 25% 25%, hsl(var(--h) 75% 50% / .6), transparent 55%),
    radial-gradient(circle at 80% 80%, hsl(calc(var(--h) + 70) 70% 45% / .55), transparent 55%),
    repeating-linear-gradient(45deg, #ffffff08 0 2px, transparent 2px 14px), #151925; }

/* play area: full width on phones, centred and height-capped on larger screens */
.play { margin: 12px calc(-1 * var(--pad)) 0; }
.frame { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 auto; background: #000; overflow: hidden; }
.portrait .frame { aspect-ratio: 9 / 16; }
.frame::before { content: ''; position: absolute; inset: -40px; background: var(--cover, none) center / cover; filter: blur(28px) brightness(.45); }
.frame > .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frame > .ph span { margin-bottom: 60px; } /* keep the title clear of the Play button */
.frame.playing::before { display: none; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.play-btn { position: absolute; inset: 0; display: grid; place-items: end center; width: 100%; border: 0; padding: 0 0 clamp(14px, 6%, 44px); background: linear-gradient(transparent 55%, #000b); cursor: pointer; color: #06231e; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px 14px 24px; border-radius: 99px; background: var(--play); font-family: inherit; font-size: 1.25rem; font-weight: 800; line-height: 1; box-shadow: 0 10px 30px #000a; transition: transform .12s; }
.play-btn:hover .pill { transform: scale(1.05); }
.play-btn:focus-visible { outline: none; }
.play-btn:focus-visible .pill { outline: 3px solid #fff; outline-offset: 3px; }
.play-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 8px; padding: 8px var(--pad) 0; color: var(--muted); font-size: .9rem; }
.hint { margin-right: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.btn:hover { border-color: #3b4456; }
.btn[hidden] { display: none; }

.frame:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.portrait .frame:fullscreen iframe { position: relative; inset: auto; width: auto; height: 100%; max-width: 100%; aspect-ratio: 9 / 16; margin: 0 auto; }

@media (min-width: 700px) {
  .play { margin: 16px 0 0; }
  .play-bar { padding: 8px 0 0; }
  .frame { border-radius: var(--r); width: min(100%, calc((100vh - 180px) * 16 / 9)); }
  .portrait .frame { width: min(100%, max(300px, calc((100vh - 180px) * 9 / 16))); }
}

/* game info */
.game-head h1 { margin-bottom: 0; }
.orig { color: var(--muted); margin: 2px 0 0; }
.summary { font-size: 1.1rem; color: #d6dae4; margin: 20px 0 4px; }
.cols { display: grid; gap: 0 32px; }
.about p { margin: 0 0 1em; }
.controls { margin: 0; padding-left: 1.2em; }
.controls li { margin: .2em 0; }
.facts-box { align-self: start; margin-top: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.ai-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: #c8cee2; font-size: .92rem; }
.ai-note::before { content: '\2726'; color: var(--play); margin-right: 8px; }
.more { margin-top: 40px; }
@media (min-width: 860px) {
  .cols { grid-template-columns: 1fr 300px; }
}

/* game page: title row */
.game-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.game-head .orig { margin: 0; font-size: 1.1rem; }

/* phones: before Play the frame is only as tall as the cover (Play goes full screen) */
@media (max-width: 699px) {
  .frame:not(.playing) { aspect-ratio: 4 / 3; }
  .both .frame.playing { aspect-ratio: 9 / 16; } /* adaptive games: portrait on phones, 16:9 on wider screens */
  .play-btn .pill { padding: 11px 24px 11px 19px; font-size: 1.1rem; }
}

/* wide screens: portrait games sit in a column on the left, the page text beside them */
@media (min-width: 1000px) {
  .game.is-portrait { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 40px; align-items: start; }
  .game.is-portrait > * { grid-column: 2; }
  .game.is-portrait > .play { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: 76px; margin-top: 8px;
    width: clamp(300px, calc((100vh - 150px) * 9 / 16), 480px); }
  .game.is-portrait .frame { width: 100%; }
  .game.is-portrait .game-head h1 { margin-top: .2em; }
  .game.is-portrait .cols { grid-template-columns: 1fr; }
}

/* full screen without the Fullscreen API (iPhone): the frame covers the page */
.play .frame.fs-fake { position: fixed; inset: 0; z-index: 90; width: 100vw; height: 100vh; height: 100dvh; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 0; }
html.gp-fs-lock, html.gp-fs-lock body { overflow: hidden; overscroll-behavior: none; }
.fs-exit { display: none; position: absolute; z-index: 3; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right));
  width: 36px; height: 36px; place-items: center; padding: 0; border-radius: 50%; border: 1px solid #ffffff40; background: #000000a0; color: #fff; cursor: pointer; opacity: .75; }
.fs-exit:hover { opacity: 1; }
.frame:fullscreen .fs-exit, .frame.fs-fake .fs-exit { display: grid; }

/* 10-ui.css */
/* Shared UI kit for every page and module: header, forms, buttons, tables, panels, tabs, modal, toast.
   Modules add their own files (client/styles/<nn>-<module>.css) and reuse these classes. */

/* header */
.top-in { gap: 18px; flex-wrap: wrap; }
.top-nav { display: flex; gap: 16px; align-items: center; }
.top-nav a { color: var(--muted); font-weight: 600; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.search { position: relative; margin-left: auto; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: min(42vw, 260px); padding: 7px 12px 7px 34px; border-radius: 99px; background: #151922; }
.search input:focus { background: #0b0d12; }
.user-area { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.user-btn:hover { border-color: #3b4456; }
.user-btn .avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2d3550; font-weight: 800; font-size: .85rem; }
.user-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-in { border-radius: 99px; padding: 7px 18px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px #000a; }
.menu-list[hidden] { display: none; }
.menu-list a, .menu-list button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: #222839; text-decoration: none; }
.menu-out { color: var(--muted) !important; border-top: 1px solid var(--line) !important; border-radius: 0 0 6px 6px !important; }
@media (max-width: 640px) {
  .top-in { gap: 10px 12px; padding: 8px 12px 10px; }
  .top-nav { margin-right: auto; }
  .search { order: 5; width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .user-btn { padding: 3px; }
  .user-btn .user-name { display: none; }
  .sign-in { padding: 6px 14px; }
}

/* buttons */
.btn.primary { background: var(--play); border-color: var(--play); color: #06231e; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: #7f2d3a; color: #ffb4bf; }
.btn.danger:hover { background: #3a1820; }
.btn.small { padding: 4px 10px; font-size: .88rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }

/* forms */
input, select, textarea { font: inherit; color: var(--text); background: #0b0d12; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 90px; resize: vertical; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--play); }
.form { display: grid; gap: 14px; max-width: 640px; }
.form.wide { max-width: none; }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-weight: 600; font-size: .95rem; }
.field .help { color: var(--muted); font-size: .85rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; }
.search-big { display: flex; gap: 10px; margin: 8px 0 18px; max-width: 560px; }
.search-big input { flex: 1; }

/* panels, notices, badges, tables, tabs */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 14px 0; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.notice { padding: 10px 14px; border-radius: 10px; border: 1px solid #2f4b7a; background: #14223a; margin: 12px 0; }
.notice.warn { border-color: #7a5d2f; background: #2c2412; }
.notice.error { border-color: #7f2d3a; background: #2a1218; }
.notice.ok { border-color: #2f7a5d; background: #12291f; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: #222839; color: #c8cee2; vertical-align: middle; }
.badge.ok { background: #12392b; color: #7ee2b8; }
.badge.warn { background: #3a2f12; color: #f3cf7a; }
.badge.bad { background: #3a1820; color: #ffb4bf; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 10px 0 16px; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--play); }
.layout-side { display: grid; gap: 20px; }
@media (min-width: 900px) { .layout-side { grid-template-columns: 220px 1fr; } }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.side-nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--panel); color: var(--text); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 12px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat small { display: block; margin-top: 2px; font-size: .78rem; }

/* modal + toast */
.gp-modal { width: min(92vw, 460px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px #000c; }
.gp-modal::backdrop { background: #000a; }
.gp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.gp-modal-head h2 { margin: 0; font-size: 1.1rem; }
.gp-x { background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.gp-modal-body { padding: 8px 16px; }
.gp-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 8px 16px 16px; }
.gp-toasts { position: fixed; z-index: 100; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.gp-toast { padding: 10px 16px; border-radius: 10px; background: #222839; border: 1px solid var(--line); box-shadow: 0 10px 30px #000a; transition: opacity .3s; }
.gp-toast.error { border-color: #7f2d3a; }
.gp-toast.ok { border-color: #2f7a5d; }
.gp-toast.out { opacity: 0; }

/* game page extension points */
.bar-slot { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.game-panels { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 860px) { .game-panels { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.home-section { margin: 8px 0 28px; }
.home-section h2 { margin-top: .6em; }
.all-games h2 { margin-top: .6em; }
.also-played { margin-top: 32px; }
.mp-note { margin: 10px 0 0; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 1.4em; }
.legal li { margin: .3em 0; }

/* home: intro line + featured game */
.home-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin: 6px 0 18px; }
.home-intro h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); margin: 0; }
.home-intro .lead { margin: 0; }
.hero { position: relative; isolation: isolate; display: grid; overflow: hidden; margin: 0 0 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.hero::before { content: ''; position: absolute; inset: -60px; z-index: -1; background: var(--cover, none) center / cover; filter: blur(48px) brightness(.32) saturate(1.3); }
.hero-media { display: block; overflow: hidden; }
.hero-media .cover { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.hero:hover .hero-media .cover { transform: scale(1.03); }
.hero-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; padding: 18px 18px 22px; }
.hero-kicker { margin: 0; color: var(--play); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-title { margin: 0; font-size: clamp(1.7rem, 4.4vw, 2.7rem); line-height: 1.1; }
.hero-title a { color: var(--text); }
.hero-title a:hover { text-decoration: none; }
.hero-sum { margin: 0; color: #d6dae4; font-size: 1.05rem; max-width: 46ch; }
.hero .btn.big { margin-top: 6px; }
.btn.big { padding: 12px 26px 12px 20px; border-radius: 99px; font-size: 1.1rem; font-weight: 800; }
.btn.big:hover { text-decoration: none; }
@media (min-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .hero-body { padding: 28px 36px; }
}

/* 20-paper.css */
/* Paper theme (body.paper): the PIXIE news site's design language for the public pages.
   Warm paper, ink, one yellow accent, a dark green for the video card and the play window.
   Tokens follow pixel-news-web/site/src/styles/newsroom.css. Everything is scoped to .paper,
   so account, studio and admin pages keep the dark theme. */

@font-face { font-family: 'Reading Sans'; src: url('/fonts/reading-sans.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'PX Mono'; src: url('/fonts/px-mono.woff2') format('woff2'); font-display: swap; unicode-range: U+0020-007E, U+00A0; }

.paper {
  color-scheme: light;
  --bg: #f5f3ec; --bg-alt: #eae7dd; --panel: #fffef9; --line: #d7d9ce; --ink: #242b27;
  --text: #242b27; --muted: #676e64; --accent: #3f5a2f; --play: #f8d757; --hover: #65773a;
  --green: #253b32; --yellow: #f8d757; --scene: #edc94c; --r: 0px;
  --font-sans: 'Reading Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Consolas, 'Reading Sans', monospace;
  font-family: var(--font-sans);
  font-synthesis: weight;
  background: var(--bg) radial-gradient(#b9bca92b .6px, transparent .6px) 0 0 / 6px 6px;
  color: var(--ink);
}
.paper a { color: inherit; }
.paper a:hover { color: var(--hover); text-decoration: none; }
.paper h1, .paper h2, .paper h3 { font-weight: 650; letter-spacing: -.04em; }
.paper b, .paper strong { font-weight: 650; }
.paper .px { font-family: var(--font-mono); }
.paper .wrap { max-width: 1180px; padding: 0 32px 48px; }
.paper :focus-visible { outline-color: var(--ink); }
.paper .eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 550; letter-spacing: 1.4px; color: var(--muted); }
.paper .text-link { display: inline-block; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* masthead + section nav */
.paper .paper-head { position: relative; background: var(--bg); border-top: 5px solid var(--ink); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.paper .paper-head .top-in { max-width: 1180px; padding: 22px 32px 16px; gap: 14px 24px; }
.paper .wordmark { display: flex; align-items: center; gap: 20px; color: var(--ink); font-family: 'PX Mono', ui-monospace, monospace; font-size: 32px; line-height: 1.2; letter-spacing: -1px; white-space: nowrap; }
.paper .wordmark:hover { color: var(--ink); }
.paper .wm-mark { display: grid; place-items: center; width: 45px; height: 45px; background: var(--yellow); font: 34px/1 system-ui, sans-serif; letter-spacing: 0; }
.paper .wordmark-sub { margin: 0; font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.paper .search input { width: 220px; border-radius: 0; background: var(--panel); border-color: var(--line); color: var(--ink); }
.paper .search input:focus { border-color: var(--ink); background: var(--panel); }
.paper .site-nav .nav-in { display: flex; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 0 32px; overflow-x: auto; scrollbar-width: none; }
.paper .site-nav .nav-in::-webkit-scrollbar { display: none; }
.paper .site-nav a { flex: none; padding: 12px 0 9px; border-bottom: 3px solid transparent; font-size: 14px; color: var(--muted); }
.paper .site-nav a:hover { color: var(--ink); }
.paper .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* header controls on paper */
.paper .sign-in, .paper .btn.primary { background: var(--ink); border-color: var(--ink); color: #fffef9; border-radius: 0; font-weight: 500; }
.paper .sign-in:hover, .paper .btn.primary:hover { background: #425340; color: #fff; filter: none; }
.paper .user-btn, .paper .coin-chip { border-radius: 0; background: var(--panel); border-color: var(--line); color: var(--ink); }
.paper .user-btn .avatar { background: #e8ebdd; color: var(--ink); }
.paper .menu-list { border-radius: 0; background: var(--panel); border-color: var(--ink); box-shadow: 4px 4px 0 var(--line); }
.paper .menu-list a, .paper .menu-list button { color: var(--ink); border-radius: 0; }
.paper .menu-list a:hover, .paper .menu-list button:hover { background: var(--bg-alt); }

/* shared UI kit on paper */
.paper .btn { border-radius: 0; background: var(--panel); border-color: var(--line); color: var(--ink); }
.paper .btn:hover { border-color: var(--ink); }
.paper .pbtn { display: inline-flex; align-items: center; gap: 30px; padding: 12px 22px; border: 1px solid var(--ink); background: var(--ink); color: #fffef9; font: 14px var(--font-sans); cursor: pointer; }
.paper .pbtn:hover { background: #425340; color: #fff; }
.paper input, .paper select, .paper textarea { border-radius: 0; background: var(--panel); border-color: var(--line); color: var(--ink); }
.paper .chip { border-radius: 0; background: #e8ebdd; color: #394f3c; }
.paper .panel, .paper .empty, .paper .notice { border-radius: 0; }
.paper .panel { background: var(--panel); }
.paper .notice { background: #eae9dc; border-color: #d8b537; }
.paper .gp-modal { border-radius: 0; background: var(--panel); color: var(--ink); border-color: var(--ink); box-shadow: 8px 8px 0 #0002; }
.paper .gp-toast { border-radius: 0; background: var(--ink); color: #fffef9; border-color: var(--ink); }
.paper .lead { color: var(--muted); }
.paper .card { border-radius: 0; background: var(--panel); border-color: var(--line); }
.paper .card:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.paper .card-title { color: var(--ink); }
.paper .card-play { border-radius: 0; background: var(--yellow); color: var(--green); }

/* edition line, hero, PIXIE scene */
.paper .edition-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font: 11px var(--font-mono); letter-spacing: 1px; color: var(--muted); }
.paper .edition-line > span:first-child { display: flex; align-items: center; gap: 8px; }
.paper .edition-line i { width: 7px; height: 7px; background: #5e7144; }
.paper .edition-line a { font-family: var(--font-sans); }
.paper-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 52px; align-items: center; padding: 32px 0 48px; }
.paper .hero-copy h1 { max-width: 640px; margin: 0 0 24px; font-size: clamp(34px, 4vw, 52px); line-height: 1.35; letter-spacing: -2px; }
.paper .hero-intro { max-width: 580px; margin: 0; font-size: 16px; line-height: 1.95; color: var(--muted); }
.paper .hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; font-size: 13px; }
.paper .reading-meta { margin: 20px 0 0; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.pixie-scene { position: relative; isolation: isolate; overflow: hidden; height: 390px; background: var(--scene, #edc94c); border: 1px solid #d3af32;
  background-image: linear-gradient(#5c521215 1px, transparent 1px), linear-gradient(90deg, #5c521215 1px, transparent 1px); background-size: 24px 24px; }
.pixie-scene img { position: absolute; z-index: 2; right: 0; bottom: -44px; width: 250px; height: 360px; object-fit: contain; filter: drop-shadow(4px 9px 0 #69592120); }
.scene-label, .scene-caption { position: absolute; z-index: 3; left: 20px; font-size: 9px; letter-spacing: 1px; }
.scene-label { top: 18px; }
.scene-caption { bottom: 18px; }
.scene-note { position: absolute; z-index: 3; left: 24px; top: 115px; margin: 0; font-size: 22px; font-weight: 600; line-height: 1.65; letter-spacing: -1px; }
.scene-orbit { position: absolute; right: -20px; top: 62px; width: 285px; height: 285px; border: 1px solid #8d772f80; border-radius: 50%; }
.scene-star { position: absolute; z-index: 3; font-size: 45px; line-height: 1; }
.star-one { left: 30px; top: 38px; }
.star-two { right: 18px; top: 35px; font: 32px var(--font-mono); }

/* editorial rule + lead story */
.paper .editorial-rule { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-block: 1px solid var(--ink); font-size: 12px; letter-spacing: 1px; }
.paper .editorial-rule span:last-child { color: var(--muted); font-size: 11px; }
.paper .lead-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 40px; align-items: start; padding: 36px 0; border-bottom: 1px solid var(--ink); }
.paper .lead-media { display: block; border: 1px solid var(--line); background: var(--panel); }
.paper .lead-media .cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.paper .lead-main h2 { margin: 0 0 16px; font-size: 29px; line-height: 1.45; }
.paper .lead-main p:not(.eyebrow) { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.paper .lead-main .text-link { margin-top: 18px; }
.paper .lead-aside { border-left: 1px solid var(--line); padding-left: 32px; }
.paper .lead-aside .eyebrow { display: block; }
.paper .q-lines { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.7; }
.paper .q-lines em { font-style: normal; box-shadow: inset 0 -9px var(--yellow); }
.paper .q-note { display: block; margin-top: 16px; font-size: 11px; color: var(--muted); }

/* stories column + sidebar */
.paper-columns { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 56px; margin-top: 40px; scroll-margin-top: 24px; }
.paper .section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.paper .section-heading h2 { margin: 0; font-size: 25px; }
.paper .section-heading span { font-size: 10px; color: var(--muted); }
.prow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.prow:hover, .prow:focus-within { border-bottom-color: var(--ink); }
.prow-media { display: block; align-self: start; border: 1px solid var(--line); background: var(--panel); }
.prow-media .cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.prow-body { display: flex; flex-direction: column; min-width: 0; }
.prow-meta { margin: 0 0 8px; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.prow-title { margin: 0 0 8px; font-size: 21px; line-height: 1.5; }
.prow-hook { margin: 0 0 6px; font-size: 15px; line-height: 1.75; }
.prow-sum { margin: 0; font-size: 13px; line-height: 1.85; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: auto 0 0; padding-top: 12px; font-size: 11px; color: var(--muted); }
.prow-foot .text-link { color: var(--ink); }
.paper .tag-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.paper .tag-strip .eyebrow { margin: 0 6px 0 0; }
.paper .tag-strip a span { margin-left: 4px; font-size: 10px; color: var(--muted); }
.paper-side > section { margin-bottom: 24px; padding: 25px; }
.paper-side h2 { margin: 0; }
.paper .watch-card { background: var(--green); color: #f5f3ec; }
.paper .watch-card .eyebrow { color: #bdc9b2; }
.paper .watch-card h2 { margin-bottom: 18px; font-size: 25px; }
.paper .watch-card > p:not(.eyebrow) { margin: 0; font-size: 13px; line-height: 1.9; color: #c6cfc3; }
.paper .watch-card .video-pending { margin-top: 25px; padding-top: 16px; border-top: 1px solid #607067; }
.paper .video-pending span { font-size: 11px; }
.paper .desk-note { border: 1px solid var(--line); }
.paper .desk-note h2, .paper .curious-card h2 { font-size: 18px; }
.paper .desk-note ol { margin: 20px 0 0; padding-left: 18px; font-size: 12px; }
.paper .desk-note li { padding: 0 0 14px 5px; }
.paper .desk-note li span { display: block; margin-top: 5px; color: var(--muted); }
.paper .curious-card { background: #eae9da; }
.paper .curious-card .eyebrow { display: block; }
.paper .curious-card p { margin: 16px 0; font-size: 13px; color: var(--muted); }
.paper .curious-card a { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.paper .archive-link { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding: 22px 0; border-block: 1px solid var(--ink); }
.paper .archive-link span { font-size: 11px; }
.paper .home-section h2, .paper .also-played h2 { font-size: 25px; }

/* tag and search pages */
.paper-page-head { padding: 20px 0 22px; border-bottom: 1px solid var(--ink); }
.paper-page-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.3; letter-spacing: -1.5px; }
.paper-page-head .eyebrow { display: block; }
.paper .search-big { margin: 20px 0 0; max-width: 620px; }
.paper .search-big input { padding: 11px 14px; font-size: 16px; }
.paper-page-head .lead { margin: 14px 0 0; }

/* game page */
.paper .pgame-head { display: block; padding: 8px 0 0; }
.paper .pgame-head h1 { margin: 0 0 14px; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.25; letter-spacing: -2px; }
.paper .pgame-head .orig { margin: -6px 0 12px; color: var(--muted); }
.paper .pgame-head .hero-intro { color: var(--ink); font-size: 18px; }
.paper .stage { margin: 28px 0 0; padding: 12px 14px 14px; background: var(--green); }
.paper .stage-bar { display: flex; justify-content: space-between; gap: 12px; padding: 0 2px 10px; font-size: 10px; letter-spacing: 1px; color: #bdc9b2; }
.paper .stage .frame { border-radius: 0; }
.paper .stage .pill { border-radius: 0; gap: 18px; padding: 13px 24px; background: var(--yellow); color: var(--green); font: 650 17px var(--font-sans); box-shadow: 4px 4px 0 #0007; }
.paper .stage .play-btn:hover .pill { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #0007; }
.paper .stage .play-bar { padding: 10px 0 0; color: #bdc9b2; }
.paper .stage .btn { background: transparent; border-color: #607067; color: #f5f3ec; }
.paper .stage .btn:hover { border-color: #bdc9b2; }
.paper .pgame-cols { display: grid; gap: 0 56px; margin-top: 36px; }
.paper .prose .standfirst { margin: 0 0 8px; padding: 20px 24px; border-left: 3px solid #d8b537; background: #eae9dc; font-size: 17px; line-height: 1.9; }
.paper .prose h2 { margin: 32px 0 12px; font-size: 21px; }
.paper .prose p { margin: 0 0 1em; font-size: 16px; line-height: 2; }
.paper .prose .controls { font-size: 15px; line-height: 1.9; }
.paper .pgame-side > * { margin: 0 0 22px; }
.paper .pgame-side .lead-aside { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--ink); }
.paper .pgame-side .q-lines { font-size: 21px; }
.paper .fact-file { padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.paper .fact-file .facts { gap: 10px 16px; font-size: 14px; }
.paper .fact-file dt { color: var(--muted); font-size: 12px; }
.paper .ptags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.paper .ptags a { text-decoration: underline; text-underline-offset: 3px; }
.paper .ai-desk { padding: 20px; }
.paper .ai-desk p:not(.eyebrow) { margin: 0; font-size: 13px; line-height: 1.85; }
.paper .paper-more { margin-top: 48px; }
.paper .paper-more .section-heading { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
@media (min-width: 860px) { .paper .pgame-cols { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (min-width: 1000px) {
  .paper .game.is-portrait > .play { top: 24px; margin-top: 8px; width: clamp(328px, calc((100vh - 120px) * 9 / 16 + 28px), 500px); }
  .paper .game.is-portrait .pgame-cols { grid-template-columns: 1fr; }
  .paper .game.is-portrait .pgame-head { padding-top: 0; }
}

/* footer */
.paper .paper-foot { margin-top: 0; padding: 28px 32px calc(32px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.paper .paper-foot .foot-in { justify-content: space-between; align-items: flex-start; max-width: 1116px; }
.paper .pf-about p { margin: 0 0 6px; }
.paper .paper-foot .foot-links { max-width: 340px; justify-content: flex-end; gap: 6px 16px; }
.paper .paper-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.paper .paper-foot .lang-link { padding: 0; border: 0; border-radius: 0; }

@media (max-width: 850px) {
  .paper .wordmark-sub { display: none; }
  .paper-hero { grid-template-columns: 1.2fr 1fr; gap: 24px; }
  .pixie-scene { height: 340px; }
  .pixie-scene img { right: -20px; width: 200px; height: 295px; }
  .scene-note { left: 18px; top: 110px; font-size: 18px; }
  .paper-columns { grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; }
  .paper .lead-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .paper .lead-story .lead-aside { grid-column: 1 / -1; border-left: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
  .prow { grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 640px) {
  .paper .paper-head .top-in { padding: 14px 20px 10px; gap: 10px 12px; }
  .paper .wordmark { gap: 12px; font-size: 24px; }
  .paper .wm-mark { width: 36px; height: 36px; font-size: 28px; }
  .paper .top-in .user-area { margin-left: auto; }
  .paper .top-in > .coin-chip { margin-left: auto; }
  .paper .top-in > .coin-chip:not([hidden]) + .user-area { margin-left: 0; }
  .paper .search { order: 5; width: 100%; }
  .paper .search input { width: 100%; }
  .paper .site-nav .nav-in { gap: 18px; padding: 0 20px; }
  .paper .site-nav a { padding: 10px 0 8px; font-size: 13px; }
  .paper .wrap { padding: 0 20px 36px; }
  .paper .edition-line { flex-wrap: wrap; gap: 8px; font-size: 9px; letter-spacing: 0; }
  .paper .edition-line a { display: none; }
  .paper-hero { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 28px; }
  .paper .hero-copy h1 { font-size: 32px; letter-spacing: -1.5px; }
  .paper .hero-intro { font-size: 14px; }
  .paper .hero-actions { flex-wrap: wrap; gap: 16px; }
  .pixie-scene { height: 260px; }
  .pixie-scene img { right: 16px; bottom: -52px; height: 285px; }
  .scene-note { top: 100px; left: 25px; font-size: 23px; }
  .scene-orbit { right: 0; top: 40px; width: 220px; height: 220px; }
  .scene-caption { font-size: 8px; }
  .paper .editorial-rule { font-size: 11px; }
  .paper .editorial-rule span:last-child { font-size: 9px; letter-spacing: 0; }
  .paper .lead-story { grid-template-columns: 1fr; gap: 18px; padding: 24px 0; }
  .paper .lead-main h2 { font-size: 25px; }
  .paper .q-lines { font-size: 21px; }
  .paper-columns { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .prow { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
  .prow-title { font-size: 18px; margin-bottom: 4px; }
  .prow-hook { font-size: 14px; }
  .prow-sum { display: none; }
  .paper .archive-link { margin-top: 20px; }
  .paper .pgame-head h1 { font-size: 34px; letter-spacing: -1.5px; }
  .paper .pgame-head .hero-intro { font-size: 15px; }
  .paper .stage { margin: 20px -20px 0; padding: 10px 0 12px; }
  .paper .stage-bar { padding: 0 20px 8px; }
  .paper .stage .play-bar { padding: 10px 20px 0; }
  .paper .stage .pill { font-size: 15px; padding: 11px 20px; }
  .paper .paper-foot { padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); }
  .paper .paper-foot .foot-in { flex-direction: column; }
  .paper .paper-foot .foot-links { justify-content: flex-start; max-width: 100%; }
}

/* creators: landing steps, rules, studio list, join form, studio page; legal pages */
.paper .cr-steps { list-style: none; margin: 0; padding: 0; }
.paper .cr-steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.paper .cr-n { font-size: 22px; color: #806820; }
.paper .cr-steps h3 { margin: 0 0 6px; font-size: 19px; }
.paper .cr-steps p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.paper .cr-sub { margin-top: 40px; }
.paper .cr-rules { margin: 0; padding-left: 1.2em; font-size: 15px; line-height: 1.9; }
.paper .cr-rules li { padding: 6px 0; }
.paper .cr-more { margin: 18px 0 0; }
.paper .cr-studios { list-style: none; margin: 0; padding: 0; }
.paper .cr-studios li { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.paper .cr-studios .px { font-size: 10px; color: var(--muted); }
.paper .studio-form { max-width: 640px; margin: 28px 0 0; }
.paper .studio-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.paper .studio-form legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.paper .studio-form .help { margin: -8px 0 0; }
.paper .studio-form .check { font-size: 14px; }
.paper .studio-form .check a { text-decoration: underline; text-underline-offset: 3px; }
.paper .studio-bio { max-width: 640px; margin: 10px 0 0; font-size: 16px; line-height: 1.9; white-space: pre-wrap; color: var(--muted); }
.paper .studio-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; }
.paper .paper-list .section-heading { margin-top: 32px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.paper .legal { max-width: 760px; margin: 0 auto; padding-top: 24px; }
.paper .legal h1 { font-size: clamp(30px, 4vw, 40px); }
.paper .legal h2 { margin: 32px 0 10px; font-size: 21px; }
.paper .legal p, .paper .legal li { font-size: 16px; line-height: 1.95; }
.paper .c-creator { background: var(--green); color: #f5f3ec; }

/* 30-player.css */
/* Player module: login, account pages, preset avatars, game page panels, favorite button. */

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

/* preset avatars (colours mirror workers/site/modules/player/avatars.mjs) */
.pl-avatar { --s: 40px; display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; background: #2d3550; color: #fff; font-weight: 800; font-size: calc(var(--s) * .45); }
[data-avatar="sun"] { background: #f59e0b !important; color: #2b1a00; }
[data-avatar="moon"] { background: #6366f1 !important; }
[data-avatar="leaf"] { background: #22c55e !important; color: #052e13; }
[data-avatar="wave"] { background: #0ea5e9 !important; color: #04233a; }
[data-avatar="flame"] { background: #ef4444 !important; }
[data-avatar="star"] { background: #eab308 !important; color: #2b2100; }
[data-avatar="heart"] { background: #ec4899 !important; }
[data-avatar="bolt"] { background: #a855f7 !important; }
[data-avatar="drop"] { background: #06b6d4 !important; color: #032a31; }
[data-avatar="cube"] { background: #64748b !important; }
[data-avatar="ghost"] { background: #94a3b8 !important; color: #111827; }
[data-avatar="crown"] { background: #d97706 !important; color: #261400; }

/* login */
.login-wrap { max-width: 560px; margin: 0 auto; }
.login-box h2 { margin-top: 0; }
.oauth-list { display: grid; gap: 10px; }
.oauth-list form { margin: 0; }
.oauth-btn { width: 100%; justify-content: center; }
.dev-login { border-style: dashed; }
body.busy { cursor: progress; }

/* account */
.account-tabs { margin-top: 4px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.avatar-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-pick legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.av-opt { position: relative; cursor: pointer; border-radius: 50%; }
.av-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.av-opt .pl-avatar { outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.av-opt input:checked + .pl-avatar { outline-color: var(--play); }
.av-opt input:focus-visible + .pl-avatar { outline-color: var(--accent); }
.ident-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ident-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form { display: inline; margin: 0; }
.danger-zone { border-color: #4a2330; }
pre.code { white-space: pre-wrap; background: #0b0d12; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #c2475b; }
#profile-form .field > .help, #board-form .field > .help, #ach-form .field > .help { font-weight: 400; }

/* achievements (account page + game panel) */
.ach-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: #11141b; opacity: .72; }
.ach.unlocked { opacity: 1; background: #13201c; }
.ach-icon { font-size: 1.1rem; line-height: 1.4; color: #f3cf7a; }
.ach-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ach-body .muted { font-size: .88rem; }
.ach-meta { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.ach-count { font-weight: 400; font-size: .95rem; }

/* game page: leaderboard panel */
.player-panels:empty { display: none; }
.player-panels .panel { margin: 0; }
.lb-panel h2, .ach-panel h2 { margin: 0 0 10px; }
.lb-select { margin: 0 0 10px; width: 100%; }
.seg { display: inline-flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.seg .btn[aria-pressed="true"] { border-color: var(--play); color: var(--text); background: #12392b; }
.lb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; counter-reset: none; }
.lb-list li { display: grid; grid-template-columns: 2.2em 14px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; }
.lb-list li:nth-child(odd) { background: #11141b; }
.lb-list li.me { outline: 1px solid var(--play); }
.lb-rank { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.lb-dot { width: 12px; height: 12px; border-radius: 50%; background: #2d3550; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-value { font-variant-numeric: tabular-nums; font-weight: 700; }
.lb-mine { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }

/* favorite button in the play bar */
.fav-btn { display: inline-flex; align-items: center; gap: 6px; }
.fav-heart { color: var(--muted); font-size: 1.05rem; line-height: 1; transition: color .15s, transform .15s; }
.fav-btn[aria-pressed="true"] .fav-heart { color: #ff5c8a; transform: scale(1.1); }
@media (max-width: 520px) { .fav-label { display: none; } }

/* 40-dev-admin.css */
/* Game management (/dev/) and admin console (/admin/) pages, and the Report button on game pages. */
.dev-main, .admin-main { min-width: 0; }
.dev-cards { display: grid; gap: 0 14px; }
@media (min-width: 900px) { .dev-cards { grid-template-columns: 1fr 1fr; } }
.dev-cards > .panel { margin: 14px 0; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plain-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dev-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
.dev-facts dt { color: var(--muted); }
.dev-facts dd { margin: 0; overflow-wrap: anywhere; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 16px; margin: 0; display: grid; gap: 14px; }
legend { padding: 0 6px; font-weight: 700; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
[aria-invalid="true"] { border-color: #c4475a !important; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 16px; }
.filters input:not([type="date"]) { min-width: 200px; }
.btn-cell { white-space: nowrap; }
.btn-cell .btn + .btn { margin-left: 6px; }
a.stat { color: inherit; }
a.stat:hover { text-decoration: none; border-color: #3b4456; }
.table.audit .detail { max-width: 360px; overflow-wrap: anywhere; color: var(--muted); }
.file-list { max-height: 420px; overflow-y: auto; }
.problems { margin: 0; padding-left: 18px; max-height: 50vh; overflow-y: auto; }
input.secret { width: 100%; }

/* media */
.media-thumb { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #0b0d12; }
.media-thumb.cover { width: 360px; aspect-ratio: 4 / 3; object-fit: cover; }
.media-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.media-grid figure { margin: 0; display: grid; gap: 6px; }
.media-grid .media-thumb { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

/* build upload */
.upload-status { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.upload-status[hidden] { display: none; }
.upload-status progress { width: 220px; accent-color: var(--play); }

/* analytics chart: dark categorical slots 1 (blue) and 2 (orange), validated against the panel surface */
.chart { margin: 0; --series-1: #3987e5; --series-2: #d95926; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: #3b4456; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .val { fill: var(--text); font-size: 11px; font-weight: 600; }
.chart .s1 { fill: var(--series-1); }
.chart .s2 { fill: var(--series-2); }
.chart .hit { fill: transparent; }
.chart .day:hover .hit { fill: #ffffff0d; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: .88rem; margin-bottom: 6px; }
.chart-legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 12px; }
.chart-legend .key:first-child { margin-left: 0; }
.chart-legend .key.s1 { background: var(--series-1); }
.chart-legend .key.s2 { background: var(--series-2); }
.range-tabs { margin-top: 0; }

/* Report button + dialog on game pages */
.report-btn { color: var(--muted); }
.report-form .report-reasons { display: grid; gap: 6px; margin: 8px 0 12px; }
.report-form textarea { min-height: 70px; }

/* 50-money-ads.css */
/* Money + ads: coin chip in the header, wallet/shop pages, purchase dialog, ad slots and ad overlay. */

/* coin icon + header chip */
.coin-icon { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -0.12em; margin-right: .35em;
  background: radial-gradient(circle at 35% 30%, #fff6c4 0 18%, #f6c945 19% 58%, #c98f12 59%); box-shadow: inset 0 0 0 1px #8a5d07; }
.coin-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--panel); color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.coin-chip:hover { text-decoration: none; border-color: #3b4456; }
.coin-chip.neg { color: #ffb4bf; }
.coin-chip[hidden] { display: none; }

/* wallet + shop */
.coin-stat b::before { content: ''; display: inline-block; width: .8em; height: .8em; margin-right: .3em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c4 0 18%, #f6c945 19% 58%, #c98f12 59%); }
.money-history td.neg { color: #ffb4bf; }
.money-history td.pos { color: #7ee2b8; }
.coin-packs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); margin: 14px 0; }
.coin-pack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; }
.coin-amount { font-size: 1.3rem; }
.coin-pack .btn { margin-top: auto; width: 100%; }
.mock-checkout { max-width: 460px; }

/* developer items tab */
#items-table td { vertical-align: middle; }
#items-table input:not([type="checkbox"]) { width: 100%; min-width: 7em; }
#items-table input[name="price"] { max-width: 9em; }
#purchases-flag { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* purchase dialog */
.buy-dialog .buy-from { margin: 0 0 4px; font-size: .88rem; }
.buy-dialog .buy-item { margin: 0; font-size: 1.1rem; }
.buy-dialog .buy-type { margin: 2px 0 10px; font-size: .88rem; }
.buy-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0; }
.buy-facts dt { color: var(--muted); }
.buy-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.buy-missing a { white-space: nowrap; }
.wallet-big { font-size: 1.6rem; font-weight: 800; margin: 6px 0; }

/* ad slots: outside the play area, labelled, never covering the game */
.ad-section[hidden], .ad-slot[hidden] { display: none; }
.ad-slot { position: relative; margin: 12px 0; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r); min-height: 60px; }
.ad-label { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ad-house-link { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--text); font-weight: 600; }
.ad-house-link img { width: 120px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.ad-side .ad-house-link { flex-direction: column; align-items: flex-start; }
.ad-side .ad-house-link img { width: 100%; }

/* ad break overlay (platform-owned, top layer) */
.gp-ad-overlay { width: min(92vw, 420px); }
.gp-ad-overlay .ad-label { margin-left: auto; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; }
.gp-ad-overlay .gp-modal-head h2 { margin-right: 10px; }
.ad-house { text-align: center; }
.ad-house img, .ad-house-ph { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #151925; }
.ad-house-ph { display: grid; place-items: center; font-weight: 800; }
.ad-house p { margin: 6px 0; }
.ad-sum { font-size: .9rem; }
.ad-count { text-align: center; font-weight: 700; min-height: 1.5em; margin: 10px 0 0; font-variant-numeric: tabular-nums; }

/* 60-social.css */
/* Social: like / dislike in the play bar, comment thread on game pages, admin comment table.
   Dark theme first; .paper overrides at the end. */

/* votes */
.vote-group { display: inline-flex; gap: 6px; }
.vote-btn { gap: 6px; }
.vote-btn .v-ico { display: inline-flex; }
.vote-btn .v-n { font-variant-numeric: tabular-nums; font-weight: 700; }
.vote-btn .v-n:empty { display: none; }
.vote-btn[aria-pressed="true"] { border-color: var(--play); color: var(--play); }
@media (max-width: 640px) { .vote-btn .v-label { display: none; } }

/* comments */
.comments { margin-top: 40px; scroll-margin-top: 80px; }
.comments .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.comments .section-heading h2 { margin: 0; }
.c-count { color: var(--muted); font-size: .85rem; }
.c-form textarea { display: block; width: 100%; min-height: 84px; }
.c-reply-box .c-form textarea { min-height: 60px; }
.c-form-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.c-chars { margin-right: auto; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.c-chars.over { color: #ff8a8a; font-weight: 700; }
.c-signin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r); }
.c-signin p, .c-note { margin: 0; color: var(--muted); font-size: .9rem; }
.c-list, .c-replies { list-style: none; margin: 0; padding: 0; }
.c-list { margin-top: 18px; }
.c-item { padding: 14px 0; border-top: 1px solid var(--line); }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .9rem; }
.c-avatar { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #2d3550; color: #fff; font-size: .8rem; font-weight: 800; }
.c-name { font-weight: 650; }
.c-name.gone { color: var(--muted); font-weight: 500; }
.c-staff { padding: 0 7px; border-radius: 99px; background: var(--play); color: #06231e; font-size: .72rem; font-weight: 800; }
.c-you { padding: 0 6px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .72rem; }
.c-time { color: var(--muted); font-size: .8rem; }
.c-body { margin: 6px 0 4px 36px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-actions { display: flex; gap: 16px; margin-left: 36px; font-size: .85rem; }
.c-actions .link-btn, .c-more-replies { color: var(--muted); }
.c-actions .link-btn:hover, .c-more-replies:hover { color: var(--text); }
.c-replies { margin: 6px 0 0 36px; padding-left: 14px; border-left: 2px solid var(--line); }
.c-replies:empty { display: none; }
.c-replies .c-item { padding: 10px 0; border-top: 0; }
.c-more-replies { margin: 6px 0 0 50px; font-size: .85rem; }
.c-reply-box { margin: 10px 0 4px 36px; }
.c-removed { margin: 0; color: var(--muted); font-style: italic; }
.c-empty { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.c-foot { margin-top: 14px; }
.c-reasons { display: grid; gap: 10px; }
.c-admin-body { max-width: 46ch; white-space: pre-wrap; overflow-wrap: anywhere; }

/* paper theme */
.paper .comments { margin-top: 48px; }
.paper .comments .section-heading { padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.paper .comments .section-heading h2 { font-size: 25px; }
.paper .c-count { font-size: 11px; letter-spacing: 1px; }
.paper .comments .c-form textarea { padding: 12px 14px; font-size: 15px; line-height: 1.8; }
.paper .c-list { margin-top: 0; }
.paper .c-item:first-child { border-top: 0; }
.paper .c-avatar { border-radius: 0; background: #e8ebdd; color: var(--ink); }
.paper .c-staff { border-radius: 0; background: var(--yellow); color: var(--green); }
.paper .c-you { border-radius: 0; }
.paper .c-body { font-size: 15px; line-height: 1.85; }
.paper .c-signin { border-radius: 0; border-style: solid; background: var(--panel); }
.paper .c-replies { border-left-color: #d8b537; }
.paper .c-chars.over { color: #b8332d; }
.paper .stage .vote-btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--green); }
.paper .vote-btn[aria-pressed="true"] { border-color: var(--ink); }

