/* Bát Hoang Lục admin pages (/admin/): the website's ink, jade and seal (assets/css/site.css), laid out as in the
   Claude Design mockups (docs/specs/admin). Self-contained, so the game server can serve this folder alone. */
:root {
  --ink: #0b0c0f;
  --ink-2: #0d0f13;
  --panel: #12141a;
  --panel-2: #101217;
  --line: #262a33;
  --line-2: #2d3139;
  --line-3: #1d2027;
  --text: #e9e4d4;
  --text-2: #b3bcb6;
  --cell: #d6dcd6;
  --muted: #8f9a93;
  --faint: #6f7a73;
  --title: #f1ecdd;
  --jade: #3f9e78;
  --jade-dark: #2f7a5e;
  --jade-light: #9be3c2;
  --jade-ink: #14231d;
  --gold: #e3c06b;
  --gold-ink: #2d2412;
  --seal: #c4473d;
  --seal-ink: #2a1513;
  --link: #7fd3ac;
  /* chart colours, checked for colour-blind separation on --panel (dataviz validator, dark mode) */
  --flow-in: #3f9e78;
  --flow-out: #c2702d;
  --w-kiem: #b39122;
  --w-dao: #c83b2c;
  --w-truong: #2689b9;
  --w-quyen: #9e5822;
  --w-cung: #70a74f;
  --w-quat: #8f6fd0;
  --w-but: #22a8a0;   /* Bút (02/12): validator dark on --panel, CVD ΔE >= 9,5 against every line colour above */
  --w-none: #6f7a73;
  --death: #c4473d;
  --serif: 'Noto Serif', Georgia, serif;
  --sans: 'Be Vietnam Pro', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
a { color: var(--link); }
a:hover { color: #b4ecd0; }
button { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.px { image-rendering: pixelated; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }

/* ---- login ---- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background: radial-gradient(ellipse at 50% 30%, #14231d 0%, var(--ink) 62%); }
.login-box { width: 100%; max-width: 400px; background: var(--panel-2); border: 2px solid var(--line-2);
  box-shadow: inset 0 0 0 1px var(--ink), inset 0 0 0 3px var(--jade-dark); border-radius: 4px; padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 18px; }
.login-box .logo { align-self: center; width: 204px; height: auto; }
.login-box h1 { margin: 0; text-align: center; font-family: var(--serif); font-size: 22px; color: var(--title); }
.login-box .kicker { text-align: center; font-size: 11px; letter-spacing: 0.24em; color: var(--faint); margin-top: -10px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.form .hint, .fld .hint { color: var(--faint); font-size: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.small { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ---- fields and buttons ---- */
.field { width: 100%; min-height: 44px; padding: 0 12px; background: #0a0b0e; border: 1px solid #3a3f48; border-radius: 3px;
  color: #ece7d8; font: inherit; font-size: 14px; }
.field:focus { outline: 2px solid var(--jade); outline-offset: 1px; border-color: var(--jade); }
textarea.field { min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.field { padding-right: 28px; }
.btn, .act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 4px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 2px solid #4a4f58; background: transparent; color: var(--text); text-decoration: none; }
.btn:hover, .act:hover { border-color: var(--jade-light); color: #fff; }
.btn:disabled, .act:disabled { opacity: 0.5; cursor: default; }
.btn-play { background: var(--jade); color: #06110c; border-color: var(--jade-light); }
.btn-play:hover { background: #56b98f; color: #06110c; }
.act-warn { border-color: #a8742d; color: #f3d79a; }
.act-warn:hover { background: var(--gold-ink); border-color: #d8a24c; color: #fbe6b8; }
.act-ban { border-color: var(--seal); color: #f6c3bc; background: var(--seal-ink); }
.act-ban:hover { background: #3a1b18; border-color: #e0685d; color: #fff; }
.act-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-width: 1px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; text-decoration: underline; }
.status { margin: 0; padding: 10px 12px; border-radius: 3px; font-size: 13px; line-height: 1.5; }
.status.error { background: var(--seal-ink); color: #f6c3bc; border: 1px solid #5a2620; }
.status.ok { background: var(--jade-ink); color: #b4ecd0; border: 1px solid var(--jade-dark); }

/* ---- the shell: side menu + content ---- */
.shell { min-height: 100vh; display: flex; }
.side { flex: 0 0 236px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; border-right: 1px solid var(--line-3);
  background: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: block; padding: 4px 8px 16px; }
.side .brand img { display: block; width: 204px; height: auto; }
.side .label { font-size: 11px; letter-spacing: 0.2em; color: var(--faint); padding: 8px 14px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 4px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.side nav a:hover { background: #161920; color: #fff; }
.side nav a[aria-current="page"] { background: var(--jade-ink); color: var(--jade-light); box-shadow: inset 3px 0 0 var(--jade); }
.side nav svg { flex: none; }
/* 14/11: the red notices (new góp ý, open báo cáo) on the menu, the red strip on Tổng quan, the "Mới" chip */
.side nav .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #d63a2f; color: #fff;
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--ink-2); }
.side nav .badge[hidden] { display: none; }
.new-banner { display: block; padding: 12px 16px; border-radius: 4px; background: #3a1512; border: 1px solid #d63a2f; color: #ffd7d2;
  font-weight: 600; text-decoration: none; }
.new-banner:hover { background: #4a1914; color: #fff; }
.new-banner[hidden] { display: none; }
.chip.new { background: #d63a2f; color: #fff; border-color: #d63a2f; }
.side .short { display: none; }
.side .me { margin-top: auto; padding: 16px 14px 4px; border-top: 1px solid var(--line-3); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.side .me strong { color: #f1c9c4; }
.side .me .act { margin-top: 8px; }
.side .tz { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.5; }
main.view { flex: 1 1 auto; min-width: 0; padding: 28px 32px 56px; }
main.view:focus { outline: none; }
.page { display: flex; flex-direction: column; gap: 20px; }

/* ---- page parts ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head h1 { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.2; color: var(--title); }
.page-head .sub { font-size: 13px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-head .tools { margin-left: auto; }
.range { min-height: 40px; padding: 0 14px; border-radius: 4px; border: 1px solid #2c3139; background: #101217; color: #c9d3cc; font: inherit; font-size: 13px; cursor: pointer; }
.range:hover { border-color: var(--jade); }
.range[aria-pressed="true"] { background: var(--jade-ink); border-color: var(--jade); color: var(--jade-light); }
.range.small { min-height: 28px; padding: 0 10px; font-size: 12px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.pad { padding: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > * { min-width: 0; }
.grow-2 { flex: 2 1 520px; }
.grow-1 { flex: 1 1 340px; }
.grow-h { flex: 1 1 420px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--title); }
.panel-head .note { font-size: 12px; color: var(--muted); }
.panel-head .note b { font-weight: 500; color: var(--jade-light); }
.section-title { margin: 8px 0 -6px; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }
.foot { margin: 14px 0 0; font-size: 12px; color: var(--muted); line-height: 1.55; }
.foot .num { color: var(--text); }
.foot.warn { color: #f0a29a; }
.caption { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.loading { opacity: 0.55; transition: opacity 120ms; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { font-family: var(--mono); font-size: 28px; line-height: 1.15; color: var(--title); word-break: break-word; }
.kpi .d { font-size: 12px; color: var(--muted); }
.kpi .d.up { color: var(--jade-light); }
.kpi .d.down { color: #f0b07a; }
.kpis.small .v { font-size: 20px; }
.kpis.small .kpi { padding: 14px 16px; }
/* 01/12: a tile that opens a page (Tổng quan's "Đang chơi thực tế" → IP trùng đang online) */
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover, a.kpi:focus-visible { border-color: var(--jade); color: inherit; }
a.kpi .go { font-size: 12px; color: var(--link); }
a.kpi:hover .go { text-decoration: underline; }

/* horizontal bar lists (label | bar | value) */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 128px) minmax(0, 1fr) minmax(48px, auto); align-items: center; gap: 10px; font-size: 13px; }
.bar-row .name { color: #c9d3cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .name a { color: inherit; text-decoration: none; }
.bar-row .name a:hover { color: #fff; text-decoration: underline; }
.bar-row .val { text-align: right; color: var(--cell); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track { height: 12px; background: #1a1d24; border-radius: 2px; overflow: hidden; position: relative; }
.track .fill { height: 100%; border-radius: 0 2px 2px 0; background: var(--jade); }
.track.thin { height: 6px; }
.track .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--title); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.flows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.flows .bar-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
.flows .bar-row .val { grid-row: 1; grid-column: 2; }
.flows .bar-row .track { grid-row: 2; grid-column: 1 / -1; }

/* tables */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); letter-spacing: 0.04em; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-3); font-size: 14px; color: var(--cell); vertical-align: middle; }
td.num, th.r { text-align: right; white-space: nowrap; }
td.when.num { text-align: left; }
td.when { color: var(--muted); white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.dim { color: #a9b3ac; }
td.wrap { min-width: 220px; }
tbody tr:hover td { background: #151820; }
tbody tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
td .inline-bar { display: block; height: 6px; margin-top: 6px; background: #1a1d24; border-radius: 2px; overflow: hidden; min-width: 60px; }
td .inline-bar i { display: block; height: 100%; background: var(--jade); border-radius: 0 2px 2px 0; }
.chip { display: inline-block; font-size: 12px; line-height: 1.4; padding: 3px 8px; border-radius: 3px; background: #1c1f26; color: #c9d3cc; white-space: nowrap; }
.chip.jade { background: var(--jade-ink); color: #b4ecd0; }
.chip.blue { background: #1b2030; color: #bcd2ff; }
.chip.gold { background: var(--gold-ink); color: #f3d79a; }
.chip.violet { background: #2a1a30; color: #e2c2f5; }
.chip.red { background: #3a1b18; color: #f6c3bc; }
.chip.orange { background: #2e1d12; color: #f6c39a; }
.chip-level::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }

/* filters (chips you press) */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter { min-height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid #2c3139; background: #101217; color: #c9d3cc; font-size: 13px; cursor: pointer; }
.filter:hover { border-color: var(--jade); }
.filter[aria-pressed="true"] { background: var(--jade-ink); border-color: var(--jade); color: var(--jade-light); }
.filter .n { color: var(--faint); margin-left: 6px; font-family: var(--mono); font-size: 12px; }
.filter[aria-pressed="true"] .n { color: var(--jade-light); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .spacer { flex: 1; }
.filter.hot { border-color: #d63a2f; }
.filter.hot .n { color: #ffb3ab; }

/* 19/11: a Góp ý thread (#/gop-y/<id>): the player's lines on the left, Ban quản trị's on the right, the reply box under them */
.thread-who { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: flex-start; }
.thread-who .caption { display: block; margin-bottom: 4px; }
.thread-who .thread-act { margin-left: auto; align-self: center; }
.thread { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.thread-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.msg { max-width: min(720px, 88%); padding: 10px 14px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: #151820; }
.msg.from-player { align-self: flex-start; border-top-left-radius: 2px; }
.msg.from-admin { align-self: flex-end; border-top-right-radius: 2px; background: #1d1612; border-color: #5a3a22; }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.msg-head .who { color: var(--title); font-weight: 600; font-size: 13px; }
.msg.from-admin .msg-head .who { color: #ffb08a; }
.msg-head .sub { color: var(--muted); font-weight: 400; }
.msg-text { white-space: pre-wrap; word-break: break-word; color: var(--cell); line-height: 1.55; }
.thread-reply { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.thread-reply-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.thread-reply-bar .hint:first-child { flex: 1 1 320px; color: var(--faint); font-size: 12px; line-height: 1.5; }
.thread-reply-bar .num { color: var(--muted); font-size: 12px; }

/* paging */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager .btns { display: flex; gap: 6px; }

/* empty and error states */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 32px 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.empty .glyph { width: 40px; height: 40px; border: 1px solid var(--line-2); background: #0f1114; color: var(--faint); font-family: var(--serif); font-size: 18px; display: flex; align-items: center; justify-content: center; }
.empty strong { color: var(--text-2); font-weight: 600; font-size: 14px; }
.panel > .empty { min-height: 160px; }
.error-box { padding: 16px; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid { stroke: var(--line-3); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: #3a3f48; stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--faint); font-family: var(--mono); font-size: 11px; }
.chart .hit { fill: transparent; cursor: default; }
.chart .bar-mark.on { filter: brightness(1.3); }
.chart .xhair { stroke: var(--muted); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: #0b0c0f; border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; font-size: 12px; color: var(--text-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); min-width: 120px; white-space: nowrap; }
.tip b { display: block; color: var(--title); font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.tip .r { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .r span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.tip .r i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.tip .r strong { color: var(--title); font-family: var(--mono); font-weight: 500; }
.view-toggle { margin-left: auto; }
.chart-table { margin-top: 10px; max-height: 320px; overflow: auto; border: 1px solid var(--line-3); border-radius: 4px; }
.chart-table th { position: sticky; top: 0; background: var(--panel); }

/* the player page */
.search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search .field { flex: 1 1 200px; min-width: 0; }
.search select.field { flex: 0 1 190px; }
.profile { padding: 22px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.profile .seal { width: 72px; height: 72px; flex: none; border: 2px solid var(--jade-dark); background: #0f1c17; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 30px; color: var(--jade-light); }
.profile .who { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.profile .line1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.profile h1 { margin: 0; font-family: var(--serif); font-size: 28px; color: var(--title); line-height: 1.2; word-break: break-word; }
.profile .ids { font-size: 14px; color: var(--muted); }
.profile .ids .num { color: #c9d3cc; }
.profile .line2 { font-size: 14px; color: #c9d3cc; }
.profile .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tab { min-height: 44px; padding: 0 14px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: #9aa59e; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--jade-light); border-bottom-color: var(--jade); }
.gear { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 24px; }
.gear > div { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gear .worn { flex: 1 1 260px; }
.gear .bag { flex: 2 1 360px; }
.slots { display: grid; gap: 8px; }
.slots.worn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slots.bag-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.slot { aspect-ratio: 1; background: #0d0f13; border: 1px solid var(--line); border-radius: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; padding: 4px; overflow: hidden; word-break: break-word; position: relative; }
.slot .where { position: absolute; top: 3px; left: 4px; font-size: 9px; color: var(--faint); letter-spacing: 0.04em; }
.slot .count { position: absolute; right: 4px; bottom: 2px; font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.slot.empty-slot { color: #4c5550; }
.q0 { color: #c9d3cc; }
.q1 { color: var(--jade-light); border-color: #2c5a47; }
.q2 { color: #bcd2ff; border-color: #34446b; }
.q3 { color: #e2c2f5; border-color: #5a3d6a; }
.facts { margin: 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; }
.facts div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-size: 14px; color: var(--cell); word-break: break-word; }
.tab-note { margin: 10px 16px 14px; font-size: 13px; color: var(--muted); }

/* dialogs */
dialog.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 2px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--ink), 0 24px 64px rgba(0, 0, 0, 0.6); }
dialog.modal::backdrop { background: rgba(5, 6, 8, 0.72); }
dialog.modal.danger { border-color: #5a2620; }
.modal form { display: flex; flex-direction: column; gap: 16px; padding: 22px 22px 20px; }
.modal h2 { margin: 0; font-family: var(--serif); font-size: 21px; color: var(--title); }
.modal .lead { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.modal .lead strong { color: var(--title); }
.modal .buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.modal legend { padding: 0 6px; font-size: 12px; color: var(--muted); }
.radio { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); flex-direction: row !important; }
.radio input, .check input { width: 18px; height: 18px; accent-color: var(--jade); margin: 0; }
.check { display: flex; align-items: center; gap: 8px; flex-direction: row !important; font-size: 13px; color: var(--text-2); }
.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline > label { flex: 1 1 140px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.inline > label.pack-tries { flex: 0 0 96px; }
/* 24/11 Người ủng hộ: the import dialog is wider (its preview table) */
dialog.modal:has(.wide-dialog) { width: min(920px, calc(100vw - 32px)); overflow-y: auto; }
.pack-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: #0c0d11; border: 1px solid var(--line); border-radius: 4px; }
.pack-lines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.pack-lines b { color: var(--title); font-weight: 600; }
.pack-lines .sub { display: block; font-size: 12px; color: var(--muted); }
.send-line { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.send-line b { color: var(--title); font-weight: 600; }
.send-line .warn-text { color: #f3d79a; }
.item-rows { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto 40px; gap: 8px; align-items: center; }
.item-row .x { min-height: 40px; width: 40px; padding: 0; border: 1px solid #3a3f48; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.item-row .x:hover { color: #f6c3bc; border-color: var(--seal); }
.summary { margin: 0; padding: 12px 14px; background: #0c0d11; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.summary li { margin-left: 18px; }
.summary b { color: var(--title); font-weight: 600; }

/* toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 4px; font-size: 14px; line-height: 1.45; background: var(--jade-ink); color: #b4ecd0; border: 1px solid var(--jade-dark); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.toast.error { background: var(--seal-ink); color: #f6c3bc; border-color: #5a2620; }

/* phones and narrow windows: the side menu becomes a header with the pages in a grid */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { position: static; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--line-3); padding: 12px 16px 14px; }
  .side .brand { padding: 0 0 8px; }
  .side .brand img { width: 150px; }
  .side .label { display: none; }
  .side nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .side nav a { min-height: 44px; padding: 0 10px; gap: 8px; font-size: 13px; justify-content: center; background: #11131a; }
  .side nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--jade); }
  .side nav a { position: relative; }
  .side nav .badge { position: absolute; top: 3px; right: 4px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; }
  .side .long { display: none; }
  .side .short { display: inline; }
  .side .me { margin-top: 10px; padding: 10px 0 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .side .me .act { margin: 0 0 0 auto; }
  .side .tz { display: none; }
  main.view { padding: 18px 16px 48px; }
  .page { gap: 16px; }
  .page-head h1 { font-size: 24px; }
  .page-head .tools { margin-left: 0; }
  .pad { padding: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .v { font-size: 22px; }
  .flows { grid-template-columns: 1fr; }
  .profile { padding: 16px; gap: 14px; }
  .profile h1 { font-size: 23px; }
  .profile .actions { width: 100%; }
  .profile .actions .act { flex: 1 1 calc(50% - 8px); }
  .slots.bag-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .slots.worn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gear { padding: 16px; }
  .item-row { grid-template-columns: minmax(0, 1fr) 70px 40px; }
  .item-row .check { grid-column: 1 / 3; }
  .item-row .x { grid-row: 1; grid-column: 3; }
}
@media (max-width: 420px) {
  .side nav a { font-size: 12px; padding: 0 6px; }
  .side nav svg { display: none; }
  .bar-row { grid-template-columns: minmax(70px, 96px) minmax(0, 1fr) minmax(40px, auto); }
}

/* Cân bằng › Chiến đấu (23/10): the filters, the sortable skill table grouped by weapon line */
.combat-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.combat-filters .fld { flex: 0 1 190px; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; color: inherit; font: inherit; letter-spacing: inherit; }
th button.sort:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--title); }
.skill-table tr.group th { background: var(--panel-2); color: var(--title); font-size: 13px; letter-spacing: 0; padding-top: 14px; }
.skill-table tr.group .note { color: var(--muted); font-weight: 400; }
.skill-table tr.group .g { position: sticky; left: 8px; }   /* the line's name stays in view while the table scrolls sideways */
.skill-table td, .skill-table th, .top-dps td, .top-dps th { padding: 8px 8px; }
.top-dps td.skills .sub { color: var(--cell); font-size: 13px; }
.skill-table td .inline-bar { min-width: 44px; }
.skill-table .sticky { position: sticky; left: 0; background: var(--panel); z-index: 1; }
.skill-table tbody tr:hover td.sticky { background: #151820; }
@media (max-width: 420px) {
  .combat-filters .fld { flex: 1 1 100%; }
}

/* ---- Dữ liệu game (page-data.js, game.js) and the player page's icons ---- */
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
img.ico { display: inline-block; vertical-align: middle; flex: none; max-width: none; object-fit: contain; }
img.mon { display: inline-block; vertical-align: middle; width: auto; height: auto; }
img.minimap { display: inline-block; vertical-align: middle; height: auto; border: 1px solid var(--line); border-radius: 3px; background: #0b0c0f; }
td.ico-cell { width: 1%; padding-right: 4px; text-align: center; white-space: nowrap; }
td.ico-cell img.mon { max-width: none; }
.item-ref { display: inline-flex; align-items: center; gap: 4px; }
.tab-body { min-height: 200px; }
a.tab { display: inline-flex; align-items: center; text-decoration: none; }
table.data { width: 100%; border-collapse: collapse; }
table.data th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.sortable:hover { color: var(--jade-light); }
table.data.clickable tbody tr { cursor: pointer; }
table.data.clickable tbody tr:hover td { background: #161a20; }
table.data tbody tr:focus-visible { outline: 2px solid var(--jade); outline-offset: -2px; }
.more { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
dialog.modal.detail { width: min(980px, calc(100vw - 32px)); }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-2); z-index: 1; }
.detail-head h2 { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--title); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-head h2 .sub { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.detail-body { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-body .lead { margin: 0; color: var(--text-2); line-height: 1.6; }
.detail-sec h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
table.dump { border-collapse: collapse; width: 100%; font-size: 13px; }
table.dump th { text-align: left; vertical-align: top; color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 12px; padding: 4px 10px 4px 0; width: 1%; white-space: nowrap; }
table.dump td { padding: 4px 0; color: var(--cell); word-break: break-word; }
table.dump tr + tr th, table.dump tr + tr td { border-top: 1px solid var(--line-3); }
table.dump.nested { font-size: 12px; background: #0d0f13; border: 1px solid var(--line-3); border-radius: 3px; }
table.dump.nested th, table.dump.nested td { padding: 3px 8px; }
.dump-list > div { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.dump-list .k { color: var(--faint); font-family: var(--mono); font-size: 11px; min-width: 26px; }
.rich b { color: var(--title); }
.rich-tip { max-width: 360px; white-space: normal; line-height: 1.5; position: absolute; }
.rich-tip b { margin-bottom: 4px; }
.mon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.mon-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: #0d0f13; border: 1px solid var(--line); border-radius: 4px; text-align: center; font-size: 13px; }
.mon-card .sub { font-size: 11px; color: var(--muted); }
.map-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.const-block { border-top: 1px solid var(--line); }
.const-block summary { padding: 10px 16px; cursor: pointer; font-family: var(--mono); color: var(--title); }
.const-block summary .n { color: var(--faint); }
td.mono { font-family: var(--mono); font-size: 12px; }
td.sub-cell { color: var(--faint); font-size: 12px; }
.slot img.ico { margin-bottom: 2px; }
.slot .slot-name { font-size: 11px; line-height: 1.25; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot .lock { position: absolute; top: 2px; right: 3px; font-size: 9px; }
.slot { cursor: pointer; }
pre.record { white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 11px; color: var(--text-2); background: #0b0c0f; border: 1px solid var(--line); border-radius: 3px; padding: 10px; max-height: 420px; overflow: auto; }
.gems { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* Số liệu chi tiết (12/11): the sections' menu beside one section's tables */
.rate-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.rate-nav { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 0; }
.rate-group + .rate-group { border-top: 1px solid var(--line-3); margin-top: 6px; padding-top: 6px; }
.rate-group-name { padding: 6px 14px 4px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.rate-nav a { display: block; padding: 5px 14px; font-size: 13px; line-height: 1.35; color: var(--text-2); text-decoration: none; border-left: 2px solid transparent; }
.rate-nav a:hover { color: var(--jade-light); background: #151820; }
.rate-nav a[aria-current="page"] { color: var(--jade-light); border-left-color: var(--jade); background: var(--jade-ink); }
.rate-nav a.bad { color: var(--seal); }
.rate-main .toolbar .field[type=search] { flex: 1 1 320px; }
.rate-content { padding: 4px 0 16px; }
.rate-sec + .rate-sec { border-top: 1px solid var(--line); margin-top: 8px; }
.rate-sec-title { margin: 14px 16px 4px; font-family: var(--serif); font-size: 20px; color: var(--title); font-weight: 700; }
.rate-sec-title a { color: inherit; }
.rate-sec-title .sub { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; }
.rate-lead { margin: 4px 16px 10px; font-size: 13px; line-height: 1.6; color: var(--text-2); max-width: 110ch; }
.rate-block { margin-top: 14px; border-top: 1px solid var(--line-3); padding-top: 10px; }
.rate-title { margin: 0 16px 4px; font-size: 14px; color: var(--title); font-weight: 600; }
.rate-title .n { font-size: 12px; color: var(--faint); font-weight: 400; font-family: var(--mono); }
.rate-note { margin: 0 16px 8px; font-size: 12px; line-height: 1.55; color: var(--muted); max-width: 120ch; }
.rate-text { margin: 0 16px 8px; font-size: 13px; line-height: 1.6; color: var(--text-2); white-space: pre-line; }
.rate-chips { display: flex; flex-direction: column; gap: 6px; margin: 0 16px 8px; }
.rate-chips .filter { min-height: 28px; padding: 0 10px; font-size: 12px; }
.rate-block table.data td.item-cell { white-space: nowrap; }
.rate-block table.data.kv td:first-child { color: var(--cell); }
.rate-block .sure { color: var(--gold); }
.rate-block table.data.kv td.kv-text { color: var(--text-2); font-size: 13px; text-align: right; }
.rate-found { margin-top: 6px; }
.rate-found-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 900px) {
  .rate-layout { grid-template-columns: 1fr; }
  .rate-nav { position: static; max-height: 260px; }
}

/* 25/11 Máy nhiều tài khoản (page-clones.js): a device's card, the account picker of its dialogs */
.clone-card { overflow: hidden; }
.clone-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.clone-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--title); }
.clone-head .clone-tools { margin-left: auto; }
.clone-tools { gap: 6px; margin-top: 10px; }
.clone-head .clone-tools { margin-top: 0; }
/* 04/12: Máy nhiều tài khoản's filters (pills a group, the same look as Theo mã máy) */
.clone-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px; }
.clone-filter-title { font-size: 12px; font-weight: 600; color: var(--title); text-transform: uppercase; letter-spacing: .04em; }
.clone-filter .grp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.clone-filter .lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.clone-filter .filter { min-height: 28px; padding: 0 10px; font-size: 12px; }
.clone-filter-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.clone-filter .clone-search { flex: 0 1 260px; min-width: 180px; min-height: 30px; font-size: 13px; }
.clone-showing { color: var(--jade-light); }
.member-pick { display: flex; flex-direction: column; gap: 6px; max-height: min(46vh, 380px); overflow-y: auto; padding-right: 4px; }
.member-pick .member { flex-wrap: wrap; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line-3); border-radius: 4px; background: #0c0d11; }
.member-pick .member input { margin-top: 2px; }
.member-pick .member .who { flex: 1 1 200px; min-width: 0; color: var(--text); }
.member-pick .member .who b { color: var(--title); font-weight: 600; }
.member-pick .member .tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.member-pick .member > .sub { flex-basis: 100%; padding-left: 26px; font-size: 12px; color: var(--muted); }
.member-pick .member.locked { opacity: 0.6; }

/* 02/12 Số liệu trực tiếp (page-pitch.js): the 30/11 pitch deck's slides with live numbers. A slide is drawn on a 1280 x 720 page
   whose unit --u is one of its pixels (100cqw / 1280), so the same slide fills a laptop, a 16:9 projector in full screen or a phone
   (narrower than 860 px: a column, --u = 1px). Charts are SVG drawn at the slide's own pixels. */
.pitch-tools .act[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.pitch-note { margin: 0; font-size: 12px; color: var(--muted); }
.deck { display: flex; flex-direction: column; gap: 24px; }
.slide { container: pitch / inline-size; }
.slide-in { --u: 1px; position: relative; display: flex; flex-direction: column; gap: calc(var(--u) * 14); padding: 18px 16px 16px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: inset 0 3px 0 -1px #4a3d1c; overflow: hidden; color: var(--text); }
.p-head { display: flex; flex-direction: column; gap: calc(var(--u) * 4); }
.p-kicker { font-size: calc(var(--u) * 14); letter-spacing: 0.2em; text-transform: uppercase; color: var(--jade-light); font-weight: 600; }
.p-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: calc(var(--u) * 36); line-height: 1.15; color: var(--gold); }
.p-title small { font-family: var(--sans); font-size: calc(var(--u) * 18); color: var(--muted); font-weight: 400; margin-left: calc(var(--u) * 12); }
.p-body { display: flex; flex-direction: column; gap: calc(var(--u) * 14); }
.p-cols { display: flex; flex-direction: column; gap: 14px; }
.p-stack-col { display: flex; flex-direction: column; gap: 12px; }
.p-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--u) * 12); }
.p-tile { background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--u) * 8); padding: calc(var(--u) * 12) calc(var(--u) * 16) calc(var(--u) * 11); min-width: 0; }
.p-tile .v { font-family: var(--serif); font-weight: 700; font-size: calc(var(--u) * 38); line-height: 1.05; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.p-tile .v small { font-family: var(--sans); font-weight: 400; font-size: calc(var(--u) * 17); color: var(--muted); margin-left: calc(var(--u) * 4); }
.p-tile .l { font-size: calc(var(--u) * 15); color: var(--text); margin-top: calc(var(--u) * 4); line-height: 1.25; }
.p-tile .s { font-size: calc(var(--u) * 13); color: var(--muted); margin-top: calc(var(--u) * 2); line-height: 1.3; }
.p-tile.jade .v { color: var(--jade-light); }
.p-tag { display: inline-block; font-family: var(--sans); font-size: calc(var(--u) * 12); font-weight: 600; color: #f3d79a; background: var(--gold-ink); border-radius: 3px; padding: 1px calc(var(--u) * 6); margin-left: calc(var(--u) * 8); vertical-align: middle; letter-spacing: 0.02em; }
.p-hero { background: radial-gradient(ellipse at 30% 20%, #1a2a22 0%, var(--panel) 70%); border: 1px solid #2f4a3d; border-radius: calc(var(--u) * 12);
  padding: calc(var(--u) * 22) calc(var(--u) * 28); display: flex; flex-direction: column; justify-content: center; gap: calc(var(--u) * 6); min-width: 0; }
.p-hero .k { font-size: calc(var(--u) * 16); letter-spacing: 0.18em; text-transform: uppercase; color: var(--jade-light); font-weight: 600; display: flex; align-items: center; gap: calc(var(--u) * 10); }
.p-hero .v { font-family: var(--serif); font-weight: 700; font-size: calc(var(--u) * 150); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.p-hero .s { font-size: calc(var(--u) * 18); color: var(--text-2); line-height: 1.4; }
.p-hero .s b { color: var(--title); font-weight: 600; }
.p-live { display: inline-block; width: calc(var(--u) * 12); height: calc(var(--u) * 12); min-width: 8px; min-height: 8px; border-radius: 50%; background: #e0574b; animation: p-pulse 2s infinite; }
@keyframes p-pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 87, 75, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(224, 87, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 87, 75, 0); } }
@media (prefers-reduced-motion: reduce) { .p-live { animation: none; } }
.p-panel { background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--u) * 8); padding: calc(var(--u) * 14) calc(var(--u) * 16); display: flex; flex-direction: column; gap: calc(var(--u) * 8); min-width: 0; min-height: 0; }
.p-panel h3 { margin: 0; font-size: calc(var(--u) * 15); color: var(--title); font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: calc(var(--u) * 4) calc(var(--u) * 10); }
.p-panel h3 span { font-weight: 400; color: var(--muted); font-size: calc(var(--u) * 13); }
.p-panel h3 .p-switch { margin-left: auto; }
.p-switch { display: inline-flex; gap: 4px; }
.p-switch button { min-height: 28px; padding: 0 10px; font: inherit; font-size: 12px; border: 1px solid #2c3139; border-radius: 4px; background: #101217; color: #c9d3cc; cursor: pointer; }
.p-switch button[aria-pressed="true"] { background: var(--jade-ink); border-color: var(--jade); color: var(--jade-light); }
.p-chart { position: relative; height: 220px; min-width: 0; }
.p-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.p-chart text { font-family: var(--sans); fill: var(--muted); }
.p-legend { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 4) calc(var(--u) * 16); font-size: calc(var(--u) * 13); color: var(--muted); }
.p-legend i { display: inline-block; width: calc(var(--u) * 11); height: calc(var(--u) * 11); min-width: 8px; min-height: 8px; border-radius: 2px; margin-right: calc(var(--u) * 6); vertical-align: -1px; }
.p-legend i.line { height: calc(var(--u) * 3); min-height: 2px; vertical-align: 3px; }
.p-bars { display: flex; flex-direction: column; gap: calc(var(--u) * 9); }
.p-bar { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr) auto; gap: calc(var(--u) * 10); align-items: center; font-size: calc(var(--u) * 15); }
.p-bar .n { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bar .t { height: calc(var(--u) * 14); min-height: 8px; background: #191d24; border-radius: 3px; overflow: hidden; }
.p-bar .t b { display: block; height: 100%; border-radius: 3px; background: var(--jade); }
.p-bar .x { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--title); font-size: calc(var(--u) * 15); text-align: right; white-space: nowrap; }
.p-bar .x small { color: var(--muted); font-family: var(--sans); font-size: calc(var(--u) * 12); margin-left: calc(var(--u) * 6); }
.p-split { display: flex; height: calc(var(--u) * 30); min-height: 18px; border-radius: 4px; overflow: hidden; background: #191d24; }
.p-split span { display: block; height: 100%; }
.p-split-keys { display: grid; grid-template-columns: repeat(var(--k, 3), minmax(0, 1fr)); gap: calc(var(--u) * 8); }
.p-split-keys div { font-size: calc(var(--u) * 13); color: var(--muted); line-height: 1.3; min-width: 0; }
.p-split-keys b { display: block; font-family: var(--serif); font-size: calc(var(--u) * 28); color: var(--title); font-weight: 700; line-height: 1.1; }
.p-split-keys i { display: inline-block; width: calc(var(--u) * 10); height: calc(var(--u) * 10); min-width: 8px; min-height: 8px; border-radius: 2px; margin-right: calc(var(--u) * 6); }
.p-scroll { overflow-x: auto; min-width: 0; }
table.p-cohort { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: calc(var(--u) * 4); font-size: calc(var(--u) * 15); }
table.p-cohort th { text-align: left; font-size: calc(var(--u) * 12); color: var(--jade-light); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; padding: 0 calc(var(--u) * 8); }
table.p-cohort th.n, table.p-cohort td.n { text-align: right; }
table.p-cohort td { padding: calc(var(--u) * 6) calc(var(--u) * 8); border-radius: 3px; background: #14171d; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.p-cohort td.heat { text-align: center; color: #fff; font-weight: 600; }
table.p-cohort td.heat small { display: block; font-weight: 400; font-size: calc(var(--u) * 11); color: rgba(255, 255, 255, 0.75); }
table.p-cohort td.wait { text-align: center; color: var(--faint); background: transparent; border: 1px dashed var(--line-2); }
.p-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: calc(var(--u) * 5); font-size: calc(var(--u) * 14); }
.p-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line-3); padding-bottom: calc(var(--u) * 4); }
.p-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-list li b { font-family: var(--mono); color: var(--title); font-weight: 500; }
.p-small { margin: 0; font-size: calc(var(--u) * 13); line-height: 1.45; color: var(--muted); }
.p-small b { color: var(--text); font-weight: 600; }
.p-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: calc(var(--u) * 12.5); color: var(--faint); border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: calc(var(--u) * 7); letter-spacing: 0.02em; }
.p-veil { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--muted); font-size: 13px; }
.p-veil .act { margin-left: auto; }
.p-loading { opacity: 0.6; transition: opacity 0.2s; }
/* a slide 860 px wide or more: the 1280 x 720 page (after the column rules above, which it overrides) */
@container pitch (min-width: 860px) {
  .slide-in { --u: calc(100cqw / 1280); aspect-ratio: 16 / 9; padding: calc(var(--u) * 40) calc(var(--u) * 54) calc(var(--u) * 58); border-radius: calc(var(--u) * 10); }
  .slide-in .p-foot { position: absolute; left: calc(var(--u) * 54); right: calc(var(--u) * 54); bottom: calc(var(--u) * 16); }
  .slide-in .p-body { flex: 1 1 auto; min-height: 0; }
  .p-cols { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: calc(var(--u) * 24); min-height: 0; flex: 1 1 auto; }
  .p-tiles { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
  .p-chart { flex: 1 1 auto; height: auto; min-height: calc(var(--u) * 120); }
  .p-stack-col { display: flex; flex-direction: column; gap: calc(var(--u) * 14); min-height: 0; }
  .p-stack-col > .p-panel { flex: 1 1 auto; }
  .p-panel > .p-bars { flex: 1 1 auto; justify-content: center; gap: calc(var(--u) * 26); }
  .p-bar { font-size: calc(var(--u) * 18); }
  .p-bar .x { font-size: calc(var(--u) * 18); }
  .p-bar .t { height: calc(var(--u) * 22); }
  .p-panel.fill { justify-content: space-evenly; }
  .p-split-keys b { font-size: calc(var(--u) * 44); }
  .p-split-keys div { font-size: calc(var(--u) * 15); }
  .p-split { height: calc(var(--u) * 40); }
  table.p-cohort { font-size: calc(var(--u) * 17); }
  table.p-cohort td { padding: calc(var(--u) * 8) calc(var(--u) * 10); }
  .p-panel.fill .p-list { font-size: calc(var(--u) * 17); gap: calc(var(--u) * 10); }
  .p-panel.fill .p-tile .v { font-size: calc(var(--u) * 60); }
}
/* trình chiếu: one slide over the whole window (and the screen, with F or the button), arrows to move */
.deck.present { position: fixed; inset: 0; z-index: 1000; background: #050607; display: flex; align-items: center; justify-content: center; gap: 0; padding: 0; }
.deck.present .slide { display: none; width: min(100vw, calc(100vh * 16 / 9)); }
.deck.present .slide.on { display: block; }
.deck.present .slide-in { border-radius: 0; border: 0; }
.deck.present .p-veil { display: none; }
.deck .p-nav { display: none; }
.deck.present .p-nav { display: flex; position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 1001; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(12, 14, 18, 0.9); border: 1px solid var(--line-2); border-radius: 999px; opacity: 0; transition: opacity 0.25s; }
.deck.present .p-nav:hover, .deck.present .p-nav:focus-within, .deck.present.nav-on .p-nav { opacity: 1; }
.p-nav button { min-width: 40px; min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; cursor: pointer; }
.p-nav button:hover { background: #1b1f27; color: #fff; }
.p-nav .dots { display: flex; gap: 6px; }
.p-nav .dots button { min-width: 0; width: 12px; height: 12px; min-height: 12px; padding: 0; border-radius: 50%; background: #3a404b; }
.p-nav .dots button[aria-current="true"] { background: var(--gold); }
.p-nav .count { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 0 4px; }
body.presenting { overflow: hidden; }
