:root {
  --text: #1f1d2b;
  --muted: #6b6778;
  --line: #e7e4ee;
  --paper: #f4f3f6;
  --white: #fff;
  --cta: #d62a5e;
  --cta-shadow: #8f1a3d;
  --sun: #ffc542;
  --rose: #ff8db0;
  --sky: #2f5fb8;
  --leaf: #4aa63a;
  --glass: rgba(10, 14, 35, .78);
  --veil: rgba(255, 255, 255, .25);
  --radius: 12px;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Silkscreen", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--sky); }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: 44px; }
h2 { font-size: 28px; margin-top: 48px; }
h3 { font-size: 18px; font-weight: 600; margin-top: 24px; }
p { margin: 0 0 16px; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.bar-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 20px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--sky); color: var(--white); font-family: var(--sans); font-size: 18px; line-height: 1; }
.bar-sep { color: var(--muted); }
.bar-page { font-size: 15px; font-weight: 600; white-space: nowrap; }
.bar-tag { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-nav { margin-left: auto; display: flex; gap: 16px; }
.bar-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.bar-nav a:hover { color: var(--cta); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--cta); color: var(--cta); }
.chip-msg { font-size: 13px; color: var(--muted); }

/* ---------- game stage wrapper (the game itself is styled in its tool.css) ---------- */
.stage { padding: 0; }

/* ---------- under the stage ---------- */
.under { padding-top: 16px; }
.under-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 32px; }
.under h1 { margin-bottom: 12px; }
.intro { font-size: 18px; color: var(--muted); max-width: 64ch; }
.unofficial { font-size: 14px; color: var(--muted); max-width: 70ch; }
.fold { background: var(--paper); border-radius: 14px; margin: 24px 0; }
.fold summary { list-style: none; cursor: pointer; padding: 18px 24px; position: relative; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "⌄"; position: absolute; right: 24px; top: 16px; font-size: 20px; color: var(--muted); transition: transform .2s; }
.fold[open] summary::after { transform: rotate(180deg); }
.fold-h { display: block; font-size: 18px; font-weight: 600; }
.fold-s { display: block; font-size: 14px; color: var(--muted); }
.fold-body { padding: 0 24px 24px; }
.prose > * { max-width: 72ch; }
.prose > table { max-width: none; }
.prose h2 { font-size: 24px; margin-top: 32px; }
.prose ol, .prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; margin: 0 0 24px; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.page-prose { padding-top: 40px; padding-bottom: 40px; }
.updated { color: var(--muted); font-size: 14px; }
.ad-slot { margin: 16px 0; }

/* ---------- home ---------- */
.paper { padding-top: 40px; }
.paper-top { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: end; padding-bottom: 16px; border-bottom: 2px solid var(--text); }
.paper-title h1 { font-size: 52px; margin: 0; }
.dateline { font-family: var(--serif); font-size: 20px; margin: 6px 0 0; color: var(--muted); }
.paper-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.widget { font-size: 15px; }
.w-h { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.w-q { margin: 0 0 10px; font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.w-t { margin: 0; color: var(--muted); }
.w-btn { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--paper); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.w-btn:hover { background: var(--line); color: var(--text); }
.shelf-h { margin: 40px 0 16px; font-size: 26px; }
.shelf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.card:hover { color: var(--text); }
.card-cover { display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--paper); }
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-flip img { rotate: x 180deg; }
.card-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--white); font-family: var(--display); font-size: 15px; }
.card-icon-rocket { background: var(--sky); }
.card-icon-mountain { background: var(--leaf); }
.card-icon-opposite { background: var(--cta); }
.card-text { min-width: 0; line-height: 1.3; }
.card-text strong { display: block; font-size: 16px; font-weight: 600; }
.card-text span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-suggest { align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 180px; padding: 20px; border-radius: 10px; background: var(--paper); }
.card-suggest span { font-size: 14px; color: var(--muted); }
.card-suggest .suggest-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); font-size: 22px; color: var(--text); }
.home-prose { padding-top: 24px; }
.faq { padding-bottom: 32px; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.faq-item { padding: 14px 0; border-top: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 6px; font-size: 16px; }
.faq-item p { margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
.foot { background: var(--paper); margin-top: 64px; padding: 40px 0 28px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot-h { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.foot-cols a { display: block; margin-bottom: 6px; color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: var(--text); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.foot-base p { margin: 0; max-width: 56ch; font-size: 13px; color: var(--muted); text-align: right; }

@media (prefers-reduced-motion: reduce) {
}
@media (max-width: 820px) {
  .paper-top, .paper-row, .faq-list { grid-template-columns: 1fr; }
  .bar-tag { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1, .paper-title h1 { font-size: 34px; }
  .stage { padding: 0; }
  .bar-nav { display: none; }
  .bar-row { gap: 8px; }
  .shelf-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-base p { text-align: left; }
}

