:root {
  color-scheme: dark;
  --bg: #0b1020; --bg2: #11182e; --card: #151d36; --line: #263157;
  --text: #e8ecf8; --muted: #9aa6c8; --accent: #4cc9f0; --accent2: #f72585; --tea: #7bc96f; --ok: #38d39f; --warn: #ffb703;
  --radius: 18px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f7fc; --bg2: #e9eef9; --card: #ffffff; --line: #d6ddef;
    --text: #141a2e; --muted: #56607d; --accent: #076fa8; --accent2: #d0186a; --tea: #2f7428; --ok: #11785a; --warn: #8a5d00;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fc; --bg2: #e9eef9; --card: #ffffff; --line: #d6ddef;
  --text: #141a2e; --muted: #56607d; --accent: #076fa8; --accent2: #d0186a; --tea: #2f7428; --ok: #11785a; --warn: #8a5d00;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans Thai", system-ui, sans-serif; line-height: 1.7; font-size: 16px;
}
h1, h2, h3, .brand { font-family: "Mitr", "Noto Sans Thai", sans-serif; font-weight: 500; line-height: 1.3; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header.top {
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-size: 1.25rem; text-decoration: none; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 32px; height: 32px; display: block; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-8deg) scale(1.1); }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav { display: flex; align-items: center; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .95rem; white-space: nowrap; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { nav a.hide-sm, nav .long { display: none; } nav a { margin-left: 12px; } .brand { font-size: 1.05rem; gap: 6px; } .brand img { width: 28px; height: 28px; } .toggle { margin-left: 10px; } }
/* phones (up to ~460px, e.g. 390/414/430 iPhones): logo only in the header so the nav still fits */
@media (max-width: 459px) { header.top .brand { font-size: 0; gap: 0; } header.top .brand img { width: 30px; height: 30px; } }
@media (max-width: 480px) {
  .hero .stats { gap: 8px; flex-wrap: nowrap; }
  .hero .stats li { flex: 1 1 0; min-width: 0; padding: 8px 6px; }
  .hero .stats b { font-size: 1.2rem; }
  .hero .stats span { font-size: .78rem; }
}

.hero { padding: 56px 0 44px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -2;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent),
              radial-gradient(closest-side, color-mix(in srgb, var(--accent2) 25%, transparent), transparent);
  background-position: 30% 50%, 70% 40%; background-repeat: no-repeat; background-size: 60% 100%, 50% 90%;
}
.hero-logo { width: 84px; height: 84px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 10px 24px color-mix(in srgb, var(--accent2) 35%, transparent)); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); margin: 0 0 14px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 28px; font-size: 1.08rem; }
.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats { list-style: none; padding: 0; margin: 34px auto 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats li { background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 10px 20px; min-width: 120px; backdrop-filter: blur(6px); }
.stats b { display: block; font-family: "Mitr", sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.stats span { color: var(--muted); font-size: .85rem; }
.glyphs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glyph { position: absolute; bottom: -60px; font-family: "Mitr", sans-serif; font-weight: 600; color: var(--accent); opacity: 0; user-select: none; }

/* ===== animation (all off when the visitor prefers reduced motion) ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: blobs 16s ease-in-out infinite alternate; }
  .hero-logo { animation: pop .7s cubic-bezier(.3,1.5,.5,1) both, bob 5s ease-in-out .9s infinite; }
  .hero h1, .hero p, .hero .btns, .hero .stats, .page-head > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 { animation-delay: .1s; } .hero p { animation-delay: .22s; } .hero .btns { animation-delay: .34s; } .hero .stats { animation-delay: .46s; }
  .page-head > :nth-child(2) { animation-delay: .12s; }
  .grad-text { animation: shine 7s linear infinite; }
  .glyph { animation: float-up linear infinite; }
  .btn.primary { background-size: 200% auto; transition: transform .15s, background-position .6s; }
  .btn.primary:hover { background-position: right center; }
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .reveal.in { opacity: 1; transform: none; }
  .mod { transition: transform .3s, box-shadow .3s, border-color .3s, opacity .7s ease; }
  .mod.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .3s; }
  .mod.in:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(0,0,0,.35); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
  .mod .shot img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .mod:hover .shot img { transform: scale(1.05); }
  .mod.covers.in:hover { transform: none; box-shadow: none; }
  .cover-pick { transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .2s, box-shadow .25s; }
  .cover-pick .art img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .cover-pick:hover .art img { transform: scale(1.05); }
  .qr-card { transition: transform .3s, box-shadow .3s; }
  .qr-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 16px 36px rgba(0,0,0,.35); }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes blobs { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-5%, 4%) scale(1.1); } 100% { transform: translate(4%, -3%) scale(1.03); } }
@keyframes float-up {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  12% { opacity: var(--o, .3); }
  85% { opacity: calc(var(--o, .3) * .6); }
  100% { transform: translateY(-560px) rotate(var(--r, 20deg)); opacity: 0; }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--card);
  transition: transform .15s, border-color .15s; cursor: pointer; font: inherit; font-weight: 600; font-size: .98rem;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; border: 0; }
.btn.primary { text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.btn.tea { border-color: color-mix(in srgb, var(--tea) 60%, transparent); }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

section { padding: 48px 0; }
section h2 { font-size: 1.7rem; margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 28px; }

/* ===== mod cards (info + install guide together) ===== */
.mods { display: grid; gap: 28px; }
.mod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 76px; }
/* cover shown whole (Steam capsule 460x215), never cropped */
/* the shorter column (cover + Steam link, or the text) sits in the middle, so a long description leaves no empty corner */
.mod .top { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: center; }
@media (max-width: 800px) { .mod .top { grid-template-columns: 1fr; } }
.mod .side { padding: 20px 0 20px 20px; display: grid; gap: 10px; }
@media (max-width: 800px) { .mod .side { padding: 16px 16px 0; } }
.mod .shot { aspect-ratio: 460 / 215; border-radius: 12px; overflow: hidden; background: var(--bg2); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.mod .shot img { width: 100%; height: 100%; display: block; }
.store {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 600;
}
.store:hover { border-color: var(--accent); }
.mod .body { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.mod h3 { margin: 0; font-size: 1.35rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .78rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.badge.adult { color: #fff; background: var(--accent2); border: 0; }
.badge.ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.mod ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: .95rem; }
.mod .actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.mod .actions .btn { padding: 10px 18px; font-size: .92rem; }
/* config.js notice: a warning right above the download button (e.g. the game updated, the mod isn't ready yet) */
.mod-notice { margin: auto 0 0; display: flex; gap: 9px; align-items: flex-start; padding: 10px 13px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 11%, transparent);
  color: var(--text); font-size: .9rem; line-height: 1.6; }
.mod-notice .ico { width: 1.25em; height: 1.25em; flex: none; margin-top: .15em; fill: none; stroke: var(--warn); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mod-notice + .actions { margin-top: 0; }
.note { color: var(--muted); font-size: .92rem; margin: 0; }

.mod details.guide { border-top: 1px solid var(--line); padding: 18px 24px 0; }
.mod details.guide:not([open]) { display: none; }      /* opened by the "วิธีติดตั้ง" button in the card */
.mod details.guide summary {
  cursor: pointer; padding: 14px 0; font-family: "Mitr", sans-serif; font-size: 1.05rem; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mod details.guide summary::-webkit-details-marker { display: none; }
.mod details.guide summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.mod details.guide[open]:not(.closing) summary::after { content: "−"; }
.steps { counter-reset: s; list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 10px 14px 10px 52px; background: var(--bg2); border-radius: 12px; }
.steps li::before {
  content: counter(s); position: absolute; left: 12px; top: 10px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.uninstall { margin: 0 0 18px; }

/* ===== Steam covers: pick a game's cover (or all of them); covers on the left, what's inside + buttons on the right ===== */
.mod.covers { padding: 22px 22px 0; }
/* covers are the same size on both pages (190px); 2-3 games (adult.html) sit beside the info,
   while 4+ games (.wide on index.html) use full card width in centered 190px rows above a balanced 2-column info bar */
.covers-layout { display: grid; grid-template-columns: auto minmax(0, 400px); justify-content: center; gap: 20px 32px; align-items: center; padding-bottom: 22px; }
.cover-grid { display: grid; grid-template-columns: repeat(var(--n, 3), 190px); gap: 16px; }
.covers-info { display: flex; flex-direction: column; gap: 10px; }
.covers-info h3 { font-size: 1.1rem; }
.covers-layout.wide { grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 22px; }
.covers-layout.wide .cover-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.covers-layout.wide .cover-pick { flex: 0 0 190px; }
.covers-layout.wide .covers-info {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 28px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.covers-layout.wide .covers-list { display: flex; flex-direction: column; gap: 6px; }
.covers-layout.wide .covers-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.covers-layout.wide .covers-cta .actions { justify-content: flex-end; margin: 0; }
.covers-layout.wide .covers-cta .dl-meta { justify-content: flex-end; }
.dl-meta.covers-more a { white-space: normal; }
.mod.covers .actions { margin: 4px 0 0; padding: 0; }
.mod.covers details.guide { margin: 0 -22px; }
@media (max-width: 1000px) {
  .covers-layout { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
  .cover-grid { grid-template-columns: repeat(var(--n, 3), minmax(0, 190px)); }
}
@media (max-width: 800px) {
  .mod.covers { padding: 16px 16px 0; }
  .cover-grid, .covers-layout.wide .cover-grid { gap: 12px; }
  .covers-layout.wide .covers-info { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .covers-layout.wide .covers-cta { align-items: flex-start; text-align: left; }
  .covers-layout.wide .covers-cta .actions, .covers-layout.wide .covers-cta .dl-meta { justify-content: flex-start; }
  .mod.covers details.guide { margin: 0 -16px; padding: 18px 16px 0; }
}
@media (max-width: 520px) {
  .cover-grid, .covers-layout.wide .cover-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .covers-layout.wide .cover-pick { flex: none; width: auto; }
}
.cover-pick {
  display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: var(--text);
}
.cover-pick:hover, .cover-pick:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.cover-pick .art { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--card); }
.cover-pick .art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-pick .art .badge { position: absolute; top: 8px; left: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.cover-pick .name { padding: 10px 12px 0; font-weight: 600; line-height: 1.35; }
.cover-pick .get { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding: 4px 12px 12px; color: var(--accent); font-size: .84rem; font-weight: 600; }
.cover-pick .get .size { color: var(--muted); font-weight: 500; white-space: nowrap; }
.cover-pick .get .ico { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
code { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; word-break: break-all; }
.steps code { background: var(--card); }

/* ===== green tea ===== */
.support { background: linear-gradient(135deg, color-mix(in srgb, var(--tea) 18%, var(--card)), color-mix(in srgb, var(--accent) 10%, var(--card)));
  border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
@media (max-width: 760px) { .support { grid-template-columns: 1fr; padding: 24px; } }
.support h2 { margin-top: 0; }
.support.donate { grid-template-columns: 1fr; gap: 20px; }
.support.donate > p { margin: 0; text-align: center; }
/* three identical cards: colored title bar, square QR / bank box, account name, action button */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, 260px); gap: 24px; justify-content: center; }
@media (max-width: 420px) { .qr-grid { grid-template-columns: minmax(0, 280px); } }
.qr-card { margin: 0; display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,.28); text-align: center; color: #1b2233; }
.qr-head { color: #fff; padding: 12px 14px 10px; display: grid; gap: 0; line-height: 1.35; }
.qr-head b { font-family: "Mitr", sans-serif; font-weight: 500; font-size: 1.15rem; }
.qr-head small { opacity: .88; font-size: .82rem; }
.qr-card > img { width: 100%; height: auto; aspect-ratio: 1; display: block; padding: 14px; object-fit: contain; }
.qr-card figcaption { margin-top: auto; font-weight: 700; padding: 0 12px 10px; font-size: .98rem; }
.qr-act {
  margin: 0 14px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem;
  color: #fff; background: var(--c, var(--accent)); text-decoration: none; transition: transform .15s, filter .15s;
}
.qr-act:hover { transform: translateY(-1px); filter: brightness(1.08); }
.qr-act .ico { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.donate-note { margin-top: 16px; text-align: center; }

/* FAQ: click a question to open it */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq details[open]:not(.closing) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; flex: none; }
.faq details[open]:not(.closing) summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* donate & report page header (keep .wrap's 16px side padding on mobile) */
.page-head { padding: 40px 16px 8px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }

/* footer: glowing gradient line, centered logo, soft legal card */
footer {
  position: relative; border-top: 1px solid var(--line); padding: 44px 0 40px; color: var(--muted); font-size: .9rem; text-align: center;
  background: radial-gradient(55% 140px at 50% 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent),
              linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg2) 80%, transparent));
}
footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: min(720px, 90%); height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent2) 45%, transparent);
}
footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
footer p { margin: 0; }
.foot-brand { font-size: 1.35rem; }
.foot-brand img { width: 44px; height: 44px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--accent2) 30%, transparent)); }
.foot-legal {
  max-width: 760px; padding: 14px 20px; border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent); font-size: .88rem; line-height: 1.8;
}
.foot-legal a { font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 640px) { .foot-legal br { display: none; } .foot-legal { padding: 12px 14px; } }
.foot-home {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; transition: transform .2s, border-color .2s;
}
.foot-home:hover { transform: translateY(-2px); border-color: var(--accent); }
.foot-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foot-fb svg { width: 18px; height: 18px; fill: #1877f2; flex: none; }
.foot-fb:hover { border-color: #1877f2; }
.toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; margin-left: 14px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 50%;
  transition: border-color .2s, transform .3s, color .2s;
}
.toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-20deg); }
.toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toggle .i-moon { fill: currentColor; stroke: none; }
/* dark theme shows the sun (tap for light), light theme shows the moon */
.toggle .i-moon { display: none; }
:root[data-theme="light"] .toggle .i-sun { display: none; }
:root[data-theme="light"] .toggle .i-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .toggle .i-sun { display: none; }
  :root:not([data-theme="dark"]) .toggle .i-moon { display: block; }
}
/* line icons inside buttons (download, send, guide chevron) */
.btn .ico { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn .chev { width: 1.05em; height: 1.05em; margin-right: -4px; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn[aria-expanded="true"] { border-color: var(--accent); }
.btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ===== report page ===== */
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 700; }
.field .hint { color: var(--muted); font-size: .88rem; margin: 0; }
.req { color: var(--accent2); }
.form input[type="text"], .form select, .form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.form textarea { min-height: 84px; resize: vertical; }
.form textarea#idea { min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--bg2); font-size: .93rem; }
.chips input { accent-color: var(--accent); }
.chips label:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.preview { white-space: pre-wrap; background: var(--bg2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; font-size: .9rem; color: var(--muted); max-height: 280px; overflow: auto; }
.form .btns { justify-content: flex-start; }
.msg { margin: 0; font-size: .92rem; color: var(--ok); min-height: 1.4em; }
.msg:empty { display: none; }
.form > .hint { margin: -8px 0 0; color: var(--muted); font-size: .88rem; }
.msg.err { color: var(--accent2); }
.msg a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.tips { color: var(--muted); font-size: .93rem; margin: 0; padding-left: 20px; }

/* bank account card (exact same square body size as the QR cards) */
.bank-body {
  aspect-ratio: 1; margin: 14px; border-radius: 12px; background: #f3f6f4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px;
}
.bank-icon { font-size: 2.6rem; line-height: 1; }
.qr-card img.bank-logo { width: 72px; height: 72px; padding: 0; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.bank-body small { color: #5b6573; font-size: .86rem; }
.bank-no { font-family: "Mitr", sans-serif; font-weight: 600; font-size: 1.52rem; letter-spacing: .03em; color: #10331f; font-variant-numeric: tabular-nums; }

/* report page: bug / idea switch */
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.mode button {
  border: 0; border-radius: 10px; padding: 10px 8px; cursor: pointer; font: inherit; font-weight: 700; font-size: 1rem;
  color: var(--muted); background: transparent; transition: background .25s, color .25s;
}
.mode button[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.mode-fields { display: grid; gap: 18px; }
.mode-fields[hidden] { display: none; }
.hint-inline { color: var(--muted); font-weight: 400; font-size: .88rem; }
@media (prefers-reduced-motion: no-preference) {
  .mode-fields:not([hidden]) { animation: rise .35s ease both; }
}

/* 404 page */
.nf { text-align: center; padding: 72px 0 80px; }
.nf-code {
  margin: 0; font-family: "Mitr", sans-serif; font-weight: 600; font-size: clamp(5rem, 20vw, 8.5rem); line-height: 1;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf h1 { margin: 6px 0 10px; font-size: clamp(1.5rem, 4vw, 2rem); }
.nf-text { color: var(--muted); margin: 0 auto 28px; max-width: 460px; }
.nf .btns { justify-content: center; }

/* theme switch animation (see main.js) */

/* screen-reader-only text (install-guide summaries: the card button opens them) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* file size · update date · game version · changelog, under the download buttons */
.dl-meta { margin: 2px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.dl-meta a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.dl-meta a:hover { text-decoration: underline; }
.dl-meta .sep { opacity: .5; margin: 0 6px; }
/* troubleshooting list inside an FAQ answer */
.faq ul.fix { margin: 0 0 12px; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.faq ul.fix b { color: var(--text); font-weight: 600; }

/* link box on the home page to the separate 18+ page */
.adult-link { margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px dashed var(--line); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.adult-link:hover { border-color: var(--accent2); transform: translateY(-2px); }
.adult-link b { display: block; font-family: "Mitr", sans-serif; font-weight: 500; }
.adult-link small { color: var(--muted); font-size: .88rem; }
.adult-link .arrow { margin-left: auto; color: var(--muted); font-size: 1.3rem; }

/* theme switch veil (main.js): fades in the new background colour, then out */
.theme-veil { position: fixed; inset: 0; z-index: 2147483647; pointer-events: none; opacity: 0; will-change: opacity; }
