/*
 * GIAO DIỆN VŨ TRỤ (2026-11-25): theo mẫu anh duyệt prototype/ui-mau/my-thuat/4-tranh-sach/chon-hanh-tinh.html và
 * 5-man-chinh/man-chinh.html + SPEC.md. Nạp SAU styles.css: chỉ ghi đè token và mảnh dùng chung, giữ nguyên bố cục cũ của các màn
 * chưa có mẫu (Chợ, Công ty, Hồ sơ, Cài đặt…) để chúng đổi theo cùng token màu và thẻ.
 * Nguyên tắc (SPEC): nền tối phủ ảnh thiên hà; tranh chỉ nằm trong ô bo góc; khung, nút, thẻ, số do code vẽ, phẳng;
 * MỘT màu nhấn tím cho nút chính và mục đang chọn; xanh / đỏ / vàng chỉ cho chữ số và viền nhỏ (đủ / thiếu / bảo trì, năng lượng).
 * Hướng đã duyệt chỉ có nền tối: hai lựa chọn sáng/tối của theme.js đều ra bộ màu này (theme sáng làm sau, xem DOI-BAN).
 */
:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --bg: #0b0f1e; --bg2: #1b2340; --card: rgba(20, 26, 46, .92); --ink: #eef1fb; --muted: #8d97b8; --soft: #c7cdea; --line: #26304f;
  --panel: #141a2e; --panel2: #1b2340; --accent: #8b5cf6; --accent2: #a78bfa; --up: #34d399; --down: #f87171; --gold: #fbbf24;
  --pri: #8b5cf6; --pri-ink: #ffffff; --pri-sh: #5b21b6; --pri-soft: rgba(139, 92, 246, .18); --pri-t: #c4b5fd;
  --okb: #7c3aed; --okb-sh: #4c1d95; --ok: #34d399; --ok-bg: rgba(52, 211, 153, .13);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .13); --bad: #f87171; --bad-bg: rgba(248, 113, 113, .13);
  --nrg: #fbbf24; --nrg-bg: rgba(251, 191, 36, .14); --nrg-sh: #b45309; --nrg-ink: #1a1300;
  --top1: transparent; --top2: transparent; --top-ink: #eef1fb; --sky: #1b2340; --ground: #141a2e;
  --nav: rgba(14, 19, 36, .96); --shadow: 0 8px 24px rgba(0, 0, 0, .3);
  --on-bad: #2a0a0a; --desk: #05070f; --go-sh: #4c1d95; --badge: #8b5cf6; --badge-ink: #ffffff;
  --dream: #8b5cf6; --dream-hi: #d9ccff; --dream-deep: #1d1042; --dream-line: #a78bfa; --dream-t: #d9ccff;
  --t1: #4fc7b8; --t1-soft: rgba(79, 199, 184, .14); --t1-ink: #a9f0e6; --t2: #e8b94a; --t2-soft: rgba(232, 185, 74, .14); --t2-ink: #ffe3a0;
  --t3: #ee7fa4; --t3-soft: rgba(238, 127, 164, .14); --t3-ink: #ffc4d8;
  --isl: #a78bfa; --hud-pill: rgba(20, 26, 46, .85); --overlay: rgba(3, 5, 12, .6);
  --ring-track: #26304f; --ring-full: #f87171;
  --font-d: "Be Vietnam Pro", "Inter", system-ui, sans-serif;
  --font-b: "Be Vietnam Pro", "Inter", system-ui, sans-serif;
  --r: 16px;
  color-scheme: dark;
}
body { background: var(--desk); font-family: var(--font-b); font-weight: 500; }
#app { background: var(--bg) url(img/nen-thien-ha.jpg) center top / cover no-repeat; }
#app::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 15, 30, .6), rgba(11, 15, 30, .94) 45%); pointer-events: none; }
#app > * { position: relative; }
#top { background: transparent; color: var(--ink); box-shadow: none; border: 0; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.2px; margin: 0; }
h2, .title { font-weight: 800; }
.num { font-variant-numeric: tabular-nums; }

/* Thẻ, nút, viên */
.card, .fac, .sheet-f { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.btn { background: linear-gradient(180deg, #9d74ff, #7c3aed); color: #fff; border: 0; border-radius: 14px; box-shadow: 0 8px 24px rgba(124, 58, 237, .35); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 4px 12px rgba(124, 58, 237, .35); }
.btn.green, .btn.blue, .btn.go { background: linear-gradient(180deg, #9d74ff, #7c3aed); color: #fff; box-shadow: 0 8px 24px rgba(124, 58, 237, .35); }
.btn.green:active:not(:disabled), .btn.blue:active:not(:disabled), .btn.go:active:not(:disabled) { box-shadow: 0 4px 12px rgba(124, 58, 237, .35); }
.btn.ghost { background: var(--panel); color: var(--soft); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:active:not(:disabled) { box-shadow: none; }
.btn.danger { background: var(--panel); color: var(--down); border: 1.5px solid var(--down); box-shadow: none; }
.btn:disabled, .btn.ghost:disabled, .btn.green:disabled { background: var(--panel); color: var(--muted); border: 1px solid var(--line); box-shadow: none; opacity: .6; }
.btn.big { border-radius: 16px; }
.pill { background: rgba(20, 26, 46, .85); border: 1px solid var(--line); box-shadow: none; color: var(--ink); min-height: 36px; font-size: 13.5px; }
.pill.nrg { outline: 0; }
.ava { background: linear-gradient(135deg, #334, #556); border: 2px solid var(--accent2); box-shadow: none; }
.ava b { background: var(--accent); color: #fff; border-color: var(--bg); }
.tag { background: var(--panel2); color: var(--muted); }
.nav { background: var(--nav); border-top: 1px solid var(--line); }
.nav button { color: var(--muted); font-size: 10.5px; }
.nav button .ni { filter: none; opacity: 1; display: grid; place-items: center; }
.nav button .ni svg.i { width: 22px; height: 22px; }
.nav button[aria-current="page"] { background: none; color: var(--ink); }
.nav button[aria-current="page"] .ni { transform: none; color: var(--accent2); }
.nav button[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 50%; margin-left: -13px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent2); }
.nav .dot { background: var(--accent); color: #fff; border-color: #0e1324; }
.nav .locked { opacity: .5; }
#modal { background: var(--overlay); }
.sheet { background: var(--panel); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; }
.sheet-f { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
#toast { background: #fff; color: #111; }
input, textarea, select { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.login input { background: var(--bg); color: var(--ink); border-color: var(--line); }

/* Icon nét (mẫu: bảng P) */
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }

/* Ảnh món, cơ sở, cấp đơn: luôn trong ô bo góc, cover */
.ico { background: var(--panel2); overflow: hidden; }
.ico img.iim, .ico img.pimg { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
img.iim { width: 1.4em; height: 1.4em; object-fit: cover; border-radius: 6px; vertical-align: middle; display: inline-block; }
img.tim { width: 1.5em; height: 1.5em; object-fit: cover; border-radius: 6px; vertical-align: middle; display: inline-block; }
.tag.tw-t img.tim { width: 16px; height: 16px; border-radius: 4px; }

/* ===== Màn chọn hành tinh (mẫu 4-tranh-sach) ===== */
.pl-pick { display: flex; flex-direction: column; gap: 14px; }
.pl-pick > * + * { margin-top: 0; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tagp { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--accent2); background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .4); padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.tagp svg.i { width: 13px; height: 13px; }
.hero { position: relative; height: 340px; border-radius: 20px; overflow: hidden; border: 1.5px solid rgba(167, 139, 250, .7); box-shadow: 0 10px 40px rgba(139, 92, 246, .25); }
.hero .himg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(8, 10, 22, .92)); pointer-events: none; }
.hero .hinfo { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.hero .hname { font-size: 26px; font-weight: 800; }
.hero .htag { font-size: 13px; color: #cfd5ee; margin-top: 2px; }
.ibtn { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font: 700 14px/1 Georgia, serif; color: #fff; padding: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); display: inline-flex; align-items: center; gap: 4px; color: var(--soft); }
.chip svg.i { width: 13px; height: 13px; }
.chip.up { color: var(--up); } .chip.down { color: var(--down); } .chip.gold { color: var(--gold); } .chip.mid { color: var(--soft); }
.pstrip { display: flex; gap: 10px; }
.pstrip .pl { flex: 1; min-width: 0; text-align: center; background: none; border: 0; padding: 0; color: var(--muted); }
.pstrip .th { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); }
.pstrip .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pstrip .pn { display: block; font-size: 11px; font-weight: 600; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstrip .pl.on .th { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(139, 92, 246, .3); }
.pstrip .pl.on .pn { color: var(--ink); }
.pstats { padding: 6px 14px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; background: none; border: 0; color: var(--ink); text-align: left; font-size: 14px; font-weight: 600; }
.prow + .prow { border-top: 1px solid var(--line); }
.pic { width: 34px; height: 34px; border-radius: 10px; background: var(--panel2); display: grid; place-items: center; color: var(--soft); flex: none; overflow: hidden; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.val { font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.val.up { color: var(--up); background: rgba(52, 211, 153, .12); }
.val.down { color: var(--down); background: rgba(248, 113, 113, .12); }
.val.mid { color: var(--muted); background: rgba(141, 151, 184, .12); }
.pact { display: flex; gap: 10px; }
.pact .dice { width: 54px; height: 54px; flex: none; border-radius: 16px; padding: 0; display: grid; place-items: center; }
.pact .dice svg.i { width: 24px; height: 24px; }
.pact .btn.big { min-height: 54px; }
.center { text-align: center; }

/* ===== Dải hành tinh trên màn chính (mẫu 5-man-chinh mục 1) ===== */
.pbanner { position: relative; display: block; width: 100%; height: 76px; border-radius: 16px; overflow: hidden; border: 1.5px solid rgba(167, 139, 250, .6); padding: 0; background: var(--panel); text-align: left; color: var(--ink); flex: none; }
.pbanner .bimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.pbanner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 22, .88) 10%, rgba(8, 10, 22, .1) 75%); }
.pbanner .bin { position: absolute; inset: 0; z-index: 1; padding: 10px 48px 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pbanner .bnm { font-size: 20px; font-weight: 800; line-height: 1.1; }
.pbanner .chips { margin-top: 2px; }
.pbanner .tagp { position: absolute; right: 10px; bottom: 8px; z-index: 2; font-size: 10.5px; padding: 3px 8px; background: rgba(8, 10, 22, .7); }
.pbanner .ibtn { top: 8px; right: 10px; width: 28px; height: 28px; font-size: 13px; }
.home-dao .pbanner, .home-day .pbanner { margin: 0 0 4px; }

/* Thẻ cơ sở dạng ảnh, lưới 2 cột (mẫu: ảnh cao 114, viên cấp góc trên trái, viên việc góc dưới phải) */
.home-dao .land { background: none; padding: 0; }
.home-dao .zone { color: var(--muted); }
.bgrid { grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 8px; }
.bld { background: rgba(20, 26, 46, .92); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; align-items: stretch; }
.bld-main { align-items: stretch; gap: 6px; padding-bottom: 10px; }
.bld-art { width: 100%; height: 114px; border-radius: 0; background: var(--panel2) !important; box-shadow: none !important; margin: 0; overflow: hidden; filter: none !important; }
.bld-art .fi { position: absolute; inset: 0; font-size: 0; }
.bld-art .fi img.fim { width: 100%; height: 100%; object-fit: cover; display: block; }
.bld-art .fi svg { width: 100%; height: 100%; }
.bld-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(20, 26, 46, .85)); }
.bld-art .fitem { position: absolute; right: 8px; bottom: 8px; z-index: 1; width: 30px; height: 30px; border-radius: 9px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .25); }
.bld-art .fitem img.iim { width: 100%; height: 100%; border-radius: 0; }
.bld-art .lv { left: 8px; top: 8px; bottom: auto; z-index: 1; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(8, 10, 22, .7); border: 1px solid rgba(255, 255, 255, .18); color: var(--ink); }
.bld.s-rest .bld-art .fi img, .bld.s-wait .bld-art .fi img { filter: saturate(.45) brightness(.7); }
.bld-lb { background: none; box-shadow: none; padding: 0 10px; font-size: 13px; text-align: left; align-self: stretch; }
.bld .st { background: none; padding: 0 10px; justify-content: flex-start; color: var(--muted); font-size: 11px; font-weight: 700; }
.bld .bb { top: 78px; left: auto; right: 8px; margin: 0; width: auto; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: linear-gradient(180deg, #9d74ff, #7c3aed); border: 0; color: #fff; font-size: 14px; animation: none; display: inline-flex; gap: 4px; box-shadow: 0 4px 14px rgba(124, 58, 237, .5); }
.bld .bb.b-bt { background: rgba(8, 10, 22, .82); border: 1.5px solid var(--gold); color: var(--gold); box-shadow: none; }
.bld .bb.b-bad { background: rgba(8, 10, 22, .82); border: 1.5px solid var(--down); color: var(--down); box-shadow: none; }
.bld .bb img.iim { width: 22px; height: 22px; border-radius: 50%; }
.bld .corner { right: auto; left: 8px; top: 36px; z-index: 1; }
.bld.add { border-style: dashed; background: rgba(20, 26, 46, .5); min-height: 166px; justify-content: center; }
.bld.add .bld-art { height: 70px; background: none !important; }
.bld.add .bld-art::after { display: none; }
.bld.add .plus { width: 44px; height: 44px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.bld.hl { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(139, 92, 246, .3); }
.bld.hl .bld-art { outline: 0; }

/* Tấm Hành tinh */
.sh-art { position: relative; height: 132px; border-radius: 16px; overflow: hidden; }
.sh-art .aimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(8, 10, 22, .9)); }
.sh-art .in { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sh-art .nm { font-size: 20px; font-weight: 800; }
.lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.pgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.pbtn { border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; background: var(--panel); }
.pbtn + .pbtn { border-top: 1px solid var(--line); margin-top: 8px; }
.pbtn:disabled { opacity: .55; }
.pbtn .chips { margin-top: 4px; }
.popbar { display: flex; gap: 2px; border-radius: 10px; overflow: hidden; height: 30px; }
.popbar .pb { background: var(--panel2); display: grid; place-items: center; min-width: 0; }
.popbar .pb:nth-child(2n) { background: rgba(139, 92, 246, .25); }
.popbar .pb i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

/* Màn chọn nghề, các màn cũ: chỉ đổi màu theo token */
.alert.ok { background: var(--ok-bg); color: var(--ink); border: 1px solid rgba(52, 211, 153, .35); }
.pick { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
#themeCard { display: none; } /* hướng đã duyệt chỉ có nền tối */

/* Thanh đáy phẳng ở cả hai bố cục (mẫu: icon nét, mục đang mở tô tím + vạch trên). Ghi đè kiểu "bến cảng" cũ. */
:root[data-layout] .nav { background: var(--nav); border-top: 1px solid var(--line); border-radius: 0; padding: 6px 6px calc(10px + env(safe-area-inset-bottom, 0px)); gap: 2px; box-shadow: none; }
:root[data-layout] .nav button, :root[data-layout] .nav button[aria-current="page"] { background: none; color: var(--muted); border: 0; border-radius: 12px; min-height: 52px; box-shadow: none; outline: 0; font-size: 10.5px; flex: 1; }
:root[data-layout] .nav button[aria-current="page"] { color: var(--ink); }
:root[data-layout] .nav button .ni, :root[data-layout] .nav button[aria-current="page"] .ni, :root[data-layout] .nav .neo .ni, :root[data-layout] .nav .home .ni,
:root[data-layout] .nav .neo[aria-current="page"] .ni, :root[data-layout] .nav .home[aria-current="page"] .ni { background: none; box-shadow: none; width: 30px; height: 26px; margin: 0; border-radius: 0; color: inherit; }
:root[data-layout] .nav button[aria-current="page"] .ni { color: var(--accent2); }
:root[data-layout] .nav .neo, :root[data-layout] .nav .home { color: var(--muted); }
:root[data-layout] .nav .dot { top: 0; right: calc(50% - 22px); border-color: #0e1324; }
:root[data-layout] .nav .ns { top: 0; right: calc(50% - 28px); background: var(--panel2); }
.nav .nl small { color: var(--muted); font-weight: 700; }
.phead h1 { font-size: 21px; white-space: nowrap; }
.pbanner .chips .tagp { position: static; background: rgba(8, 10, 22, .7); padding: 2px 7px; font-size: 10.5px; }

.phen { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .35); font-size: 13px; }
.phen .pic { color: var(--accent2); font-size: 16px; }
.phen.sm { padding: 8px 10px; }
.page.home-dao { background: none; }
.land { background: none; box-shadow: none; margin: 8px 0 0; padding: 0; border-radius: 0; }

/* ===== Bảng đơn (mẫu 5-man-chinh mục 2) ===== */
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dhead .tools { display: flex; gap: 8px; align-items: center; }
.dhead .ibtn { position: static; width: 28px; height: 28px; font-size: 13px; flex: none; }
.tool { height: 32px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; font-size: 12px; font-weight: 700; color: var(--soft); }
.tool svg.i { width: 15px; height: 15px; }
.tool:disabled { opacity: .5; }
.don2 .tier { padding: 10px; }
.don2 .th { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.don2 .th img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.don2 .th .tn { font-size: 15px; font-weight: 800; }
.don2 .th .ts { display: flex; gap: 6px; margin-top: 3px; }
.don2 .th .chip { background: var(--panel2); color: var(--muted); margin: 0; }
.don2 .th .chip.gold { color: var(--gold); }
.don2 .th .day { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.ots { display: grid; gap: 8px; }
.ots.c4 { grid-template-columns: repeat(4, 1fr); } .ots.c2 { grid-template-columns: 1fr 1fr; } .ots.c1 { grid-template-columns: 1fr; }
.ot2 { background: var(--panel2); border: 1.5px solid transparent; border-radius: 14px; padding: 7px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; min-height: 92px; color: var(--ink); min-width: 0; }
.ot2.ready { border-color: rgba(52, 211, 153, .7); background: linear-gradient(180deg, rgba(52, 211, 153, .12), var(--panel2) 60%); }
.ot2 .due { font-size: 10px; font-weight: 700; color: var(--muted); display: flex; gap: 3px; align-items: center; white-space: nowrap; }
.ot2 .due svg.i { width: 10px; height: 10px; }
.ot2 .its { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.ot2 .it { position: relative; width: 30px; display: flex; flex-direction: column; align-items: center; }
.ot2 .it img.iim { width: 30px; height: 30px; border-radius: 9px; }
.ot2 .it u { text-decoration: none; font-size: 10px; font-weight: 800; margin-top: 2px; color: var(--up); white-space: nowrap; }
.ot2 .it.miss u { color: var(--down); }
.ot2 .rw { font-size: 12px; font-weight: 800; display: flex; align-items: center; gap: 4px; margin-top: auto; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; }
.dot.coin { background: radial-gradient(circle at 35% 35%, #fde68a, #d97706); }
.ot2 .rw .dot { width: 11px; height: 11px; }
.ot2 .okb { position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--up); color: #062; display: grid; place-items: center; }
.ot2 .okb svg.i { width: 11px; height: 11px; stroke-width: 3; }
.ot2.idle { justify-content: center; color: var(--muted); border: 1.5px dashed var(--line); background: none; font-size: 11px; font-weight: 700; gap: 3px; text-align: center; }
.ot2.idle svg.i { width: 20px; height: 20px; }
.c2 .ot2 .it, .ot2.wide .it { width: 40px; } .c2 .ot2 .it img.iim, .ot2.wide .it img.iim { width: 40px; height: 40px; border-radius: 11px; }
.ot2.wide { flex-direction: row; min-height: 0; padding: 10px 12px; gap: 12px; }
.ot2.wide .its { justify-content: flex-start; }
.ot2.wide .rwc { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ot2.wide .rw { font-size: 15px; margin: 0; }
.don2 .dock .btn small, .sheet-f .btn small { display: inline; margin-left: 4px; }
.sh-art .big { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.sh-art .chips { margin-top: 4px; }

/* ===== Kho (mẫu mục 3) ===== */
.kho2 .cap { display: flex; gap: 12px; align-items: center; }
.kho2 .capimg { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.kho2 .cap .g { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kho2 .cap .n { display: flex; align-items: baseline; justify-content: space-between; }
.kho2 .cap .big { font-size: 24px; font-weight: 800; }
.kho2 .cap .of { font-size: 13px; color: var(--muted); font-weight: 700; }
.kho2 .val.mid { color: var(--gold); background: rgba(251, 191, 36, .12); }
.bar { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bar.h8 { height: 8px; } .bar.up i { background: var(--up); } .bar.mid i { background: var(--gold); } .bar.down i { background: var(--down); }
.kho2 .btn small { display: inline; margin-left: 4px; }
.fl { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.fl::-webkit-scrollbar { display: none; }
.fch { height: 34px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; flex: none; }
.fch svg.i { width: 16px; height: 16px; }
.fch.on { background: rgba(139, 92, 246, .18); border-color: var(--accent2); color: var(--ink); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.kst { text-align: center; position: relative; background: none; border: 0; padding: 0; color: var(--ink); min-width: 0; }
.kst .im { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); position: relative; }
.kst .im img.iim { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
.kst .q { position: absolute; right: 0; bottom: 0; font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 10px 0 0 0; background: rgba(8, 10, 22, .82); }
.kst .need { position: absolute; left: 5px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; }
.kst .need svg.i { width: 10px; height: 10px; stroke-width: 2.4; }
.kst .nm { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Tấm bán (mẫu: tấm vật phẩm) ===== */
.sellh { display: flex; align-items: center; gap: 12px; }
.pic.xl { width: 72px; height: 72px; border-radius: 14px; }
.pic img.iim { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.step { display: flex; align-items: center; gap: 8px; }
.step .q { flex: 1; height: 44px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); text-align: center; font-size: 18px; font-weight: 800; color: var(--ink); min-width: 0; }
.step .btn.sq { width: 44px; height: 44px; padding: 0; flex: none; }
.three { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }
.sheet .btn small, #modal .btn small { display: inline; margin-left: 4px; }

/* ===== Tấm cơ sở (mẫu: ảnh lớn, chọn món ô ảnh) ===== */
.fac-art { height: 132px; }
.fac-art img.fim { width: 100%; height: 100%; object-fit: cover; display: block; }
.fh .art { display: none; }
.rcp { display: flex; gap: 8px; flex-wrap: wrap; }
.rcp .rc { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; margin: 0; }
.rcp .rc img.iim { width: 56px; height: 56px; border-radius: 14px; border: 1.5px solid var(--line); }
.rcp .rc[aria-pressed="true"] { color: var(--ink); }
.rcp .rc[aria-pressed="true"] img.iim { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(139, 92, 246, .3); }
.rcp .rc.locked { opacity: .5; }
.cdot { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; vertical-align: -2px; background: radial-gradient(circle at 35% 35%, #fde68a, #d97706); }
.ot2 .rw .cdot { width: 11px; height: 11px; }
.btn .cdot { margin-left: 4px; }
.don2 .th .chip, .sh-art .chip { min-height: 0; height: auto; padding: 3px 8px; border-radius: 999px; font-size: 11px; box-shadow: none; border: 0; }
.chips .chip, .hero .chip, .pbanner .chip, .sellh .chip { min-height: 0; padding: 3px 8px; border: 0; font-size: 11px; }
.rcp .rc.chip { min-height: 0; padding: 0; border: 0; background: none; border-radius: 0; white-space: normal; }
.sheet-f { background: var(--panel); }
.dock .btn.big, .sheet-f .btn.big, #modal .btn.big, .kho2 .btn { flex-direction: row; gap: 6px; }
.dock .btn.big small, .sheet-f .btn.big small, #modal .btn.big small { display: inline; margin: 0; }

.drow { display: flex; align-items: center; gap: 12px; padding: 8px 12px; width: 100%; color: var(--ink); text-align: left; }
.drow img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.drow b { font-size: 14px; font-weight: 700; flex: 1; }
.drow .cnt { font-size: 16px; font-weight: 800; color: var(--accent2); }
.drow .ibtn { position: static; width: 28px; height: 28px; font-size: 13px; }

/* Soát qa N4: ảnh cơ sở trong ô .art (màn chọn nghề, màn mua cơ sở, đầu tấm) co vừa ô */
.art img.fim { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.art { overflow: hidden; }
/* Soát qa L4: dân số hành tinh dạng hàng (tên, %, thanh), không chồng nhãn */
.poprows .prow { padding: 6px 0; font-size: 13px; }
.poprows .pbar { flex: 1.2; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.poprows .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* ===================== BỐ CỤC A / B (anh chốt 2026-11-25; mẫu prototype/ui-mau/my-thuat/6-bo-cuc/A, B) ===================== */
/* A. Bảng thẻ: thẻ cơ sở nhỏ 3 cột, dải "Đủ hàng", thanh Kho, đáy là nút việc kế tiếp + nút vuông */
.page.home-a { padding: 12px 12px 0; display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.page.home-a > * + * { margin-top: 0; }
.home-a .pbanner { height: 60px; margin: 0; }
.home-a .pbanner .bnm { font-size: 17px; }
.page.home-a > .land { margin: 0; }
.home-a .zone { display: none; }
.home-a .bgrid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 0; }
.home-a .bld-art { height: 82px; }
.home-a .bld-main { gap: 4px; padding-bottom: 8px; }
.home-a .bld-lb { font-size: 12px; padding: 0 8px; }
.home-a .bld .st { font-size: 10.5px; padding: 0 8px; }
.home-a .bld .bb { top: 46px; right: auto; left: 50%; transform: translateX(-50%); height: 30px; min-width: 30px; padding: 0 8px; font-size: 13px; }
.home-a .bld .bb img.iim { width: 20px; height: 20px; }
.home-a .bld-art .fitem { width: 22px; height: 22px; right: 6px; top: 6px; bottom: auto; }
.home-a .bld-art .lv { left: 6px; top: 6px; padding: 1px 6px; font-size: 10.5px; }
.home-a .bld .corner { top: 30px; left: 6px; }
.home-a .bld.add { min-height: 0; }
.home-a .bld.add .bld-art { height: 64px; }
.home-a .bld.add .plus { width: 36px; height: 36px; font-size: 18px; }
.home-a .bld.lock { opacity: .55; }
.home-a .ft-note { margin-top: 6px; }
.page.home-a > .mile2 { margin: 0; width: 100%; }
.astrip { padding: 10px; }
.astrip .sh { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.astrip .sh svg.i { width: 18px; height: 18px; }
.astrip .sh .lnk { margin-left: auto; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; font-size: 12px; min-height: 28px; }
.astrip .orail { margin: 0 -10px; padding: 8px 10px 2px; }
.khobar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; width: 100%; text-align: left; color: var(--ink); font: inherit; }
.khobar img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.khobar .g { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.khobar .n { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; }
.meter.warn > i { background: var(--gold); } .meter.bad > i { background: var(--down); } .khobar .meter.green > i { background: var(--up); }
.page.home-a > .dock.jobs { position: sticky; bottom: 0; margin: auto -12px 0; padding: 10px 12px; background: linear-gradient(180deg, rgba(11, 15, 30, 0), rgba(11, 15, 30, .95) 35%); flex-direction: column; align-items: stretch; gap: 8px; }
.jrow { display: flex; gap: 8px; width: 100%; }
.jrow .job { flex: 1; min-height: 54px; border-radius: 18px; font-size: 16px; flex-direction: row; gap: 8px; width: auto; }
.jrow .job svg.i { width: 20px; height: 20px; }
.jrow .job small { font-size: 12px; opacity: .85; }
.jrow .job.gold { background: rgba(20, 26, 46, .95); border: 1.5px solid var(--gold); color: var(--gold); box-shadow: none; }
.jrow .job.idle { color: var(--muted); }
.jrow .job-sq { position: relative; flex: 0 0 60px; min-height: 54px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); box-shadow: none; padding: 0; }
.jrow .job-sq svg.i { width: 20px; height: 20px; }
.jrow .cnt { position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.jrow .cnt.gold { background: var(--gold); color: #1a1300; }

/* B. Thế giới căn cứ (7-can-cu/SPEC.md): bản đồ rộng 480, cao 150 + 390n + 180, vuốt / kéo để xem. Mỗi ô = lớp sprite
   (bóng đổ, sprite neo 50%/77%, vùng bấm elip; z = y) + lớp nổi (bong bóng, số cấp; z = 5000 + y).
   HUD, thẻ cố vấn, Mốc kế, dải mờ đáy là lớp đứng yên ngoài vùng cuộn .bpan. */
.page.home-b { padding: 0; height: 100%; }
.bworld { position: relative; height: 100%; min-height: 480px; overflow: hidden; background: var(--bg); isolation: isolate; } /* z của ô (tới 5000+y) không vượt ra ngoài: tấm, hộp thoại vẫn đè lên */
.bpan { position: absolute; inset: 0; z-index: 0; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; cursor: grab; touch-action: pan-x pan-y; }
.bpan::-webkit-scrollbar { display: none; }
.bpan:active { cursor: grabbing; }
.bscene { position: relative; background: var(--bg); padding-bottom: 70px; box-sizing: content-box; }
.bscene .nen { display: block; width: 100%; background: center / 100% 100% no-repeat; }
.bscene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 300px at 50% 400px, rgba(255, 214, 150, .12), rgba(255, 214, 150, 0) 70%); pointer-events: none; }
/* Lớp trang trí (bước 8, 8-trang-tri/SPEC.md): nền < trang trí (z 1) < cơ sở (z = y ≥ 166) < bong bóng (z 5000 + y). Không bắt chạm,
   cắt theo khung bản đồ để cụm lớn ở mép không nới rộng vùng kéo. Trong lớp: lối đi < sân < vật (z theo hàng). */
.tt { position: absolute; left: 0; top: 0; width: 100%; z-index: 1; pointer-events: none; overflow: hidden; }
.tt > * { position: absolute; left: 0; top: 0; pointer-events: none; }
.tt .lo { background-repeat: repeat-x; background-size: auto 100%; filter: brightness(.9); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.tt img { display: block; scale: var(--fx, 1) 1; transform-origin: 50% 92%; -webkit-user-drag: none; user-select: none; }
/* Thú và máy: chỉ đổi translate / rotate / scale (máy tự đẩy lên GPU, không vẽ lại trang); chu kỳ dài, lệch pha theo khe. */
.tt .dg { animation: 2.8s ease-in-out infinite; }
.tt .nhun { animation-name: ttNhun; }
.tt .bay { animation-name: ttBay; animation-duration: 2.2s; }
.tt .lac { animation-name: ttLac; animation-duration: 3.4s; }
.tt .quay { animation-name: ttQuay; animation-duration: 9s; animation-timing-function: step-end; }
@keyframes ttNhun { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.5px; } }
@keyframes ttBay { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes ttLac { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes ttQuay { 0%, 100% { scale: var(--fx, 1) 1; } 55% { scale: calc(var(--fx, 1) * -1) 1; } }
@media (prefers-reduced-motion: reduce) { .tt .dg { animation: none !important; } }
.bday { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(11, 15, 30, 0), var(--bg) 85%); pointer-events: none; z-index: 110; }
.plot { position: absolute; width: 0; height: 0; --w: 106px; }
.plot .sh { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1.02); height: calc(var(--w) * .46); transform: translate(-50%, -42%); border-radius: 50%; background: radial-gradient(closest-side, rgba(4, 6, 16, .62) 55%, rgba(4, 6, 16, 0)); pointer-events: none; }
.plot .spr { position: absolute; left: 0; top: 0; width: var(--w); height: var(--w); transform: translate(-50%, -77%); pointer-events: none; -webkit-user-drag: none; user-select: none; }
.plot .pl-hit { position: absolute; left: 0; top: 0; width: var(--w); height: 85px; transform: translate(-50%, calc(-50% - 17px)); border-radius: 50%; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; }
.plot .pl-hit:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.plot.s-wait .spr, .plot.s-stall .spr { filter: saturate(.6) brightness(.8); }
.plot.hl .spr { filter: drop-shadow(0 0 10px rgba(167, 139, 250, .95)); }
.plot.p-empty .spr { filter: brightness(1.05); }
.plot.p-pay .spr { filter: grayscale(.55) brightness(.8); }
.plot.p-lock .spr { filter: grayscale(1) brightness(.5) contrast(.9); opacity: .75; }
.plot.p-lock.xa .spr { opacity: .4; }
.plot .ring { position: absolute; left: 0; top: 0; width: calc(var(--w) * .94); height: calc(var(--w) * .47); transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed rgba(167, 139, 250, .9); box-shadow: 0 0 14px rgba(139, 92, 246, .7); animation: tho 1.8s ease-in-out infinite; pointer-events: none; }
.plot.p-pay .ring { border-color: rgba(251, 191, 36, .95); box-shadow: 0 0 14px rgba(251, 191, 36, .6); }
@keyframes tho { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.plot.noi .lv { position: absolute; left: 0; top: 18px; transform: translate(-50%, -50%); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(8, 10, 22, .85); border: 1px solid rgba(255, 255, 255, .25); font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; color: var(--ink); }
.bub { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - var(--by, 0px))); height: 34px; border-radius: 17px; padding: 0 11px 0 5px; display: flex; align-items: center; gap: 5px; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; border: 0; color: var(--ink); }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); background: inherit; border-radius: 0 0 3px 0; }
.bub svg.i { width: 16px; height: 16px; }
.bub img.iim { width: 26px; height: 26px; border-radius: 50%; }
.bub.b-thu { background: #7c3aed; color: #fff; box-shadow: 0 6px 16px rgba(124, 58, 237, .55); animation: nhun 2.4s ease-in-out infinite; }
.bub.b-thu.full { box-shadow: 0 0 0 2.5px var(--down), 0 6px 16px rgba(248, 113, 113, .5); }
.bub.b-bt { background: #141a2e; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); padding: 0 10px; animation: nhun 2.4s ease-in-out infinite; }
.bub.b-go { background: #141a2e; box-shadow: inset 0 0 0 1.5px var(--accent2); padding: 0 10px; font-size: 16px; }
.bub.b-bad { background: #141a2e; color: var(--down); box-shadow: inset 0 0 0 1.5px var(--down); padding: 0 10px; }
.bub.b-ok { background: #0f3d2e; color: var(--up); box-shadow: inset 0 0 0 1.5px var(--up); padding: 0 11px; }
.bub.b-info, .bub.b-tm { background: rgba(14, 19, 36, .84); color: var(--soft); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); padding: 0 9px; height: 26px; font-size: 12px; gap: 4px; }
.bub.b-info svg.i, .bub.b-tm svg.i, .bub.b-xay svg.i, .bub.b-gia svg.i, .bub.b-lk svg.i { width: 12px; height: 12px; }
.bub.b-xay { background: rgba(14, 19, 36, .9); color: #7dd3fc; box-shadow: inset 0 0 0 1.5px #7dd3fc; padding: 0 9px; height: 26px; font-size: 12px; gap: 4px; }
.bub.b-them { width: 34px; padding: 0; justify-content: center; background: linear-gradient(180deg, #a78bfa, #7c3aed); color: #fff; box-shadow: 0 6px 16px rgba(124, 58, 237, .5); }
.bub.b-gia { height: 28px; padding: 0 10px 0 6px; background: #1a1505; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); font-size: 12px; gap: 5px; }
.bub.b-gia .coin { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, #d97706); }
.bub.b-lk { height: 26px; padding: 0 9px; background: rgba(8, 10, 22, .88); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); font-size: 11.5px; gap: 4px; }
.bub.b-them::after, .bub.b-gia::after, .bub.b-lk::after { display: none; }
.bub .warnc { color: var(--gold); } .bub .badc { color: var(--down); }
@keyframes nhun { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }
@media (prefers-reduced-motion: reduce) { .bub, .plot .ring { animation: none !important; } }
.bhud { position: absolute; left: 12px; right: 12px; top: 8px; z-index: 120; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.bhud > * { pointer-events: auto; }
.bpl { height: 32px; border-radius: 999px; padding: 0 5px 0 4px; display: flex; align-items: center; gap: 7px; background: rgba(14, 19, 36, .85); border: 1px solid rgba(255, 255, 255, .18); color: var(--ink); font: inherit; font-size: 13px; }
.bpl .bpi { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.bpl .ibtn { position: static; width: 22px; height: 22px; font-size: 11px; }
.bhud .tagp { position: static; background: rgba(14, 19, 36, .85); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 6px 10px; font-size: 11.5px; display: inline-flex; gap: 5px; align-items: center; color: var(--soft); }
.bhud .tagp svg.i { width: 13px; height: 13px; }
.btop { position: absolute; left: 10px; right: 10px; top: 48px; z-index: 121; }
.bfoot { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 121; display: flex; flex-direction: column; gap: 6px; }
:root[data-layout="b"] .bfoot { bottom: 18px; }
:root[data-layout="b"] .chatb { bottom: 132px; } /* bong bóng chat nằm trên thẻ Mốc kế, không che chữ bên phải */ /* chừa chỗ phần nút tròn nhô lên (góp ý anh 2026-11-27) */
.bfoot .mile2 { margin: 0; width: 100%; background: rgba(14, 19, 36, .9); }
.bfoot .ft-note { margin: 0; text-align: center; }
/* B: thanh đáy, nút tròn giữa */
:root[data-layout="b"] .nav { align-items: center; }
:root[data-layout="b"] .nav .fab { flex: 0 0 70px; height: 70px; min-height: 70px; margin: -20px 4px 0; /* hạ 10px: nút tròn che thẻ Mốc kế (góp ý anh 2026-11-27) */ border-radius: 50%; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: linear-gradient(180deg, #a78bfa, #7c3aed); color: #fff; box-shadow: 0 0 0 5px var(--bg), 0 10px 26px rgba(124, 58, 237, .55); font-size: 14px; font-weight: 800; }
:root[data-layout="b"] .nav .fab svg.i { width: 24px; height: 24px; }
:root[data-layout="b"] .nav .fab.f-bt { background: #141a2e; color: var(--gold); box-shadow: 0 0 0 5px var(--bg), inset 0 0 0 2px var(--gold); }
:root[data-layout="b"] .nav .fab.idle, :root[data-layout="b"] .nav .fab.home { background: var(--panel2); color: var(--soft); box-shadow: 0 0 0 5px var(--bg); font-size: 11px; }
:root[data-layout="b"] .nav .fab .nl { font-size: 10.5px; font-weight: 700; }
.home-a .bld.add .bld-lb, .home-a .bld.add .tiny { text-align: center; align-self: center; padding: 0 6px; }

/* Cấp người chơi, ô đất, sắp xếp (cờ capSlot, 2026-11-25; SPEC 7-can-cu mục "Sắp xếp") */
.pill.lvp { flex-direction: column; justify-content: center; gap: 3px; padding: 4px 5px; min-width: 0; font-size: 13px; }
#top:has(.lvp) { gap: 4px; } /* 375 px: thêm viên cấp mà không xuống dòng */
.pill.lvp b { line-height: 1; }
.lvbar { display: block; width: 28px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.lvbar i { display: block; height: 100%; background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.arr-b { min-height: 44px; min-width: 64px; padding: 4px 14px; font-size: 13px; white-space: nowrap; flex: none; }
.arr-hint { margin: 4px 0 8px; }
.b-arr-hint { position: absolute; left: 12px; right: 12px; top: 46px; z-index: 121; background: rgba(14, 19, 36, .9); border-radius: 10px; padding: 6px 10px; color: var(--soft); }
.home-a .bld.arr { touch-action: none; cursor: grab; }
.home-a .bld.arr .bld-main { pointer-events: auto; }
.home-a .bld.arr.cam, .home-a .bld.add.arr:focus-visible { box-shadow: 0 0 0 2px #a78bfa, 0 0 16px rgba(167, 139, 250, .8); }
.home-a .bld.arr.drag { z-index: 50; position: relative; opacity: .9; transition: none; }
.home-a .bld.add.arr .plus { font-size: 18px; }
.home-a .bld.add.pay.later, .plot.p-pay.later .spr { opacity: .7; }
.plot.arr { touch-action: none; }
.plot.arr .pl-hit { cursor: grab; }
.plot.p-fac.arr.cam .spr { transform: translate(-50%, calc(-77% - 14px)) scale(1.06); filter: drop-shadow(0 0 10px rgba(167, 139, 250, .9)); }
.plot.p-fac.arr.drag { z-index: 9000 !important; }
.plot.noi .so { position: absolute; left: 0; top: 18px; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #1b1340; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.bub.b-gia { cursor: pointer; }
.home-a .zone.capz { display: flex; justify-content: space-between; margin: 2px 2px 8px; text-transform: none; letter-spacing: 0; font-size: 12px; opacity: 1; color: var(--soft); }
.home-a .zone.capz .ii { position: relative; }
.bfoot-arr { display: flex; justify-content: flex-start; } /* trái: góc phải là bong bóng chat */
.bfoot-arr .arr-b { background: linear-gradient(180deg, #a78bfa, #7c3aed); color: #fff; }
.bfoot-arr .arr-b[aria-pressed="true"] { background: linear-gradient(180deg, #a78bfa, #7c3aed); color: #fff; }
/* Nút gộp khoá cho người thường (cờ vipTap, 2026-11-25): mờ, có 👑 */
.vipl { opacity: .62; filter: saturate(.5); }
.vipl small { font-size: 10px; margin-left: 4px; }
.fab .vipb { position: absolute; top: -4px; right: -2px; font-style: normal; font-size: 14px; }
.job-sq.vipl::after { content: "👑"; position: absolute; top: -6px; left: -4px; font-size: 11px; }
.btn.job.vipl::before { content: "👑"; margin-right: 4px; }
.pl-pick .pact { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 14px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, rgba(11, 15, 30, 0), rgba(11, 15, 30, .92) 30%, var(--bg)); }
/* Chữ tên game (app.title) trên thanh đầu trùng tên lớp .tt của lớp trang trí, bị đặt tuyệt đối đè lên logo */
#top .tt { position: static; width: auto; overflow: visible; pointer-events: auto; z-index: auto; }

/* Sàn hàng thô (chợ bước 2, 2026-11-25): xanh = bên mua, đỏ = bên bán, chỉ cho chữ số và vạch mỏng; nút chính vẫn tím. */
.san .mk-pick .chips { margin: 0 -14px 10px; }
.mk-chip { min-height: 44px; padding: 4px 12px; font-size: 13.5px; }
.chip.mk-chip[aria-pressed="true"], .mk-quick .chip[aria-pressed="true"] { background: var(--pri-soft); color: var(--pri-t); border-color: var(--accent); }
.mk-head { display: flex; align-items: center; gap: 10px; }
.mk-head .grow b { display: block; font-size: 16px; }
.mk-ref { text-align: right; flex: none; }
.mk-ref span { display: block; }
.mk-ref b { font-size: 22px; font-weight: 800; color: var(--ink); }
.mk-band { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.mk-band span { background: var(--panel2); border-radius: 12px; padding: 6px 8px; text-align: center; min-width: 0; }
.mk-band i { display: block; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-band b { font-size: 15px; }
.mk-band b.up, .mk-lv.bid b, .mk-side.bid { color: var(--up); }
.mk-band b.dn, .mk-lv.ask b, .mk-side.ask { color: var(--down); }
.mk-cols { display: grid; grid-template-columns: 1fr 1fr; padding: 6px 8px 2px; }
.mk-cols.three { grid-template-columns: 1fr 1fr 1fr; }
.mk-cols span:last-child, .mk-tr span:last-child { text-align: right; }
.mk-lv { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 100%; min-height: 44px; padding: 0 8px; margin: 2px 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; overflow: hidden; }
.mk-lv i { position: absolute; right: 0; top: 0; bottom: 0; border-radius: 8px; pointer-events: none; }
.mk-lv.ask i { background: var(--bad-bg); } .mk-lv.bid i { background: var(--ok-bg); }
.mk-lv b, .mk-lv span { position: relative; } .mk-lv span { text-align: right; font-weight: 700; }
.mk-mid { text-align: center; font-size: 12.5px; color: var(--soft); padding: 6px 0; margin: 4px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.mk-none { padding: 6px 8px; }
.mk-form > * + * { margin-top: 10px; }
.mk-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-f .lb { font-weight: 700; color: var(--soft); font-size: 14px; }
.mk-step { display: flex; align-items: center; gap: 6px; }
.mk-step .btn.sq { width: 44px; min-height: 44px; font-size: 20px; padding: 0; }
.mk-step b { min-width: 86px; text-align: center; font-size: 19px; }
.mk-step b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.mk-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-quick .chip { min-height: 44px; padding: 4px 10px; font-size: 13px; }
.mk-sum { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.mk-sum div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 13.5px; }
.mk-sum dt { color: var(--muted); min-width: 0; } .mk-sum dd { margin: 0; font-weight: 700; white-space: nowrap; }
.mk-sum .tot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.mk-sum .tot dt { color: var(--ink); font-weight: 700; } .mk-sum .tot dd { font-size: 16px; color: var(--pri-t); }
.mk-form .btn.big small { display: block; font-size: 12px; font-weight: 600; margin-top: 2px; }
.mk-quay h3 .cnt, .mk-quay .cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; text-align: center; }
.mk-quay .btn, .mk-mine .btn { min-height: 44px; padding: 6px 14px; }
.mk-side { font-size: 12px; font-weight: 800; margin-right: 2px; }
.mk-tr { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 3px 8px; font-size: 13px; }
.mk-cf { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.mk-rule { line-height: 1.45; }
#modal .mk-sum { margin: 0 0 10px; }

/* ===== Nâng có tỉ lệ, cấp công ty 1–5, thuế giữ tiền (cờ capCty, prototyper 2026-11-25) ===== */
.tl-card { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--bg2); display: grid; gap: 6px; min-width: 0; }
.tl-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-top .tiny { flex: 1; min-width: 0; line-height: 1.3; }
.tl-pct { font-size: 28px; font-weight: 900; line-height: 1; }
.tl-card .tl-ins { min-height: 48px; margin: 0; }
.tl-card p { margin: 0; overflow-wrap: anywhere; }
.tl-cond .meter { display: block; margin-top: 4px; }
.tl-tb { overflow-x: auto; max-width: 100%; }
.tl-tb td { white-space: nowrap; font-size: 12px; }
#top .pill.tl-dot { position: relative; }
#top .pill.tl-dot::after { content: ''; position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn, #f59e0b); box-shadow: 0 0 0 2px var(--bg, #fff); }

/* (soát chợ bước 2, N1 nút ≥ 44px ở trên; N4) Ở tab Sàn ẩn nút 💬 nổi để không che sổ lệnh; vào chat bằng nút "Mở chat" trong Sàn. */
html.cb-off #chatBubble { display: none !important; }
.mk-chat { margin-top: 8px; min-height: 44px; }
#top > button.pill.num { flex: 0 0 auto; min-width: 0; font: inherit; font-weight: 800; font-size: 13.5px; color: var(--ink); cursor: pointer; }

/* ===== Sửa nhẹ sau soát cấp công ty (playtest/soat-cap-cong-ty.md, prototyper 2026-11-25) ===== */
/* N-c: nút 💬 ở hàng đầu trang (mọi màn trừ Căn cứ). */
.pg-chat { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; display: grid; place-items: center; padding: 0; flex: none; }
.pg-chat .cnt { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--badge); color: var(--badge-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.pg-top .grow { flex: 1; }
/* N-d: số tiền trên thanh trên (mở tấm Ví) có vùng bấm 44px, không đổi hình. */
#top button[data-sheet="vi"] { position: relative; }
#top button[data-sheet="vi"]::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
/* N-e: "Nghiệm thu" không gãy dòng; dòng nhỏ xuống dưới. */
.btn.nt-btn { flex-direction: column; gap: 2px; text-align: center; }
.btn.nt-btn b { white-space: nowrap; }
.btn.nt-btn small { display: block; }
/* Có từ trước: 5 nút thẻ Công ty bị .chip (vu-tru.css) hạ còn 21px. */
.co-tabs .chip { min-height: 44px; padding: 6px 12px; font-size: 13px; }

/* Nhấn giữ để dời (anh 2026-11-25): không còn nút Sắp xếp. Chặn menu nhấn giữ / chọn chữ / kéo ảnh trên cơ sở; nhấc lên thì rung nhẹ. */
.home-a .bld, .plot.p-fac, .plot.p-fac .spr, .plot.p-fac .pl-hit { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.home-a .bld.lift, .plot.p-fac.lift .spr { animation: lp-rung .16s ease-in-out 3; }
@keyframes lp-rung { 0%, 100% { rotate: 0deg; } 25% { rotate: -2.5deg; } 75% { rotate: 2.5deg; } }
@media (prefers-reduced-motion: reduce) { .home-a .bld.lift, .plot.p-fac.lift .spr { animation: none; } }
.lp-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfoot-arr .lp-hint { background: rgba(14, 19, 36, .86); color: var(--soft); border-radius: 999px; padding: 6px 12px; pointer-events: none; }

/* Góp ý chọn vùng (anh 2026-11-25): lối vào trong tấm chat, ảnh xem trước trong tấm Góp ý, lớp khoanh vùng như chụp màn hình. */
.sx-gy { display: flex; gap: 8px; margin: 0 14px 8px; flex: none; }
.sx-gy .sx-gy-b { flex: 1 1 0; min-height: 44px; font-size: 13px; padding: 6px 8px; white-space: nowrap; }
.gy-sheet { z-index: 60; }
.gy-sheet .btn.sq { min-width: 44px; min-height: 44px; }
.gy-chip { min-height: 44px; }
.gy-b { min-height: 44px; }
.gy-shot { display: flex; gap: 10px; align-items: flex-start; }
.gy-shot img { width: 46%; max-height: 150px; object-fit: contain; object-position: left top; border-radius: 10px; border: 1.5px solid var(--line); background: #000; }
.gy-shot-r { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.gy-pick { position: fixed; inset: 0; z-index: 3000; background: rgba(5, 8, 20, .45); touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gy-pick.on { background: transparent; }
.gyp-box { position: absolute; border: 2px dashed #fff; border-radius: 4px; box-shadow: 0 0 0 9999px rgba(5, 8, 20, .45); pointer-events: none; }
.gyp-box.hidden { display: none; }
.gyp-bar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top, 0px)); width: calc(100% - 16px); max-width: 464px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 14px; background: rgba(14, 19, 36, .94); color: var(--ink); border: 1px solid var(--line); cursor: default; }
.gyp-t { font-size: 14px; font-weight: 700; text-align: center; }
.gyp-bs { gap: 8px; }
.gyp-bs .gyp-b { flex: 1 1 0; min-height: 44px; }
.gy-pick.on .gyp-bar { opacity: .35; }
.gyp-mini { position: absolute; right: calc(var(--colR, 0px) + 12px); bottom: 112px; width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); pointer-events: none; animation: gyp-thu .22s ease-out; }
.gyp-mini i { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--pri); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; }
@keyframes gyp-thu { from { transform: scale(1.6); opacity: .3; } to { transform: scale(1); opacity: 1; } }
body:has(#gyPick) #toast { z-index: 3001; }

/* Soát cty4 nhẹ 6 (2026-11-26): đang nhấc cơ sở thì ô thả được có viền đứt xanh, ô không nhận (khoá, chờ trả tiền) mờ đi. */
.home-a .bld.lp-ok { outline: 2px dashed #34d399; outline-offset: -2px; }
.home-a .bld.lp-no { opacity: .4; filter: grayscale(.8); }
.plot.lp-ok .ring { border-color: #34d399; box-shadow: 0 0 14px rgba(52, 211, 153, .8); }
.plot.p-fac.lp-ok .spr { filter: drop-shadow(0 0 8px rgba(52, 211, 153, .9)); }
.plot.lp-no { opacity: .35; filter: grayscale(.8); }

/* Chợ bước 5 (prototyper 2026-11-26): nhóm Hàng thô / Thành phẩm, thẻ VIP tự mua */
.san .mk-pick .mk-grp { margin: 2px 0 4px; }
.mk-tu .li .tiny { display: block; }
.mk-tu .mk-step { margin-right: 6px; }

/* N1 (2026-11-26): thẻ gập Dreamium / nhóm Đá có mũi tên báo bấm được */
details.dreamfold > summary, details.mk-da-grp > summary { list-style: none; gap: 6px; }
details.dreamfold > summary::-webkit-details-marker, details.mk-da-grp > summary::-webkit-details-marker { display: none; }
details.dreamfold > summary::before, details.mk-da-grp > summary::before { content: '\25B8'; color: var(--muted); font-size: 14px; }
details.dreamfold[open] > summary::before, details.mk-da-grp[open] > summary::before { content: '\25BE'; }
