/* แท็บแปล (TabPlae) — site styles. A+B style: tabs + card from the logo, pixel-game scene,
   raised 3D buttons/frames (highlight on top, hard shadow below, press = sink 4px). */
:root {
  --navy-950: #05071A;
  --navy-900: #0C1030;
  --navy-850: #10143A;
  --navy-800: #141A48;
  --navy-750: #171C4A;
  --navy-700: #1C2254;
  --navy-650: #151A45;
  --navy-600: #1B2150;
  --navy-500: #232A66;
  --navy-400: #2C3372;
  --indigo: #2E2A8C;
  --indigo-2: #3C37A8;
  --indigo-3: #4A4F9A;
  --lav: #C9CDEB;
  --lav-2: #A9AFD6;
  --lav-3: #8C92C4;
  --paper: #F2F3FA;
  --card-lo: #EEEFFA;
  --card-edge: #D3D5EE;
  --ink: #141A48;
  --ink-2: #3A3F72;
  --ink-3: #6A6F9E;
  --yellow: #FFD23F;
  --yellow-hi: #FFE27A;
  --yellow-lo: #F5B800;
  --yellow-dk: #7A5A00;
  --green: #34A16C;
  --green-lo: #237A4F;
  --green-dk: #1C6B45;
  --mint: #8FE3B5;
  --red: #B0243A;
  --pink: #F2A0A8;
  --font-head: "Noto Sans Thai Looped", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --shadow-hard: 0 5px 0 var(--navy-800), 0 10px 16px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--paper);
  background-color: var(--navy-900);
  background-image: linear-gradient(var(--navy-750) 1px, transparent 1px),
                    linear-gradient(90deg, var(--navy-750) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); }
a:hover { color: var(--yellow-hi); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
p { margin: 0; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 10px; }
.top { display: flex; align-items: flex-end; gap: 4px; padding: 14px 4px 0; }
.frame {
  position: relative;
  border-radius: 0 20px 20px 20px;
  background: linear-gradient(var(--navy-700), var(--navy-650));
  border: 3px solid var(--paper);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .12), inset 0 -4px 0 rgba(0, 0, 0, .35), 0 6px 0 var(--navy-950), 0 14px 26px rgba(0, 0, 0, .5);
  overflow: hidden;
  margin-bottom: 18px;
}
.frame--round { border-radius: 20px; }
.sec { padding: 16px 14px 6px; }
.sec + .sec { padding-top: 12px; }
.sec:last-child { padding-bottom: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--lav); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.ink-muted { color: var(--ink-2); }
.desk-only { display: none !important; }
body { padding-bottom: 96px; }

/* ---------- language tabs (from the logo) ---------- */
.langtab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border: 0; border-radius: 10px 10px 0 0;
  background: linear-gradient(var(--indigo-3), #33387A);
  color: #B7BCEF; font-weight: 600; font-size: 13px; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25);
}
.langtab[aria-current="true"] {
  padding: 9px 16px; border-radius: 12px 12px 0 0;
  background: linear-gradient(#FFFFFF, #E9EAF8); color: var(--indigo); font-weight: 800;
  box-shadow: inset 0 2px 0 #FFFFFF; cursor: default;
}
.flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); flex-shrink: 0; }
.top__spacer { margin-left: auto; }
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: var(--navy-800); border: 3px solid var(--yellow); color: var(--paper);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 0 6px 0 var(--navy-950);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 0 var(--yellow), 0 8px 14px rgba(0, 0, 0, .45); }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 26px; line-height: 1.1; text-shadow: 0 3px 0 var(--navy-950); display: block; }
.brand__en { font-size: 12px; font-weight: 800; letter-spacing: .3em; color: var(--yellow); display: block; }
.loadbar {
  height: 14px; border-radius: 7px; border: 2px solid var(--paper); padding: 2px;
  display: flex; gap: 3px; background: var(--navy-900); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
.loadbar span { flex: 1; border-radius: 2px; background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); }
.loadbar span.off { background: #252B63; }

/* ---------- 3D buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border-radius: 14px;
  background: linear-gradient(var(--yellow-hi), var(--yellow-lo));
  border: 3px solid var(--navy-800); color: var(--ink);
  font-family: var(--font-head); font-weight: 800; font-size: 16px; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -4px 0 rgba(160, 110, 0, .45), var(--shadow-hard);
  transition: transform .08s ease, box-shadow .08s ease, filter .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.06); color: var(--ink); }
.btn:active, .press:active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 1px 0 #0A0D2B, 0 2px 4px rgba(0, 0, 0, .4) !important;
}
.btn[disabled], .btn[aria-disabled="true"] { filter: grayscale(.8) brightness(.8); cursor: not-allowed; transform: none; }
.btn--big { min-height: 60px; font-size: 18px; }
.btn--block { display: flex; width: 100%; }
.btn--blue {
  background: linear-gradient(var(--indigo-3), var(--indigo)); color: #FFFFFF;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .3), var(--shadow-hard);
}
.btn--blue:hover { color: #FFFFFF; }
.btn--white {
  background: linear-gradient(#FFFFFF, #DADCF2); color: var(--indigo);
  box-shadow: inset 0 3px 0 #FFFFFF, inset 0 -4px 0 #B9BCE0, 0 5px 0 var(--navy-950), 0 10px 16px rgba(0, 0, 0, .45);
}
.btn--white:hover { color: var(--indigo); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--indigo); font-family: var(--font-body); font-weight: 600; }
.btn--sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; border-width: 2px; }
.iconbtn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(var(--navy-400), var(--navy-600)); border: 2px solid var(--indigo-3); color: var(--paper);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 3px 0 var(--navy-950);
  cursor: pointer; text-decoration: none;
}
.iconbtn:hover { color: var(--yellow); }

/* ---------- surfaces ---------- */
.card {
  border-radius: 16px; background: linear-gradient(#FFFFFF, var(--card-lo)); color: var(--ink);
  border: 3px solid var(--paper); overflow: hidden;
  box-shadow: inset 0 -4px 0 var(--card-edge), 0 6px 0 var(--navy-950), 0 12px 20px rgba(0, 0, 0, .45);
}
.card--gold { border-color: var(--yellow); }
.card a:not(.btn) { color: var(--indigo); }
.card__body { padding: 14px; }
.panel {
  border-radius: 14px; padding: 12px 14px;
  background: linear-gradient(var(--navy-500), var(--navy-600)); border: 2px solid var(--indigo-3);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 4px 0 var(--navy-950);
}
.panel--gold {
  border: 3px solid var(--yellow); border-radius: 18px; padding: 16px;
  background: linear-gradient(var(--indigo-2), var(--indigo));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 6px 0 var(--navy-950), 0 12px 20px rgba(0, 0, 0, .45);
}
.well { border-radius: 10px; background: var(--navy-900); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55); }
.dialog {
  position: relative; padding: 12px 14px 20px; border-radius: 12px;
  background: linear-gradient(var(--navy-750), var(--navy-850)); border: 3px solid var(--paper);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 4px 0 var(--navy-950), 0 8px 14px rgba(0, 0, 0, .4);
}
.dialog::after { content: "▼"; position: absolute; right: 12px; bottom: 2px; font-size: 13px; color: var(--paper); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dialog::after { animation: none; } * { transition: none !important; } }
.dialog__title { font-weight: 800; color: var(--yellow); margin-bottom: 4px; }
.scene {
  border-radius: 16px; background: linear-gradient(var(--green), var(--green-lo)); border: 3px solid var(--paper); padding: 10px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .25), 0 5px 0 var(--navy-950), 0 10px 18px rgba(0, 0, 0, .45);
}
.scene__shot { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 2px var(--navy-900); background: #1F6E47; }
.scene .dialog { margin-top: 10px; }
.h-sec { font-family: var(--font-head); font-weight: 800; font-size: 18px; text-shadow: 0 2px 0 var(--navy-950); }
.h-sec__dot { color: var(--mint); }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .2em; color: var(--yellow); }

/* ---------- tabs (section headers from the logo) ---------- */
.tabs { display: flex; align-items: flex-end; gap: 4px; }
.tab {
  padding: 7px 14px; border-radius: 10px 10px 0 0; font-size: 14px; text-decoration: none;
  background: linear-gradient(var(--indigo-3), #33387A); color: #B7BCEF;
}
.tab:hover { color: #FFFFFF; }
.tab[aria-current="page"], .tab.is-on { background: linear-gradient(#FFFFFF, #E9EAF8); color: var(--ink); font-weight: 800; box-shadow: inset 0 2px 0 #FFFFFF; }
.tabs + .card { border-radius: 0 16px 16px 16px; }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; line-height: 1.5;
  padding: 2px 8px; border-radius: 6px; background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); color: var(--ink);
  box-shadow: 0 2px 0 var(--yellow-dk); white-space: nowrap;
}
.badge--rel { background: #E3F4EA; color: var(--green-dk); box-shadow: 0 2px 0 #9CCFB3; }
.badge--beta { background: #FFF1D6; color: #9A4E00; box-shadow: 0 2px 0 #E8C58A; }
.badge--wip { background: #E6E8F7; color: var(--indigo); box-shadow: 0 2px 0 #B9BCE0; }
.badge--plan { background: #ECEDF5; color: var(--ink-3); box-shadow: 0 2px 0 #C5C8DE; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  background: linear-gradient(var(--navy-400), var(--navy-600)); border: 2px solid var(--indigo-3); color: var(--lav);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 4px 0 var(--navy-950);
  transition: transform .08s ease, box-shadow .08s ease;
}
.chip[aria-pressed="true"] {
  background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); border-color: var(--navy-800); color: var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 110, 0, .45), 0 4px 0 var(--navy-950);
}
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy-950); }

/* ---------- form ---------- */
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 52px; border-radius: 14px;
  background: var(--navy-900); border: 3px solid var(--paper); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6), 0 4px 0 var(--navy-950);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--paper); font-size: 16px; padding: 12px 0; }
.search input::placeholder { color: var(--lav-3); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--yellow); }

/* ---------- game cards ---------- */
.gcard { display: flex; gap: 12px; padding: 12px; text-decoration: none; color: var(--ink); }
.gcard:hover .gcard__title { color: var(--indigo); }
.cover {
  width: 88px; height: 88px; flex-shrink: 0; border-radius: 10px; object-fit: cover;
  border: 3px solid var(--navy-800); box-shadow: 0 3px 0 var(--navy-800); background: #3A3F72;
  display: flex; align-items: center; justify-content: center; color: #E8EAF8; font-weight: 800; font-size: 13px; text-align: center;
}
.cover--sm { width: 48px; height: 48px; border-width: 2px; border-radius: 8px; font-size: 10px; }
.gcard__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gcard__title { font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1.25; }
.gcard__en { font-size: 13px; color: var(--ink-3); }
.gcard__sub { font-size: 13px; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ticks { list-style: none; margin: 0; padding: 0 14px 10px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.ticks li::before { content: "▸ "; color: var(--indigo); }
.card__actions { display: flex; gap: 10px; padding: 4px 12px 16px; }
.card__actions .btn:first-child { flex: 1; }
.nextrow { display: flex; align-items: center; gap: 10px; padding: 10px; text-decoration: none; color: var(--paper); }
.nextrow:hover { color: var(--paper); border-color: var(--yellow); }
.progress {
  height: 14px; border-radius: 7px; border: 2px solid var(--paper); display: flex; overflow: hidden;
  background: var(--navy-900); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
.progress > span { background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); transition: width .2s; }
.progress--light { border-color: var(--navy-800); background: var(--card-edge); height: 18px; border-radius: 9px; border-width: 3px; box-shadow: inset 0 3px 4px rgba(0, 0, 0, .25); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat {
  border-radius: 14px; padding: 10px 6px 8px; text-align: center;
  background: linear-gradient(#FFFFFF, var(--card-lo)); color: var(--ink); border: 3px solid var(--paper);
  box-shadow: inset 0 -3px 0 var(--card-edge), 0 5px 0 var(--navy-950);
}
.stat__num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 24px; line-height: 1.2; color: var(--indigo); font-variant-numeric: tabular-nums; }
.stat__label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.35; }
.stat__sub { display: block; font-size: 11px; color: var(--ink-3); }

/* ---------- bottom nav (mobile) ---------- */
.botnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(var(--navy-750), var(--navy-900)); border-top: 3px solid var(--paper);
}
.navbtn {
  min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 12px; font-size: 11px; text-decoration: none; line-height: 1.2;
  background: linear-gradient(var(--navy-400), var(--navy-600)); border: 2px solid var(--indigo-3); color: var(--lav);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .15), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 4px 0 var(--navy-950);
  transition: transform .08s ease, box-shadow .08s ease;
}
.navbtn:hover { color: #FFFFFF; }
.navbtn[aria-current="page"] {
  background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); border-color: var(--navy-800); color: var(--ink); font-weight: 800;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(160, 110, 0, .45), 0 4px 0 var(--navy-950);
}
.navbtn svg { width: 22px; height: 22px; }
.topnav { display: none; }

/* ---------- game page ---------- */
.gamehead { display: flex; align-items: center; gap: 8px; padding: 10px; background: linear-gradient(var(--navy-500), var(--navy-750)); border-bottom: 3px solid var(--paper); }
.gamehead h1 { font-size: 18px; text-shadow: 0 2px 0 var(--navy-950); flex: 1; min-width: 0; }
.hero { position: relative; height: 170px; background: var(--navy-900) center 30% / cover no-repeat; border-bottom: 3px solid var(--paper); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(12, 16, 48, .55)); }
.hero__cover { position: absolute; left: 14px; bottom: -34px; width: 100px; height: 100px; border-radius: 12px; object-fit: cover; border: 3px solid var(--navy-800); box-shadow: 0 5px 0 var(--navy-800), 0 8px 14px rgba(0, 0, 0, .45); background: #3A3F72; display: flex; align-items: center; justify-content: center; color: #E8EAF8; font-weight: 800; }
.hero__shot { position: absolute; right: 12px; bottom: 12px; width: 140px; border-radius: 8px; border: 3px solid var(--paper); box-shadow: 0 4px 0 var(--navy-950); }
.hero + .sec { padding-top: 46px; }
.hero + .lay { padding-top: 32px; }
.step { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; cursor: pointer; background: linear-gradient(#FFFFFF, #E6E8F7); border: 3px dashed var(--indigo); box-shadow: inset 0 3px 0 #FFFFFF, 0 4px 0 #B9BCE0; color: var(--ink); }
.step:hover { border-color: var(--indigo-2); }
.step--drag { border-color: var(--green); background: #E3F4EA; }
.step__num { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: linear-gradient(var(--indigo-3), var(--indigo)); color: var(--yellow); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 3px 0 var(--navy-800); }
.step__title { font-weight: 800; font-size: 16px; display: block; }
.step__hint { font-size: 12px; color: var(--ink-2); display: block; word-break: break-all; }
.msg { border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.6; }
.msg--err { background: #FDE8EB; color: #7A1426; border: 2px solid #E9A3AE; }
.msg--ok { background: #E3F4EA; color: #134A31; border: 2px solid #9CCFB3; }
.msg--info { background: #E6E8F7; color: var(--ink); border: 2px solid #B9BCE0; }
.checkline { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.checkline b { color: var(--green-dk); }
.dl { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 14px; text-align: left; justify-content: flex-start; font-family: var(--font-body); }
.dl__name { display: block; font-weight: 800; font-size: 15px; word-break: break-all; }
.dl__meta { display: block; font-size: 12px; font-weight: 600; }
.req { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.req dt { color: var(--lav-2); }
.req dd { margin: 0; color: var(--paper); word-break: break-all; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 3px solid var(--paper); box-shadow: 0 4px 0 var(--navy-950); }
.cols2 { display: grid; gap: 12px; align-items: start; }
.list-dot { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--lav); }
.ver { border-left: 3px solid var(--yellow); padding-left: 10px; font-size: 14px; }

/* ---------- support ---------- */
.qrcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: linear-gradient(var(--navy-500), var(--navy-800)); border-bottom: 3px solid var(--yellow); color: var(--paper); }
.qrbox { position: relative; padding: 12px; border-radius: 16px; background: #FFFFFF; box-shadow: inset 0 3px 6px rgba(20, 26, 72, .18), 0 0 0 3px var(--navy-800), 0 6px 0 var(--navy-800); }
.qrbox img { width: 236px; height: 236px; }
.qrbox i { position: absolute; width: 26px; height: 26px; border: 0 solid var(--yellow-lo); }
.qrbox i:nth-child(2) { left: -8px; top: -8px; border-left-width: 5px; border-top-width: 5px; border-radius: 8px 0 0 0; }
.qrbox i:nth-child(3) { right: -8px; top: -8px; border-right-width: 5px; border-top-width: 5px; border-radius: 0 8px 0 0; }
.qrbox i:nth-child(4) { left: -8px; bottom: -8px; border-left-width: 5px; border-bottom-width: 5px; border-radius: 0 0 0 8px; }
.qrbox i:nth-child(5) { right: -8px; bottom: -8px; border-right-width: 5px; border-bottom-width: 5px; border-radius: 0 0 8px 0; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #E6E8F7; color: var(--indigo); box-shadow: inset 0 -2px 0 #C9CCEA; }
.pill--tm { background: #FFF1D6; color: #B25A00; box-shadow: inset 0 -2px 0 #F4D39A; }
.hof { border-radius: 18px; background: linear-gradient(var(--navy-700), var(--navy-650)); border: 3px solid var(--yellow); overflow: hidden; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .12), 0 6px 0 var(--navy-950), 0 12px 20px rgba(0, 0, 0, .45); }
.hof__head { padding: 12px 14px 10px; background: linear-gradient(var(--indigo-2), var(--indigo)); border-bottom: 3px solid var(--yellow); display: flex; flex-direction: column; gap: 10px; }
.monthbar { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--navy-900); font-weight: 800; box-shadow: inset 0 3px 5px rgba(0, 0, 0, .6); }
.toprow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(#FFFFFF, var(--card-lo)); color: var(--ink); box-shadow: inset 0 -3px 0 var(--card-edge), 0 4px 0 var(--navy-950); }
.coin { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: var(--ink); border: 3px solid var(--navy-800); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 3px 0 var(--navy-800); }
.coin--1 { background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); }
.coin--2 { background: linear-gradient(#FFFFFF, #BFC4DD); }
.coin--3 { background: linear-gradient(#F6C08A, #C97A3A); }
.namechip { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: linear-gradient(var(--navy-400), var(--navy-600)); border: 2px solid var(--indigo-3); color: var(--paper); box-shadow: 0 3px 0 var(--navy-950); }

/* ---------- FAQ ---------- */
.faq details { border-radius: 14px; background: linear-gradient(#FFFFFF, var(--card-lo)); color: var(--ink); border: 3px solid var(--paper); box-shadow: inset 0 -3px 0 var(--card-edge), 0 5px 0 var(--navy-950); }
.faq details + details { margin-top: 12px; }
.faq summary { list-style: none; cursor: pointer; padding: 12px 44px 12px 14px; font-weight: 800; position: relative; min-height: 48px; display: flex; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(var(--yellow-hi), var(--yellow-lo)); border: 2px solid var(--navy-800); display: flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 2px 0 var(--navy-800); }
.faq details[open] summary::after { content: "–"; }
.faq__a { padding: 0 14px 14px; font-size: 15px; color: var(--ink-2); }
.faq__a ul, .faq__a ol { padding-left: 20px; margin: 6px 0; }
.faq__a code, .guide code { background: #E6E8F7; color: var(--ink); padding: 1px 5px; border-radius: 5px; font-size: 13px; word-break: break-all; }
.faq__refs { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.faq__refs a { color: var(--indigo); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.refs { margin: 0; padding-left: 22px; font-size: 13px; color: var(--lav); }
.refs li { margin-bottom: 4px; word-break: break-word; }
.refs li:target { color: var(--yellow); }
.guide { font-size: 15px; color: var(--ink-2); }
.guide ol { padding-left: 20px; margin: 8px 0; }
.guide pre { background: var(--navy-900); color: var(--paper); padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.folder { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #E6E8F7; border-radius: 10px; padding: 10px 12px; line-height: 1.7; }

footer.foot { font-size: 12px; line-height: 1.6; color: var(--lav-3); text-align: center; padding: 6px 12px 24px; }
footer.foot a { color: var(--lav-2); }

/* ---------- page layouts: one copy of each section; on mobile the columns dissolve
   (display: contents) and `order` interleaves them, on desktop they are real columns ---------- */
.lay { display: flex; flex-direction: column; }
.lay > .col { display: contents; }
.lay--home, .lay--game { padding-bottom: 12px; }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .wrap { max-width: 1320px; padding: 0 32px; }
  .botnav { display: none; }
  .desk-only { display: revert !important; }
  .mob-only { display: none !important; }
  .top { padding: 20px 20px 0; gap: 6px; }
  .topnav { display: flex; gap: 10px; margin-left: auto; padding-bottom: 10px; }
  .topnav .navbtn { min-height: 46px; flex-direction: row; gap: 8px; padding: 0 16px; font-size: 15px; }
  .topnav .navbtn svg { width: 20px; height: 20px; }
  .top__spacer { display: none; }
  .frame { border-radius: 0 24px 24px 24px; }
  .lay { display: grid; gap: 24px; padding: 24px; align-items: start; }
  .lay > .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .lay > .col > .sec { padding: 0; order: 0 !important; }
  .lay--home { grid-template-columns: 380px minmax(0, 1fr) 340px; }
  .lay--game { grid-template-columns: minmax(0, 1fr) 420px; }
  .hero + .lay { padding-top: 64px; }
  .grid3 { display: grid; grid-template-columns: 400px minmax(0, 1fr) 360px; gap: 24px; padding: 24px; }
  .grid3 > * { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .grid3 .sec { padding: 0; }
  .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; padding: 24px; align-items: start; }
  .grid2 > * { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .grid2 .sec { padding: 0; }
  .gamelist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .hero { height: 260px; }
  .hero__cover { width: 132px; height: 132px; left: 24px; bottom: -44px; }
  .hero__shot { width: 220px; right: 24px; bottom: 18px; }
  .hero + .sec, .hero + .grid2 { padding-top: 60px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .narrow { max-width: 860px; margin: 0 auto; }
  .toast { bottom: 40px; }
}
