/* 12 Tails Online website. Colours from the game: the title screen's dark brown and teal ornaments, the client's
   parchment panels (create / stat card) and its gold buttons. No web fonts: Georgia like the game's GUI, then the
   system's Thai faces. */
/* Georgia draws old-style figures (a balance of 0 reads as "o", a 500 page as "5oo"): the digits of the serif stack
   come from a serif with lining figures, the letters stay Georgia's. With none of these faces the digits fall through
   to Georgia as before. local() only: nothing is downloaded. */
@font-face { font-family: "TT Digits"; font-weight: 400; unicode-range: U+0030-0039;
  src: local("Cambria"), local("Times New Roman"), local("TimesNewRomanPSMT"), local("Noto Serif"), local("NotoSerif"),
       local("Liberation Serif"), local("DejaVu Serif"); }
@font-face { font-family: "TT Digits"; font-weight: 700; unicode-range: U+0030-0039;
  src: local("Cambria Bold"), local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Noto Serif Bold"),
       local("NotoSerif-Bold"), local("Liberation Serif Bold"), local("DejaVu Serif Bold"); }
:root {
  --bg: #1c1813; --bg2: #26201a; --bg3: #2f271f; --line: rgba(240, 200, 130, .18);
  --ink: #f1e8d6; --muted: #c2b293; --gold: #f0a63a; --gold2: #ffcf7a; --gold3: #c97a1f;
  --teal: #47c1c6; --teal2: #1f6a70;
  --parch: #f6ecd3; --parch2: #ecdcb6; --pink: #3c2a14; --pmuted: #6b5838; --pline: #8a6a3c; --plink: #8c4a10;
  --bad: #ff8a7a; --ok: #7fd892;
  --serif: "TT Digits", Georgia, "Noto Serif Thai", "Leelawadee UI", Thonburi, "Times New Roman", serif;
  --sans: "Noto Sans Thai", "Leelawadee UI", "Segoe UI", Thonburi, Tahoma, system-ui, sans-serif;
  --r: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans); background-image: radial-gradient(1200px 600px at 50% -200px, #3a2d20 0%, transparent 70%); }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--gold2); }
a:hover { color: #fff1cf; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }
.block { padding-top: 40px; padding-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--gold); color: #2a1a06; padding: 8px 14px; }
.skip:focus { left: 8px; top: 8px; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -.2em; flex: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---- buttons: the client's gold ------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 10px;
  border: 1px solid #7a5326; background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, var(--gold3));
  color: #2a1a06; font: 700 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 4px 14px rgba(0, 0, 0, .35); transition: filter .15s, transform .1s; }
.btn:hover { color: #2a1a06; filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: rgba(20, 16, 12, .55); color: var(--ink); border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(71, 193, 198, .25); }
.btn.ghost:hover { color: #fff; background: rgba(31, 106, 112, .45); }
.btn.sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn.big { padding: 15px 34px; font-size: 19px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn.play { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 3px rgba(240, 166, 58, .18), 0 6px 22px rgba(240, 140, 30, .35); }
.btn.big.play { min-width: 230px; letter-spacing: .5px; }
.linkbtn { background: none; border: 0; padding: 4px 6px; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.linkbtn:hover { color: var(--gold2); text-decoration: underline; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.cta.center { justify-content: center; }

/* ---- header ------------------------------------------------------------------------------------------ */
.top { position: sticky; top: 0; z-index: 20; background: rgba(24, 19, 14, .92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topin { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: block; flex: none; }
.brand img { display: block; width: 116px; height: auto; }
.navbox { display: flex; align-items: center; gap: 18px; flex: 1; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--gold2); background: rgba(255, 255, 255, .05); }
.nav a[aria-current] { color: var(--gold2); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 8px 8px 0 0; }
.acct { display: flex; align-items: center; gap: 8px; }
.me { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); max-width: 190px; }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me[aria-current] { color: var(--gold2); }
/* the Android app's link: in the phone menu (its readers) and where the header has room for six links */
.nav a.n-app { display: none; }
@media (min-width: 1180px) { .nav a.n-app { display: block; } }
.navt { position: absolute; opacity: 0; pointer-events: none; }
.navbtn { display: none; margin-left: auto; width: 44px; height: 40px; border-radius: 8px; cursor: pointer; padding: 10px;
  border: 1px solid var(--line); flex-direction: column; justify-content: space-between; }
.navbtn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.navt:focus-visible + .navbtn { outline: 3px solid var(--teal); }
@media (max-width: 900px) {
  .navbtn { display: flex; }
  .navbox { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
    gap: 6px; padding: 10px 16px 16px; background: #18130e; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .6); }
  .navt:checked ~ .navbox { display: flex; z-index: 1; }
  /* the page dims under the open menu (its edge read as part of the page) and a tap on it closes the menu */
  .navshade { display: none; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: rgba(6, 4, 2, .62); }
  .navt:checked ~ .navshade { display: block; }
  .navbtn span { transition: transform .2s, opacity .2s; }
  .navt:checked + .navbtn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .navt:checked + .navbtn span:nth-child(2) { opacity: 0; }
  .navt:checked + .navbtn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav { flex-direction: column; }
  .nav a { padding: 12px; font-size: 16px; }
  .nav a.n-app { display: block; }
  .nav a[aria-current] { box-shadow: inset 3px 0 0 var(--gold); border-radius: 0 8px 8px 0; }
  .acct { flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
  .acct .btn { flex: 1; }
}
.banner { background: linear-gradient(90deg, #12464b, #1f6a70, #12464b); color: #e9fbfb; text-align: center; padding: 8px 16px; font-size: 15px; }
.banner a { color: #fff; }
/* an app's own browser (site.js): the way to Chrome / Safari and the link to copy */
.inapp { background: #2a2116; color: #fff1d0; text-align: center; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #6b5432; }
.inapp p { margin: 0 0 8px; }
.inapp-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.inapp small { display: block; margin-top: 6px; min-height: 1.2em; color: #ffd98a; word-break: break-all; }

/* ---- messages ---------------------------------------------------------------------------------------- */
.msg { margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.msg.err { background: #fbe1da; color: #7a1d10; border: 1px solid #d98a7b; }
.msg.ok { background: #e1f4df; color: #1f5a26; border: 1px solid #8cc58e; }
.wrap > .msg { margin-top: 16px; }

/* ---- parchment: the game's panels ---------------------------------------------------------------------- */
.parch { color-scheme: light; background: linear-gradient(180deg, var(--parch), var(--parch2)); color: var(--pink); border: 2px solid var(--pline);
  border-radius: var(--r); box-shadow: 0 0 0 3px rgba(122, 83, 38, .45), 0 14px 30px rgba(0, 0, 0, .45); }
.parch a { color: var(--plink); }
.parch .btn.ghost { background: rgba(255, 255, 255, .35); color: #3c2a14; border-color: #1f6a70; box-shadow: none; }
/* the account's deletion (pages.account_delete): its button warns */
.btn.danger { background: linear-gradient(#b8432f, #7a2216); color: #fff4ea; border-color: #5a1a10; }
.btn.danger:hover { filter: brightness(1.1); }
.parch .btn.ghost:hover { background: rgba(31, 106, 112, .14); color: #1d3f42; }
.parch a:hover { color: #5a2c05; }
.parch .muted { color: var(--pmuted); }
.parch h1, .parch h2, .parch h3 { color: #4a3418; }
.card { padding: 26px 24px; margin-bottom: 22px; }
.card > :first-child { margin-top: 0; }
.card h1 { margin: 0 0 6px; font-size: 28px; }
.card h2 { margin: 0 0 12px; font-size: 20px; }
.ptitle { margin: 0 0 22px; font-size: 32px; color: var(--gold2); text-shadow: 0 2px 0 #000, 0 0 18px rgba(240, 166, 58, .25); }

/* ---- hero -------------------------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-bottom: 36px;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #3b2f22 0%, #241d16 55%, var(--bg) 100%); }
/* the title screen's swirls, one a corner, pinned to the window's edges whatever its width (build_art.py ornaments) */
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 320px; pointer-events: none; opacity: .6;
  background: url(img/ornament-l.webp) left bottom / auto 320px no-repeat, url(img/ornament-r.webp) right bottom / auto 320px no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.heroart { max-width: 1320px; margin: 0 auto; }
.heroart img { display: block; width: auto; max-width: 100%; margin: 0 auto; max-height: max(320px, calc(100vh - 285px));
  -webkit-mask-image: radial-gradient(ellipse 54% 56% at 50% 46%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 54% 56% at 50% 46%, #000 72%, transparent 100%); }
.herobody { position: relative; z-index: 1; text-align: center; margin-top: 6px; }
.tagline { font-size: 19px; margin: 0 auto; max-width: 640px; text-shadow: 0 2px 4px #000; }
.tagline strong { color: var(--gold2); }
.hero .cta { justify-content: center; }
.status { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0; padding: 8px 16px; border-radius: 999px;
  background: rgba(10, 8, 6, .6); border: 1px solid var(--line); font-size: 15px; }
.status b { color: var(--gold2); }
.applink { margin: -6px 0 12px; font-size: 15px; text-shadow: 0 2px 4px #000; }
.applink a { color: var(--teal); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.applink a:hover { color: #a8f1f3; text-decoration: underline; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #8a8170; flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(127, 216, 146, .2), 0 0 10px var(--ok); }
.dot.off { background: var(--bad); }

/* ---- home sections ----------------------------------------------------------------------------------- */
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: 26px; color: var(--gold2); text-shadow: 0 2px 0 #000; }
.more { font-size: 15px; }
.newsgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ncard { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); text-decoration: none; color: var(--pink);
  background: linear-gradient(180deg, var(--parch), var(--parch2)); border: 2px solid var(--pline);
  box-shadow: 0 0 0 3px rgba(122, 83, 38, .4), 0 10px 24px rgba(0, 0, 0, .4); transition: transform .15s; }
.ncard:hover { transform: translateY(-3px); color: var(--pink); }
.ncard img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; border-bottom: 2px solid var(--pline); }
.nbody { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.nbody b { font: 700 18px/1.35 var(--serif); color: #3a2410; }
.nsum { color: var(--pmuted); font-size: 15px; }
.nmeta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pmuted); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #1f6a70; color: #eafcfc; font-size: 12px; font-weight: 700; }
.races-strip { background: linear-gradient(180deg, transparent, rgba(31, 106, 112, .12) 30%, rgba(31, 106, 112, .12) 70%, transparent); padding-bottom: 28px; }
.faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 10px; }
.face { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); }
.face img { width: 96px; height: 96px; object-fit: cover; object-position: 50% 10%; border-radius: 50%; margin-bottom: 8px;
  background: radial-gradient(#5a4730, #241a10); box-shadow: 0 0 0 3px #7a5326, 0 0 0 6px #e9c97a, 0 4px 12px rgba(0, 0, 0, .6);
  transition: box-shadow .15s, transform .15s; }
.face:hover img { transform: translateY(-3px); box-shadow: 0 0 0 3px #7a5326, 0 0 0 6px #ffe08a, 0 0 22px #ffd36a; }
.face b { font: 700 16px var(--serif); }
.face small { color: var(--muted); font-size: 13px; }
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feat { position: relative; display: block; overflow: hidden; border-radius: var(--r); aspect-ratio: 3 / 4; text-decoration: none;
  border: 2px solid #7a5326; box-shadow: 0 0 0 3px rgba(233, 201, 122, .25), 0 10px 26px rgba(0, 0, 0, .5); }
.feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.feat:hover img { transform: scale(1.05); }
.ftext { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; padding: 60px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(16, 12, 8, .88) 45%); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.ftext b { font: 700 19px var(--serif); color: var(--gold2); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps li { counter-increment: s; position: relative; padding: 20px 18px 18px 74px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font: 700 22px var(--serif); color: #2a1a06;
  background: linear-gradient(180deg, var(--gold2), var(--gold3)); box-shadow: 0 0 0 3px rgba(240, 166, 58, .25); }
.steps b { display: block; font: 700 18px var(--serif); color: var(--gold2); }
.steps span { color: var(--muted); font-size: 15px; }

/* ---- documents (guide, FAQ, rules, news) ------------------------------------------------------------- */
.doc, .post { padding: 26px 28px; margin-bottom: 24px; }
.doc > :first-child, .post > :first-child { margin-top: 0; }
.doc h2, .post h2 { font-size: 24px; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #c9b07f; }
.doc h3 { font-size: 19px; margin: 22px 0 6px; }
.doc h4 { font-size: 17px; margin: 18px 0 4px; }
.doc p, .post p { margin: 0 0 12px; }
.doc ul, .doc ol, .post ul, .post ol { margin: 0 0 14px; padding-left: 24px; }
.doc li { margin: 3px 0; }
.doc code, .post code, .card code { background: rgba(122, 83, 38, .14); padding: 1px 6px; border-radius: 5px; font-size: .92em; color: #5a2c05; }
.note { background: rgba(31, 106, 112, .1); border-left: 4px solid #1f6a70; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 0 0 14px; }
.post .nmeta { margin-bottom: 4px; }
.post h2 { margin-top: 6px; border: 0; }
.tablewrap { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #d6c095; vertical-align: middle; }
th { font-weight: 700; color: #4a3418; background: rgba(122, 83, 38, .1); white-space: nowrap; }

/* races */
.races { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 10px 0 20px; }
.race { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; padding: 14px; border-radius: 10px;
  background: rgba(255, 252, 240, .55); border: 1px solid #cdb383; scroll-margin-top: 80px; }
.rart { background: radial-gradient(circle at 50% 40%, #2f6f73, #173a3e 75%); border-radius: 10px; overflow: hidden; align-self: start;
  box-shadow: inset 0 0 0 2px rgba(233, 201, 122, .5); }
.rart img { display: block; width: 100%; }
.race h3 { margin: 0; font-size: 21px; }
.race h3 span { font-size: 15px; color: var(--pmuted); font-style: italic; margin-left: 4px; }
.race .role { margin: 2px 0 6px; font-weight: 700; color: #1f6a70; font-size: 14px; }
.race p { font-size: 15px; margin: 0 0 8px; }
.race .sh { font-size: 13px; color: var(--pmuted); margin: 6px 0 2px; }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 14px; font-size: 13px; }
.stats li { display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 6px; }
.stats span { color: var(--pmuted); font-weight: 700; }
.bar { display: block; height: 7px; border-radius: 4px; background: rgba(122, 83, 38, .18); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #c97a1f, #f0a63a); }
.v1 { width: 8.3%; } .v2 { width: 16.7%; } .v3 { width: 25%; } .v4 { width: 33.3%; } .v5 { width: 41.7%; } .v6 { width: 50%; }
.v7 { width: 58.3%; } .v8 { width: 66.7%; } .v9 { width: 75%; } .v10 { width: 83.3%; } .v11 { width: 91.7%; } .v12 { width: 100%; }
.stats b { text-align: right; }
.doc [id], main h2[id] { scroll-margin-top: 80px; }

/* ---- forms ------------------------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.flabel { font-weight: 700; font-size: 15px; color: #4a3418; }
.flabel small { font-weight: 400; color: var(--pmuted); }
.field input, .pwwrap input { width: 100%; padding: 11px 12px; font: 16px var(--sans); color: #2c2416; background: #fffaf0;
  border: 1px solid #b39568; border-radius: 8px; }
.field input:focus { outline: 3px solid rgba(31, 106, 112, .45); outline-offset: 0; border-color: #1f6a70; }
.pwwrap { position: relative; display: block; }
.pwwrap input { padding-right: 70px; }
.pwtoggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px 8px;
  color: #6b5838; font: 600 13px var(--sans); cursor: pointer; border-radius: 6px; }
.pwtoggle:hover { background: rgba(122, 83, 38, .12); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: #c97a1f; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alt { margin: 16px 0 0; text-align: center; font-size: 15px; }

/* ---- account ----------------------------------------------------------------------------------------- */
.acctgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.acctgrid h2 { color: var(--gold2); font-size: 22px; margin: 26px 0 12px; }
.acctgrid aside h2, .acctgrid .card h2 { margin-top: 0; color: #4a3418; }   /* (gold is for the dark page, not parchment) */
.whoami { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.whoami > div { display: flex; flex-direction: column; }
.whoami .login { font: 700 26px var(--serif); color: #3a2410; word-break: break-all; }
.whoami small { font-size: 13px; }
.chars { display: flex; flex-direction: column; gap: 14px; }
.char { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.char.empty { border: 2px dashed rgba(240, 200, 130, .3); border-radius: var(--r); color: var(--muted); align-items: center; }
.char.empty h3 { margin: 0; color: var(--muted); }
.plus { width: 72px; height: 72px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 700 32px var(--serif);
  color: #e9c97a; border: 2px dashed rgba(233, 201, 122, .4); }
.cface { width: 84px; height: 84px; flex: none; object-fit: cover; object-position: 50% 10%; border-radius: 50%;
  background: radial-gradient(#5a4730, #241a10); box-shadow: 0 0 0 3px #7a5326, 0 0 0 5px #e9c97a; margin: 4px; }
.cinfo { flex: 1; min-width: 0; }
.cinfo h3 { margin: 0; font-size: 22px; word-break: break-all; }
.crace { margin: 0; color: var(--pmuted); font-size: 14px; }
.guild { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; color: #6b3f9a; }
.guild.none { color: var(--pmuted); font-weight: 400; }
.lv { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 15px; }
.lv b { font-size: 18px; }
.exp { flex: 1; height: 9px; border-radius: 5px; background: rgba(122, 83, 38, .2); overflow: hidden; display: block; }
.exp i { display: block; height: 100%; background: linear-gradient(90deg, #1f6a70, #47c1c6); }
.lv small { color: var(--pmuted); width: 38px; text-align: right; }
.w0 { width: 0; } .w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; }
.w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; } .w55 { width: 55%; }
.w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; } .w85 { width: 85%; }
.w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }
.cstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.cstats div { background: rgba(122, 83, 38, .08); border-radius: 8px; padding: 6px 8px; }
.cstats dt { font-size: 12px; color: var(--pmuted); }
.cstats dd { margin: 0; font-weight: 700; }

/* ---- rankings ---------------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs a { padding: 8px 18px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--bg2);
  border: 1px solid var(--line); font-weight: 700; }
.tabs a:hover { border-color: var(--gold); color: var(--gold2); }
.tabs a[aria-current] { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2a1a06; border-color: #7a5326; }
.tablewrap.parch { padding: 6px 10px; }
.rank td { padding: 9px 10px; }
.rank .pos { width: 64px; }
.pos span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 50%; font: 700 15px var(--serif);
  color: #4a3418; background: rgba(122, 83, 38, .1); }
.pos .n1 { background: linear-gradient(180deg, #ffe08a, #e0a52a); box-shadow: 0 0 0 2px #a8741c; }
.pos .n2 { background: linear-gradient(180deg, #f1f1f1, #b8bcc2); box-shadow: 0 0 0 2px #8c9096; }
.pos .n3 { background: linear-gradient(180deg, #f2c49a, #b8743e); box-shadow: 0 0 0 2px #8a5428; }
.who { display: flex; align-items: center; gap: 10px; }
.who img { width: 40px; height: 40px; object-fit: cover; object-position: 50% 10%; border-radius: 50%; flex: none;
  background: radial-gradient(#5a4730, #241a10); box-shadow: 0 0 0 2px #b89048; }
.who span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
/* line-height: the Thai UI faces draw "_" under a 1.25 line box, which overflow: hidden then cut ("lk a50610") */
.who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; line-height: 1.5; }
.who small { color: var(--pmuted); font-size: 12px; }
td.empty { text-align: center; color: var(--pmuted); padding: 30px 10px; }
.rank tr.mine td { background: rgba(31, 106, 112, .14); }
.yours { margin-top: 18px; padding: 14px 18px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); }
.yours h2 { margin: 0 0 6px; font-size: 18px; color: var(--gold2); }
.yours ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.yours b { color: var(--ink); }

/* ---- Jil and top-up ---------------------------------------------------------------------------------- */
.jilbal { margin: 0 0 6px; font-size: 17px; }
.jilbal b { font: 700 28px var(--serif); color: #6a3d9a; }
.jilcard .jilbal b { font-size: 26px; }
.rate { margin: 0 0 12px; color: #4a3418; }
.rate b { color: #7a1d10; }
.howto ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }
.topups td { font-size: 14px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: #e1f4df; color: #1f5a26; }
.chip.wait { background: #fdf0d2; color: #7a5310; }
.chip.bad { background: #fbe1da; color: #7a1d10; }
.topups.admin td { font-size: 13px; word-break: break-word; }
.topups tr.review td { background: rgba(240, 166, 58, .18); }
.totals { margin-bottom: 10px; }
/* a preview's banner for the admins, the players' "opening soon" */
.msg.warn { background: #fdf0d2; color: #6a4708; border: 1px solid #d9b46a; }
/* the bonus tiers under the form, the terms beside it */
.bonusbox { margin-top: 16px; }
.acctgrid .bonusbox h2, .acctgrid .topupterms h2 { margin: 0 0 8px; font-size: 18px; color: #4a3418; }
.bonusbox ul, .topupterms ul { margin: 0 0 8px; padding-left: 20px; line-height: 1.7; }
.bonusbox b { color: #7a1d10; }
.topupterms { margin-top: 16px; }
.topupform .check a { margin: 0 4px; }
.topupmode { margin: 0 0 6px; }
/* the vouchers waiting for the staff ('manual'): the baht it gave beside its button, the reason beside its own */
.rvform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.rvform .rvbaht { width: 6.5em; padding: 6px 8px; }
.rvform select { max-width: 13em; padding: 5px 6px; }
.topups.review td { vertical-align: middle; }
/* (a phone, where the staff open TrueMoney: each voucher a card -- its number, time and account on one line, the link,
   the baht and its button, the reason and its button -- with nothing to scroll sideways) */
@media (max-width: 700px) {
  .topups.review thead { display: none; }
  .topups.review, .topups.review tbody, .topups.review tr, .topups.review td { display: block; width: auto; }
  .topups.review tr { padding: 10px 12px; border-bottom: 2px solid rgba(120, 84, 30, .25); }
  .topups.review td { padding: 4px 0; border: 0; }
  .topups.review td:nth-child(-n+3) { display: inline-block; margin-right: 10px; font-weight: 600; }
  .topups.review td:nth-child(1)::before { content: '#'; }
  .topups.review td:nth-child(4) .btn { display: block; text-align: center; padding: 10px; }
  .topups.review .rvform .rvbaht { flex: 1; width: auto; min-width: 0; }
  .topups.review .rvform select { flex: 1; max-width: none; }
  .topups.review .rvform .btn { min-width: 7.5em; padding: 9px 10px; }
}

/* ---- admin: mission drop rates (/admin/drops) --------------------------------------------------------- */
.atabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.atabs a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--bg2);
  border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.atabs a[aria-current] { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2a1a06; border-color: #7a5326; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 22px; }
.frow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 0 14px; }
.frow .field { flex: 1 1 140px; }
.field select { width: 100%; padding: 10px 12px; font: 16px var(--sans); color: #2c2416; background: #fffaf0;
  border: 1px solid #b39568; border-radius: 8px; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 15px; color: #4a3418; }
.check input { width: 20px; height: 20px; accent-color: #1f6a70; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty input, input.pct { width: 64px; padding: 8px 6px; font: 15px var(--sans); color: #2c2416; background: #fffaf0;
  border: 1px solid #b39568; border-radius: 6px; text-align: right; }
.field .qty input { width: 72px; padding: 11px 8px; font-size: 16px; }
input.pct { width: 78px; }
.qty input:focus, input.pct:focus { outline: 3px solid rgba(31, 106, 112, .45); border-color: #1f6a70; }
table.drops td.num, table.drops th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.drops td.mc { width: 56px; color: var(--pmuted); font-variant-numeric: tabular-nums; }
table.drops td.ic { width: 52px; padding: 4px 6px; }
table.drops td.ic img { display: block; border-radius: 8px; background: rgba(122, 83, 38, .12); }
table.drops td.nw { white-space: nowrap; }
table.drops tr.changed td { background: rgba(240, 166, 58, .2); }
table.drops code { font-size: 12px; }

/* ---- the Android test app (/app) ------------------------------------------------------------------------ */
.appcard .cta { margin: 16px 0 6px; }
.appmeta { margin: 0 0 16px; color: var(--pmuted); font-size: 14px; }
.qrcard { text-align: center; }
.qrcard img { display: block; width: 200px; height: 200px; margin: 4px auto 8px; background: #fff; padding: 10px; border-radius: 8px;
  image-rendering: pixelated; }
code.hash { display: block; word-break: break-all; font-size: 12.5px; line-height: 1.5; }

/* ---- footer ------------------------------------------------------------------------------------------ */
.foot { margin-top: 56px; padding: 40px 0 20px; position: relative; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #15110d, #100d0a); }
.foot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background: url(img/ornament-l.webp) left bottom / auto 260px no-repeat, url(img/ornament-r.webp) right bottom / auto 260px no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%); }
.footin { position: relative; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.fcol h2 { font-size: 18px; color: var(--gold2); margin: 0 0 10px; }
.fcol p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.flogo { width: 150px; }
.flinks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.clinks { display: flex; flex-wrap: wrap; gap: 8px; }
.clink { display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--teal2); color: var(--ink); text-decoration: none; font-size: 14px; }
a.clink:hover { background: rgba(31, 106, 112, .4); color: #fff; }
.clink.soon { opacity: .5; border-style: dashed; cursor: default; }
.legal { position: relative; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: #8f8169; font-size: 13px; }

/* ---- smaller screens --------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .newsgrid { grid-template-columns: 1fr 1fr; }
  .newsgrid .ncard:nth-child(3) { display: none; }
  .feats { grid-template-columns: 1fr 1fr; }
  .faces { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .acctgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .block { padding-top: 30px; }
  .brand img { width: 100px; }
  .heroart img { -webkit-mask-image: none; mask-image: none; }
  .herobody { margin-top: 10px; }
  .btn.big { padding: 14px 22px; font-size: 18px; }
  .btn.big.play { min-width: 0; }
  .hero .cta { flex-direction: column; align-items: stretch; max-width: 360px; margin-left: auto; margin-right: auto; }
  .cta form.inline { display: flex; }
  .cta form.inline .btn { flex: 1; }
  .tagline { font-size: 15.5px; }
  .newsgrid { grid-template-columns: 1fr; }
  .newsgrid .ncard:nth-child(3) { display: flex; }
  .faces { display: flex; overflow-x: auto; gap: 14px; padding: 6px 4px 12px; scroll-snap-type: x mandatory; }
  .face { flex: 0 0 96px; scroll-snap-align: start; }
  .face img { width: 80px; height: 80px; }
  .feats { gap: 12px; }
  .ftext { font-size: 13px; padding: 40px 12px 12px; }
  .ftext b { font-size: 17px; }
  .steps { grid-template-columns: 1fr; }
  .ptitle { font-size: 27px; }
  .doc, .post, .card { padding: 20px 16px; }
  .race { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cstats { grid-template-columns: 1fr 1fr; }
  .char { gap: 12px; padding: 14px 12px; }
  .cface, .plus { width: 64px; height: 64px; }
  .hide-s { display: none; }
  .qrcard { display: none; }
  .appcard .cta .btn { flex: 1; }
  .rank th, .rank td { padding: 8px 6px; }
  .rank .pos { width: 46px; }
  .pos span { min-width: 30px; height: 30px; font-size: 14px; }
  .who img { width: 34px; height: 34px; }
  .who b { max-width: 34vw; }
  .footin { grid-template-columns: 1fr; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
/* /admin/compound: a recipe row's own chance, off and save on one line */
.crow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.crow input[type=number] { width: 72px; }
.crow input.mk { width: 92px; }
.crow span.mk { min-width: 92px; }
