@charset "utf-8";
:root {
  --bg: #fbfaf7; --ink: #1d2433; --muted: #5d6779; --line: #e8e4dc; --card: #ffffff;
  --gold: #f5a524; --gold2: #ffd35a; --blue: #2f80ed;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 64px); background: #fbfaf7d9; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--gold); font-weight: 800; }
.logo { display: block; width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.nav nav a { margin-left: 22px; color: var(--muted); font-weight: 600; }
.nav nav a:hover { color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  padding: clamp(36px, 7vw, 90px) clamp(18px, 5vw, 64px) 40px; max-width: 1280px; margin: 0 auto; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff3d6; color: #9a6400;
  font-weight: 700; font-size: 14px; border: 1px solid #ffe2a1; }
h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.05; margin: 18px 0; letter-spacing: -1.5px; }
.hl { background: linear-gradient(transparent 62%, #ffd96a 62%); }
.hero p { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { padding: 14px 26px; border-radius: 14px; font-weight: 700; font-size: 16px; transition: transform .15s, box-shadow .15s; }
.btn.primary { background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #2b1c00; box-shadow: 0 10px 24px #f5a52455; }
.btn.ghost { background: #fff; border: 1px solid var(--line); }
.btn:hover { transform: translateY(-2px); }
.hero-art { position: relative; aspect-ratio: 16 / 10; }
.hero-art img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 22px;
  box-shadow: 0 30px 60px #1d243333; transform: rotate(-2deg); border: 6px solid #fff; }
.blob { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .7; }
.b1 { width: 55%; height: 55%; background: #ffd96a; top: -8%; right: -6%; }
.b2 { width: 45%; height: 45%; background: #a8d8ff; bottom: -10%; left: -6%; }
.b3 { width: 30%; height: 30%; background: #c9f2df; bottom: 10%; right: 6%; }

/* Sections */
.section { padding: 40px clamp(18px, 5vw, 64px); max-width: 1280px; margin: 0 auto; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h2 { font-size: 32px; margin: 0; letter-spacing: -.5px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px;
  margin-left: 6px; font: 600 14px inherit; font-family: inherit; color: var(--muted); cursor: pointer; }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Daily play and cross-game progress */
.passport { max-width: 1280px; margin: 4px auto 0; padding: 28px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #fff8e8, #f1f8ff 55%, #f5f2ff); }
.passport-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.passport-head h2 { margin: 3px 0 4px; }
.passport-head p { margin: 0; color: var(--muted); line-height: 1.5; }
.eyebrow { color: #87600a; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.passport-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.passport-stats div { min-width: 105px; padding: 8px 12px; border: 1px solid #e8e4dc; border-radius: 12px; background: #ffffffc9; }
.passport-stats b, .passport-stats span { display: block; }
.passport-stats b { font-size: 18px; }
.passport-stats span { color: var(--muted); font-size: 11px; }
.passport-stats .storage-note { flex-basis: 100%; color: #9a6400; font-size: 11px; }
.quests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quest { min-width: 0; display: flex; flex-direction: column; padding: 13px 14px; border: 1px solid #e5e1d9; border-radius: 14px; background: #ffffffd9;
  transition: transform .16s, box-shadow .16s, border-color .16s; }
.quest:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 22px #1d243314; }
.quest.done { border-color: #93d4aa; background: #f3fff6; }
.quest-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.quest-top b { color: #996200; font-size: 9px; letter-spacing: .5px; white-space: nowrap; }
.quest.done .quest-top b { color: #15803d; }
.quest strong { display: block; margin-top: 10px; font-size: 16px; }
.quest p { min-height: 38px; margin: 4px 0 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.quest-career { display: block; margin-top: auto; margin-bottom: 10px; color: #8a93a3; font-size: 10px; }
.quest-link { color: #805500; font-size: 12px; font-weight: 800; }
.quest.done .quest-link { color: #15803d; }

/* Game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.game { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
a.game:hover { transform: translateY(-6px); box-shadow: 0 22px 40px #1d24331f; border-color: var(--accent); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--accent) 18%, #fff); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; font-weight: 800;
  color: color-mix(in srgb, var(--accent) 60%, #fff);
  background: repeating-linear-gradient(45deg, transparent 0 14px, #ffffff70 14px 28px); }
.badge { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: #fff; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.badge.new { background: var(--accent); color: #2b1c00; }
.play { position: absolute; right: 14px; bottom: 14px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink); font-size: 20px; box-shadow: 0 8px 20px #0003; transition: transform .18s; }
a.game:hover .play { transform: scale(1.12); background: var(--accent); }
.body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.body h3 { margin: 0 0 4px; font-size: 22px; }
.tag { margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--accent); font-weight: 700; filter: brightness(.85); }
.desc { margin: 0 0 14px; color: var(--muted); line-height: 1.55; font-size: 15px; height: calc(5 * 1.55em);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.chips span { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: #f2efe8; color: var(--muted); margin: 0 6px 6px 0; }
.chips { height: 30px; overflow: hidden; }
.controls { margin: 8px 0 0; font-size: 13px; color: #8a93a3; line-height: 1.45; min-height: calc(2 * 1.45em);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.game.soon { opacity: .75; }
.game.soon .body h3 { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.about p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.about-cards { display: grid; gap: 12px; }
.mini { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.mini span { grid-row: span 2; font-size: 28px; }
.mini small { color: var(--muted); }

.footer { text-align: center; color: #9aa2b1; padding: 40px 20px 50px; font-size: 14px; }

@media (max-width: 820px) {
  .hero, .about { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .passport-head { align-items: start; flex-direction: column; }
  .quests { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .quest { scroll-snap-align: start; }
}
@media (max-width: 520px) { .quests { grid-auto-columns: 82%; } }

/* Games dropdown */
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav > a, .menu-btn { margin: 0; color: var(--muted); font-weight: 600; }
.nav nav > a.on, .menu-btn.on { color: var(--ink); }
.menu { position: relative; }
.menu-btn { border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; padding: 6px 0; }
.menu-btn:hover { color: var(--ink); }
.menu-btn::after { content: " \25BE"; font-size: 11px; }
.menu-panel { position: absolute; right: -12px; top: calc(100% + 8px); width: 340px; padding: 8px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 50px #1d243326;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; }
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.menu:hover .menu-panel, .menu:focus-within .menu-panel, .menu.open .menu-panel { opacity: 1; visibility: visible; transform: none; }
.menu-panel a { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 11px; margin: 0; }
.menu-panel a:hover, .menu-panel a:focus { background: #f6f3ec; outline: none; }
.menu-panel b, .menu-panel small { display: block; }
.menu-panel b { color: var(--ink); font-size: 14px; }
.menu-panel small { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 2px; }
.menu-all { flex-direction: column; align-items: flex-start !important; gap: 0 !important; background: #fff8e8; margin-bottom: 4px !important; }
.menu-game img { width: 54px; height: 34px; object-fit: cover; border-radius: 7px; border: 2px solid var(--accent); flex: none; }

/* Card actions */
.game { position: relative; }
.game .card-link { position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; position: relative; z-index: 2; flex-wrap: wrap; }
.card-actions a { padding: 8px 13px; border-radius: 10px; font-weight: 700; font-size: 13px; border: 1px solid var(--line); background: #fff; }
.card-actions a.go { background: var(--accent); border-color: var(--accent); color: #fff; }
.card-actions a:hover { border-color: var(--accent); }
.game:not(.soon):hover { transform: translateY(-6px); box-shadow: 0 22px 40px #1d24331f; border-color: var(--accent); }
.game:not(.soon):hover .play { transform: scale(1.12); background: var(--accent); }
.more-link { display: inline-block; margin-top: 6px; font-weight: 800; color: #805500; }

/* Content pages */
.page { max-width: 1080px; margin: 0 auto; padding: 44px clamp(18px, 5vw, 48px) 20px; }
.page-head { margin-bottom: 30px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 8px 0 12px; }
.page-head p, .prose p, .prose li { color: var(--muted); font-size: 17px; line-height: 1.7; }
.page-head p { max-width: 720px; margin: 0; }
.prose h2 { margin: 34px 0 8px; font-size: 26px; }
.prose ul { padding-left: 20px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.toc a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; }
.toc a:hover { border-color: var(--gold); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.game-doc { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.game-doc img { width: 100%; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 14px 30px #1d24331f; }
.game-doc h2 { margin: 0 0 2px; }
.game-doc .tag { margin-bottom: 8px; }
.game-doc p, .game-doc li { color: var(--muted); line-height: 1.65; }
.game-doc h3 { margin: 16px 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); }
.game-doc ol { padding-left: 20px; margin: 4px 0; }
.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn.small { padding: 10px 18px; font-size: 14px; border-radius: 12px; }
.cat { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; background: color-mix(in srgb, var(--accent) 16%, #fff); color: color-mix(in srgb, var(--accent) 70%, #000); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.principles .panel span { font-size: 28px; }
.principles .panel b { display: block; margin: 8px 0 4px; }
.principles .panel p { margin: 0; font-size: 15px; }

/* Game detail page */
.game-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 34px; align-items: center; }
.game-hero img { width: 100%; border-radius: 20px; border: 6px solid #fff; box-shadow: 0 24px 50px #1d24332b; }
.game-hero h1 { margin: 10px 0 6px; }
.game-hero .tag { font-size: 18px; }
.stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.stats-row div { padding: 8px 13px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.stats-row b, .stats-row span { display: block; }
.stats-row span { font-size: 11px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; margin-top: 34px; align-items: start; }
.panel h2 { font-size: 22px; margin-bottom: 4px; }
.panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.board { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #8a93a3; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.board td { padding: 9px 8px; border-bottom: 1px solid #f1eee7; }
.board td:first-child { width: 44px; font-weight: 800; color: var(--muted); }
.board td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.board th.num { text-align: right; }
.board td.when { color: #8a93a3; font-size: 12px; white-space: nowrap; }
.board td.medal { font-size: 20px; }
.board tr.me td { background: #fff8e2; }
.form { display: grid; gap: 10px; }
.form label { font-size: 13px; font-weight: 700; color: var(--muted); }
.form input[type=text], .form textarea { width: 100%; font: inherit; font-size: 15px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: #fdfcf9; color: var(--ink); }
.form textarea { min-height: 92px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid #f5a52466; border-color: var(--gold); }
.form .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.form button, .ghost-btn { font: inherit; font-weight: 800; padding: 11px 18px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--gold2), var(--gold)); color: #2b1c00; }
.form button:disabled { opacity: .5; cursor: not-allowed; }
.ghost-btn { background: #fff; border: 1px solid var(--line); color: var(--ink); width: 100%; margin-top: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { font-size: 13px; min-height: 18px; color: var(--muted); }
.msg.ok { color: #15803d; } .msg.err { color: #c2410c; }
.notice { font-size: 13px; padding: 9px 12px; border-radius: 10px; background: #fff6df; color: #8a5a00; margin-bottom: 12px; }
.comments { display: grid; gap: 12px; margin-top: 18px; }
.comment { display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px; }
.comment .meta { font-size: 13px; color: #8a93a3; }
.comment .meta b { color: var(--ink); margin-right: 6px; }
.comment p { margin: 3px 0 0; line-height: 1.55; color: #3b4456; overflow-wrap: anywhere; white-space: pre-line; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0; }

@media (max-width: 820px) {
  .game-doc, .game-hero, .two-col { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .game-doc img { max-width: 420px; }
}
@media (max-width: 560px) {
  .nav { padding: 12px 16px; }
  .nav nav { gap: 14px; font-size: 15px; }
  .brand { font-size: 17px; }
  .menu-panel { position: fixed; left: 10px; right: 10px; top: 62px; width: auto; }
  .filters { width: 100%; overflow-x: auto; white-space: nowrap; }
  .filters button:first-child { margin-left: 0; }
  .board td.when { display: none; }
  .panel { padding: 18px 16px; }
}
.comments-panel { margin-top: 24px; }
.comments-panel .form { max-width: 720px; }
@media (min-width: 900px) { .comments { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
