/* FishLevel — tool nội bộ, dày thông tin. Light/dark theo hệ thống, ép được bằng data-theme.
   Bảng màu gốc --fl-* (một accent teal, một họ xám lạnh, bóng đổ ngả màu nền) dùng chung cho app và editor
   (game/editor/editor.css trỏ token của nó về đây). Token ngắn (--bg, --accent…) là tên các file CSS của app dùng. */
:root {
  --fl-bg: #f3f5f7; --fl-surface: #ffffff; --fl-surface-2: #f7f9fa; --fl-sunken: #edf1f4;
  --fl-ink: #16202a; --fl-ink-2: #384553; --fl-muted: #62707e; --fl-faint: #98a3ae;
  --fl-line: #e2e7eb; --fl-line-2: #cfd7de; --fl-line-3: #a9b5c0;
  --fl-accent: #0f757b; --fl-accent-hover: #0b6368; --fl-accent-ink: #ffffff; --fl-accent-soft: #e2f1f1; --fl-accent-line: #9ccfd2;
  --fl-ring: color-mix(in srgb, #0f757b 32%, transparent);
  --fl-ok: #1d7a4c; --fl-ok-soft: #e2f3e9; --fl-warn: #a64d17; --fl-warn-soft: #fbece1; --fl-bad: #bb2d24; --fl-bad-soft: #fce8e6;
  --fl-lock: #7449ac; --fl-lock-soft: #f1eafa;
  --fl-amber: #d38a0b; --fl-amber-soft: #fcf1d9; --fl-amber-ink: #2e1f00;
  --fl-green: #2f9a55; --fl-green-hover: #258146; --fl-green-ink: #ffffff;
  --fl-shadow-xs: 0 1px 2px rgb(15 30 45 / .06);
  --fl-shadow-sm: 0 1px 2px rgb(15 30 45 / .05), 0 3px 10px rgb(15 30 45 / .06);
  --fl-shadow-lg: 0 2px 6px rgb(15 30 45 / .08), 0 18px 44px rgb(15 30 45 / .18);
  /* nút: mặt nổi nhẹ (gradient 2 tông + viền sáng mép trên), nhấn thì lún; nút màu dùng --c (xem .btn.primary) */
  --fl-btn-bg: linear-gradient(180deg, #ffffff 0%, #f3f6f8 100%);
  --fl-btn-bg-hover: linear-gradient(180deg, #fbfcfd 0%, #eaeff2 100%);
  --fl-btn-bg-active: #e7ecef;
  --fl-btn-bd: #cdd6dd; --fl-btn-bd-hover: #aab7c2;
  --fl-btn-sh: inset 0 1px 0 rgb(255 255 255 / .9), 0 1px 2px rgb(15 30 45 / .08);
  --fl-btn-sh-active: inset 0 1px 2px rgb(15 30 45 / .14);
  --fl-lift: 80%;                               /* tông sáng mép trên của nút màu = màu trộn trắng */
  --fl-hi: rgb(255 255 255 / .28);
  --fl-header: linear-gradient(180deg, #fbfcfd 0%, #f4f7f9 100%);   /* nền header khung / thẻ */
  /* bậc DDA (O1–O5) — xanh lá · xanh ngọc · vàng hổ phách · cam · đỏ; né = xám */
  --dda-t1: #2f9a55; --dda-t2: #0f8b8d; --dda-t3: #d38a0b; --dda-t4: #e0722a; --dda-t5: #c0392b; --dda-none: #8b8f94;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fl-bg: #0d1215; --fl-surface: #141b1f; --fl-surface-2: #192126; --fl-sunken: #10171a;
    --fl-ink: #e4eaed; --fl-ink-2: #c1cbd2; --fl-muted: #8e9ba5; --fl-faint: #5d6a74;
    --fl-line: #232d33; --fl-line-2: #31404a; --fl-line-3: #4a5a66;
    --fl-accent: #4cc0c8; --fl-accent-hover: #6ad0d7; --fl-accent-ink: #04262a; --fl-accent-soft: #0f3336; --fl-accent-line: #1f666c;
    --fl-ring: color-mix(in srgb, #4cc0c8 38%, transparent);
    --fl-ok: #4cc38a; --fl-ok-soft: #122e20; --fl-warn: #e38a52; --fl-warn-soft: #382315; --fl-bad: #f0766c; --fl-bad-soft: #3a1714;
    --fl-lock: #b996ea; --fl-lock-soft: #2a2140;
    --fl-amber: #e0a73a; --fl-amber-soft: #36290f; --fl-amber-ink: #231700;
    --fl-green: #3aa864; --fl-green-hover: #46bd72; --fl-green-ink: #ffffff;
    --fl-shadow-xs: 0 1px 2px rgb(0 0 0 / .35);
    --fl-shadow-sm: 0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .3);
    --fl-shadow-lg: 0 2px 8px rgb(0 0 0 / .45), 0 22px 50px rgb(0 0 0 / .5);
    --fl-btn-bg: linear-gradient(180deg, #232d33 0%, #1c252a 100%);
    --fl-btn-bg-hover: linear-gradient(180deg, #2a353c 0%, #222c32 100%);
    --fl-btn-bg-active: #192126;
    --fl-btn-bd: #34434d; --fl-btn-bd-hover: #4d5f6b;
    --fl-btn-sh: inset 0 1px 0 rgb(255 255 255 / .06), 0 1px 2px rgb(0 0 0 / .4);
    --fl-btn-sh-active: inset 0 1px 3px rgb(0 0 0 / .45);
    --fl-lift: 88%;
    --fl-hi: rgb(255 255 255 / .32);
    --fl-header: linear-gradient(180deg, #192126 0%, #151c20 100%);
    --dda-t1: #4cc38a; --dda-t2: #4cc0c8; --dda-t3: #e0a73a; --dda-t4: #e58a4a; --dda-t5: #f0766c; --dda-none: #7c8790;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fl-bg: #0d1215; --fl-surface: #141b1f; --fl-surface-2: #192126; --fl-sunken: #10171a;
  --fl-ink: #e4eaed; --fl-ink-2: #c1cbd2; --fl-muted: #8e9ba5; --fl-faint: #5d6a74;
  --fl-line: #232d33; --fl-line-2: #31404a; --fl-line-3: #4a5a66;
  --fl-accent: #4cc0c8; --fl-accent-hover: #6ad0d7; --fl-accent-ink: #04262a; --fl-accent-soft: #0f3336; --fl-accent-line: #1f666c;
  --fl-ring: color-mix(in srgb, #4cc0c8 38%, transparent);
  --fl-ok: #4cc38a; --fl-ok-soft: #122e20; --fl-warn: #e38a52; --fl-warn-soft: #382315; --fl-bad: #f0766c; --fl-bad-soft: #3a1714;
  --fl-lock: #b996ea; --fl-lock-soft: #2a2140;
  --fl-amber: #e0a73a; --fl-amber-soft: #36290f; --fl-amber-ink: #231700;
  --fl-green: #3aa864; --fl-green-hover: #46bd72; --fl-green-ink: #ffffff;
  --fl-shadow-xs: 0 1px 2px rgb(0 0 0 / .35);
  --fl-shadow-sm: 0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .3);
  --fl-shadow-lg: 0 2px 8px rgb(0 0 0 / .45), 0 22px 50px rgb(0 0 0 / .5);
  --fl-btn-bg: linear-gradient(180deg, #232d33 0%, #1c252a 100%);
  --fl-btn-bg-hover: linear-gradient(180deg, #2a353c 0%, #222c32 100%);
  --fl-btn-bg-active: #192126;
  --fl-btn-bd: #34434d; --fl-btn-bd-hover: #4d5f6b;
  --fl-btn-sh: inset 0 1px 0 rgb(255 255 255 / .06), 0 1px 2px rgb(0 0 0 / .4);
  --fl-btn-sh-active: inset 0 1px 3px rgb(0 0 0 / .45);
  --fl-lift: 88%;
  --fl-hi: rgb(255 255 255 / .32);
  --fl-header: linear-gradient(180deg, #192126 0%, #151c20 100%);
  --dda-t1: #4cc38a; --dda-t2: #4cc0c8; --dda-t3: #e0a73a; --dda-t4: #e58a4a; --dda-t5: #f0766c; --dda-none: #7c8790;
  color-scheme: dark;
}
:root {
  --bg: var(--fl-bg); --surface: var(--fl-surface); --surface-2: var(--fl-surface-2); --sunken: var(--fl-sunken);
  --ink: var(--fl-ink); --ink-2: var(--fl-ink-2); --muted: var(--fl-muted); --faint: var(--fl-faint);
  --line: var(--fl-line); --line-2: var(--fl-line-2); --line-3: var(--fl-line-3);
  --accent: var(--fl-accent); --accent-hover: var(--fl-accent-hover); --accent-ink: var(--fl-accent-ink); --accent-soft: var(--fl-accent-soft); --accent-line: var(--fl-accent-line);
  --ring: var(--fl-ring);
  --ok: var(--fl-ok); --ok-soft: var(--fl-ok-soft); --warn: var(--fl-warn); --warn-soft: var(--fl-warn-soft); --bad: var(--fl-bad); --bad-soft: var(--fl-bad-soft);
  --lock: var(--fl-lock); --lock-soft: var(--fl-lock-soft);
  --shadow: var(--fl-shadow-lg); --shadow-xs: var(--fl-shadow-xs); --shadow-sm: var(--fl-shadow-sm);
  /* bo góc: trong nhỏ, ngoài to — nút / ô nhập 8, thẻ 12, hộp thoại 16 */
  --radius: 12px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --ctl: 30px; --ctl-sm: 26px;                                   /* cao nút / ô nhập */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --font: "Be Vietnam Pro", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
}
/* màn cảm ứng: nút / ô nhập đủ to để bấm bằng ngón tay */
@media (pointer: coarse) { :root { --ctl: 38px; --ctl-sm: 32px; } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 var(--font); overflow: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "ss01"; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
button, input, select, textarea { font: inherit; color: inherit; }
h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 13.5px; }
h4 { font-size: 12px; color: var(--ink-2); margin: 10px 0 6px; }
a { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }  /* .btn{display:…} không được đè thuộc tính hidden */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- app shell ---------- */
#app { display: grid; grid-template-rows: 48px 1fr 28px; height: 100vh; height: 100dvh; }
/* khung đã dựng (topbar có mặt): thêm hàng dải thông báo chung — đặt hàng cố định để dải ẩn (display:none) không làm
   main / statusbar trượt sang hàng khác */
#app:has(> .topbar) { grid-template-rows: 48px auto 1fr 28px; }
#app > .topbar { grid-row: 1; }
#app > .noticebar { grid-row: 2; }
#app > main { grid-row: 3; }
#app > .statusbar { grid-row: 4; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--fl-header); border-bottom: 1px solid var(--line); min-width: 0; box-shadow: 0 1px 0 var(--surface) inset, var(--shadow-sm); position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
/* logo Sonat (assets/brand/sonat_logo.webp) — giống AntLevel */
.brand .logo { height: 28px; width: auto; display: block; object-fit: contain; flex: none; }
.brand small { font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 2px; height: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { border: 0; background: none; padding: 0 12px; height: 32px; border-radius: var(--r-md); cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; flex: none;
  transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav button:hover { color: var(--ink); background: var(--surface-2); }
.nav button[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.topbar .spacer { flex: 1; }
/* thanh trên tràn — main.mjs fitNav đo thật: bậc 1 gọn chữ, bậc 2 menu xuống hàng riêng (như màn ≤ 640 px) */
.topbar.tb-tight .brand small, .topbar.tb-tight .userchip > span[translate="no"] { display: none; }
.topbar.tb-tight .userchip { padding-right: 3px; }
.topbar.tb-tight .nav button { padding: 0 8px; }
.topbar.tb-wrap { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
.topbar.tb-wrap .nav { order: 10; flex: 1 0 100%; height: 40px; }
#app:has(> .topbar.tb-wrap) { grid-template-rows: auto auto 1fr 28px; }
.userchip { display: flex; align-items: center; gap: 7px; height: 32px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; white-space: nowrap; min-width: 0; flex-shrink: 0;
  transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.userchip:hover { border-color: var(--line-2); background: var(--surface); }
.userchip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.avatar { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; flex: none; }
.devtag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); font-weight: 700; letter-spacing: .04em; }
/* EN | VI + nút Sáng/Tối cạnh chip tài khoản (main.mjs) */
.langsw { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); flex: none; }
.langsw button { border: 0; background: none; color: var(--muted); height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; letter-spacing: .04em; cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.langsw button:hover { color: var(--ink); }
.langsw button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.langsw button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.themebtn { font-size: 14px; flex: none; }

main { min-height: 0; min-width: 0; position: relative; }
.view { position: absolute; inset: 0; overflow: auto; }
/* container "view": bố cục 2 cột của view (Sinh level, Promote…) đổi theo bề rộng THẬT của view — khung game / DDA Live
   ghim phải (body padding-right) làm view còn ~500 px trong khi cửa sổ vẫn rộng, @media theo cửa sổ không bắt được */
.view.pad { padding: 12px; container: view / inline-size; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl); padding: 0 12px; border: 1px solid var(--fl-btn-bd); border-radius: var(--r-md);
  background: var(--fl-btn-bg); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--fl-btn-sh); user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .08s var(--ease), filter .15s var(--ease); }
.btn:hover:not(:disabled) { border-color: var(--fl-btn-bd-hover); background: var(--fl-btn-bg-hover); }
.btn:active:not(:disabled) { transform: translateY(1px); background: var(--fl-btn-bg-active); box-shadow: var(--fl-btn-sh-active); }
.btn:disabled { cursor: not-allowed; background: var(--surface-2); border-color: var(--line); color: var(--faint); box-shadow: none; }
/* nút màu: --c = màu nền; mép trên sáng hơn, viền tối hơn một tông, bóng đổ ngả theo màu */
.btn.primary { --c: var(--accent); --c-ink: var(--accent-ink); }
.btn.primary.danger { --c: var(--bad); --c-ink: #fff; }
.btn.primary.ok { --c: var(--ok); --c-ink: #fff; }   /* nút xanh lá (▶ Chơi bằng game thật) */
.btn.primary:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--c) var(--fl-lift), #fff) 0%, var(--c) 100%); border-color: color-mix(in srgb, var(--c) 78%, #000);
  color: var(--c-ink); font-weight: 600; text-shadow: 0 1px 0 color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: inset 0 1px 0 var(--fl-hi), 0 1px 2px color-mix(in srgb, var(--c) 40%, transparent), 0 3px 8px -3px color-mix(in srgb, var(--c) 60%, transparent); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, color-mix(in srgb, var(--c) 94%, #fff) 100%); border-color: color-mix(in srgb, var(--c) 78%, #000); }
.btn.primary:active:not(:disabled) { background: color-mix(in srgb, var(--c) 90%, #000); box-shadow: inset 0 1px 3px rgb(0 0 0 / .25); }
.btn.primary:disabled { font-weight: 600; }
/* phụ nguy hiểm: chữ đỏ, di chuột thì nền đỏ nhạt */
.btn.danger:not(.primary):not(:disabled) { color: var(--bad); }
.btn.danger:not(.primary):hover:not(:disabled) { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 55%, var(--line-2)); }
.btn.ghost { border-color: transparent; background: none; box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 7%, transparent); border-color: transparent; }
.btn.ghost:active:not(:disabled) { background: color-mix(in srgb, var(--ink) 11%, transparent); box-shadow: none; }
.btn.ghost:disabled { background: none; border-color: transparent; }
.btn.sm { height: var(--ctl-sm); padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn.icon { width: var(--ctl); padding: 0; }
.btn.sm.icon { width: var(--ctl-sm); }
input[type=text], input[type=number], input[type=search], input[type=email], input[type=url], input[type=password], input[type=date], input[type=datetime-local], input[type=time], input:not([type]), select, textarea {
  height: var(--ctl); padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); min-width: 0;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--line-3); }
::placeholder { color: var(--faint); }
textarea { height: auto; padding: 7px 9px; font-family: var(--mono); font-size: 12px; line-height: 1.45; resize: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.btn:focus-visible, .nav button:focus-visible, .subtabs button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
/* select: mũi tên vẽ bằng gradient (theo màu chữ phụ, đúng cả sáng / tối), bỏ mũi tên hệ thống */
select { appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8.5px) 52%; background-size: 4.5px 4.5px, 4.5px 4.5px; background-repeat: no-repeat; }
select[multiple] { background-image: none; padding-right: 9px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.fld { display: inline-flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.fld > input, .fld > select { color: var(--ink); font-size: 13px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; cursor: pointer; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.pill.lock { background: var(--lock-soft); color: var(--lock); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--shadow-xs); }
.card + .card { margin-top: 10px; }
.card > h3 { margin-bottom: 9px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card > h3:first-child { margin: -12px -14px 12px; padding: 10px 14px; background: var(--fl-header); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; font-size: 13.5px; }
.note { padding: 8px 11px; border-radius: var(--r-md); background: var(--sunken); border-left: 3px solid var(--line-2); font-size: 12px; line-height: 1.5; }
.note.ok { background: var(--ok-soft); border-color: var(--ok); }
.note.warn { background: var(--warn-soft); border-color: var(--warn); }
.note.bad { background: var(--bad-soft); border-color: var(--bad); }
.note.acc { background: var(--accent-soft); border-color: var(--accent); }
.note + .note { margin-top: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 10px; }
.grid2 > .card + .card { margin-top: 0; }
.grid2 + .card, .card + .grid2 { margin-top: 8px; }

table.tbl { border-collapse: collapse; width: 100%; font-size: 12px; }
.tbl th, .tbl td { padding: 6px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .02em; z-index: 1; white-space: nowrap; }
.tbl td { font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; }
.tblwrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); max-width: 100%; }

.progress { height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .15s; }
.bar { height: 8px; background: var(--sunken); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--faint); }
.bar.ok > i { background: var(--ok); } .bar.bad > i { background: var(--bad); } .bar.warn > i { background: var(--warn); }
.bar-row { display: grid; grid-template-columns: 150px 1fr 110px; gap: 8px; align-items: center; margin: 3px 0; font-size: 12px; }

.empty { display: grid; place-items: center; color: var(--muted); padding: 30px 12px; text-align: center; }
.spin { width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- workspace + panel ---------- */
.work { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); overflow: hidden; }
.work.two { grid-template-columns: 1fr 1fr; }
.panel { display: grid; grid-template-rows: auto auto 1fr; min-width: 0; min-height: 0; background: var(--bg); }
.work:not(.two) .panel[data-idx="1"] { display: none; }
.phead { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--fl-header); border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: wrap; row-gap: 6px; }
.phead .pidx { font-size: 10px; font-weight: 700; color: var(--accent-ink); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) var(--fl-lift), #fff), var(--accent)); border-radius: 6px; padding: 2px 7px; box-shadow: inset 0 1px 0 var(--fl-hi); }
/* ô chọn bộ: rộng theo tên bộ (vd "ABTest_Hybrid_2809 (12)") và cao bằng nút thường; nút ＋ ⚙ ▦ ‹ › cạnh đó cùng cỡ */
.phead select.pack { min-width: 200px; max-width: 360px; height: var(--ctl); font-size: 13px; font-weight: 600; }
.phead > .btn.sm.icon, .phead .lnav .btn.sm.icon { height: var(--ctl); width: var(--ctl); font-size: 14px; }
.work.two .phead select.pack { max-width: 260px; }
.ptitle { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 160px; }
.ptitle b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.pmeta { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pacts { display: flex; gap: 4px; flex-wrap: wrap; }
/* ô chọn chế độ test game thật cạnh nút ▶ — cùng cỡ nút sm */
.pacts select.sm { height: var(--ctl-sm); font-size: 12px; padding: 0 6px; border-radius: 7px; }
.lockbar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lockbar.other { background: var(--lock-soft); color: var(--lock); font-weight: 600; box-shadow: inset 3px 0 0 var(--lock); }
.lockbar.mine { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.lockbar.offline { background: var(--warn-soft); color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.lockbar.info { background: var(--sunken); color: var(--ink-2); display: block; }
.lockbar:empty { display: none; }
.pbody { display: grid; grid-template-columns: 168px 1fr; min-height: 0; min-width: 0; }
.pbody.nolist { grid-template-columns: 0 1fr; }
.pbody.nolist .levels { visibility: hidden; }

.levels { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; min-width: 0; overflow: hidden; border-right: 1px solid var(--line); background: var(--surface); }
.levels .lhead .chk { white-space: normal; align-items: flex-start; line-height: 1.25; }
.levels .lhead .chk input { margin-top: 1px; }
.levels .lhead { padding: 8px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); background: var(--fl-header); }
.levels .lhead input[type=search] { width: 100%; height: var(--ctl-sm); }
.levels .lhead select { width: 100%; height: var(--ctl-sm); }
.levels ul { list-style: none; margin: 0; padding: 4px; overflow: auto; }
.levels li { display: flex; align-items: center; gap: 5px; padding: 4px 8px; cursor: pointer; font-size: 12px; border-radius: var(--r-sm); transition: background-color .12s var(--ease); }
.levels li:hover { background: var(--surface-2); }
.levels li.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); font-weight: 600; }
.levels li.missing { color: var(--faint); cursor: default; }
.levels li .lno { font-family: var(--mono); min-width: 34px; }
.levels li .lic { margin-left: auto; display: flex; gap: 3px; align-items: center; }
/* tag level trong danh sách (ui/leveltags.mjs): chữ độ khó + icon cơ chế; màu --d-* ở gallery.css */
.levels li .ltags { display: inline-flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.levels li .ltag-d { font: 700 10px/1 var(--mono); min-width: 16px; text-align: center; color: var(--muted); }
.levels li .ltag-d.d-easy { color: var(--d-easy); }
.levels li .ltag-d.d-medium { color: var(--d-medium); }
.levels li .ltag-d.d-hard { color: var(--d-hard); }
.levels li .ltag-d.d-superhard { color: var(--d-superhard); }
.levels li .ltag-ic { width: 14px; height: 14px; object-fit: contain; }
.levels li .ltag-txt, .levels li .ltag-more { font-size: 9px; color: var(--muted); }
.levels .lfoot { padding: 8px; border-top: 1px solid var(--line); display: flex; gap: 5px; flex-wrap: wrap; align-items: center; background: var(--fl-header); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.acc { background: var(--accent); }
.lockic { color: var(--lock); font-size: 11px; }
.levels li .lnote { position: relative; font-size: 11px; line-height: 1; cursor: pointer; padding: 1px; border-radius: 3px; }
.levels li .lnote:hover { background: var(--surface-3, var(--line)); }
.levels li .lnote-dot { position: absolute; right: -1px; top: -1px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.lnote-dlg { display: grid; gap: 8px; }
.lnote-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lnote-chip.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.lnote-ta { width: 100%; min-height: 140px; resize: vertical; font: inherit; }
.popmenu .pm-item.on { background: var(--accent-soft); }

.pcontent { display: grid; grid-template-rows: auto auto 1fr; min-width: 0; min-height: 0; }
.curbar { display: flex; align-items: center; gap: 7px; padding: 7px 12px; background: linear-gradient(90deg, var(--accent-soft) 0%, color-mix(in srgb, var(--accent-soft) 35%, var(--surface)) 100%); border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--accent); font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; }
.curbar .cb-panel { font: 700 11px/1.6 var(--mono); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) var(--fl-lift), #fff), var(--accent)); color: var(--accent-ink); border-radius: 6px; padding: 0 7px; flex: none; box-shadow: inset 0 1px 0 var(--fl-hi); }
.curbar .cb-pack { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.curbar .cb-sep { color: var(--muted); flex: none; }
.curbar .cb-level { font-size: 15px; font-weight: 700; letter-spacing: -.01em; flex: none; }
.curbar .cb-meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.curbar .grow { flex: 1 1 0; }
.curbar .ltags { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.curbar .ltag-d { font: 700 11px/1 var(--mono); }
.curbar .ltag-d.d-easy { color: var(--d-easy); } .curbar .ltag-d.d-medium { color: var(--d-medium); }
.curbar .ltag-d.d-hard { color: var(--d-hard); } .curbar .ltag-d.d-superhard { color: var(--d-superhard); }
.curbar .ltag-ic { width: 16px; height: 16px; object-fit: contain; }
.curbar .ltag-txt, .curbar .ltag-more { font-size: 10px; color: var(--muted); }
@keyframes lflash { 0% { background: var(--accent); color: var(--accent-ink); } 100% { background: var(--accent-soft); } }
.levels li.flash { animation: lflash 0.9s ease-out; }
.subtabs { display: flex; gap: 2px; padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { border: 0; background: none; padding: 10px 12px 9px; border-radius: var(--r-sm) var(--r-sm) 0 0; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 12.5px; font-weight: 500;
  transition: color .15s var(--ease), border-color .15s var(--ease); }
.subtabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.subtabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: transparent; font-weight: 600; box-shadow: inset 0 -2.5px 0 var(--accent); }
.subtabs button .cnt { margin-left: 3px; }
.tabpane { overflow: auto; min-height: 0; padding: 10px; }
.tabpane.flush { padding: 0; }

/* ---------- editor placeholder / JSON ---------- */
.jsonpane { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 6px; }
.jsonpane textarea { width: 100%; height: 100%; min-height: 200px; background: var(--surface); }
.jsonpane textarea[readonly] { background: var(--surface-2); color: var(--ink-2); }
.edhost { height: 100%; min-height: 0; }
.valbox { font-size: 12px; max-height: 110px; overflow: auto; }
.valbox li { margin: 1px 0; }
.valbox ul { margin: 3px 0; padding-left: 18px; }

/* ---------- play board ---------- */
.ctrls { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: flex-end; }
.ctrls .fld input[type=number] { width: 70px; }
.hud { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.hud b { font-variant-numeric: tabular-nums; }
.banner { padding: 8px 12px; border-radius: var(--r-md); font-weight: 600; margin-bottom: 8px; }
.banner.win { background: var(--ok-soft); color: var(--ok); }
.banner.lose { background: var(--bad-soft); color: var(--bad); }
.banner.run { background: var(--sunken); color: var(--ink-2); font-weight: 500; }
.na { border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--warn); border-radius: var(--r-md); padding: 7px 11px; font-size: 12px; margin-bottom: 8px; }
.na b { color: inherit; }
.board { display: flex; flex-wrap: wrap; gap: 6px; }
.bubble { border: 1px solid var(--line-2); border-radius: 12px; padding: 5px 6px; background: var(--surface); min-width: 70px; }
.bubble.frozen { border-color: #6bb7d6; background: color-mix(in srgb, #6bb7d6 12%, var(--surface)); }
.bubble.locked { border-style: dashed; border-color: var(--lock); }
.bubble.obstacle { background: var(--sunken); }
.bubble .bh { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.seats { display: flex; gap: 3px; }
.seat { width: 30px; height: 26px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font: 600 11px/1 var(--mono); background: var(--surface-2); }
.seat.click { cursor: pointer; }
.seat.click:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.seat.empty { color: var(--faint); border-style: dotted; }
.seat.hidden { background: repeating-linear-gradient(45deg, var(--sunken) 0 4px, var(--surface-2) 4px 8px); color: var(--muted); }
.seat.blocked { opacity: .55; }
.flags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.fchip { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 5px; font: 600 11px/1 var(--mono); border: 1.5px solid var(--line-2); }
.temprow { display: flex; gap: 5px; flex-wrap: wrap; }
.tempslot { width: 46px; height: 42px; border: 1px dashed var(--line-2); border-radius: 6px; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 10px; color: var(--muted); }
.tanks { display: flex; gap: 6px; flex-wrap: wrap; }
.tank { border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 7px; min-width: 104px; font-size: 11px; background: var(--surface); }
.tank.locked { background: var(--sunken); color: var(--muted); }
.tank.dead { opacity: .5; text-decoration: line-through; }
.tank .held { display: flex; gap: 3px; margin-top: 3px; min-height: 22px; }
.queue { display: flex; flex-wrap: wrap; gap: 3px; max-height: 120px; overflow: auto; }
.qitem { font-size: 11px; padding: 1px 5px; border-radius: 3px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.log { font: 11px/1.45 var(--mono); max-height: 140px; overflow: auto; color: var(--ink-2); }
.playgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 8px; align-items: start; }
@media (max-width: 1500px) { .work.two .playgrid { grid-template-columns: 1fr; } }

/* ---------- verify ---------- */
.curve svg { display: block; }
.curve .axis { stroke: var(--line-2); }
.curve .grid { stroke: var(--line); }
.curve .half { stroke: var(--bad); stroke-dasharray: 4 3; }
.curve .line { stroke: var(--accent); fill: none; stroke-width: 2; }
.curve .pt { fill: var(--accent); }
.curve .estar { stroke: var(--warn); stroke-dasharray: 3 3; }
.curve text { fill: var(--muted); font-size: 11px; }
.curve text.estar-t { fill: var(--warn); }
.runbar { display: flex; align-items: center; gap: 8px; }
.runbar .progress { flex: 1; }

/* ---------- dialog ---------- */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); max-width: min(1100px, 94vw); max-height: 90vh; max-height: 90dvh; }
dialog.dlg[open] { animation: dlg-in .18s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
dialog.dlg::backdrop { background: rgb(8 16 22 / .42); backdrop-filter: blur(2px); }
.dlg .dh { padding: 14px 18px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; background: var(--fl-header); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.dlg .dh h2 { font-size: 15px; }
.dlg .db { padding: 14px 18px; overflow: auto; max-height: calc(90vh - 120px); max-height: calc(90dvh - 120px); }
.dlg .df { padding: 11px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* diff */
.diff td.mine, .diff th.mine { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.diff td.srv, .diff th.srv { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.diff tr.chg td:first-child { border-left: 3px solid var(--warn); }
.diff tr.add td:first-child { border-left: 3px solid var(--ok); }
.diff tr.del td:first-child { border-left: 3px solid var(--bad); }
.diff .fishrow { display: flex; gap: 2px; flex-wrap: wrap; }
.diff .fchip.x { outline: 2px solid var(--warn); outline-offset: 0; }
/* tag obs + chữ độ khó dùng chung (ui/obstags.mjs): Gallery, tooltip danh sách level — màu obs của game (--ob/--obd),
   màu chữ độ khó --d-* (gallery.css) */
.obs-tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px 0 4px; border-radius: 5px; font-size: 11px; line-height: 1;
  color: #fff; background: var(--ob, #475569); border: 1px solid var(--obd, #94a3b8); white-space: nowrap; }
.obs-tag b { font-weight: 700; }
.obs-tag img { width: 14px; height: 14px; object-fit: contain; }
/* độ khó: chữ tô màu thang chung, không nền */
.diff-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; line-height: 1; color: var(--muted); white-space: nowrap; }
.diff-tag.d-easy { color: var(--d-easy); } .diff-tag.d-medium { color: var(--d-medium); }
.diff-tag.d-hard { color: var(--d-hard); } .diff-tag.d-superhard { color: var(--d-superhard); }
/* tooltip tag level (rê chuột vào tag ở danh sách / dải đang chọn) */
.ltip { position: fixed; z-index: 2000; max-width: 340px; padding: 8px 10px; border-radius: 8px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12px; pointer-events: none; }
.ltip[hidden] { display: none; }
.ltip-head { display: flex; align-items: center; gap: 8px; }
.ltip-counts { color: var(--muted); font-variant-numeric: tabular-nums; }
.ltip-obs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ltip-none, .ltip-ex { margin-top: 6px; color: var(--muted); }
.ltip-ex { color: var(--warn); }
/* tag "ngoại lệ" luật template ở danh sách level (ui/leveltags.mjs) */
.ltag-ex { display: inline-flex; align-items: center; height: 15px; padding: 0 4px; margin-left: 2px; border-radius: 4px; font-size: 9.5px; font-weight: 700; background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
/* "đã sửa gì" (ui/changes.mjs) — Audit, tab Lịch sử, hộp Xem thay đổi */
.chg { margin: 0 0 3px; padding-left: 16px; }
.chg li { margin: 1px 0; line-height: 1.55; }
.chg .fchip { height: 18px; min-width: 22px; font-size: 10px; vertical-align: middle; }

/* ---------- status bar ---------- */
.statusbar { display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--fl-header); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.statusbar .seg { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; border-radius: 0; background: none; }   /* trùng tên .seg (nút chọn đoạn ở gallery.css) */
.statusbar .seg:empty { display: none; }
.statusbar .seg.offline { color: var(--warn); font-weight: 600; }
.statusbar button.link { border: 0; background: none; color: var(--bad); font-weight: 600; cursor: pointer; padding: 0; }
.statusbar .ptbtn, .statusbar .verbtn { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.statusbar .ptbtn:hover, .statusbar .verbtn:hover { color: var(--accent); }
.statusbar .ptbtn:focus-visible, .statusbar .verbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: var(--r-sm); }
.statusbar .right { margin-left: auto; display: inline-flex; gap: 14px; align-items: center; }
.presence { display: inline-flex; gap: 2px; }
.presence .avatar { width: 18px; height: 18px; font-size: 9px; border-radius: 5px; }

/* toast */
.toasts { position: fixed; right: 14px; bottom: 40px; display: grid; gap: 8px; z-index: 50; }
/* hộp toast là popover (top layer): bỏ kiểu mặc định của trình duyệt (inset:0 + margin:auto + viền + nền) — trước đây hộp RỖNG
   còn mở hiện thành ô vuông viền trắng giữa màn hình; rỗng thì ẩn hẳn */
.toasts[popover] { inset: auto 14px 40px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: inherit; }
.toasts:empty { display: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-lg); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.45; max-width: 400px; animation: toast-in .2s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* global views */
.toolgrid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 100%; }
.toolgrid > * { min-width: 0; }
.toolgrid > .side { position: sticky; top: 0; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.formgrid .full { grid-column: 1 / -1; }
.formgrid .fld > input, .formgrid .fld > select { width: 100%; }
/* nút "?" chú thích (app/js/help.mjs hint): rê chuột / bấm để đọc — khung bật lên đọc từ aria-label (đổi ngôn ngữ tự dịch) */
.qhint { display: inline-grid; place-items: center; width: 15px; height: 15px; margin: 0 0 0 4px; padding: 0; flex: none; border-radius: 50%;
  border: 1px solid var(--fl-line-3); background: var(--fl-surface); color: var(--fl-muted); font-family: inherit; font-size: 10px; font-weight: 700; line-height: 1; cursor: help;
  position: relative; vertical-align: middle; }
.qhint:hover, .qhint:focus-visible { border-color: var(--fl-accent); color: var(--fl-accent); outline: none; }
/* khung chú thích (help.mjs showHint): fixed + kẹp trong màn hình — không bị khung cuộn của hộp thoại cắt */
.qhint-pop { position: fixed; z-index: 80; width: max-content; max-width: min(360px, calc(100vw - 16px)); white-space: pre-line; text-align: left;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--fl-line-2); background: var(--fl-surface); color: var(--fl-ink);
  box-shadow: var(--fl-shadow-lg); font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-transform: none; pointer-events: none; }
.qhint-pop[hidden] { display: none; }
.mechgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px 8px; }
.mechgrid .mechdose { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mechgrid .mechdose > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mechgrid .mechdose .dose { width: 40px; flex: none; padding: 1px 3px; font-size: 12px; }
.sectionhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sectionhead h2 { font-size: 15px; }
/* đầu thẻ bên trái (Sinh level / Promote / Theo template): cùng dải header với .card > h3 */
.card > .sectionhead:first-child { margin: -12px -14px 12px; padding: 10px 14px; background: var(--fl-header); border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .pbody { grid-template-columns: 118px 1fr; }
  .phead select.pack { min-width: 150px; max-width: 220px; }
  .nav button { padding: 0 8px; }
  .brand small { display: none; }   /* nhường chỗ cho nút điều hướng (Tổng quan bộ…) */
}
/* form + kết quả (Sinh level / Promote): theo bề rộng view (xem .view.pad) — 1150 / 870 ≈ cửa sổ 1180 / 900 px trừ lề view */
@container view (max-width: 1150px) { .toolgrid { grid-template-columns: 290px minmax(0, 1fr); } }
@container view (max-width: 870px) {
  .toolgrid { grid-template-columns: minmax(0, 1fr); }
  .toolgrid > .side { position: static; }
}

/* ---------- thanh cuộn mảnh (Windows / Chromium) ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- tablet: ≤ 900px ---------- */
@media (max-width: 900px) {
  .brand small { display: none; }
  .userchip > span[translate="no"] { display: none; }        /* email: chỉ còn avatar (bấm vẫn mở Cài đặt) */
  .userchip { padding-right: 3px; }
  .work.two { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }   /* 2 bộ song song: chồng trên / dưới */
  .playgrid { grid-template-columns: minmax(0, 1fr); }   /* bàn chơi trên, ô tạm / khay / hàng chờ dưới */
  .pbody { grid-template-columns: 140px 1fr; }
}

/* ---------- Tìm nhanh (Ctrl+K — ui/palette.mjs) + bảng phím tắt (? — keymap.mjs) ---------- */
kbd { display: inline-block; font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.qsbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex: none; }
.qsbtn > span { font-size: 15px; line-height: 1; }
.topbar.tb-tight .qsbtn kbd { display: none; }
dialog.dlg.qs { width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 8px; display: grid; gap: 6px; }
dialog.dlg.qs:not([open]) { display: none; }
.qs input { width: 100%; font-size: 15px; height: 38px; padding: 0 12px; }
.qs ul { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; }
.qs li[data-i] { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; }
.qs li[data-i] .qs-l { flex: none; }
.qs li[data-i] .qs-h { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs li[data-i]:hover { background: var(--surface-2); }
.qs li.cur, .qs li.cur:hover { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.qs .qs-group { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 2px; }
.qs .qs-none { padding: 8px 10px; }
.qs .qs-foot { margin: 0 4px; }
table.km { width: 100%; }
table.km tr.km-h th { position: static; padding-top: 12px; font-size: 12px; white-space: normal; }
table.km td.km-k { white-space: nowrap; }
table.km td.km-a { white-space: nowrap; text-align: right; width: 1%; }
table.km tr.km-ro td { color: var(--muted); }
#shortcuts-dialog [data-r=msg].warn { color: var(--warn); }

/* ---------- mobile: ≤ 640px — thanh trên 2 hàng, danh sách level nằm trên nội dung, hộp thoại thành tấm dưới ---------- */
@media (max-width: 640px) {
  #app { grid-template-rows: auto 1fr auto; }
  #app:has(> .topbar) { grid-template-rows: auto auto 1fr auto; }
  .topbar { flex-wrap: wrap; row-gap: 0; padding: 6px 10px 0; gap: 8px; }
  .topbar .nav { order: 10; flex: 1 0 100%; height: 42px; margin: 0 -4px; padding: 0 4px; }
  .brand > span:not(.logo), .brand small { display: none; }
  /* cả khu làm việc cuộn dọc: danh sách level (thấp) ở trên, nội dung level cao gần hết màn ở dưới */
  .work, .work.two { grid-template-rows: none; grid-auto-rows: auto; align-content: start; overflow-y: auto; }
  .panel { grid-template-rows: auto auto auto; }
  .pbody { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .pcontent { height: calc(100dvh - 124px); min-height: 440px; }
  .levels { border-right: 0; border-bottom: 1px solid var(--line); height: 36vh; height: 36dvh; }   /* height (không max-height): hàng 1fr của danh sách mới có chiều cao xác định để cuộn */
  .pbody.nolist { grid-template-columns: 1fr; grid-template-rows: 0 auto; }
  .pbody.nolist .levels { height: 0; border: 0; }
  .phead { padding: 6px 8px; }
  .phead select.pack { min-width: 0; max-width: 44vw; }
  .tabpane { padding: 8px; }
  .view.pad { padding: 10px; }
  .formgrid { grid-template-columns: 1fr; }
  .vfilter input[type=search] { width: 100%; }
  .bar-row { grid-template-columns: 96px 1fr 72px; }
  .statusbar { gap: 10px; padding: 0 10px; min-height: 30px; overflow-x: auto; scrollbar-width: none; }
  .statusbar::-webkit-scrollbar { display: none; }
  .statusbar .right { gap: 10px; }
  .toasts, .toasts[popover] { left: 10px; right: 10px; bottom: 40px; }
  .toast { max-width: none; }
  dialog.dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh; border-bottom: 0; }
  dialog.dlg[open] { animation: sheet-in .22s var(--ease); }
  .dlg .db { max-height: calc(92dvh - 120px); padding: 12px 14px; }
  .dlg .dh { padding: 12px 14px 10px; }
  .dlg .df { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius: 0; }
  .dlg .df .btn { flex: 1 1 auto; }
  .popmenu { min-width: 0; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* màn cảm ứng: tab / dòng danh sách đủ cao để bấm */
@media (pointer: coarse) {
  .nav button { height: 38px; }
  .subtabs button { padding: 11px 13px 10px; }
  .levels li { padding: 8px 10px; }
  .popmenu .pm-item { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* hộp hướng dẫn "Chơi bằng game thật" (js/ui/unityguide.mjs) — không chặn, thu gọn được */
.uguide { position: fixed; right: 14px; bottom: 40px; z-index: 45; width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow); font-size: 12px; }
.uguide .ug-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; }
.uguide .ug-mini { flex: 1 1 auto; min-width: 0; color: var(--muted); }
.uguide:not(.collapsed) .ug-mini { visibility: hidden; }
.uguide.collapsed .ug-body { display: none; }
.uguide .ug-body { display: grid; gap: 7px; padding: 0 10px 10px; }
.uguide .ug-body p { margin: 0; }
.uguide .ug-how { font-size: 13px; line-height: 1.55; }
.uguide .ug-n { font-family: var(--mono); padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.uguide .ug-status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.uguide .ug-status.ok { color: var(--ok); }
.uguide .ug-status.bad { color: var(--bad); }
/* game Unity Web trong iframe (ui/webgame.mjs): ghim cột phải giữa thanh trên (48px) và thanh dưới (28px), màn game
   theo khung điện thoại chuẩn rộng:cao = 1:2 (--wg-w = bề rộng màn; viền máy 6px + lề 8px = 28px); body.has-webgame
   chừa chỗ để khung không che nút của panel; hộp "Game thật" dời sang trái khung game. */
:root { --wg-hr: 2; --wg-w: min(calc((100dvh - 144px) / var(--wg-hr)), 40vw); --wg-frame: calc(var(--wg-w) + 28px); }
.webgame { position: fixed; right: 12px; top: 56px; z-index: 44; width: var(--wg-frame); background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.webgame .wg-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; font-size: 12px; }
.webgame iframe { display: block; box-sizing: content-box; width: var(--wg-w); height: calc(var(--wg-w) * var(--wg-hr)); margin: 0 8px 8px;
  border: 6px solid #0b0d12; border-radius: 22px; background: #000; }
.webgame.min iframe { display: none; }
/* dải nút điều khiển playtest (ui/gamecontrols.mjs): NGOÀI vùng game, ngay dưới thanh tiêu đề khung. Chỉ hiện khi
   bản game báo caps; có dải nút thì khung co lại để không tràn màn hình (ResizeObserver báo lại vị trí chỗ chứa). */
/* Dải nút gom theo cụm (wgc-grp không tự xuống dòng giữa cụm) — dùng chung trong khung game và cửa sổ nổi .wgc-float */
.wgc { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; padding: 0 6px 4px; font-size: 11px; }
.wgc[hidden] { display: none; }
.wgc .wgc-grp { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
.wgc .wgc-btn { padding: 1px 6px; font-size: 11px; line-height: 1.7; white-space: nowrap; }
.wgc .wgc-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.wgc .wgc-seg .wgc-btn { padding: 1px 5px; }
.wgc .wgc-seg .wgc-btn + .wgc-btn { margin-left: -3px; }
.wgc .wgc-seg .wgc-btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.wgc .wgc-seg .wgc-btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.wgc .wgc-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; background: var(--muted); }
.wgc .wgc-btn.on .wgc-dot { background: var(--bad); }
.wgc .wgc-info { flex: 1 1 auto; min-width: 0; gap: 6px; }
.wgc .wgc-lab { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wgc .wgc-detach { margin-left: auto; padding: 0 6px; font-size: 14px; line-height: 1.3; }
.wgc-float { position: fixed; top: 56px; right: calc(var(--wg-frame, 460px) + 24px); z-index: 46; max-width: min(460px, calc(100vw - 16px));
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.wgc-float[hidden] { display: none; }
/* kích thước màn game (ui/gamescreen.mjs): màn cố định = iframe đúng W×H pixel thu nhỏ bằng transform, bỏ viền máy */
.webgame .wg-screen { max-width: 132px; font-size: 11px; padding: 1px 4px; }
.webgame.wg-fixed iframe { border-width: 0; border-radius: 0; transform-origin: 0 0; }
/* ↗ game ở cửa sổ trình duyệt riêng (webpop.html): khung thành thanh nổi góc dưới-phải (tiêu đề + dải nút), không iframe */
.webgame.popped { top: auto; bottom: calc(40px + var(--ug-h, 0px)); width: min(460px, calc(100vw - 24px)); box-shadow: var(--shadow), 0 10px 28px rgba(0, 0, 0, .18); }
.webgame.popped iframe, .webgame.popped .wg-detach, .webgame.popped .wg-resize, .webgame.popped [data-act=min],
.webgame.popped .wg-screen, .webgame.popped .wgc-detach { display: none; }
body.wg-popped .uguide { right: 14px; }
/* bản game ẩn chụp ảnh level (ui/gamecapture.mjs): trong suốt, không nhận chuột, nằm dưới mọi thứ (vẫn render WebGL) */
.wg-capture { position: fixed; left: 0; top: 0; z-index: -1; border: 0; opacity: 0; pointer-events: none; }
/* cửa sổ game riêng (webpop.html + webpop.mjs): CHỈ có game — ô lớn nhất vừa cửa sổ, căn giữa, nền đen */
body.webpop { margin: 0; overflow: hidden; background: #000; }
.wp-stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.wp-stage iframe { display: block; border: 0; background: #000; }
.wp-stage p { color: #aaa; padding: 24px; text-align: center; }
/* Admin → Loài cá: nhóm màu của loài (tabs/admin.mjs) */
.adminfish-colors { display: flex; flex-wrap: wrap; gap: 3px 6px; align-items: center; min-height: 20px; padding: 2px 4px; border: 1px dashed var(--line); border-radius: var(--r-md); background: none; color: var(--ink-2); font-size: 11px; text-align: left; cursor: pointer; }
.adminfish-colors:disabled { cursor: default; border-color: transparent; }
.adminfish-colors.manual { border: 1.5px solid var(--accent); }
.adminfish-color, .admincolorgrid .chk { display: inline-flex; align-items: center; gap: 4px; }
.adminfish-color i, .admincolorgrid i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.popmenu.admincolorpop { padding: 8px 10px; }
.admincolorgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 12px; }
.admincolorhead { margin: 0 2px 6px; }
.admincolorbtns { display: flex; gap: 6px; margin-top: 8px; }
/* cấu hình bot (chuột phải nút Bot, gamecontrols.mjs) — cùng các ô tab Chơi thử */
.popmenu.wgc-botcfg { width: min(520px, calc(100vw - 16px)); max-width: none; padding: 8px 10px 10px; }
.wgc-botcfg .wgc-bothead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.wgc-botcfg .wgc-botgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; }
.wgc-botcfg .fld { display: grid; gap: 2px; font-size: 11.5px; }
.wgc-botcfg .fld input, .wgc-botcfg .fld select { width: 100%; min-width: 0; }
.wgc-botcfg .wgc-botdesc { margin-top: 8px; white-space: pre-line; }
.wgc-float .wgc-fhead { padding: 3px 10px; font-size: 11.5px; cursor: move; user-select: none; touch-action: none; border-bottom: 1px solid var(--line); }
.wgc-float .wgc { padding: 5px 6px; }
.webgame.min .wgc { display: none; }
.webgame.has-controls { --wg-w: min(calc((100dvh - 224px) / var(--wg-hr)), 40vw); --wg-frame: calc(var(--wg-w) + 28px); }
body.has-webgame { padding-right: calc(var(--wg-frame) + 24px); }
body.has-webgame .uguide { right: calc(var(--wg-frame) + 36px); }
@media (max-width: 900px) {
  :root { --wg-w: min(calc(100vw - 54px), calc((100dvh - 144px) / var(--wg-hr))); }
  .webgame.has-controls { --wg-w: min(calc(100vw - 54px), calc((100dvh - 224px) / var(--wg-hr))); --wg-frame: calc(var(--wg-w) + 28px); }
  body.has-webgame { padding-right: 0; }
  body.has-webgame .uguide { right: 14px; }
}
body:has(.uguide:not([hidden])) .toasts { bottom: calc(44px + var(--ug-h, 0px)); }

/* ---------- bảng "DDA Live" (game/app/ui/ddalive.mjs): cột cố định BÊN TRÁI khung game (khung game ghim phải) ---------- */
.ddalive { position: fixed; top: 56px; bottom: 36px; right: calc(var(--wg-frame) + 24px); width: 400px; z-index: 44;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-lg);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; font-size: 12px; }
.ddalive[hidden] { display: none; }
.dl-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--line); }
.dl-head b { font-size: 12.5px; }
.dl-status { padding: 4px 10px; font-weight: 600; color: var(--ink-2); }
.dl-status.ok { color: var(--ok); }
.dl-status.bad { color: var(--bad); }
.dl-status.wait { color: var(--warn); }
.dl-scroll { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 12px; }
.dl-h { margin: 0 0 4px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.dl-empty { margin: 0; color: var(--muted); }
.dl-sub { margin: 4px 0 2px; color: var(--muted); font-size: 11px; }
.dl-note { font-size: 11px; color: var(--muted); }
.dl-note.warn { color: var(--warn); }
.dl-note.bad { color: var(--bad); }
.dl-kv { margin-top: 3px; }
.dl-kv .mono { word-break: break-word; }
.dl-dim { color: var(--muted); }

/* Tình hình */
.dl-prog { position: relative; height: 12px; margin: 3px 0 2px; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.dl-prog-bar { height: 100%; background: var(--accent); }
.dl-mark { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-3); }
.dl-prog-lab { color: var(--muted); }
.dl-temp { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.dl-tempbox { display: inline-flex; gap: 3px; }
.dl-tempbox i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-3); background: var(--sunken); }
.dl-tempbox i.on { background: var(--accent); border-color: var(--accent); }
.dl-tiers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.dl-chip { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--sunken); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.dl-rowline { margin-top: 5px; color: var(--ink-2); }
.dl-stack { display: flex; width: 100%; height: 18px; margin-top: 4px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.dl-seg { display: inline-flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap;
  font-size: 9px; color: #fff; text-shadow: 0 1px 1px rgb(0 0 0 / .35); }
.dl-src { margin-top: 5px; color: var(--muted); }
.dl-t1 { background: color-mix(in srgb, var(--dda-t1) 18%, var(--surface)); color: var(--dda-t1); border-color: color-mix(in srgb, var(--dda-t1) 45%, transparent); }
.dl-t2 { background: color-mix(in srgb, var(--dda-t2) 18%, var(--surface)); color: var(--dda-t2); border-color: color-mix(in srgb, var(--dda-t2) 45%, transparent); }
.dl-t3 { background: color-mix(in srgb, var(--dda-t3) 18%, var(--surface)); color: var(--dda-t3); border-color: color-mix(in srgb, var(--dda-t3) 45%, transparent); }
.dl-t4 { background: color-mix(in srgb, var(--dda-t4) 18%, var(--surface)); color: var(--dda-t4); border-color: color-mix(in srgb, var(--dda-t4) 45%, transparent); }
.dl-t5 { background: color-mix(in srgb, var(--dda-t5) 18%, var(--surface)); color: var(--dda-t5); border-color: color-mix(in srgb, var(--dda-t5) 45%, transparent); }
.dl-tnone { background: var(--sunken); color: var(--dda-none); border-color: var(--line-2); }
.dl-seg.dl-t1, .dl-seg.dl-t2, .dl-seg.dl-t3, .dl-seg.dl-t4, .dl-seg.dl-t5 { background: var(--seg); color: #fff; }
.dl-seg.dl-t1 { --seg: var(--dda-t1); } .dl-seg.dl-t2 { --seg: var(--dda-t2); } .dl-seg.dl-t3 { --seg: var(--dda-t3); }
.dl-seg.dl-t4 { --seg: var(--dda-t4); } .dl-seg.dl-t5 { --seg: var(--dda-t5); }
.dl-seg.dl-tnone { background: var(--dda-none); }

/* Khay */
.dl-bowlgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dl-bowl { border: 1px solid var(--line); border-radius: var(--r-md); padding: 5px 6px; background: var(--surface-2); min-width: 0; }
.dl-bowl.wait { border-style: dashed; }
.dl-bowl.locked { opacity: .8; }
.dl-bowl-h { font-weight: 600; color: var(--ink-2); }
.dl-bowl-f { display: flex; align-items: center; gap: 5px; margin: 3px 0; }
.dl-fid { font-weight: 600; }
.dl-bowl-m { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dl-seats { display: inline-flex; gap: 3px; }
.dl-seats i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-3); }
.dl-seats i.on { background: var(--accent); border-color: var(--accent); }
.dl-seats i.res { border-color: var(--accent); }
.dl-obs { font-size: 10px; padding: 0 4px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
.dl-srcchip { font-size: 10px; color: var(--muted); }
.dl-wild { color: var(--fl-amber); font-weight: 600; }
.dl-next { margin-top: 3px; color: var(--ink-2); font-size: 11px; }
.dl-sp { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; }
.dl-more { margin-left: 5px; color: var(--muted); }
.dl-miss { margin-top: 2px; color: var(--warn); font-size: 11px; }

/* ảnh cá nhỏ */
.dl-fish { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

/* Cost từng loài */
.dl-costwrap { overflow-x: hidden; }
.dl-cost { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; }
.dl-cost th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 2px 3px; }
.dl-cost td { border-bottom: 1px solid var(--line); padding: 2px 3px; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.dl-cost tr.dim { opacity: .5; }
.dl-cost .num { text-align: right; font-variant-numeric: tabular-nums; }
.dl-cost .bad { color: var(--bad); font-weight: 600; }
.dl-cost .dl-cfish { display: flex; align-items: center; gap: 3px; }
.dl-cost col.c-f { width: 64px; } .dl-cost col.c-n { width: 34px; } .dl-cost col.c-t { width: 38px; }
.dl-cost tr:has(+ .dl-whyrow) td { border-bottom: 0; }
.dl-cost .dl-whyrow td { padding: 0 3px 3px 10px; color: var(--muted); white-space: normal; font-size: 10.5px; }
.dl-cost .dl-whyrow.dim { opacity: .5; }
.dl-cost .dl-warn { color: var(--warn); cursor: help; }
.dl-cost .dl-serve { color: var(--accent); }

/* Dòng thời gian */
.dl-filters { display: flex; gap: 4px; margin-bottom: 5px; }
.dl-filters .btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.dl-tl { border-left: 3px solid var(--line-2); padding: 3px 0 3px 7px; margin-bottom: 5px; cursor: default; }
.dl-tl[data-order] { cursor: pointer; }
.dl-tl.bowl.dda { border-left-color: var(--accent); }
.dl-tl.done { border-left-color: var(--ok); }
.dl-tl.wait { border-left-color: var(--warn); }
.dl-tl.bad { border-left-color: var(--bad); }
.dl-tl-head { color: var(--muted); font-size: 11px; }
.dl-tl-bad { color: var(--bad); }
.dl-dda { font-weight: 600; }
.dl-badge { display: inline-block; padding: 0 5px; border-radius: 999px; font-size: 10px; border: 1px solid var(--line-2); }
.dl-badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.dl-badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.dl-badge.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.dl-detail { border: 1px solid var(--line); border-radius: var(--r-md); padding: 5px 7px; margin: 0 0 6px 10px; background: var(--surface-2); }
.dl-dtitle { font-weight: 600; margin-bottom: 3px; }

/* Biểu đồ */
.dl-svg { width: 100%; height: 120px; display: block; }
.dl-axis { stroke: var(--line-2); stroke-width: 1; }
.dl-line { fill: none; stroke-width: 1.6; }
.dl-line.p { stroke: var(--accent); }
.dl-line.s { stroke: var(--warn); stroke-dasharray: 3 2; }
.dl-svg circle { stroke: var(--surface); stroke-width: 1; }
.dl-svg circle.dl-t1 { fill: var(--dda-t1); } .dl-svg circle.dl-t2 { fill: var(--dda-t2); } .dl-svg circle.dl-t3 { fill: var(--dda-t3); }
.dl-svg circle.dl-t4 { fill: var(--dda-t4); } .dl-svg circle.dl-t5 { fill: var(--dda-t5); } .dl-svg circle.dl-tnone { fill: var(--dda-none); }
.dl-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.dl-lg::before { content: ''; display: inline-block; width: 9px; height: 3px; margin-right: 4px; vertical-align: middle; background: var(--line-3); }
.dl-lg.p::before { background: var(--accent); }
.dl-lg.s::before { background: var(--warn); }
.dl-lg.d::before { background: var(--dda-t2); }

/* bảng DDA Live chiếm chỗ bên trái khung game (chỉ màn đủ rộng); hộp "Game thật" dời thêm sang trái */
body.has-ddalive { padding-right: calc(var(--wg-frame) + 436px); }
body.has-ddalive .uguide { right: calc(var(--wg-frame) + 436px); }
@media (max-width: 1279px) {
  /* màn hẹp: bảng đè lên nội dung, nội dung giữ đúng lề của khung game */
  body.has-ddalive { padding-right: 0; }
  body.has-ddalive.has-webgame { padding-right: calc(var(--wg-frame) + 24px); }
  body.has-ddalive .uguide { right: 14px; }
  body.has-ddalive.has-webgame .uguide { right: calc(var(--wg-frame) + 36px); }
  .ddalive { box-shadow: var(--fl-shadow-lg); z-index: 46; }   /* nằm trên hộp "Game thật" (cùng góc) — bảng là thứ vừa mở */
}
/* ≤ 900px khung game rộng gần hết màn (xem .webgame) → bảng DDA rộng hết màn, đè lên (bản desktop: embed.mjs tạm ẩn game
   native khi bảng che khung) */
@media (max-width: 900px) {
  .ddalive { left: 0; right: 0; width: auto; top: 48px; bottom: 28px; border-radius: 0; }
  body.has-ddalive.has-webgame { padding-right: 0; }
  body.has-ddalive .uguide, body.has-ddalive.has-webgame .uguide { right: 14px; }
}

/* ---------- quản lý level (panel.mjs, ui/levelops.mjs, ui/menu.mjs): ‹ › · ⋯ · level đã xoá · kéo-thả · lọc kiểm định ---------- */
.phead .lnav { display: inline-flex; gap: 2px; }
/* thêm ‹ › ⋯ làm đầu panel chật: tiêu đề không bị ép nhỏ hơn nội dung (pill không xếp dọc) — thiếu chỗ thì cả nhóm nút xuống dòng */
.phead .ptitle { flex-basis: auto; min-width: min-content; }
.phead .ptitle > .row { flex-wrap: nowrap; }
.phead .lnav .btn.icon { width: 22px; font-size: 15px; line-height: 1; }
.lockbar.deleted { background: var(--bad-soft); color: var(--bad); font-weight: 600; box-shadow: inset 3px 0 0 var(--bad); }
.lockbar.prod { background: var(--lock-soft); color: var(--lock); box-shadow: inset 3px 0 0 var(--lock); font-weight: 500; }
.lockbar.archived { background: var(--sunken); color: var(--ink-2); box-shadow: inset 3px 0 0 var(--line-3); font-weight: 500; }
.pill.prod { background: var(--lock-soft); color: var(--lock); }
.levels { position: relative; }
.levels li.deleted { color: var(--muted); }
.levels li.deleted .lno { text-decoration: line-through; }
.levels li.deleted .lic { font-size: 11px; }
.levels.dropping { outline: 2px dashed var(--accent); outline-offset: -3px; }
.levels.dropping::after { content: attr(data-drop); position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 600; font-size: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 90%, transparent); pointer-events: none; z-index: 2; }
.popmenu { position: fixed; z-index: 60; min-width: 240px; max-width: min(330px, calc(100vw - 16px)); padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: dlg-in .14s var(--ease); }
.popmenu .pm-item { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--ink); text-align: left; cursor: pointer; font-size: 12.5px; }
.popmenu .pm-item:hover:not(:disabled), .popmenu .pm-item:focus-visible { background: var(--accent-soft); outline: none; }
.popmenu .pm-item:disabled { cursor: not-allowed; }
.popmenu .pm-item:disabled .pm-ic, .popmenu .pm-item:disabled .pm-tx > span { opacity: .45; }
.popmenu .pm-item.danger { color: var(--bad); }
.popmenu .pm-ic { width: 16px; text-align: center; flex: none; }
.popmenu .pm-tx { display: grid; gap: 1px; min-width: 0; }
.popmenu .pm-tx small { color: var(--muted); font-size: 11px; }
.popmenu .pm-sep { height: 1px; margin: 4px 2px; background: var(--line); }
.lvhint { font-size: 12px; color: var(--muted); }
.lvhint.ok { color: var(--ok); }
.lvhint.warn { color: var(--warn); }
.lvhint.bad { color: var(--bad); }
.dlg .chk.full { white-space: normal; align-items: flex-start; }
.vfilter { margin-bottom: 6px; }
/* bảng Kiểm định nhiều level: nút ▸ mở dòng chi tiết (như kết quả 1 level) ngay dưới dòng */
.vexp { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px 0 0; font-size: 12px; line-height: 1; }
.vexp:hover, tr.vopen .vexp { color: var(--accent); }
tr.vopen > td { background: var(--accent-soft); }
tr.vdetail > td { background: var(--sunken); padding: 10px 12px 12px; cursor: default; white-space: normal; }
tr.vdetail .card { margin-bottom: 8px; }
tr.vdetail .card:last-child { margin-bottom: 0; }
.vfilter input[type=search] { width: 240px; }
[data-r=batchsum] .pill[data-show] { cursor: pointer; }
.tbl td.vmsgs { max-width: 420px; font-size: 11px; }
/* hộp Lịch mở obstacle: ô số trong bảng — chữ các cột khác căn giữa theo dòng */
#unlock-dialog .tbl td { vertical-align: middle; }
/* cột so sánh (bản build hoặc lịch của bộ khác): ô chọn trong tiêu đề, số khác số đang điền thì tô nổi */
#unlock-dialog th select[data-r=ucmp] { max-width: 230px; height: var(--ctl-sm); font-size: 12px; padding: 0 22px 0 6px; font-weight: 600; }
#unlock-dialog .cmpdiff { color: var(--warn); font-weight: 700; }
/* màn Sắp xếp level: dòng kéo thả, đã đổi số, sai lịch; vạch số mở obstacle */
.tbl.reorder td { vertical-align: middle; }
.tbl.reorder tr[draggable] .ro-grip { cursor: grab; }
.tbl.reorder .ro-grip { color: var(--muted); user-select: none; }
.tbl.reorder tr.ro-moved td { background: var(--accent-soft); }
.tbl.reorder tr.ro-bad td { background: var(--bad-soft); }
.tbl.reorder .ro-err { color: var(--bad); max-width: 380px; }
.tbl.reorder tr.ro-mark td { color: var(--accent); font-weight: 600; border-bottom: 2px solid var(--accent-line); padding: 3px 9px; }
.tbl.reorder tr.ro-over-top td { box-shadow: inset 0 2px 0 var(--accent); }
.tbl.reorder tr.ro-over-bot td { box-shadow: inset 0 -2px 0 var(--accent); }
.tbl.reorder .ro-btns { white-space: nowrap; }
.vmsg { min-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.nomsg > thead > tr > th:last-child, table.nomsg > tbody > tr > td.vmsgs { display: none; }  /* cả bảng không có lỗi / cảnh báo: ẩn cột (chỉ bảng ngoài, không đụng bảng trong dòng chi tiết ▸) */
.vmsg.bad { color: var(--bad); }
.vmsg.warn { color: var(--warn); }
.ctrls label.off { opacity: .5; }

/* ---------- Hoạt động: ai đang làm gì (ui/activity.mjs) ---------- */
.statusbar .presbtn { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; color: inherit; cursor: pointer; }
.statusbar .presbtn:hover { background: var(--surface-2); color: var(--ink); }
.statusbar .presbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.statusbar .presbtn[aria-expanded="true"] { background: var(--accent-soft); }
.vwrs { display: inline-flex; align-items: center; gap: 1px; }
.vwr { width: 14px; height: 14px; border-radius: 4px; display: inline-grid; place-items: center; font: 700 8px/1 var(--font); color: #fff; flex: none; box-shadow: 0 0 0 1px var(--surface); }
.vwr.away, .actpop .away .avatar { opacity: .45; }
.vwr-more { font-size: 9px; color: var(--muted); margin-left: 1px; }
.curbar .cb-vwr { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.curbar .cb-vwr.hot { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.actpop { position: fixed; z-index: 55; width: min(430px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); outline: none; animation: dlg-in .14s var(--ease); }
.actpop .ap-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; background: var(--fl-header); border-bottom: 1px solid var(--line); }
.actpop .ap-head h3 { font-size: 13.5px; white-space: nowrap; }
.actpop .ap-empty { margin: 0; padding: 14px 12px; font-size: 12px; }
.actpop .ap-user { padding: 8px 12px 9px; display: grid; gap: 4px; }
.actpop .ap-user + .ap-user { border-top: 1px solid var(--line); }
.actpop .ap-who { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.actpop .ap-tab { display: grid; gap: 3px; padding-left: 27px; }
.actpop .ap-tab + .ap-tab { margin-top: 3px; padding-top: 4px; border-top: 1px dashed var(--line); }
.actpop .ap-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; font-size: 12px; }
.actpop .ap-last { padding-left: 27px; color: var(--ink-2); }
.actpop .ap-panels { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.actpop .ap-panels li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; padding: 1px 4px; margin: 0 -4px; border-radius: 4px; }
.actpop .ap-panels li.same { background: var(--warn-soft); }
.actpop .ap-p { font: 700 10px/1.5 var(--mono); padding: 0 4px; border-radius: 3px; background: var(--sunken); color: var(--muted); flex: none; }
.actpop .ap-lvl { border: 0; padding: 0; background: none; font: 600 12px var(--mono); color: var(--accent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.actpop .ap-lvl:hover { text-decoration-style: solid; }
.actpop .ap-lvl:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 3px; }
.actpop .ap-lvl.off { cursor: default; color: var(--ink-2); text-decoration: none; }
.actpop .ap-job .progress { min-width: 60px; max-width: 120px; }

/* ---------- Có gì mới (ui/changelog.mjs) ---------- */
.clver { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; }
.clnotes { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.clnotes li::marker { color: var(--accent); }
.clmid { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.clmid > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.clmid > summary:hover { color: var(--ink); }
.clact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.card > h3 .grow { flex: 1 1 auto; }

/* Asset Test (tabs/assettest.mjs) */
.assettest .at-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; margin-top: 10px; }
.assettest .at-sec { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.assettest .at-sec h3 { margin: 0 0 8px; font-size: 14px; }
.assettest .fld.grow { flex: 1 1 200px; min-width: 0; }
.assettest .fld.grow > input, .assettest .fld.grow > select { width: 100%; }
.assettest .at-bgcard { display: flex; gap: 10px; align-items: center; }
.assettest .at-bgcard img { width: 96px; height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.assettest .at-apply { margin-top: 12px; }
.assettest .at-note > input { width: 100%; }

/* Admin Console (tabs/admin.mjs) — cột mục co giãn, lưới loài nhiều cột khi rộng */
.adminconsole { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: start; }
.adminconsole > * { min-width: 0; }
.adminmenu { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; padding: 10px; }
.adminmenu-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 2px 4px 6px; }
.adminmenuitem { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.adminmenuitem:hover { background: var(--sunken); }
.adminmenuitem.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.admincontent { min-width: 0; }
.adminbar { margin-bottom: 10px; }
.admingrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-top: 10px; }
@media (min-width: 1100px) { .admingrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.adminfish { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface-2); min-width: 0; }
.adminfish.on { border-left: 3px solid var(--ok); }
.adminfish.off { border-left: 3px solid var(--warn); }
.adminfish.locked { border-left: 3px solid var(--bad); }
.adminfish.hidden { display: none; }
.adminpick { align-self: flex-start; }
.adminfish-img { display: flex; align-items: center; gap: 6px; }
.adminfish-img img { width: 38px; height: 38px; object-fit: contain; }
.adminfish-img .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.adminfish-id { font-size: 12px; color: var(--muted); }
.adminseg { display: flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.adminsegbtn { flex: 1 1 0; min-width: 0; padding: 4px 2px; border: none; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 11px; cursor: pointer; border-right: 1px solid var(--line); }
.adminsegbtn:last-child { border-right: none; }
.adminsegbtn:disabled { cursor: not-allowed; }
.adminsegbtn:disabled:not(.active) { color: var(--faint); }
.adminsegbtn.active { font-weight: 700; }
.adminsegbtn.active.on { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 -2px 0 var(--ok); }
.adminsegbtn.active.off { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 -2px 0 var(--warn); }
.adminsegbtn.active.locked { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 -2px 0 var(--bad); }
.adminfish-src { font-size: 11px; color: var(--muted); min-height: 14px; }
.adminfish-note { width: 100%; font-size: 12px; }
.adminrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* Admin → Quản trị viên: trái = rule + tài khoản, phải = quyền của rule đang chọn */
.adminroles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; margin-top: 10px; }
.adminroles-right { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; background: var(--surface-2); position: sticky; top: 0; }
.adminrole-list { display: grid; gap: 4px; }
.adminrole { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-align: left; cursor: pointer; color: var(--ink); }
.adminrole:hover { border-color: var(--accent-line); }
.adminrole.active { border-color: var(--accent); background: var(--accent-soft); }
.adminrole-name { font-weight: 600; }
.adminrole small { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.adminperm-list { display: grid; gap: 4px; }
.adminperm { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.adminperm.on { border-color: var(--accent-line); }
.adminperm input { margin-top: 2px; flex: none; }
.adminperm span { display: grid; gap: 1px; min-width: 0; }
.adminperm b { font-weight: 600; font-size: 12.5px; }
.adminperm small { font-size: 11px; }
@container view (max-width: 900px) { .adminroles { grid-template-columns: 1fr; } .adminroles-right { position: static; } }

.adminrow:last-child { border-bottom: none; }
.adminrow .pill { margin-left: auto; }
.adminsegbtn.active.admin { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.adminsegbtn.active.all { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 -2px 0 var(--ok); }
.noticebar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: 13px; line-height: 1.45; border-bottom: 1px solid var(--line); }
.noticebar.hidden { display: none; }
.noticebar.info { background: var(--accent-soft); color: var(--ink); border-left: 4px solid var(--accent); }
.noticebar.warn { background: var(--warn-soft); color: var(--ink); border-left: 4px solid var(--warn); }
.noticebar .notice-text { white-space: pre-wrap; word-break: break-word; }
.noticebar .notice-close { margin-left: auto; flex: none; border: none; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.noticebar .notice-close:hover { background: rgba(0, 0, 0, .08); }
/* Link playtest (tabs/admin.mjs): link đang chọn + hộp QR */
.tbl tr.plrow.sel { background: var(--accent-soft); }
.qrbox { display: flex; justify-content: center; padding: 10px 0; }
.qrbox svg { width: min(320px, 78vw); height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.center { text-align: center; }
/* theo bề rộng view (xem .view.pad); 690 ≈ cửa sổ 720 px trừ lề view */
@container view (max-width: 690px) { .adminconsole { grid-template-columns: 1fr; } .adminmenu { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ---------- Phiên chơi (Pha 1): hộp lưu cạnh khung game · ô tạm/hàng chờ · xem lại phiên ---------- */
.plsave { position: fixed; left: 14px; bottom: 40px; z-index: 47; width: min(360px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--ok);
  border-radius: var(--r-lg); box-shadow: var(--shadow); font-size: 12px; padding: 6px 10px 10px; }
.plsave[hidden] { display: none; }
.plsave .ps-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.plsave .ps-line { font-weight: 600; }
.plsave .ps-cheat { color: var(--bad); font-weight: 600; }
.plsave .ps-warn { color: var(--warn); font-size: 11px; margin-top: 2px; }
.plsave .ps-tags { display: flex; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.plsave .ps-tag { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.plsave .ps-note { width: 100%; box-sizing: border-box; }
.plsave .ps-acts { display: flex; gap: 6px; margin-top: 6px; }

.dl-queue { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.dl-qslot { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border: 1px solid var(--line-3); border-radius: 4px; background: var(--sunken); }
.dl-qslot.empty { opacity: .4; }
.dl-qslot.fly { opacity: .5; }
.dl-qout { margin-left: 6px; color: var(--muted); }
.dl-timer { font-size: 10px; padding: 0 4px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
.dl-tl.ev { border-left-color: var(--line-3); }
.dl-ev { color: var(--ink-2); }
.dl-slist { display: flex; flex-direction: column; gap: 3px; }
.dl-srow { display: grid; grid-template-columns: 1fr auto; gap: 0 6px; text-align: left; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 6px; cursor: pointer; font-size: 11px; }
.dl-srow:hover { border-color: var(--accent); }
.dl-splayer { font-weight: 600; }
.dl-sres { justify-self: end; }
.dl-sres.ok { color: var(--ok); }
.dl-sres.bad { color: var(--bad); }
.dl-smeta { color: var(--muted); grid-column: 1; }
.dl-stime { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.dl-reviewbar { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-md); padding: 6px 8px; }
.dl-reviewbar[hidden] { display: none; }
.dl-reviewbar .dl-rb-head { font-weight: 600; }
.dl-reviewbar .dl-rb-line { color: var(--ink-2); margin-top: 2px; }
.dl-reviewbar .dl-rb-slider { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.dl-reviewbar .dl-rb-slider input { flex: 1 1 auto; }
.dl-reviewbar .dl-rb-acts { margin-top: 5px; }

/* ---------- tab "Chơi thật" (app/js/tabs/real.mjs): thống kê phiên theo revision ---------- */
.rt-filters { padding: 10px 12px; }
.rt-frow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.rt-frow .fld { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.rt-frow select { min-width: 130px; }
.rt-tags { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rt-tags .tiny { margin-right: -2px; }
.rt-filters .note.warn { margin-top: 8px; }
.rt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rt-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 7px 9px; min-width: 0; }
.rt-k { color: var(--muted); font-size: 11px; }
.rt-v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.rt-d { font-size: 11px; font-weight: 600; color: var(--muted); }
.rt-range { font-size: 11px; font-weight: 500; color: var(--muted); }
.rt-sub { color: var(--muted); font-size: 10.5px; }
.rt-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 3px 12px; margin-top: 8px; }
.rt-kv { font-size: 12px; color: var(--ink-2); }
.rt-note { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-more { margin-top: 8px; text-align: center; }

/* ---------- tab "Live (BI)" (app/js/tabs/live.mjs): khối "Các khoảng live" thu gọn được ---------- */
details.lv-periods > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
details.lv-periods > .tbl { margin-top: 4px; }
/* khối chi tiết từng nội dung của level thu gọn được (thẻ "So sánh nội dung" mở từng khối) */
details.lv-content > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 3px 0; }
details.lv-content > summary:hover { color: var(--accent); }
details.lv-content[open] > summary { margin-bottom: 6px; }

/* ---------- Level Analyze (Pha 3): dải điều hướng nhóm + biểu đồ SVG + nhận xét ---------- */
.rt-nav { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 0; margin: 10px 0 8px; background: var(--bg); box-shadow: 0 -10px 0 var(--bg); border-bottom: 1px solid var(--line); }   /* bóng lên = đúng khoảng lề trên: che nội dung cuộn qua, không đè khung lọc */
.rt-nav::-webkit-scrollbar { display: none; }
.rt-nav button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 3px 10px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.rt-nav button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.rt-sec { scroll-margin-top: 48px; }
.rt-sec + .rt-sec { margin-top: 8px; }
.rt-skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rt-sk-card { height: 64px; border-radius: var(--r-md); background: var(--sunken); animation: rt-pulse 1.2s ease-in-out infinite; }
.rt-sk-card:first-child { grid-column: 1 / -1; height: 88px; }
@keyframes rt-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.rt-cmp { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; font-size: 11px; color: var(--muted); }
.rt-ck { opacity: .8; }
.rt-cmpv { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rt-chart-t { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.rt-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11px; color: var(--ink-2); }
.rt-lg { display: inline-flex; align-items: center; gap: 5px; }
.rt-lg::before { content: ''; width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.rt-lg-dash::before { height: 3px; border-radius: 2px; }
.rt-lg-bar::before { background: var(--line-3); opacity: .5; }
.rt-sumline { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.45; }
.rt-sumline:last-child { border-bottom: 0; }
.rt-sumic { flex: none; width: 16px; text-align: center; }
.rt-sumline.warn .rt-sumic { color: var(--warn); }
.rt-sumline.info .rt-sumic { color: var(--accent); }
.rt-fish { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
.rt-fishcell { display: inline-flex; align-items: center; gap: 5px; }
.tbl tr.rt-hl td { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.tbl tr.rt-click { cursor: pointer; }
.tbl tbody tr.rt-sel td { background: var(--accent-soft); }
.rt-listhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rt-listhead .grow { flex: 1 1 auto; }
.rt-x { border: 0; background: none; color: inherit; cursor: pointer; font-weight: 700; padding: 0 2px; }
.rt-svg { width: 100%; max-width: 760px; height: auto; display: block; }   /* viewBox 620: chữ trục tối đa ×1.2 */
.rtc-ax { font-size: 10px; fill: var(--muted); }
.rtc-grid { stroke: var(--line); stroke-width: 1; }
.rtc-bar { opacity: .85; }
.rtc-bar.hl { opacity: 1; stroke: var(--ink); stroke-width: 1; }
.rtc-track { fill: var(--sunken); }
.rtc-hbar { opacity: .9; }
.rtc-hbar.hl { opacity: 1; stroke: var(--ink); stroke-width: 1; }
.rtc-sbar { stroke: var(--surface); stroke-width: 1; }
.rtc-hl { fill: color-mix(in srgb, var(--warn) 16%, transparent); }
.rtc-faint { opacity: .28; }
.rtc-line { stroke-width: 2; }
.rtc-dot { stroke: var(--surface); stroke-width: 1; }
.rtc-med { stroke-width: 2; }

/* ⧉ khung game thành cửa sổ phụ (ui/gamewin.mjs): thôi ghim phải, body bỏ lề phải; kéo tiêu đề / góc dưới-phải */
.webgame .wg-resize { display: none; }
.webgame.floating { right: auto; box-shadow: var(--shadow), 0 10px 28px rgba(0, 0, 0, .18); }
.webgame.floating .wg-head { cursor: move; user-select: none; touch-action: none; }
.webgame.floating .wg-resize { display: block; position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 58%, transparent 58%, transparent 70%, var(--muted) 70%, var(--muted) 78%, transparent 78%); }
.webgame.floating.min .wg-resize { display: none; }
.webgame.dragging iframe { pointer-events: none; }
/* khung không còn chiếm cột phải (cửa sổ phụ trong app .wg-floating, hoặc game ở cửa sổ riêng .wg-popped): DDA Live /
   dải nút nổi / hộp Game thật sát mép phải, nội dung chỉ chừa chỗ cho DDA Live */
body.has-webgame.wg-floating, body.has-ddalive.has-webgame.wg-floating { padding-right: 0; }
body.has-webgame.wg-floating .uguide { right: 14px; }
body.wg-floating .ddalive, body.wg-floating .wgc-float, body.wg-popped .ddalive { right: 12px; }
body.has-ddalive.wg-floating, body.has-ddalive.has-webgame.wg-floating, body.has-ddalive.wg-popped { padding-right: 436px; }
body.has-ddalive.wg-popped .uguide { right: 448px; }
body.has-ddalive.wg-popped .webgame.embed.popped:not([style*="top"]) { right: 448px; }   /* thanh chưa kéo: cạnh bảng DDA, không bị che */
@media (max-width: 1279px) {
  body.has-ddalive.wg-floating, body.has-ddalive.has-webgame.wg-floating, body.has-ddalive.wg-popped { padding-right: 0; }
  body.has-ddalive.wg-popped .uguide { right: 14px; }
  body.has-ddalive.wg-popped .webgame.embed.popped:not([style*="top"]) { right: 12px; }
}

/* hộp Xoá + dồn số (ui/removeshift.mjs) */
.rs-moves { columns: 4 8em; column-gap: 12px; margin: 4px 0; padding-left: 18px; max-height: 40vh; overflow: auto; }

/* ---- chọn nền tảng Android · iOS · Gộp (tab Live (BI) + Tổng quan bộ — js/liveplatform.mjs) ---- */
.platwrap { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.platseg { flex-wrap: nowrap; }
.platseg button { padding: 0 9px; white-space: nowrap; }
.platseg button:disabled { opacity: .45; cursor: not-allowed; }
.platseg button:disabled:hover { color: var(--muted); }
@media (max-width: 1024px) { .platseg button { padding: 0 7px; font-size: 11.5px; } }

/* bảng "So nền tảng" của mỗi nội dung ở tab Live (BI): gọn, số canh phải */
.lv-platcmp { margin-top: 10px; }
.lv-platcmp .tbl { width: auto; max-width: 100%; }
.lv-platcmp .tbl th, .lv-platcmp .tbl td { padding: 3px 10px 3px 0; }
.lv-platcmp .tbl th.num, .lv-platcmp .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-platcmp .rt-chart-t { margin-bottom: 2px; }

/* ---- nhóm bộ + đoạn level (ui/packops.mjs, panel.mjs, tabs/overview.mjs) ---- */
/* 2 ô sub ở .lhead dùng chung luật select của .levels (rộng hết cột, cao --ctl-sm); gọn chữ khi cột hẹp */
.levels .lhead select[data-r="subpack"], .levels .lhead select[data-r="segment"] { font-size: 11.5px; }
/* hộp Nhóm bộ… / Đoạn level…: bảng cuộn gọn trong hộp thoại */
.pkg-scroll { max-height: 60vh; }
.pkg-scroll .tbl td { vertical-align: middle; }
.pkg-scroll .pkg-grp, .pkg-scroll input[type="text"], .pkg-scroll input[type="number"] { width: 100%; height: var(--ctl-sm); }
.pkg-scroll .pkg-seg-from, .pkg-scroll .pkg-seg-to { max-width: 120px; }
/* ô sai khi kiểm đoạn level (dùng biến màu sẵn có) */
.badfield { border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent) !important; }
/* chip ĐOẠN level ở dải level (Tổng quan bộ) — đứng trước chip khúc */
.ov-chip-seg { font-weight: 600; }

/* ---- Mẫu Excel dùng chung: hộp chọn khi xuất (ui/xlsxtemplates.mjs) ---- */
.xt-choose { display: flex; flex-direction: column; gap: 6px; }
.xt-opt { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--fl-line-2); border-radius: var(--r-md); background: var(--fl-surface); cursor: pointer; }
.xt-opt:hover { border-color: var(--fl-accent-line); }
.xt-opt:has(input:checked) { border-color: var(--fl-accent); box-shadow: inset 0 0 0 1px var(--fl-accent); }
.xt-opt > input[type="radio"] { margin: 2px 0 0; flex: none; accent-color: var(--fl-accent); }
.xt-optbody { display: block; min-width: 0; }
.xt-optbody > b { display: block; }
.xt-optbody .small { display: block; margin-top: 2px; line-height: 1.45; }
.xt-links { gap: 8px; margin-top: 8px; }

/* ---- Mục "Mẫu Excel" của Admin Console (tabs/admin_xlsx.mjs) ---- */
.axl .axl-starter { margin: 8px 0; }
.axl .axl-sheets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.axl .axl-fit { margin: 6px 0; padding: 6px 9px; border-left: 3px solid var(--fl-line-2); border-radius: 4px; background: var(--fl-surface-2); }
.axl .axl-fit details { margin-top: 4px; }
.axl .axl-fit summary { cursor: pointer; color: var(--fl-muted); font-size: 12px; }
.axl .axl-cols { margin-top: 4px; line-height: 1.8; }
.axl .axl-cols b { margin-right: 4px; }
.axl code { font-family: var(--mono); font-size: 12px; }

/* Retry DDA — khối trong bảng DDA Live + hộp cấu hình (game/app/ui/retrydda.mjs) */
.dl-retryline { margin-top: 4px; padding: 3px 6px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink-2); font-size: 11px; }
.dl-retryhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dl-retrylosses { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0; }
.dl-tl.retry { border-left-color: var(--accent); }
.rdd { display: grid; gap: 12px; }
.rdd-sec { display: grid; gap: 8px; }
.rdd-sec + .rdd-sec { border-top: 1px solid var(--line); padding-top: 10px; }
.rdd-mode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rdd-radio, .rdd-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }
.rdd-form { display: grid; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.rdd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rdd-lab { min-width: 220px; font-size: 12px; color: var(--ink-2); }
.rdd-steps { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.rdd-step, .rdd-steps .fld { gap: 2px; }
.rdd-num { display: inline-flex; align-items: center; gap: 3px; }
.rdd-num input:disabled { opacity: .75; }
.rdd-sub { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rdd-tbl { width: auto; }
.rdd-tbl td, .rdd-tbl th { padding: 3px 10px; }
.rdd-json textarea { width: 100%; font-family: var(--mono, monospace); font-size: 11.5px; resize: vertical; }
.rdd-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rdd-losses { display: flex; flex-wrap: wrap; gap: 4px; }
.rdd-sim { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rdd-simrow { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid var(--line); border-radius: var(--r-md); }
@media (max-width: 640px) { .rdd-lab { min-width: 0; width: 100%; } }

/* Kiểm định — Retry DDA theo lượt (game/app/ui/retrysim.mjs) */
.vretry { display: grid; gap: 6px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.vretry-picks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vretry-picks .row { gap: 10px; flex-wrap: wrap; }
.rsim-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.rsim-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.rsim-key { display: inline-flex; align-items: center; gap: 4px; }
.rsim-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.rsim-good { color: var(--ok); }

/* ---------- ô chọn bộ dạng cây (ui/packpicker.mjs): nhóm bấm để mở / gom ---------- */
.pp { position: relative; display: inline-block; min-width: 0; }
.pp-btn { display: inline-flex; align-items: center; height: var(--ctl); max-width: 280px; min-width: 150px; padding: 0 26px 0 9px; border: 1px solid var(--line-2);
  border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-align: left;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8.5px) 52%; background-size: 4.5px 4.5px, 4.5px 4.5px; background-repeat: no-repeat;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.pp-btn:hover { border-color: var(--line-3); }
.pp-btn:focus-visible, .pp-btn[aria-expanded="true"] { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.pp-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: max(100%, 340px); max-width: calc(100vw - 24px); max-height: min(70vh, 560px);
  overflow: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: dlg-in .14s var(--ease); }
.pp-sec { padding: 8px 8px 3px; font-size: 11px; font-weight: 700; color: var(--muted); }
.pp-sep { height: 1px; margin: 4px 2px; background: var(--line); }
.pp-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px; padding: 3px 8px; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap; }
.pp-row:hover { background: var(--surface-2); }
.pp-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ring); }
.pp-row.in { padding-left: 30px; }
.pp-row.cur { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pp-group { font-weight: 600; }
.pp-group small { color: var(--muted); font-weight: 500; }
.pp-group.has { color: var(--accent); }
.pp-chev { display: inline-block; width: 12px; color: var(--muted); font-size: 10px; transition: transform .12s var(--ease); }
.pp-group[aria-expanded="true"] .pp-chev { transform: rotate(90deg); }
.pp-empty { padding: 8px; }
@media (max-width: 640px) { .pp, .pp-btn { width: 100%; max-width: none; } }

/* ---------- xem thử Base (basemode.mjs): ẩn phần riêng của game / đã bỏ, gắn nhãn MODULE ---------- */
html[data-mode="base"] [data-layer="game"], html[data-mode="base"] [data-layer="drop"] { display: none !important; }
html[data-mode="base"] button[data-layer="module"]::after { content: "MODULE"; margin-left: 5px; padding: 0 4px; border: 1px solid var(--warn);
  border-radius: 3px; color: var(--warn); font-size: 8.5px; font-weight: 700; letter-spacing: .04em; line-height: 13px; vertical-align: middle; }
html[data-mode="base"] .pill[data-layer="module"] { outline: 1px dashed var(--warn); outline-offset: 1px; }
.modesw button[data-viewmode="base"][aria-pressed="true"] { color: var(--warn); }
html[data-mode="base"] .brand small { color: var(--warn); font-weight: 700; }

/* Quản lý bộ + so sánh version (ui/packmanage.mjs) */
.pm-scroll { max-height: 46vh; overflow: auto; }
#packmanage-dialog tr.cur td { background: var(--accent-soft); }
.pm-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.6fr); gap: 12px; }
@media (max-width: 760px) { .pm-grid { grid-template-columns: 1fr; } }
.pm-card { border: 1px solid var(--line, #8883); border-radius: var(--r-sm, 6px); padding: 8px 10px; min-width: 0; }
.pm-card h4 { margin: 4px 0 6px; display: flex; align-items: center; gap: 8px; }
.pm-ho { margin: 6px 0 0; padding-left: 18px; max-height: 140px; overflow: auto; }
.pm-diff { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow: auto; }
.pm-drow { display: grid; grid-template-columns: 56px 110px 1fr 20px 1fr; align-items: center; gap: 8px; }
.pm-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pm-side.empty { justify-content: center; }
.pm-thumb { width: 60px; height: 84px; flex: none; border-radius: 4px; background: var(--sunken); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 11px; color: var(--ink-2); }
.pm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pm-arrow { color: var(--ink-2); text-align: center; }
.pm-drow .pill { justify-self: start; }

/* ---------- Kéo chỉnh độ rộng cột (ui/colsplit.mjs, D13) ---------- */
.colsplit-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; touch-action: none; border-radius: 4px; }
.colsplit-h::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: transparent; transition: background .12s; }
.colsplit-h:hover::after, .colsplit-h:focus-visible::after, .colsplit-h.on::after { background: var(--fl-accent); }
.colsplit-h:focus-visible { outline: none; }
html.colsplit-drag, html.colsplit-drag * { cursor: col-resize !important; user-select: none !important; }
