/* RAN ONLINE: FOREVER - site style. Dark, classic RAN gold + crimson. No external fonts/scripts (CSP 'self'). */
:root {
  --bg: #0b0d12; --bg2: #11151d; --card: #161b25; --line: #2a3140; --text: #e8ebf1; --muted: #939bab;
  --gold: #e8b64a; --gold2: #ffd67a; --red: #c8323b; --ok: #3fb950; --bad: #f25a5a;
  --radius: 10px; --shadow: 0 10px 30px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, Menlo, monospace; }
.center { text-align: center; }
kbd { background: #222a38; border: 1px solid #3a4458; border-bottom-width: 3px; border-radius: 5px; padding: 1px 7px; font-family: inherit; font-size: 14px; }
code { background: #1c2230; padding: 1px 6px; border-radius: 4px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11,13,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; flex-direction: column; line-height: 1; color: var(--text); font-weight: 800; letter-spacing: 1.5px; }
.logo__ran { font-size: 13px; color: var(--muted); letter-spacing: 3px; }
.logo__fv { font-size: 24px; background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, #b9832a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo--sm .logo__fv { font-size: 20px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); padding: 8px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover, .nav a.active { background: #1b2230; color: var(--gold2); }
.nav__hot { color: var(--gold) !important; }
.nav__acc { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 8px 10px; }
.linkbtn:hover { color: var(--text); }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--text); margin: 6px 0; border-radius: 2px; }
/* REQ-155 (2026-10-18): Links + Play in the nav, the EN | TH switch, a Play button in the phone header bar */
.top__right { display: flex; align-items: center; gap: 8px; flex: none; }
.nav { flex: none; }
.nav a { white-space: nowrap; }
.nav__play { margin-left: 4px; }
.nav a.nav__play { color: #1a1204; }
.nav a.nav__play:hover { background: linear-gradient(180deg, #f2c35e, #d49a2b); color: #1a1204; }
.top__right .top__play { display: none; }
.lang { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.lang__btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 6px 5px; border-radius: 6px; }
.lang__btn:hover { color: var(--text); background: #1b2230; }
.lang__btn.active { color: var(--gold2); }
.lang__sep { color: var(--line); }
/* REQ-167: four languages - one button + a list (four inline did not fit the phone header) */
.lang { position: relative; }
.lang__cur { background: none; border: 1px solid var(--line); color: var(--text); cursor: pointer; font: inherit; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.lang__cur::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px; border: 4px solid transparent; border-top-color: var(--muted); border-bottom: 0; }
.lang__cur:hover, .lang__cur[aria-expanded="true"] { border-color: var(--muted); }
.lang__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: flex; flex-direction: column; min-width: 140px; padding: 4px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.lang__menu[hidden] { display: none; }
.lang__menu .lang__btn { text-align: left; white-space: nowrap; padding: 9px 12px; font-size: 14px; letter-spacing: 0; }
@media (min-width: 901px) and (max-width: 1100px) {   /* narrow desktop: tighter links, the logo is the Home link */
  .nav a { padding: 8px 6px; font-size: 14px; }
  .nav a[href="#home"] { display: none; }
  .nav__acc { margin-left: 4px; padding-left: 8px; }
  .top__in { gap: 10px; }
}
/* REQ-171: the Vietnamese links are longer ("Bảng xếp hạng", "Cửa hàng Item"): tighter at every desktop width, the logo is
   the Home link; tighter still on a narrow desktop */
@media (min-width: 901px) {
  html[lang="vi"] .nav a { padding: 8px 6px; font-size: 14px; }
  html[lang="vi"] .nav a[href="#home"] { display: none; }
  html[lang="vi"] .nav__acc { margin-left: 4px; padding-left: 8px; }
  html[lang="vi"] .top__in { gap: 10px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  html[lang="vi"] .nav { gap: 2px; }
  html[lang="vi"] .nav a { padding: 8px 4px; font-size: 13px; }
}
@media (min-width: 901px) and (max-width: 1000px) {
  html[lang="vi"] .nav a { padding: 8px 3px; font-size: 12px; }
}

/* buttons */
.btn { display: inline-block; background: linear-gradient(180deg, #f2c35e, #d49a2b); color: #1a1204 !important; font-weight: 700; border: 0; border-radius: 8px;
  padding: 10px 18px; cursor: pointer; font-size: 15px; text-align: center; box-shadow: 0 2px 0 #8a5f17; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn--sm { padding: 6px 12px; font-size: 14px; }
.btn--big { padding: 14px 26px; font-size: 17px; }
.btn--ghost { background: rgba(0,0,0,.35); color: var(--text) !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.btn--block { display: block; width: 100%; }

/* hero */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; }
.hero__art { position: absolute; inset: 0; background: url(/img/hero.jpg) center 30% / cover no-repeat; filter: saturate(.9); }
.hero__art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,18,.15) 0%, rgba(11,13,18,.55) 55%, var(--bg) 100%), linear-gradient(90deg, rgba(11,13,18,.85), rgba(11,13,18,0) 70%); }
.hero__in { position: relative; max-width: 1180px; width: 100%; margin: 0 auto; padding: 60px 16px 56px; }
.hero__title { margin: 12px 0 6px; font-size: 64px; line-height: .95; letter-spacing: 3px; font-weight: 900; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.hero__title span { background: linear-gradient(180deg, var(--gold2), var(--gold) 60%, #a8741f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: 19px; max-width: 560px; color: #d7dbe3; margin: 10px 0 24px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__beta { margin: 0 0 18px; font-size: 16px; }
.hero__note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.hero__note a { color: var(--gold2); }
.hero__how b { color: var(--text); }
.warline { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: #cfd4dd; }   /* REQ-155: Club War in the visitor's time */
.warline b { color: var(--gold2); }
.beta-badge { display: inline-block; background: var(--ok); color: #06140a; font-weight: 800; font-size: 12px; letter-spacing: .06em; border-radius: 4px; padding: 2px 7px; margin-right: 6px; vertical-align: 2px; }
.status { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.55); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status.on .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status.off .dot { background: var(--bad); }
.status.maint { border-color: var(--gold); color: var(--gold2); }   /* REQ-081: the restart job's maintenance flag */
.status.maint .dot { background: var(--gold); animation: pulse 1.2s infinite; }
.dot--pulse { background: var(--gold); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 48px; }
.narrow { max-width: 760px; }
.h2 { font-size: 26px; margin: 28px 0 14px; letter-spacing: .5px; }
.h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); margin-top: 8px; border-radius: 2px; }
.h3 { font-size: 19px; margin: 0 0 10px; }
.lead { font-size: 17px; color: #cfd4dd; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.cols--acc { grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.cols--acc > .card { min-width: 0; overflow-x: auto; }   /* the characters table scrolls in its card, not the phone page (2026-10-14) */
.scroll-x { overflow-x: auto; }   /* a wide table scrolls by itself on a phone (My account top-ups) */
.cols--sec { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }   /* My account: password + e-mail (REQ-047) */
@media (max-width: 760px) { .cols--sec { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card--hl { border-top: 3px solid var(--gold); }
.banner { height: 190px; background-size: cover; background-position: center 40%; position: relative; display: flex; align-items: flex-end; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,18,.2), var(--bg)); }
.banner h1 { position: relative; z-index: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 16px 10px; font-size: 40px; letter-spacing: 2px; }
.banner--street { background-image: url(/img/street.jpg); }
.banner--campus { background-image: url(/img/campus.jpg); }
.banner--kick { background-image: url(/img/stairs.jpg); }
.banner--archer { background-image: url(/img/archer.jpg); background-position: right 30%; }

/* features / news */
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feat { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; }
.feat b { display: block; margin-bottom: 2px; }
.feat span { color: var(--muted); font-size: 14px; }
.news article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.news h3 { margin: 0 0 4px; font-size: 18px; }
.news time { color: var(--gold); font-size: 13px; }
.news p { margin: 6px 0 0; color: #cfd4dd; }
.more { display: inline-block; margin-top: 10px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl thead th { background: #1a2130; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl--kv th { width: 40%; color: var(--muted); font-weight: 500; }
.tbl--rank td:first-child { width: 48px; color: var(--muted); font-weight: 700; }
.tbl--rank tr.top1 td:first-child { color: #ffd24a; } .tbl--rank tr.top2 td:first-child { color: #d9dee8; } .tbl--rank tr.top3 td:first-child { color: #d69a5a; }
.tbl--mini td { padding: 8px 12px; }
.st-paid { color: var(--ok); font-weight: 600; } .st-pending { color: var(--gold); } .st-expired, .st-failed { color: var(--muted); }

/* tabs / shop */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tabs--sub { margin-top: -6px; }
.tab { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: inherit; font-size: 14px; }
.tab.active { background: var(--gold); color: #1a1204; border-color: var(--gold); font-weight: 700; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.item__name { font-weight: 600; }
.item__price { color: var(--gold2); font-weight: 700; }
.item__was { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; font-size: 13px; }
.item__head { display: flex; gap: 12px; align-items: center; }
.item__icon { width: 70px; height: 70px; flex: none; image-rendering: pixelated; background: #0e1219; border: 1px solid var(--line); border-radius: 6px; }
.item__type { display: block; color: var(--muted); font-size: 13px; }
.item__sum { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--text, #d8dbe2); opacity: .9; }
.item__info { font-size: 13px; color: var(--muted); }
.item__info summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.item__info p { margin: 6px 0; color: var(--text); }
.item__info dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0; }
.item__info dt { color: var(--muted); }
.item__info dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.item__boxh { font-weight: 600; }
.item__box { margin: 0; padding-left: 18px; color: var(--text); max-height: 180px; overflow-y: auto; }
.item__box span { color: var(--gold2); }
.item__sale { align-self: flex-start; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }

/* forms */
.form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.form input:not([type=checkbox]) { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; background: #0e1219; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; font-size: 16px; }
.form input:focus { outline: 2px solid var(--gold); border-color: transparent; }
.form small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.form .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.err { color: var(--bad); min-height: 22px; margin: 10px 0 0; }
.ok { color: var(--ok); }
.ts { margin: 6px 0 14px; min-height: 0; }
.steps { padding-left: 22px; } .steps li { margin-bottom: 10px; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.prose ul { padding-left: 20px; } .prose li { margin-bottom: 6px; } .prose p { color: #cfd4dd; }

/* account / top-up */
.ep { text-align: center; }
.ep__num { font-size: 46px; font-weight: 800; color: var(--gold2); margin: 4px 0 14px; }
.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.pkg { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 14px 8px; cursor: pointer; font: inherit; text-align: center; }
.pkg b { display: block; font-size: 20px; }
.pkg span { color: var(--muted); font-size: 13px; }
.pkg.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: #1e1a10; }
.qr { background: #fff; border-radius: 12px; padding: 12px; display: inline-block; margin: 8px 0 16px; }
.qr img { width: 250px; height: 250px; display: block; image-rendering: pixelated; }
.wait { display: flex; gap: 8px; align-items: center; justify-content: center; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--bg2); }
.foot__in { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; padding-top: 24px; padding-bottom: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }   /* REQ-121b (web 10-17): the Privacy + Delete account links wrap on phones */
/* REQ-124 Watch tab */
.gm-wact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 2px 0; white-space: nowrap; }
.gm-wact b { margin-right: 4px; }
#gmWatch td:last-child { min-width: 250px; }   /* web 10-17: the Actions cell sat narrow off-screen and stacked its buttons */
.gm-wsig { margin: 2px 0; }
.gm-wflag td:first-child { border-left: 3px solid #ffb020; }
.gm-wW1, .gm-wW2, .gm-wW3, .gm-wW4 { background: rgba(255,170,0,.2); color: #ffb020; }
.gm-wpen { margin: 2px 0; }
.foot p { flex-basis: 100%; margin: 0; }

/* phones */
@media (max-width: 900px) {
  .burger { display: block; }
  .top__in { gap: 10px; }
  .top__right { margin-left: auto; }
  .top__right .top__play { display: inline-block; }   /* REQ-155: Play stays in the sticky header bar on phones */
  /* REQ-155: the open menu scrolls inside the screen instead of running off a short phone */
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--bg2);
    border-bottom: 1px solid var(--line); padding: 8px 16px 16px; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .nav.open { display: flex; }
  .nav a.nav__play { display: none; }   /* the header bar has the Play button on phones */
  .nav__acc { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .cols, .cols--acc { grid-template-columns: 1fr; }
  .hero { min-height: 480px; }
  .hero__title { font-size: 44px; }
  .hero__sub { font-size: 17px; }
  .banner { height: 140px; } .banner h1 { font-size: 30px; }
  .tbl--rank th:nth-child(5), .tbl--rank td:nth-child(5) { display: none; }
}
@media (max-width: 480px) {
  .tbl--rank th:nth-child(4), .tbl--rank td:nth-child(4) { display: none; }
  .hero__cta .btn { width: 100%; }
}

/* support tickets */
.form select, .form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; background: #0e1219; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 16px; }
.form textarea { resize: vertical; min-height: 110px; }
.form select:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.form input[type=file] { padding: 9px; font-size: 14px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sp-head .lead { margin: 0; flex: 1 1 320px; }
.sp-center { margin: 0 auto; }
#spNew .h2 { margin-top: 0; }
.sp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sp-tbl tbody tr { cursor: pointer; }
.sp-tbl tbody tr:hover td { background: #1b2230; }
.sp-tbl .new td:nth-child(2) { font-weight: 700; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.3); font-size: 12px; text-align: center; }
.badge:empty { display: none; }
.st-open { color: var(--gold); font-weight: 600; } .st-answered { color: var(--ok); font-weight: 600; } .st-closed { color: var(--muted); }
.sp-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sp-title .h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.sp-msgs { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.sp-msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-width: 88%; }
.sp-msg--staff { align-self: flex-end; border-left: 3px solid var(--gold); background: #1a1f2a; }
.sp-msg__who { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.sp-msg__who b { color: var(--text); }
.sp-msg--staff .sp-msg__who b { color: var(--gold2); }
.sp-msg__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-msg img { display: block; max-width: 100%; max-height: 360px; margin-top: 10px; border-radius: 6px; border: 1px solid var(--line); }
.sp-staffbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.sp-staffbar label { font-size: 14px; font-weight: 600; }
.sp-staffbar select, .sp-staffbar input { display: block; margin-top: 4px; padding: 8px 10px; background: #0e1219; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 15px; }
.sp-staffbar input { width: 120px; }
.sp-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .sp-row { grid-template-columns: 1fr; }
  .sp-msg { max-width: 100%; }
  .sp-tbl th:nth-child(4), .sp-tbl td:nth-child(4), .sp-tbl th:nth-child(6), .sp-tbl td:nth-child(6) { display: none; }
}

/* GM control panel */
.gm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gm-refresh { float: right; font-size: 12px; padding: 4px 10px; }
.gm-chip { display: inline-block; margin: 0 6px 8px 0; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.gm-chip.up { background: rgba(63,185,80,.18); color: var(--ok); } .gm-chip.down { background: rgba(242,90,90,.18); color: var(--bad); }
.gm-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 6px 0 14px; font-size: 14px; } .gm-kv span { color: var(--muted); }
.gm-btns, .gm-act { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-danger { border-color: var(--bad); color: var(--bad); }
.gm-ev { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .gm-ev b { width: 50px; }
.gm-ev select, .gm-search input { padding: 7px 10px; background: #0e1219; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.gm-notice { margin-top: 16px; }
/* Bonus time (the in-game /btg) - 2026-10-07 */
.gm-btg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.gm-btg b { width: 100%; }
.gm-btg label { display: flex; align-items: center; gap: 6px; white-space: nowrap; margin: 0; }
.gm-btg input, .gm-btg select { padding: 7px 8px; background: #0e1219; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.gm-btg input { width: 72px; }
.gm-btg-go { display: flex; gap: 8px; }
.gm-search { display: flex; gap: 8px; margin-bottom: 12px; } .gm-search input { flex: 1; min-width: 0; }
.gm-scroll { overflow-x: auto; }
.gm-chat { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 10px; }
.gm-chat label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.gm-chat input[name=q] { flex: 1 1 160px; min-width: 140px; }
.gm-chatbox { max-height: 520px; overflow-y: auto; }
.gm-chat-t { white-space: nowrap; }
.gm-chat-m { word-break: break-word; }
.gm-ch { margin: 0; background: rgba(255,255,255,.08); }
.gm-ch-shout, .gm-ch-regional { background: rgba(255,170,0,.2); color: #ffb020; }
.gm-ch-whisper { background: rgba(170,120,255,.2); color: #c9a6ff; }
.gm-ch-gm, .gm-ch-notice { background: rgba(63,185,80,.18); color: var(--ok); }
.gm-ch-club, .gm-ch-alliance { background: rgba(80,160,255,.2); color: #8cc4ff; }
.gm-onlinebox { max-height: 360px; overflow-y: auto; }
.gm-where-web, .gm-where-browser { background: rgba(80,160,255,.2); color: #8cc4ff; } .gm-where-pc, .gm-where-direct { background: rgba(255,255,255,.1); }   /* direct = REQ-106 */
.gm-where-phone, .gm-where-tablet { background: rgba(63,185,80,.18); color: var(--ok); }
.gm-where-app { background: rgba(242,195,94,.18); color: var(--gold2); }   /* REQ-082: the Android app (its heartbeat) */
.gm-ban { margin-top: 16px; max-width: 520px; }
.gm-sec { margin: 14px 0; padding: 14px 16px 6px; border: 1px solid var(--gold); border-radius: var(--radius); max-width: 560px; }
.gm-sechint { margin: 8px 0 14px; padding: 10px 12px 2px; background: #0e1219; border-radius: 8px; font-size: 14px; }
.gm-sechint .gm-kv { margin-bottom: 8px; }
.gm-secgen { align-items: center; margin: -6px 0 14px; }
.gm-sec .gm-btns { margin-bottom: 10px; }
.gm-key { margin: 10px 0; font: 700 30px/1.2 Consolas, Menlo, monospace; letter-spacing: 4px; color: var(--gold2); user-select: all; word-break: break-all; }
.gm-msg { min-height: 22px; margin: 14px 0 0; }
@media (max-width: 760px) { .gm-grid { grid-template-columns: 1fr; } }
/* GM tabs + Overview tiles (2026-10-04): one row of tabs that scrolls sideways on a phone */
.gm-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 4px 0 0; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.gm-tabs .tab { flex: none; }
.gm-pane > .card { margin-top: 4px; }
.gm-pane > .h2:first-child { margin-top: 4px; }
.gm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gm-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.gm-tile span { display: block; color: var(--muted); font-size: 13px; }
.gm-tile b { display: block; margin: 2px 0; font-size: 28px; line-height: 1.15; color: var(--gold2); font-variant-numeric: tabular-nums; }
.gm-tile small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.gm-tiles-note { margin: 8px 0 14px; }
@media (max-width: 520px) { .gm-tiles { grid-template-columns: 1fr 1fr; gap: 8px; } .gm-tile { padding: 10px; } .gm-tile b { font-size: 22px; } }
/* quest completion bar (Rankings > Quests) */
.qbar { display: inline-block; width: 90px; height: 8px; background: #0e1219; border: 1px solid var(--line); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.qbar__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }
/* invite your barkada (Referral.cs, 2026-10-04) */
.hero__inv { display: inline-block; margin: 0 0 14px; padding: 8px 14px; border-radius: 8px; background: rgba(232,182,74,.16); border: 1px solid rgba(232,182,74,.55); color: var(--gold2); }
.hero__inv b { color: #fff; }
.inv-code { font: 800 40px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 6px; color: var(--gold2); margin: 4px 0 12px; word-break: break-all; }
.inv-link { display: flex; gap: 8px; }
.inv-link input { flex: 1; min-width: 0; padding: 9px 10px; background: #0e1219; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }
.inv-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inv-notes { padding-left: 20px; color: #cfd4dd; } .inv-notes li { margin-bottom: 8px; }
#invBy { margin-top: 14px; }
.inv-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.inv-totals div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.inv-totals b { display: block; font-size: 20px; color: var(--gold2); } .inv-totals span { color: var(--muted); font-size: 13px; }
.inv-creators { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.inv-creator { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.inv-ccode { font: 700 18px ui-monospace, Consolas, monospace; letter-spacing: 3px; color: var(--gold2); }
.inv-foot { margin-top: 18px; }
#invRules td, .inv-joined { white-space: nowrap; }
.form small.inv-ok { color: var(--ok); } .form small.inv-bad { color: var(--bad); }
.st-void { color: var(--muted); } .st-pending { color: #ffb020; }
.gm-ref { margin-bottom: 18px; } .gm-ref .h3 { margin-top: 20px; }
.gm-refcfg, .gm-refcreator { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 12px; margin-top: 14px; align-items: end; }
.gm-refcfg .gm-wide, .gm-refcreator .check, .gm-refcreator .btn { grid-column: 1 / -1; }
.gm-refcreator .btn { justify-self: start; margin-bottom: 8px; }
#gmRefCreators tr[data-i] { cursor: pointer; }
@media (max-width: 480px) { .inv-code { font-size: 32px; letter-spacing: 4px; } }
/* GM User page (GmUser.cs) - 2026-10-08 */
.gm-u { color: inherit; text-decoration: underline dotted; cursor: pointer; }
.gm-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.gm-item { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #0e1219; }
.gm-item b { color: var(--gold); font-weight: 600; }
.gm-item-hi { border-color: var(--gold); }
.gm-gear { display: flex; align-items: center; gap: 8px; margin: 4px 0; } .gm-gear > .muted { width: 80px; flex: none; }
.gm-gold { font-variant-numeric: tabular-nums; }
.gm-det { margin: 8px 0; } .gm-det summary { cursor: pointer; font-weight: 600; }
.gm-ctabs { flex-wrap: wrap; margin-bottom: 10px; }
.gm-ufilter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.gm-ufilter input, .gm-ufilter select { padding: 6px 8px; background: #0e1219; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.gm-ufilter input[type=number] { width: 84px; } .gm-ufilter input[name=q] { width: 200px; max-width: 100%; }
.gm-ufilter label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.gm-uchecks { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.gm-utable th a { color: inherit; white-space: nowrap; } .gm-utable td { white-space: nowrap; } .gm-utable tbody tr { cursor: pointer; }
.gm-utable tbody tr:hover td { background: rgba(255,255,255,.03); } .gm-pager { align-items: center; margin-top: 8px; }
/* GM item icons (the game's atlases as sprites; grade borders) - 2026-10-08 */
.gm-ic { position: relative; display: inline-block; width: 35px; height: 35px; border: 1px solid #3a4352; border-radius: 4px; background-color: #0b0e14; background-repeat: no-repeat; vertical-align: middle; cursor: pointer; flex: none; }
.gm-ic b { position: absolute; left: 1px; top: 0; font-size: 10px; color: #ffd67a; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.gm-ic i { position: absolute; right: 1px; bottom: 0; font-size: 10px; font-style: normal; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.gm-ic.gm-empty { cursor: default; border-color: #222936; background: #0d1118; }
.gm-g1 { border-color: #5fb4ff; } .gm-g2 { border-color: #ffcc33; box-shadow: 0 0 4px #ffcc3388; } .gm-g3 { border-color: #ff6ad5; } .gm-g4 { border-color: #b47cff; } .gm-g5 { border-color: #5ad18c; }
.gm-gn1 { color: #7cc4ff; } .gm-gn2 { color: #ffd04d; } .gm-gn3 { color: #ff7fdc; } .gm-gn4 { color: #c597ff; } .gm-gn5 { color: #6fdc9c; }
.gm-grid { display: grid; gap: 1px; margin: 6px 0 12px; max-width: 100%; overflow-x: auto; }
.gm-top { display: flex; gap: 4px; margin-top: 4px; } .gm-sum { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: flex-start; margin-bottom: 10px; }
.gm-best { display: inline-flex; align-items: center; gap: 6px; } .gm-views { margin: 6px 0; }
.gm-pop { position: absolute; z-index: 50; width: 290px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; }
.gm-pop-in { display: flex; gap: 10px; align-items: flex-start; }
.gm-itable td { vertical-align: middle; }
/* GM panel UX tab (Ux.cs, 2026-10-08): bars and heat-map cells are painted through the CSSOM (gmPaint: data-uxw / data-uxh) */
.ux-card { margin-top: 14px; padding: 16px; min-width: 0; }
.ux-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 14px; }
.ux-cols .ux-card .ux-card { margin-top: 8px; padding: 10px; }
.ux-bar { display: inline-block; width: 100px; height: 8px; margin-right: 6px; background: var(--line); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.ux-bar > i { display: block; width: 0; height: 100%; background: var(--gold); }
.ux-val { display: inline-block; margin: 2px 12px 2px 0; white-space: nowrap; }
.ux-num { text-align: right; font-variant-numeric: tabular-nums; }
.ux-heat { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; max-width: 640px; }
.ux-heat > i { display: block; aspect-ratio: 1 / 1; background: var(--gold); border-radius: 2px; opacity: .06; }
@media (max-width: 600px) { .ux-bar { width: 60px; } .ux-cols { grid-template-columns: 1fr; } }
