/* ============================================================================
 * style.css — mythavon.com (2026-09-26 redesign)
 *
 * Dark fantasy portal for every MYTHAVON game: deep night background, gold for
 * what you can press, the logo's crystal cyan/violet as the second accent.
 * Hand-written, no framework. The only web font is Mitr (SIL OFL 1.1, served
 * from /assets/fonts — licence beside it); everything else is the system stack,
 * so the page paints before the font arrives.
 * ========================================================================== */

@font-face {
  font-family: "Mitr";
  src: url("/assets/fonts/mitr-regular.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #0b0a12;
  --bg2: #110e1b;
  --panel: #161224;
  --panel2: #1d182f;
  --line: rgba(232, 184, 74, .16);
  --line2: rgba(255, 255, 255, .08);
  --gold: #e8b84a;
  --gold2: #f7db8a;
  --gold3: #fff3c4;
  --text: #f3ead3;
  --mute: #aaa0bf;
  --dim: #7c7392;
  --cyan: #6fdcff;
  --violet: #8a6cff;
  --live: #5fd08a;
  --beta: #6fb8ff;
  --soon: #f0a24a;
  --r: 14px;
  --wrap: 1180px;
  --head: "Mitr", "Leelawadee UI", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", "Leelawadee UI", "Noto Sans Thai", "Sukhumvit Set", Tahoma, system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold2); text-decoration: none; }
a:hover { color: var(--gold3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── announcement strip ───────────────────────────────────────────────────── */
.strip {
  display: block;
  text-align: center;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--gold3);
  background: linear-gradient(90deg, rgba(138, 108, 255, .22), rgba(232, 184, 74, .22), rgba(111, 220, 255, .18));
  border-bottom: 1px solid var(--line);
}
.strip:hover { color: #fff; }
.strip[hidden] { display: none; }

/* ── top navigation ───────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(rgba(11, 10, 18, .94), rgba(11, 10, 18, .78));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line2);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 48px; width: auto; }
.links { display: flex; gap: 4px; margin-left: 8px; }
.links a {
  color: var(--mute); font: 15px var(--head); padding: 8px 12px; border-radius: 9px;
}
.links a:hover, .links a.on { color: var(--gold2); background: rgba(232, 184, 74, .08); }
.nav .end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: var(--mute); font: 600 13px var(--body);
  padding: 6px 12px; cursor: pointer; letter-spacing: .5px;
}
.lang button.on { background: var(--gold); color: #21160a; }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line); color: var(--gold2);
  border-radius: 10px; width: 40px; height: 38px; font-size: 18px; cursor: pointer;
}

/* ── buttons, chips, pills ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 16px var(--head); color: var(--gold2);
  padding: 11px 22px; border-radius: 999px;
  border: 1px solid rgba(232, 184, 74, .45);
  background: rgba(232, 184, 74, .06);
  cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--gold3); background: rgba(232, 184, 74, .14); transform: translateY(-1px); }
.btn.gold {
  color: #25180a; border-color: transparent;
  background: linear-gradient(180deg, #ffe69a, #e8b84a 55%, #c9902c);
  box-shadow: 0 6px 22px rgba(232, 184, 74, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.btn.gold:hover { color: #1a1006; box-shadow: 0 10px 30px rgba(232, 184, 74, .42), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn.big { font-size: 18px; padding: 14px 28px; }
.btn.small { font-size: 14px; padding: 7px 14px; }
/* 🪪 ปุ่ม MYTHAVON ID บนแถบเมนู (site.js mvidNav) — จอแคบเหลือแค่ไอคอน ไม่ให้ดันปุ่มเล่นตกบรรทัด */
.acct-top { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .acct-top { font-size: 0 !important; padding: 7px 10px; } .acct-top::before { content: "👤"; font-size: 16px; } }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--mute);
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(255, 255, 255, .03);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px var(--body); letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--live); background: rgba(95, 208, 138, .12); }
.pill.live::before { box-shadow: 0 0 0 0 rgba(95, 208, 138, .7); animation: ping 1.8s infinite; }
.pill.beta { color: var(--beta); background: rgba(111, 184, 255, .12); }
.pill.soon { color: var(--soon); background: rgba(240, 162, 74, .12); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95, 208, 138, .6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(95, 208, 138, 0); } }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  padding: 70px 0 90px;
}
.hero .bg {
  position: absolute; inset: 0;
  background: var(--hero-img, none) center 35% / cover no-repeat;
  transform: scale(1.04);
}
.hero .bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 70% 30%, rgba(11, 10, 18, .15), rgba(11, 10, 18, .7) 70%),
    linear-gradient(90deg, rgba(11, 10, 18, .96) 0%, rgba(11, 10, 18, .78) 38%, rgba(11, 10, 18, .35) 70%, rgba(11, 10, 18, .55) 100%),
    linear-gradient(180deg, rgba(11, 10, 18, .3), rgba(11, 10, 18, 0) 30%, rgba(11, 10, 18, 0) 70%, var(--bg));
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 14px var(--head); letter-spacing: 1.5px; color: var(--cyan);
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.hero h1 { margin: 16px 0 12px; line-height: 1; }
.hero h1 img { width: min(520px, 100%); height: auto; filter: drop-shadow(0 10px 30px rgba(181, 108, 255, .35)); }
.hero .lead { font-size: 19px; color: #ddd3ee; max-width: 560px; margin: 0 0 26px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.stats { display: flex; flex-wrap: wrap; gap: 26px; }
.stat b { display: block; font: 26px var(--head); color: var(--gold2); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--mute); }

.showcase {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(232, 184, 74, .35);
  box-shadow: var(--shadow), 0 0 0 6px rgba(232, 184, 74, .05);
  background: var(--panel);
  aspect-ratio: 16 / 9;
}
.showcase img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.showcase .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 36px 18px 14px;
  background: linear-gradient(transparent, rgba(8, 7, 14, .92));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.showcase .cap b { font: 20px var(--head); display: block; }
.showcase .cap small { color: var(--mute); }
.showcase .dots { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; padding: 5px 7px; border-radius: 999px; background: rgba(11, 10, 18, .55); }
.showcase .dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .35);
}
.showcase .dots button.on { background: var(--gold); }
.online {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--live);
  padding: 6px 12px; border-radius: 999px;
  background: rgba(95, 208, 138, .1); border: 1px solid rgba(95, 208, 138, .25);
}
.online[hidden] { display: none; }
.online b { color: #d9ffe6; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 3px; color: var(--dim); text-transform: uppercase;
}

/* ── sections ─────────────────────────────────────────────────────────────── */
.sec { padding: 96px 0; position: relative; }
.sec.alt { background: linear-gradient(180deg, rgba(17, 14, 27, .6), rgba(22, 18, 36, .75)); border-block: 1px solid var(--line2); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.sec-head .eyebrow { justify-content: center; }
.sec-head .eyebrow::after { content: ""; width: 26px; height: 1px; background: currentColor; }
.sec-head h2 { font: clamp(28px, 4vw, 42px)/1.2 var(--head); margin: 12px 0 10px; color: var(--text); }
.sec-head p { color: var(--mute); margin: 0; font-size: 17px; }
.sec-head h2 em { font-style: normal; color: var(--gold2); }

/* ── game rows (home) ─────────────────────────────────────────────────────── */
.games { display: grid; gap: 34px; }
.game-row {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: linear-gradient(135deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s;
}
.game-row:hover { border-color: var(--line); transform: translateY(-2px); }
.game-row:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.game-row:nth-child(even) .art { order: 2; }
.game-row > * { min-width: 0; }
.game-row .art { position: relative; min-height: 300px; background: #0e0c16; }
.game-row .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-row .art .pill { position: absolute; top: 14px; left: 14px; background: rgba(11, 10, 18, .78); backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.game-row .body { padding: 32px 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.game-row .genre { font: 13px var(--head); color: var(--cyan); letter-spacing: 1px; text-transform: uppercase; }
.game-row h3 { font: 32px/1.15 var(--head); margin: 0; }
.game-row h3 a { color: var(--text); }
.game-row h3 a:hover { color: var(--gold2); }
.game-row p { margin: 0; color: #d4cbe4; }
.game-row .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.teaser {
  text-align: center; padding: 34px; border-radius: 20px;
  border: 1px dashed rgba(232, 184, 74, .3); color: var(--mute);
  background: rgba(255, 255, 255, .02);
}
.teaser b { display: block; font: 22px var(--head); color: var(--gold2); margin-bottom: 4px; }

/* ── feature cards ────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  padding: 22px 20px; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
  border: 1px solid var(--line2);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
.card .ic { font-size: 30px; line-height: 1; margin-bottom: 12px; }
.card h4 { font: 19px var(--head); margin: 0 0 6px; color: var(--gold2); }
.card p { margin: 0; color: var(--mute); font-size: 15px; }

/* ── steps ────────────────────────────────────────────────────────────────── */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: s; position: relative; padding: 58px 20px 22px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line2); color: #ddd3ee;
}
.steps li::before {
  content: counter(s); position: absolute; top: 16px; left: 20px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 16px var(--head); color: #25180a; background: linear-gradient(#ffe69a, #e8b84a);
}

/* ── gallery + lightbox ───────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--panel); aspect-ratio: 16 / 10; border: 1px solid var(--line2); }
.gallery figure.wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery.few { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-inline: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 9px; font-size: 13px;
  background: linear-gradient(transparent, rgba(8, 7, 14, .9)); color: #eee4ff;
}
.gallery figcaption small { color: var(--gold2); display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(5, 4, 10, .92); padding: 24px;
}
.lightbox.on { display: grid; }
.lightbox img { max-height: 84vh; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox p { text-align: center; color: var(--mute); margin: 12px 0 0; }
.lightbox button {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--gold2); font-size: 20px; cursor: pointer;
}

/* ── news ─────────────────────────────────────────────────────────────────── */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news article {
  padding: 24px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line2);
  display: flex; flex-direction: column; gap: 8px;
}
.news .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.news .tag { color: var(--gold2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.news h3 { font: 20px/1.3 var(--head); margin: 0; }
.news p { margin: 0; color: var(--mute); font-size: 15px; }

/* ── downloads ────────────────────────────────────────────────────────────── */
.dl { background: radial-gradient(120% 130% at 50% 0%, rgba(232, 184, 74, .14), transparent 60%), var(--bg2); border-block: 1px solid var(--line); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.dl-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center;
  padding: 22px; border-radius: 18px; background: rgba(22, 18, 36, .85); border: 1px solid var(--line2);
}
.dl-card .thumb { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); }
.dl-card h3 { font: 22px var(--head); margin: 0 0 4px; }
.dl-card .note { font-size: 13px; color: var(--dim); margin: 6px 0 0; }
.dl-card .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ── community ────────────────────────────────────────────────────────────── */
.comm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comm a {
  display: flex; gap: 14px; align-items: center; padding: 22px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line2); color: var(--text);
}
.comm a:hover { border-color: var(--line); color: var(--gold3); }
.comm .ic { font-size: 30px; }
.comm b { display: block; font: 19px var(--head); }
.comm small { color: var(--mute); }

/* ── footer ───────────────────────────────────────────────────────────────── */
.foot { padding: 40px 0 50px; border-top: 1px solid var(--line2); color: var(--dim); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { color: var(--mute); }
.foot img { height: 44px; width: auto; opacity: .92; }

/* ── game detail page ─────────────────────────────────────────────────────── */
.ghero { position: relative; overflow: hidden; padding: 90px 0 70px; min-height: 520px; display: flex; align-items: flex-end; }
.ghero .bg { position: absolute; inset: 0; background: var(--hero-img, none) center / cover no-repeat; }
.ghero .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 10, 18, .35) 0%, rgba(11, 10, 18, .55) 45%, var(--bg) 100%),
              linear-gradient(90deg, rgba(11, 10, 18, .85), rgba(11, 10, 18, .2) 70%);
}
.ghero .wrap { position: relative; }
.ghero h1 { font: clamp(40px, 7vw, 74px)/1.05 var(--head); margin: 10px 0 12px; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); }
.ghero .lead { font-size: 19px; color: #e4dbf2; max-width: 720px; margin: 0 0 22px; }
.ghero .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line2); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; margin-top: 30px; }
.facts div { background: var(--panel); padding: 16px 18px; }
.facts span { display: block; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.facts b { font: 17px var(--head); color: var(--gold2); }
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.about p { color: #d8cfe8; font-size: 17px; margin: 0; }
.req { padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line2); }
.req h3 { font: 18px var(--head); margin: 0 0 10px; color: var(--gold2); }
.req ul { margin: 0; padding-left: 20px; color: var(--mute); }
.notfound { text-align: center; padding: 140px 0; }
.notfound h1 { font: 40px var(--head); }

/* ── legal pages ──────────────────────────────────────────────────────────── */
.doc { max-width: 820px; margin: 0 auto; padding: 60px 0 80px; }
.doc h1 { font: 38px var(--head); margin: 0 0 6px; }
.doc h2 { font: 23px var(--head); margin: 34px 0 10px; color: var(--gold2); }
.doc .upd { color: var(--dim); font-size: 14px; margin-top: 0; }
.doc p, .doc li { color: #d6cde6; }
.doc .box { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(232, 184, 74, .06); }
[data-lang-only] { display: none; }
html[lang="th"] [data-lang-only="th"], html[lang="en"] [data-lang-only="en"] { display: block; }

/* ── reveal on scroll ─────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill.live::before { animation: none; }
  .gallery figure:hover img, .game-row:hover, .card:hover, .btn:hover { transform: none; }
}

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .news { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: #0b0a12; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; margin: 0; box-shadow: 0 20px 40px rgba(0, 0, 0, .5);
  }
  .links.open { display: flex; }
  .links a { padding: 12px; }
  .menu-btn { display: inline-block; }
  .nav .play-top { display: none; }
  .hero .wrap, .game-row, .game-row:nth-child(even), .about { grid-template-columns: 1fr; }
  .game-row:nth-child(even) .art { order: 0; }
  /* no min-height here: with aspect-ratio it becomes a min-width (220 × 16/9 = 391 px) and the card overflows a phone */
  .game-row .art { min-height: 0; aspect-ratio: 16 / 9; }
  .hero { min-height: 0; padding: 48px 0 70px; }
  .comm { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .strip { font-size: 13px; padding: 7px 12px; }
  .sec { padding: 64px 0; }
  .cards, .news { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure.wide { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
  .game-row .body { padding: 22px; }
  .game-row h3 { font-size: 26px; }
  .hero .lead, .ghero .lead { font-size: 17px; }
  .dl-card { grid-template-columns: 64px 1fr; }
  .dl-card .thumb { width: 64px; height: 64px; }
  .stats { gap: 18px; }
  .brand img { height: 40px; }
}

/* ── 📚 หน้าคู่มือเกม (guides.html + guide-*.html + faq.html · 4 ต.ค. 2569) ── */
.doc h3 { font: 19px var(--head); margin: 22px 0 6px; color: var(--gold3); }
.doc ol { padding-left: 22px; }
.doc ol li { margin: 4px 0; }
.doc code { background: rgba(255, 255, 255, .07); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; font-size: .92em; color: var(--gold3); }
.doc .crumb { font-size: 14px; color: var(--dim); margin: 0 0 8px; }
.doc .crumb a { color: var(--mute); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 15px; background: rgba(255, 255, 255, .02); border-radius: 10px; overflow: hidden; }
.doc th, .doc td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; color: #d6cde6; }
.doc th { background: rgba(232, 184, 74, .10); color: var(--gold2); font-weight: 600; white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.guide-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.guide-card:hover { transform: translateY(-2px); border-color: rgba(232, 184, 74, .45); text-decoration: none; }
.guide-card .gi { font-size: 24px; line-height: 1; }
.guide-card b { color: var(--gold2); font-size: 16px; }
.guide-card span:last-child { color: var(--mute); font-size: 13.5px; line-height: 1.5; }
.doc .cta-row { margin: 22px 0 0; }
@media (max-width: 560px) { .doc table { font-size: 13.5px; } .doc th, .doc td { padding: 7px 8px; } }
.doc .muted { color: var(--mute); font-size: .88em; font-weight: 400; }
.doc .tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; } .doc .tscroll table { margin: 0; }
.doc .news-item { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; } .doc .news-item h2 { margin-top: 4px; }
