/* ───────────────────────────────────────────────────────────────────────────
   Dragon Knight — landing page (beta)
   Plain CSS: no framework, no web fonts.

   (`site.css` sits INSIDE `assets/`, next to `img/`, so every image path is
   `img/…`. Each edition is a self-contained folder and must never reach out
   of it.)

   The palette was sampled pixel-by-pixel from real client screenshots (the
   Event dialog at 1280x720): panel body brown #5a4a2f, inner tile #6b5334,
   gold border #c9a33a, headings #ffe14d, cream body text #f4e7cf.
   Font: Verdana - the client's one and only face (`h5client/src/ui/font.ts`,
   `_globalStyle.as:101`), so the page and the game read as one system.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --ink:        #241708;
  --ink-2:      #2f2011;
  --wood:       #3a2a17;
  --panel:      #58421f;
  --panel-2:    #6b5334;
  --panel-3:    #7d6440;
  --line:       #8a6a34;
  --gold:       #c9a33a;
  --gold-2:     #e8c25a;
  --gold-hi:    #ffe14d;
  --cream:      #f4e7cf;
  --muted:      #cdb68e;
  --accent:     #e0741f;
  --accent-2:   #ffa23a;
  --danger:     #ff9c5c;
  --radius:     10px;
  --wrap:       1160px;
  --font: Verdana, "DejaVu Sans", Tahoma, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

/* `.btn`/`.strip li` dat display: nen [hidden] phai manh hon */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font: 15px/1.62 var(--font);
  color: var(--cream);
  background: var(--ink);
  background-image:
    radial-gradient(1100px 520px at 50% -180px, #4a3416 0%, rgba(74, 52, 22, 0) 70%),
    linear-gradient(180deg, #2b1d0e 0%, #241708 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold-2); }
a:hover { color: var(--gold-hi); }

:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-hi); color: #2b1d0e; padding: 10px 16px;
  font-weight: 700; z-index: 99;
}
.skip:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.plain { list-style: none; margin: 0; padding: 0; }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(36, 23, 8, .93);
  border-bottom: 1px solid #4e3a1c;
  backdrop-filter: blur(6px);
}
.topbar-in {
  display: flex; align-items: center; gap: 16px;
  min-height: 62px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand-name {
  font-size: 18px; font-weight: 700; letter-spacing: .3px;
  color: var(--gold-hi); text-shadow: 0 2px 0 #5a3a10;
}
.nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--gold-hi); border-bottom-color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* (the .langsw block was removed on 2026-09-18: one language per site, and
   each edition ships as its own independent folder.) */

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 700 15px/1 var(--font); color: #34210a;
  padding: 14px 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%);
  border: 1px solid #a5540f;
  box-shadow: 0 2px 0 #7e3f0b, 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); color: #34210a; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #7e3f0b; }
.btn-lg { font-size: 17px; padding: 17px 34px; }
.btn-sm { font-size: 13px; padding: 10px 16px; }
.btn-ghost {
  background: transparent; color: var(--gold-2);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { background: rgba(201, 163, 58, .12); color: var(--gold-hi); }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 22px 0 0; }
.cta-row.center { justify-content: center; }

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid #4e3a1c; }
.hero-art {
  position: absolute; inset: 0;
  background: url("img/hero.webp") center 30% / cover no-repeat;
  opacity: .72;
}
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(36, 23, 8, .92) 0%, rgba(36, 23, 8, .58) 52%, rgba(36, 23, 8, .12) 100%),
    linear-gradient(180deg, rgba(36, 23, 8, .45) 0%, rgba(36, 23, 8, .05) 38%, var(--ink) 100%);
}
.hero-in { position: relative; padding: 74px 20px 78px; max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) { .hero-in { margin-left: max(20px, calc((100vw - var(--wrap)) / 2)); } }

.badge {
  display: inline-block; margin: 0 0 14px;
  font: 700 12px/1 var(--font); letter-spacing: 1.4px; text-transform: uppercase;
  color: #2f2011; background: var(--gold-2);
  padding: 7px 12px; border-radius: 999px;
}
.hero-title {
  margin: 0 0 6px; font-size: clamp(38px, 7vw, 62px); line-height: 1.05;
  color: var(--gold-hi);
  text-shadow: 0 3px 0 #6b4310, 0 6px 22px rgba(0, 0, 0, .6);
}
.hero-tagline { margin: 0 0 16px; font-size: clamp(17px, 2.4vw, 22px); color: var(--gold-2); }
.hero-lede { margin: 0; font-size: 16px; color: var(--cream); max-width: 56ch; }
.hero-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

/* ── sections ────────────────────────────────────────────────────────────── */
.sec { padding: 64px 0; }
.sec-alt { background: rgba(58, 42, 23, .38); border-top: 1px solid #45311a; border-bottom: 1px solid #45311a; }
.sec-title {
  margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2;
  color: var(--gold-hi); text-shadow: 0 2px 0 #5a3a10;
}
.sec-lead { margin: 0 0 30px; color: var(--muted); max-width: 72ch; }
.strip-title { margin: 30px 0 12px; font-size: 15px; color: var(--gold-2); font-weight: 700; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18), 0 4px 16px rgba(0, 0, 0, .3);
}
.card h3 { margin: 0 0 8px; font-size: 16px; color: var(--gold-hi); }
.card p { margin: 0; color: var(--cream); font-size: 14px; }

.warn {
  margin: 24px 0 0; padding: 16px 18px;
  border: 1px solid #a3622a; border-left: 5px solid var(--accent);
  border-radius: var(--radius); background: rgba(224, 116, 31, .13);
  font-size: 14px;
}
.warn strong { color: var(--danger); display: block; margin-bottom: 4px; }

/* ── nostalgia block ─────────────────────────────────────────────────────── */
.nostalgia {
  margin: 22px 0 0; padding: 20px 22px;
  border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(107, 83, 52, .55) 0%, rgba(88, 66, 31, .55) 100%);
}
.nostalgia h3 { margin: 0 0 8px; font-size: 17px; color: var(--gold-hi); }
.nostalgia p { margin: 0; font-size: 14px; color: var(--cream); max-width: 78ch; }

/* ── class cards ─────────────────────────────────────────────────────────── */
.cls { text-align: center; display: flex; flex-direction: column; }
.cls-art {
  position: relative; height: 190px; margin: -6px 0 6px;
  display: flex; align-items: flex-end; justify-content: center;
}
.cls-art::before {
  content: ""; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 22px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 70%);
}
.cls-mount {
  position: relative; max-height: 176px; width: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}
.cls-pet {
  position: absolute; right: 2px; bottom: 4px;
  max-height: 76px; width: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)) drop-shadow(0 0 3px rgba(255, 236, 180, .55));
}
/* faint halo behind the pet - a dark pet (black panther) disappears into the
   brown card without it */
.cls-art::after {
  content: ""; position: absolute; right: 12px; bottom: 16px;
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 150, .18) 0%, rgba(255, 226, 150, 0) 70%);
}
.cls-name {
  margin: 0 0 2px; font-size: 21px; color: var(--gold-hi);
  text-shadow: 0 2px 0 #5a3a10, 0 0 14px rgba(255, 210, 80, .35);
}
.cls-role {
  margin: 0 0 10px !important; font-size: 12px; letter-spacing: .6px;
  text-transform: uppercase; color: var(--gold-2) !important;
}
.cls-desc { font-size: 13.5px !important; color: var(--cream) !important; text-align: left; }

/* ── mount / pet strip ───────────────────────────────────────────────────── */
/* Luoi chu KHONG phai flex-wrap: 9 thu cuoi o 128px thi o thu 9 rot xuong
   mot minh mot hang (da thay that trong anh xem truoc). Grid 9 cot chia deu
   giu ca hang lien mach, va cat xuong 5 / 3 cot o man hinh hep. */
.strip {
  display: grid; gap: 10px; align-items: stretch;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
.strip-sm {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.strip li {
  width: 100%; min-height: 122px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 8px 4px 6px; gap: 4px;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18);
  transition: transform .15s ease, border-color .15s ease;
}
.strip li:hover { transform: translateY(-3px); border-color: var(--gold-hi); }
.strip img { max-height: 96px; width: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.strip-sm li { min-height: 96px; justify-content: center; }

/* mount name under each tile - the real name from `cfg_mount`
   (keys mount_1_name .. mount_9_name) */
.strip-name {
  font-size: 11.5px; line-height: 1.25; color: var(--gold-2);
  text-align: center; hyphens: auto; overflow-wrap: anywhere;
}
.strip-sm img { max-height: 64px; }

/* ── feature cards ───────────────────────────────────────────────────────── */
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat img { flex: 0 0 auto; width: 44px; height: auto; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }

/* ── player guide ────────────────────────────────────────────────────────── */
/* Eight numbered tip cards + a ninth card (weddings) that opens a detail box
   IN PLACE. Everything here is plain HTML/CSS: a static site carries no
   diagram library, so the wedding timeline is drawn with borders. */
.guide { counter-reset: g; }
.guide .card h3::before {
  counter-increment: g; content: counter(g) ". ";
  color: var(--gold-2); font-weight: 700;
}
.guide-time { margin-top: 18px; }

.wed {
  margin: 18px 0 0;
  border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18), 0 4px 16px rgba(0, 0, 0, .3);
}
.wed > summary {
  display: flex; gap: 14px; align-items: flex-start;
  cursor: pointer; padding: 18px 20px; list-style: none;
}
.wed > summary::-webkit-details-marker { display: none; }
.wed > summary::after {
  content: "+"; margin-left: auto; color: var(--gold-2);
  font-size: 22px; line-height: 1.3;
}
.wed[open] > summary::after { content: "–"; }
.wed-sum { display: block; }
.wed-sum-t { display: block; font-size: 16px; font-weight: 700; color: var(--gold-hi); margin-bottom: 6px; }
.wed-sum-t::before { content: "9. "; color: var(--gold-2); }
.wed-sum-d { display: block; font-size: 14px; color: var(--cream); }
.wed-more {
  display: block; margin-top: 8px; font-size: 13px; color: var(--gold-2);
  text-decoration: underline; text-underline-offset: 3px;
}
.wed > summary:hover .wed-more { color: var(--gold-hi); }
.wed-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.wed-body h3 { margin: 18px 0 10px; font-size: 15px; color: var(--gold-hi); }
.wed-rule { margin: 0 0 14px; font-size: 14px; color: var(--cream); max-width: 86ch; }

/* timeline 08:00 -> 18:00 -> 20:00 -> gifts -> 21:00 */
.wedflow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; margin: 0; }
.wedflow li {
  position: relative; padding: 14px;
  background: rgba(36, 23, 8, .40);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.wedflow li::after {
  content: ""; position: absolute; right: -16px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left: 9px solid var(--gold);
}
.wedflow li:last-child::after { content: none; }
.wedflow-t {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px;
  font: 700 12px/1 var(--font); letter-spacing: .4px;
  color: #2f2011; background: var(--gold-2);
}
.wedflow-d { display: block; font-size: 13px; color: var(--cream); }

/* ring table — 4 classes x 3 betrothal-ring tiers */
.tablewrap { overflow-x: auto; margin: 0 0 12px; }
.ringtab { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 13.5px; }
.ringtab caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 13px; color: var(--muted); }
.ringtab th, .ringtab td { border: 1px solid var(--line); padding: 8px 10px; }
.ringtab thead th { background: rgba(36, 23, 8, .50); color: var(--gold-hi); text-align: right; }
.ringtab thead th:first-child { text-align: left; }
.ringtab tbody th { text-align: left; font-weight: 700; color: var(--gold-2); background: rgba(36, 23, 8, .28); }
.ringtab td { text-align: right; color: var(--cream); font-variant-numeric: tabular-nums; }
.ringtab-crit th, .ringtab-crit td { color: var(--gold-hi); background: rgba(201, 163, 58, .12); }

/* placeholder: no ceremony screenshot has been taken yet */
/* LAND-1d: the dashed placeholder is gone - these are real photos of the
   venue now, two per edition, side by side on a wide screen. */
.wedshots {
  display: grid; gap: 14px; margin: 14px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wedshot { margin: 0; }
.wedshot img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; background: #1b1206;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .34);
}
@media (max-width: 760px) { .wedshots { grid-template-columns: minmax(0, 1fr); } }
.wedshot figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ── gallery ─────────────────────────────────────────────────────────────── */
.gal figure { margin: 0; }
.gal img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #1b1206; object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .38);
}
.gal figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ── lightbox ────────────────────────────────────────────────────────────── */
.gal-open {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius);
}
.gal-open img { transition: transform .15s ease, border-color .15s ease; }
.gal-open:hover img { transform: translateY(-2px); border-color: var(--gold-hi); }

.lb {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px;
  background: rgba(15, 9, 3, .93);
}
.lb-fig { margin: 0; max-width: min(1280px, 100%); text-align: center; }
.lb-img {
  display: block; max-width: 100%; max-height: calc(100vh - 150px);
  width: auto; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #1b1206; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.lb-cap { margin: 12px auto 0; max-width: 80ch; font-size: 14px; color: var(--cream); }
.lb-count { color: var(--muted); }
.lb-btn {
  position: absolute; appearance: none; cursor: pointer;
  color: var(--gold-2); background: rgba(43, 29, 14, .85);
  border: 1px solid var(--line); border-radius: 50%;
  width: 46px; height: 46px; line-height: 1; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.lb-btn:hover { color: var(--gold-hi); border-color: var(--gold-hi); background: rgba(58, 42, 23, .95); }
.lb-close { top: 14px; right: 14px; font-size: 30px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

@media (max-width: 620px) {
  .lb { padding: 56px 8px; }
  .lb-btn { width: 40px; height: 40px; font-size: 22px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-cap { font-size: 13px; }
}

/* ── steps ───────────────────────────────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { position: relative; padding-top: 26px; }
.step-n {
  position: absolute; top: -14px; left: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 700 18px/1 var(--font); color: #34210a;
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 100%);
  border: 1px solid #8a6a34; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

/* ── community links ─────────────────────────────────────────────────────── */
.commlist { display: grid; gap: 10px; margin: 20px 0 0; }
.commlink {
  display: block; padding: 14px 18px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  color: var(--gold-2); font-weight: 700; font-size: 14px;
  transition: transform .14s ease, border-color .14s ease, color .14s ease;
}
.commlink:hover { transform: translateY(-2px); border-color: var(--gold-hi); color: var(--gold-hi); }
.commlink::after { content: " ↗"; color: var(--muted); font-weight: 400; }

/* ── faq ─────────────────────────────────────────────────────────────────── */
.faq {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(88, 66, 31, .5);
  margin-bottom: 10px; padding: 0 18px;
}
.faq summary {
  cursor: pointer; padding: 15px 0; font-weight: 700; color: var(--gold-hi);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold-2); font-size: 20px; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0 0 16px; color: var(--cream); font-size: 14px; }

.hint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ── footer ──────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid #45311a; padding: 34px 0 44px; background: rgba(27, 18, 6, .6); }
.foot-in { text-align: center; }
.foot p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.foot-beta { color: var(--gold-2) !important; }
.foot-links a { margin: 0 6px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .strip-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 420px; }
}
@media (max-width: 620px) {
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* wedding timeline turns vertical early: five steps never fit side by side on
   a tablet, and the arrow has to point DOWN once they stack. */
@media (max-width: 900px) {
  .wedflow { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .wedflow li::after {
    right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%);
    border: 6px solid transparent; border-top: 9px solid var(--gold);
  }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar-in { min-height: 56px; }
  .sec { padding: 46px 0; }
  .hero-in { padding: 54px 20px 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .cls-desc { text-align: center; }
  .btn { width: 100%; text-align: center; }
  .btn-sm { width: auto; }
  .cta-row { gap: 10px; }
  .wed > summary { padding: 16px; }
  .wed-body { padding: 0 16px 16px; }
  .strip li { min-height: 104px; padding: 6px 3px 5px; }
  .strip img { max-height: 72px; }
  .strip-name { font-size: 10.5px; }
}

/* ── account controls in the top bar ─────────────────────────────────────── */
/* Hidden in the HTML; site.js reveals it only when a portal is configured. */
.acct { display: flex; align-items: center; gap: 8px; }
.acct-out, .acct-in { display: flex; align-items: center; gap: 8px; }
.acct-name {
  font-weight: 700; font-size: 13px; color: var(--gold-hi);
  max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-name::before { content: "\2022 "; color: #7fd47f; }

/* ── server list ─────────────────────────────────────────────────────────── */
.srvlist { align-items: stretch; }
.srv { display: flex; flex-direction: column; gap: 6px; }
.srv-head { display: flex; align-items: center; gap: 10px; margin: 0 !important; }
.srv-code {
  font: 700 13px/1 var(--font); letter-spacing: .8px; color: #34210a;
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 100%);
  border: 1px solid #8a6a34; border-radius: 6px; padding: 5px 9px;
}
.srv-state {
  font-size: 12px; letter-spacing: .4px; text-transform: uppercase; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1px solid transparent;
}
.srv-state.is-open { color: #bff0bf; background: rgba(80, 160, 80, .22); border-color: #4d8a4d; }
.srv-state.is-new  { color: #ffe2a8; background: rgba(224, 116, 31, .22); border-color: #a3622a; }
.srv-state.is-full,
.srv-state.is-maint,
.srv-state.is-soon { color: var(--muted); background: rgba(0, 0, 0, .22); border-color: var(--line); }
.srv-name { margin: 4px 0 0 !important; font-size: 18px; color: var(--gold-hi); }
.srv-meta { margin: 0 0 4px !important; font-size: 13px !important; color: var(--muted) !important; }
.srv .btn { margin-top: auto; align-self: flex-start; }
.srv-soon { opacity: .72; }

/* ── modal (sign in / register) ──────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(12, 8, 3, .82);
  overflow-y: auto;
}
.modal-box {
  position: relative; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18), 0 10px 40px rgba(0, 0, 0, .6);
}
.modal-x {
  position: absolute; top: 8px; right: 10px;
  background: none; border: 0; cursor: pointer;
  font: 400 26px/1 var(--font); color: var(--muted);
}
.modal-x:hover { color: var(--gold-hi); }

.mtabs { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.mtab {
  flex: 1; cursor: pointer; background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 10px 6px; font: 700 15px/1 var(--font); color: var(--muted);
}
.mtab:hover { color: var(--gold-hi); }
.mtab[aria-selected="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }

.authform { display: flex; flex-direction: column; }
.authform label {
  font: 700 13px/1 var(--font); color: var(--gold-2);
  margin: 0 0 6px;
}
.authform input {
  font: 15px/1.3 var(--font); color: var(--cream);
  background: rgba(24, 15, 5, .55);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 12px; width: 100%;
}
.authform input:focus { border-color: var(--gold-hi); outline: none; box-shadow: 0 0 0 2px rgba(255, 225, 77, .25); }
.authform input[aria-invalid="true"] { border-color: #d2703a; }
.fieldhint { margin: 5px 0 14px; font-size: 12px; color: var(--muted); }
.onlyreg { display: block; }
.authform .btn { margin-top: 6px; width: 100%; text-align: center; }
.authform .btn[disabled] { filter: grayscale(.5) brightness(.85); cursor: progress; }

.formerr {
  margin: 0 0 12px; padding: 10px 12px; font-size: 13px;
  color: #ffd9c4; background: rgba(224, 116, 31, .18);
  border: 1px solid #a3622a; border-left: 4px solid var(--accent); border-radius: 6px;
}
.formok { color: #bff0bf; background: rgba(80, 160, 80, .18); border-color: #4d8a4d; border-left-color: #6fbf6f; }

body.modal-open { overflow: hidden; }

@media (max-width: 760px) {
  .acct { width: 100%; justify-content: flex-end; }
  .acct .btn { width: auto; }
  .modal { padding: 12px; align-items: flex-start; }
  .modal-box { padding: 18px 16px 14px; }
}

/* ── LAND-2c: CTA jumps to the server list ───────────────────────────────── */
/* The top bar is sticky, so an anchor jump has to stop short of it or the
   section heading lands underneath. Applies to every in-page anchor, not just
   the server one. */
.sec, .hero { scroll-margin-top: 78px; }
@media (max-width: 760px) { .sec, .hero { scroll-margin-top: 66px; } }

/* The card the CTA just sent you to. The border/ring is set outright (not
   only inside the keyframes) so the cue still shows when the viewer has asked
   for reduced motion, which switches every animation off. */
.srv-flash {
  border-color: var(--gold-hi);
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18),
              0 0 0 3px rgba(255, 225, 77, .35),
              0 6px 22px rgba(0, 0, 0, .35);
  animation: srv-flash 1.6s ease-out 1;
}
@keyframes srv-flash {
  0%, 55% { box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18),
                        0 0 0 4px rgba(255, 225, 77, .55),
                        0 6px 22px rgba(0, 0, 0, .35); }
  100%    { box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18),
                        0 0 0 3px rgba(255, 225, 77, .2),
                        0 6px 22px rgba(0, 0, 0, .35); }
}

/* ── LAND-2e: the game, played in a frame on this page ───────────────────── */
/* Covers the viewport: a thin bar with the server name and the controls, and
   the game filling everything under it. `dvh` keeps mobile browsers from
   hiding the bottom of the frame behind their own chrome; `vh` stays as the
   fallback for browsers without it. */
.playframe {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  background: #120c04;
}
.pf-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 12px;
  background: rgba(36, 23, 8, .96);
  border-bottom: 1px solid #4e3a1c;
}
.pf-name {
  font: 700 13px/1.2 var(--font); color: var(--gold-hi);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pf-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.pf-btn {
  cursor: pointer; font: 700 12px/1 var(--font); color: var(--gold-2);
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 12px;
}
.pf-btn:hover { color: var(--gold-hi); border-color: var(--gold-hi); }
.pf-btn-x { color: #34210a; background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%); border-color: #a5540f; }
.pf-btn-x:hover { color: #34210a; filter: brightness(1.07); }

/* The frame itself is created by site.js and dropped in here. */
.pf-slot { flex: 1 1 auto; min-height: 0; }
.pf-frame { display: block; width: 100%; height: 100%; border: 0; }

/* Lock the page behind the frame so a swipe does not scroll two things at
   once on a phone. */
body.pf-open { overflow: hidden; }

@media (max-width: 760px) {
  .pf-bar { padding: 6px 8px; }
  .pf-name { font-size: 12px; }
  .pf-btn { padding: 8px 10px; }
}

/* ── live support widget (SUP-2) ─────────────────────────────────────────────
   Built by support-widget.js only when BOTH data-portal-url and
   data-support-url are set; otherwise none of this markup exists. Sits under
   the sign-in modal (60) so "Sign in" from the widget opens on top of it, and
   hides while the game frame is open - the game has its own Support channel. */
.sw { position: fixed; right: 18px; bottom: 18px; z-index: 50; font-family: var(--font); }
body.pf-open .sw { display: none; }
.sw-fab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; font: 700 14px/1 var(--font); color: #34210a;
  padding: 12px 18px 12px 14px; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%);
  border: 1px solid #a5540f;
  box-shadow: 0 2px 0 #7e3f0b, 0 6px 18px rgba(0, 0, 0, .45);
  transition: transform .12s ease, filter .12s ease;
}
.sw-fab:hover { filter: brightness(1.07); transform: translateY(-1px); }
.sw-fab:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.sw-open .sw-fab { filter: brightness(.92); }
.sw-badge {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 10px; background: #c8321e; color: #fff;
  font: 700 11px/20px var(--font); text-align: center;
  box-shadow: 0 0 0 2px var(--ink);
}
.sw-panel {
  position: absolute; right: 0; bottom: 62px;
  width: 360px; height: 480px; max-height: calc(100vh - 110px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 226, 150, .18), 0 12px 40px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.sw-panel[hidden] { display: none !important; }
.sw-panel.sw-guest { height: auto !important; }
.sw-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line);
  background: rgba(36, 23, 8, .45);
}
.sw-title { margin: 0; font: 700 15px/1.2 var(--font); color: var(--gold-hi); }
.sw-status { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.sw-x {
  background: none; border: 0; cursor: pointer; padding: 0 4px;
  font: 400 26px/1 var(--font); color: var(--muted);
}
.sw-x:hover { color: var(--gold-hi); }
.sw-gate { padding: 22px 18px; }
.sw-gate-text { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--cream); }
.sw-gate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sw-log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 12px 6px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(24, 15, 5, .35);
}
.sw-msg {
  max-width: 85%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; line-height: 1.45; color: var(--cream);
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.sw-who { display: block; margin: 0 0 2px; font-weight: 700; font-size: 12px; }
.sw-at { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); text-align: right; }
.sw-me { align-self: flex-end; background: rgba(224, 116, 31, .28); border: 1px solid #a3622a; }
.sw-me .sw-who { color: var(--accent-2); }
.sw-staff { align-self: flex-start; background: rgba(36, 23, 8, .7); border: 1px solid var(--line); }
.sw-staff .sw-who { color: var(--gold-hi); }
.sw-sys {
  align-self: center; max-width: 92%; text-align: center;
  font-size: 12px; font-style: italic; color: var(--gold-2);
  background: transparent; padding: 2px 6px;
}
.sw-sys .sw-at { display: inline; margin-left: 6px; }
.sw-err {
  margin: 0; padding: 7px 12px; font-size: 12px;
  color: #ffd9c4; background: rgba(224, 116, 31, .18); border-top: 1px solid #a3622a;
}
.sw-form {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px 12px; border-top: 1px solid var(--line);
}
.sw-input {
  flex: 1 1 auto; resize: none; min-height: 40px; max-height: 110px;
  font: 14px/1.35 var(--font); color: var(--cream);
  background: rgba(24, 15, 5, .55);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px;
}
.sw-input:focus { border-color: var(--gold-hi); outline: none; box-shadow: 0 0 0 2px rgba(255, 225, 77, .25); }
.sw-send[disabled] { filter: grayscale(.5) brightness(.85); cursor: progress; }
/* SUP-3: images */
.sw-attach {
  flex: 0 0 auto; align-self: stretch; width: 36px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold-hi); background: rgba(24, 15, 5, .55);
  border: 1px solid var(--line); border-radius: 6px;
}
.sw-attach:hover { border-color: var(--gold-hi); }
.sw-attach:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.sw-attach[disabled] { opacity: .5; cursor: progress; }
.sw-img {
  display: block; padding: 0; margin: 2px 0 0; cursor: zoom-in; background: #000;
  border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: inherit;
  min-width: 60px; min-height: 24px;
}
.sw-img[disabled] { cursor: default; background: transparent; padding: 2px 6px; }
.sw-img img { display: block; max-width: 220px; max-height: 160px; border-radius: 3px; }
.sw-drop {
  position: absolute; inset: 56px 8px 8px; z-index: 2; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--gold-hi); border-radius: var(--radius); background: rgba(24, 15, 5, .82);
  color: var(--gold-hi); font-weight: 700; pointer-events: none;
}
.sw-drop[hidden] { display: none; }
.sw-lightbox {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .82); cursor: zoom-out; padding: 16px;
}
.sw-lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--gold); box-shadow: 0 8px 40px #000; }

@media (max-width: 760px) {
  .sw { right: 12px; bottom: 12px; }
  .sw-fab-text { display: none; }
  .sw-fab { padding: 13px; }
  .sw-panel {
    position: fixed; left: 8px; right: 8px; bottom: 74px; width: auto;
    height: calc(100dvh - 90px); max-height: calc(100vh - 90px);
  }
}

/* ── manual top-up desk (PAY-1) ──────────────────────────────────────────────
   Built by topup-widget.js only when data-portal-url + data-support-url are set
   AND the support server reports the desk as enabled. Reuses .modal/.authform. */
.tu-box { max-width: 560px; }
.tu-title { margin: 0 0 14px; font-size: 19px; color: var(--gold-hi); }
.tu-gate .btn { margin-top: 10px; }
.tu-form .tu-input, .tu-form select, .tu-form textarea {
  font: 14px/1.35 var(--font); color: var(--cream);
  background: rgba(24, 15, 5, .55);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 10px; width: 100%; margin: 0 0 12px;
}
.tu-form select option { color: #241708; background: #f4e7cf; }
.tu-form .tu-input:focus { border-color: var(--gold-hi); outline: none; box-shadow: 0 0 0 2px rgba(255, 225, 77, .25); }
.tu-form .fieldhint { margin-top: -6px; }
.tu-label { font: 700 13px/1 var(--font); color: var(--gold-2); margin: 0 0 6px; }
/* PAY-1b: price list only (not selectable) */
.tu-pkgs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 0 0 6px; }
.tu-pkg {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(24, 15, 5, .45); color: var(--cream); font-family: var(--font);
}
.tu-pts { font-weight: 700; font-size: 15px; color: var(--gold-hi); }
.tu-unit { font-size: 11px; color: var(--muted); }
.tu-price { font-size: 12px; color: var(--cream); }
.tu-instr {
  white-space: pre-wrap; font-size: 13px; line-height: 1.5; margin: 0 0 14px;
  padding: 10px 12px; border-radius: 6px; border: 1px dashed var(--line); background: rgba(0, 0, 0, .18);
}
.tu-sub { margin: 18px 0 8px; font-size: 15px; color: var(--gold-2); }
.tu-orders { list-style: none; margin: 0; padding: 0; max-height: 180px; overflow-y: auto; }
.tu-order {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid rgba(138, 106, 52, .5); font-size: 13px;
}
.tu-oid { font-weight: 700; color: var(--gold-2); }
.tu-opts { flex: 1 1 auto; }
.tu-ost { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tu-approved .tu-ost { color: #bff0bf; border-color: #4d8a4d; background: rgba(80, 160, 80, .18); }
.tu-rejected .tu-ost { color: #ffd9c4; border-color: #a3622a; }
.tu-oreason { flex-basis: 100%; font-size: 12px; color: #ffd9c4; }
.tu-none { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .tu-pkgs { grid-template-columns: repeat(3, 1fr); }
}
