/* Game Rabbit: navy #000d22 and rabbit red #802826 from the logo, on paper. */
:root {
  --paper: #f5f1ea;
  --paper-2: #ece6db;
  --ink: #000d22;
  --ink-soft: #3d4658;
  --muted: #6c7385;
  --red: #802826;
  --line: rgba(0, 13, 34, 0.14);
  --max: 1040px;
  --font: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --zh: "Noto Sans TC", "PingFang TC", "Heiti TC", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 13, 34, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font), var(--zh);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-zh { font-family: var(--font), var(--zh); line-height: 1.85; letter-spacing: 0.02em; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h2 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.1; font-weight: 600; }
p { margin: 0 0 1em; }

/* ── Top bar ───────────────────────────────── */
.top {
  max-width: var(--max); margin: 0 auto; padding: 22px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { height: 34px; width: auto; }
.brand__word { height: 15px; width: auto; }
.lang { display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button {
  font: 500 0.85rem var(--font), var(--zh); padding: 5px 14px; cursor: pointer;
  background: transparent; color: var(--ink); border: 0;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ── Intro ─────────────────────────────────── */
.intro {
  max-width: var(--max); margin: 0 auto; padding: clamp(24px, 6vw, 64px) 16px clamp(40px, 7vw, 80px);
  display: grid; grid-template-columns: 200px 1fr; gap: 20px 44px; align-items: center;
}
.intro__mark { width: 100%; transform: rotate(-4deg); }
.intro__text p { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--ink-soft); max-width: 40ch; }
.intro__text p:first-child { font-size: clamp(1.5rem, 3.4vw, 2.1rem); color: var(--ink); font-weight: 500; line-height: 1.3; max-width: 26ch; }
.toc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.toc__label { font-family: var(--hand); font-size: 1.45rem; color: var(--red); margin-right: 6px; }
.is-zh .toc__label { font-family: var(--zh); font-size: 0.95rem; }
.toc a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500;
  padding: 5px 14px 5px 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  transition: transform .15s, border-color .15s;
}
.toc a:hover { transform: translateY(-2px); border-color: var(--ink); }
.toc img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; }

/* ── Game entries ──────────────────────────── */
.game {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 64px) 16px;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start;
  border-top: 1.5px dashed var(--line);
  scroll-margin-top: 12px;
}
.game__media { order: 2; }

.polaroid {
  position: relative; display: block; background: #fff; padding: 10px 10px 12px;
  box-shadow: 0 1px 2px rgba(0,13,34,.08), 0 10px 30px -12px rgba(0,13,34,.35);
  transform: rotate(-1.2deg); transition: transform .25s;
}
.polaroid:hover { transform: rotate(0) translateY(-3px); }
.polaroid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--paper-2); }
.tape {
  position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; z-index: 2;
  background: rgba(214, 196, 160, .6); transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.sticker {
  position: absolute; right: -10px; bottom: 18px; z-index: 2;
  background: var(--red); color: #fff; font: 700 1.25rem/1 var(--hand); padding: 6px 14px 7px;
  transform: rotate(4deg); box-shadow: 0 3px 8px rgba(0,0,0,.18);
}
.is-zh .sticker { font: 700 0.9rem/1.2 var(--zh); }
.caption { font-size: .9rem; color: var(--muted); margin: 14px 4px 0; }
.extra { margin: 22px 18% 0 0; }
.extra img { border: 6px solid #fff; box-shadow: 0 8px 22px -12px rgba(0,13,34,.4); transform: rotate(1.5deg); }
.extra figcaption { font: 600 1.3rem var(--hand); color: var(--ink-soft); margin-top: 6px; }
.is-zh .extra figcaption { font: 400 .88rem var(--zh); color: var(--muted); }

.game__head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.game__icon { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 4px 12px -4px rgba(0,13,34,.35); }
.game__sub { margin: 4px 0 0; color: var(--muted); font-size: .98rem; }
.game__facts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 1.2em; }
.game__facts span {
  font-size: .82rem; font-weight: 500; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.6); color: var(--ink-soft);
}
.game__facts .note {
  border: 0; background: none; padding: 0 4px 0 0; color: var(--red);
  font: 700 1.3rem/1 var(--hand);
}
.is-zh .game__facts .note { font: 500 .85rem var(--zh); }
.game__body > p { color: var(--ink-soft); }

.game__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.4em; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-weight: 500; font-size: .95rem; padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--play { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn--play:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-1px); }

.credit { margin: 1.2em 0 0; font-size: .8rem; color: var(--muted); }
.credit a { text-decoration-color: var(--line); }

/* ── Footer ────────────────────────────────── */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 40px 16px 56px;
  border-top: 1.5px dashed var(--line);
  display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .92rem;
}
.foot p { margin: 0; }
.foot__mark { height: 22px; width: auto; }

/* ── Small screens ─────────────────────────── */
@media (max-width: 780px) {
  .intro { grid-template-columns: 1fr; }
  .intro__mark { width: 120px; }
  .game { grid-template-columns: 1fr; }
  .game__media { order: 0; }
  .extra { margin-right: 10%; }
}
@media (max-width: 420px) {
  .brand__word { display: none; }
  .sticker { right: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}
