.game-root{--qt-build:b8a890742513}
/* ============================================================
   Tiệm Trà Nhỏ — main.css (tự viết)
   ============================================================ */
.game-root {
  /* Chieu cao do khung trang quyet dinh qua #gameRoot: 100% khi nhung trong
     iframe, 100% viewport khi mo doc lap (xem game/index.html). */
  position: relative; height: 100%; min-height: 520px;
  overflow: hidden; background: var(--bg);
  --bg: #fdf3e4;
  --panel: #fffaf2;
  --line: #ead7bd;
  --ink: #3a2317;
  --soft: #7a5a48;
  --pink: #ef6f8e;
  --pink-d: #c24c69;
  --mint: #4fa883;
  --warn: #e2574c;
  /* --- Biến dành riêng cho CHỮ (đạt WCAG AA 4.5:1 trên nền sáng) ---
     Ba màu thương hiệu ở trên quá sáng để làm màu chữ cỡ nhỏ:
       mint   #4fa883 -> 2.78:1   (cần 4.5)
       warn   #e2574c -> 3.54:1   (cần 4.5)
       pink-d #c24c69 -> 4.46:1   (sát ngưỡng, không an toàn)
     Giữ nguyên màu gốc cho NỀN/NÚT (nhận diện thương hiệu), chỉ dùng biến đậm
     hơn khi màu đó làm CHỮ. Giá trị tính bằng công thức độ sáng tương đối WCAG
     trên nền --panel (#fffaf2) và --bg (#fdf3e4). */
  --mint-ink: #2f7355;
  --warn-ink: #b93a2b;
  --pink-ink: #9c3250;
  /* Nền nút có chữ trắng: trắng trên #ef6f8e chỉ đạt 2.86:1, nên dùng bản đậm
     hơn — #c24c69 đạt 4.63:1 với chữ trắng. */
  --pink-btn: #c24c69;
  --pink-btn-d: #a3415a;
  --gold: #f0b43c;
  --chalk: #2f4a3a;
  --chalk-ink: #f4efe2;
  --counter: #8a5a3b;
  color-scheme: light only;
}

.game-root *, .game-root *::before, .game-root *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* html/body margin do trang chu quan ly (khong phai cua game).
   Phan "nhung trong iframe" nam trong game/index.html, khong o day: main.css
   duoc boc trong .game-root khi phat hanh nen cac selector cap tai lieu
   (html, body, #gameRoot) se bi vo hieu. */
.game-root {
  background: var(--bg); color: var(--ink);
  font-family: "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", sans-serif;
}

.game-root.selling { overflow: hidden; }

.game-root button { font: inherit; color: inherit; }

.game-root button:focus-visible, .game-root input:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

.game-root .app { max-width: 560px; margin: 0 auto; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.game-root header {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 6px;
}

.game-root .h-l { display: flex; align-items: center; gap: 8px; min-width: 0; }

.game-root .h-name { font-weight: 800; line-height: 1.1; font-size: 1rem; }

.game-root .h-l small, .game-root .h-r small { display: block; color: var(--soft); font-size: .74rem; font-weight: 600; }

.game-root .h-m { text-align: center; font-weight: 800; font-size: 1.25rem; line-height: 1.1; }

.game-root .h-m small { display: block; font-size: .76rem; color: var(--pink-ink); }

.game-root .h-r { text-align: right; }

.game-root .h-r .stars { color: var(--gold); letter-spacing: 1px; font-size: .95rem; }

.game-root .pbtn {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--line); background: var(--panel); font-size: .95rem; cursor: pointer; padding: 0;
}

.game-root .pbtn:hover { border-color: var(--pink); }

/* nút tạm dừng chỉ hiện khi đang bán (giống bản gốc) */
.game-root.selling .pbtn { display: inline-flex; }

.game-root.is-paused .pbtn { background: var(--gold); border-color: var(--gold); }

/* nút cài đặt thì ngược lại: hiện lúc chuẩn bị, ẩn lúc đang bán */
.game-root .gear { font-size: 1.02rem; }

.game-root:not(.selling) .pbtn.gear { display: inline-flex; }

.game-root.selling .pbtn.gear { display: none; }

.game-root .awning { height: 14px; background: repeating-linear-gradient(90deg, var(--pink) 0 22px, #fff 22px 44px); }

.game-root #view { flex: 1; display: flex; flex-direction: column; }

/* ---------- bảng menu ---------- */
.game-root .board {
  margin: 12px 12px 10px; background: var(--chalk); color: var(--chalk-ink);
  border: 8px solid var(--counter); border-radius: 10px; padding: 18px 14px 10px;
}

.game-root .board h2 { margin: 0 0 6px; font-size: 1.3rem; text-align: center; font-weight: 800; }

.game-root .board .items { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; font-size: .92rem; }

.game-root .board .it { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(244,239,226,.25); }

.game-root .board .btop { margin-top: 8px; font-weight: 800; font-size: .8rem; opacity: .9; }

.game-root .board .btops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.game-root .board .btop-chip { font-size: .72rem; border: 1px solid rgba(244,239,226,.35); border-radius: 8px; padding: 0 6px; }

.game-root .board .extra { margin-top: 8px; font-size: .76rem; opacity: .85; text-align: center; }

.game-root .sign { display: flex; justify-content: center; margin: -6px 0 10px; }

.game-root .sign button {
  border: 3px solid var(--counter); background: #fff7e8; color: var(--pink-d);
  border-radius: 14px; padding: 6px 16px; font-size: 1.25rem; font-weight: 800; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.game-root .sign button small { font-size: .75rem; opacity: .6; }

/* ---------- tabs ---------- */
.game-root .tabs {
  display: flex; gap: 4px; margin: 0 12px; padding: 5px 5px 0; overflow-x: auto;
  background: #f0e2cb; border-radius: 16px 16px 0 0;
}

.game-root .tab {
  flex: 1; border: 0; background: transparent; padding: 8px 4px; font-size: .7rem; font-weight: 700;
  border-radius: 12px 12px 0 0; cursor: pointer; white-space: nowrap; color: var(--ink); opacity: .72;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}

.game-root .tab .ti { font-size: 1.15rem; line-height: 1; }

.game-root .tab.on { background: var(--panel); opacity: 1; }

.game-root .pane { background: var(--panel); margin: 0 12px 110px; border-radius: 0 0 16px 16px; padding: 12px; flex: 1; }

.game-root .sec { font-weight: 800; margin: 12px 2px 6px; font-size: .98rem; }

.game-root .sec:first-child { margin-top: 0; }

.game-root .sec .wl { font-weight: 600; }

.game-root .note { color: var(--soft); font-size: .8rem; margin: 0 2px 8px; line-height: 1.4; }

.game-root .rowi {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}

.game-root .rowi:last-child { border-bottom: 0; }

.game-root .rowi .nm { font-weight: 700; line-height: 1.15; }

.game-root .rowi .sub { font-size: .76rem; color: var(--soft); font-weight: 500; }

.game-root .icon { font-size: 1.4rem; text-align: center; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }

/* ---------- hệ thống icon SVG (Tabler, MIT) ---------- */
.game-root .ico { display: inline-block; vertical-align: -0.15em; flex: 0 0 auto; }

.game-root button .ico { pointer-events: none; }

.game-root .st-on { color: var(--gold); }

.game-root .st-off { color: var(--line); }

.game-root .h-l .ico, .game-root .h-r .ico { color: var(--soft); }

.game-root .pbtn .ico { color: var(--ink); }

.game-root .sp-big { width: 4.5rem !important; height: 4.5rem !important; color: var(--pink); }

.game-root .evi .ico { color: var(--pink-ink); }

.game-root .kpis .ico { color: var(--soft); vertical-align: -0.18em; }

.game-root .sec .ico, .game-root .glabel .ico, .game-root .fore .ico, .game-root .wbox .ico { color: var(--soft); }

.game-root .openbar .big .ico { vertical-align: -0.16em; }

.game-root .pin .ico, .game-root .sbtn .ico { vertical-align: -0.16em; }

.game-root .btns { display: flex; gap: 3px; }

.game-root .price { font-weight: 800; font-size: .88rem; text-align: right; }

.game-root .price small { display: block; font-size: .66rem; color: var(--soft); font-weight: 600; }

.game-root .rowi .price { grid-column: 3; }

.game-root .rowi:has(.btns) .price { grid-column: 1 / -1; text-align: right; }

.game-root .sbtn {
  border: 2px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 10px; padding: 4px 9px; font-size: .78rem; font-weight: 700; cursor: pointer;
  line-height: 1.15; text-align: center;
}

.game-root .sbtn b { display: block; font-size: .88rem; }

.game-root .sbtn.pri { background: var(--pink-btn); border-color: var(--pink-btn); color: #fff; }

.game-root .sbtn.ghost { background: var(--panel); }

.game-root .sbtn:disabled { opacity: .4; cursor: not-allowed; }

.game-root .pin { display: flex; align-items: center; gap: 4px; }

.game-root .pin input {
  width: 74px; border: 2px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 10px; padding: 5px 6px; font-weight: 800; text-align: center; font-family: inherit;
}

.game-root .pin span { font-size: .78rem; color: var(--soft); font-weight: 700; }

.game-root .pinbox {
  width: 100%; margin-top: 8px; border: 2px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 12px; padding: 10px; font-size: 1.1rem; text-align: center; font-family: inherit; font-weight: 700;
}

.game-root .pinbox.code { font-size: .74rem; letter-spacing: 0; text-align: left; word-break: break-all; }

.game-root .askbtns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.game-root .askbtns .sbtn { padding: 10px; font-size: .9rem; }

/* ---------- khoá tính năng chưa mở ---------- */
.game-root .wl { color: var(--soft); font-size: .74rem; }

.game-root .okline { color: var(--mint-ink); font-weight: 700; }

.game-root .warnline { color: var(--warn-ink); font-weight: 700; }

.game-root .neg { color: var(--warn-ink); }

.game-root .pos { color: var(--mint-ink); }

.game-root .revc { color: #2b78c5; }

.game-root .pbig { font-size: 3rem; line-height: 1; text-align: center; }

/* hai nút bật/tắt ngay trong hộp thoại tạm dừng */
.game-root .sndrow { display: flex; gap: 8px; justify-content: center; margin: 10px 0 2px; }

.game-root .sndrow .sbtn { flex: 1; max-width: 160px; padding: 9px 10px; font-size: .84rem; }

/* ---------- chips ---------- */
.game-root .chips { display: flex; flex-wrap: wrap; gap: 5px; }

.game-root .chip {
  border: 2px solid var(--line); background: var(--bg); border-radius: 12px;
  padding: 6px 11px; font-size: .82rem; font-weight: 700; cursor: pointer;
}

.game-root .chip small { font-size: .68rem; color: var(--soft); font-weight: 700; margin-left: 3px; }

.game-root .chip.on { background: var(--pink); border-color: var(--pink); color: #fff; }

.game-root .chip.on small { color: rgba(255,255,255,.8); }

.game-root .chip:disabled { opacity: .38; cursor: not-allowed; }

.game-root .steptip {
  display: flex; align-items: center; gap: 6px; background: rgba(79,168,131,.13);
  border-left: 3px solid var(--mint); border-radius: 8px; padding: 6px 9px;
  font-size: .78rem; font-weight: 700; margin-bottom: 10px; color: var(--ink);
}

.game-root .glabel { font-size: .74rem; color: var(--soft); font-weight: 700; margin: 6px 0 3px; }

.game-root .segtabs { display: flex; gap: 4px; margin-bottom: 8px; }

.game-root .segtabs .chip { flex: 1; text-align: center; }

/* ---------- thẻ sự kiện & cấp ---------- */
.game-root .evc {
  margin: 0 12px 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 14px;
  padding: 8px 12px; display: flex; gap: 10px; align-items: center; font-size: .82rem; line-height: 1.35;
}

.game-root .evc .evi { font-size: 1.5rem; }

.game-root .evc b { display: block; }

.game-root .evc small { color: var(--soft); }

.game-root .evc.loan { flex-wrap: wrap; }

.game-root .lvl {
  margin: 0 12px 8px; background: var(--panel); border: 2px solid var(--gold); border-radius: 14px;
  padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: .82rem;
}

.game-root .lvl .lvi { color: var(--gold); letter-spacing: 1px; font-size: 1.05rem; }

.game-root .lvl small { margin-left: auto; color: var(--soft); font-weight: 700; }

/* ---------- thanh nút dưới cùng ---------- */
.game-root .openbar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg) 30%); display: flex; justify-content: center; z-index: 15;
}

/* chỉ nút mới nhận click, phần nền trong suốt của thanh để lọt qua */
.game-root .openbar { pointer-events: none; }

.game-root .openbar .big { pointer-events: auto; }

.game-root .big {
  background: var(--pink-btn); color: #fff; border: 0; border-radius: 16px; padding: 13px 26px;
  font-size: 1.05rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 var(--pink-btn-d);
  width: 100%; max-width: 420px;
}

.game-root .big:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pink-btn-d); }

.game-root .big:disabled { opacity: .55; cursor: not-allowed; }

.game-root .big.blocked { background: var(--soft); box-shadow: none; }

/* ---------- sân khấu khách ---------- */
.game-root .lane {
  display: flex; gap: 8px; margin: 10px 12px 8px; overflow-x: auto; padding-bottom: 4px;
  position: relative; scroll-snap-type: x mandatory;
}

.game-root .slot {
  flex: 1 0 168px; scroll-snap-align: start; background: var(--panel); border: 2px solid var(--line);
  border-radius: 14px; padding: 8px 10px;
}

.game-root .slot.empty { display: flex; align-items: center; justify-content: center; min-height: 104px; color: var(--soft); font-size: .78rem; border-style: dashed; }

.game-root .slot.vip { border-color: var(--gold); background: #fff8e6; }

.game-root .sh { display: flex; align-items: center; gap: 5px; font-size: .84rem; }

.game-root .sh .face { font-size: 1.25rem; }

.game-root .sh .brat { font-size: .62rem; background: var(--warn); color: #fff; border-radius: 6px; padding: 0 5px; font-weight: 800; }

.game-root .sh .cups { margin-left: auto; font-size: .66rem; background: var(--pink); color: #fff; border-radius: 6px; padding: 0 5px; font-weight: 800; }

.game-root .so { font-size: .78rem; line-height: 1.3; margin: 4px 0 5px; }

.game-root .bar { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; }

.game-root .fill { display: block; height: 100%; background: var(--mint); transition: width .2s linear; }

.game-root .fill[style*="width:1"], .game-root .fill[style*="width:2"], .game-root .fill[style*="width:3"] { background: var(--warn); }

.game-root .sact { display: flex; gap: 4px; margin-top: 6px; }

.game-root .sact .sbtn { flex: 1; padding: 5px 2px; font-size: .72rem; }

.game-root .paused {
  position: sticky; left: 0; align-self: center; background: rgba(58,35,23,.85); color: #fff;
  border-radius: 12px; padding: 10px 16px; font-weight: 800;
}

/* ---------- quầy pha chế ---------- */
.game-root .counter { display: flex; justify-content: center; padding: 4px 12px 8px; }

.game-root .cupwrap { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px; }

.game-root .cupsvg { display: flex; align-items: flex-end; }

.game-root .cupsvg svg { display: block; }

.game-root .cupsvg.lg svg { transform: scale(1.06); transform-origin: bottom center; }

.game-root .cupinfo { font-size: .84rem; line-height: 1.4; }

.game-root .cupinfo b { display: block; font-size: .95rem; }

.game-root .cupinfo small { display: block; color: var(--soft); font-weight: 700; }

/* ---------- kệ nguyên liệu (dùng sprite sinh sẵn) ---------- */
.game-root .shelf { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: flex-end; margin: 0 12px 8px; padding-bottom: 14px; }

.game-root .shelf .prop { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }

.game-root .shelf .prop img { display: block; height: var(--h, 58px); width: auto; max-width: 60px; object-fit: contain; pointer-events: none; }

.game-root .shelf .prop .cap {
  position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  background: rgba(58,35,23,.86); color: #fff; font-size: .6rem; font-weight: 800;
  border-radius: 7px; padding: 1px 6px; white-space: nowrap;
}

.game-root .shelf .prop .qty {
  position: absolute; right: -4px; top: -4px; background: var(--panel); border: 2px solid var(--line);
  border-radius: 50%; min-width: 22px; height: 22px; font-size: .66rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}

.game-root .shelf .prop.empty { opacity: .42; filter: grayscale(.55); }

.game-root .shelf .prop.want img { filter: drop-shadow(0 0 0 var(--mint)) drop-shadow(0 0 6px var(--mint)); }

.game-root .shelf .prop:disabled { cursor: not-allowed; }

.game-root .shelf .prop.on img { filter: drop-shadow(0 0 0 var(--pink)) drop-shadow(0 0 7px var(--pink)); }

.game-root .shelf .prop .fill {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 46%; border-radius: 4px 4px 6px 6px; pointer-events: none; opacity: .92;
}

.game-root .shelfrow { margin: 0 12px 6px; }

.game-root .shelfrow .lbl { font-size: .68rem; font-weight: 800; color: var(--soft); margin: 0 0 3px 2px; }

/* ---------- panel pha chế ---------- */
.game-root .panel { background: var(--panel); margin: 0 12px 90px; border-radius: 16px; padding: 12px; }

.game-root .acts { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }

.game-root .acts .big2 { padding: 12px; font-size: .95rem; }

.game-root .acts2 { display: flex; gap: 6px; margin-top: 6px; }

.game-root .acts2 .sbtn { flex: 1; }

.game-root .goalc { margin: 0 12px 8px; }

/* ---------- tổng kết ---------- */
.game-root .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }

.game-root .kpis div { background: var(--bg); border-radius: 10px; padding: 6px; text-align: center; font-size: .7rem; color: var(--soft); }

.game-root .kpis b { display: block; font-size: 1.05rem; color: var(--ink); }

.game-root .rh { font-weight: 800; font-size: 1.05rem; margin: 14px 0 4px; border-bottom: 2px solid; padding-bottom: 2px; }

.game-root .thead, .game-root .trow { display: grid; grid-template-columns: minmax(0, 1fr) 62px 72px; gap: 6px; align-items: start; font-size: .78rem; }

.game-root .thead { color: var(--soft); font-weight: 700; font-size: .68rem; padding: 2px 0; }

.game-root .thead div:not(:first-child), .game-root .trow > div:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

.game-root .trow { padding: 4px 0; border-bottom: 1px dashed var(--line); }

.game-root .tbar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 3px; overflow: hidden; }

.game-root .tbar i { display: block; height: 100%; background: #2b78c5; }

.game-root .tgrp { font-size: .7rem; font-weight: 800; color: var(--soft); margin-top: 6px; }

.game-root .ttot { display: flex; justify-content: space-between; font-weight: 800; padding: 6px 0 0; font-size: .95rem; }

.game-root .crow { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; padding: 4px 0; border-bottom: 1px dashed var(--line); }

.game-root .crow span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.game-root .crow.sub { font-size: .74rem; color: var(--soft); border-bottom: 0; padding: 1px 0 1px 8px; }

.game-root .wbox { font-size: .74rem; background: rgba(226,87,76,.1); border-radius: 8px; padding: 5px 8px; margin: 5px 0; }

.game-root .final { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-weight: 800; font-size: 1.05rem; }

.game-root .final small { display: block; font-size: .68rem; color: var(--soft); font-weight: 600; }

.game-root .pnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; text-align: center; font-size: .88rem; }

.game-root .pnav .sbtn { width: 34px; height: 32px; font-size: 1.1rem; padding: 0; }

.game-root .fore { background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: .82rem; margin: 0 0 8px; line-height: 1.35; }

.game-root .ledger { background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }

.game-root .ledger div { display: flex; justify-content: space-between; padding: 3px 0; }

.game-root .ledger .fin { border-top: 1px dashed var(--line); margin-top: 5px; padding-top: 7px; font-weight: 800; font-size: 1rem; }

.game-root .lvs { margin-top: 10px; font-size: .84rem; line-height: 1.5; }

.game-root .lvs div { padding: 2px 0; }

.game-root .lvup { background: rgba(240,180,60,.25); border-radius: 10px; padding: 6px 10px; font-weight: 800; }

.game-root .news { text-align: left; max-height: 55vh; overflow-y: auto; margin-top: 8px; }

.game-root .nv { border-top: 1px solid var(--line); padding: 8px 0; }

.game-root .nv:first-child { border-top: 0; }

.game-root .nh { display: flex; align-items: baseline; gap: 6px; }

.game-root .nh small { margin-left: auto; color: var(--soft); font-size: .7rem; }

.game-root .nv ul { margin: 4px 0 0; padding-left: 18px; font-size: .84rem; line-height: 1.4; }

/* ---------- nhân viên & đơn online ---------- */
.game-root .slot.staffing { border-color: var(--gold); background: #fff8e6; align-items: center; justify-content: center; display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: .8rem; }

.game-root .slot.staffing small { color: var(--soft); font-size: .7rem; }

.game-root .slot.online { border-color: #2b78c5; background: #f2f8fd; }

.game-root .slot.online .appchip { font-size: .6rem; color: #fff; border-radius: 6px; padding: 0 5px; font-weight: 800; }

.game-root .slot.online .trans { color: var(--soft); font-style: italic; }

.game-root .slot .brat.vip { background: var(--gold); color: #5a3a1a; }

.game-root .gr2 { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; margin-top: 6px; font-size: .78rem; font-weight: 700; }

.game-root .gr2 .gv { color: var(--soft); font-variant-numeric: tabular-nums; font-size: .72rem; }

.game-root .gr2 .gb { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 3px; }

.game-root .gr2 .gb i { display: block; height: 100%; background: var(--gold); }

.game-root .gr2.ok .gb i { background: var(--mint); }

/* ---------- tem thương hiệu ---------- */
.game-root .brandprev { display: flex; justify-content: center; margin: 10px 0; }

.game-root .tem { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px; border: 2px solid rgba(90,60,32,.28); }

.game-root .tem .tem-ic { line-height: 1; }

.game-root .tem .tem-nm { font-weight: 800; line-height: 1.1; text-align: center; word-break: break-word; }

.game-root .tem .tem-sl { line-height: 1.1; text-align: center; opacity: .8; }

.game-root .owner { max-height: 60vh; overflow-y: auto; text-align: left; margin-top: 8px; }

/* ---------- thẻ quầy khi đang bán ---------- */
.game-root.selling .pane { margin-bottom: 120px; }

/* thanh hành động dưới cùng là position:fixed nên phải chừa chỗ,
   nếu không hàng cuối của quầy pha (nút đổ ly) sẽ nằm dưới thanh này */
.game-root.selling .panel { margin-bottom: 170px; }

.game-root.selling .counter { padding-bottom: 0; }

/* ---------- icon màu (Fluent Emoji Flat, MIT) ---------- */
.game-root .cico { display: inline-block; vertical-align: -0.22em; flex: 0 0 auto; }

.game-root button .cico { pointer-events: none; }

.game-root .cico-missing { font-weight: 800; color: var(--warn); }

/* thẻ khách: avatar tròn nền màu */
.game-root .face .cico { vertical-align: -0.28em; }

.game-root .slot .face { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line); }

.game-root .slot.online .face { border-color: #2b78c5; }

.game-root .rface .cico { vertical-align: -0.3em; }

/* kệ nguyên liệu: icon màu to, có nền nhẹ */
.game-root .shelf .prop .part { display: flex; align-items: center; justify-content: center; min-height: 50px; }

.game-root .shelf .prop .part .cico { display: block; }

.game-root .shelf .prop.on .part { filter: drop-shadow(0 0 6px var(--pink)); }

.game-root .shelf .prop.want .part { filter: drop-shadow(0 0 6px var(--mint)); }

/* tab: icon màu hơi nhỏ lại cho gọn */
.game-root .tab .ti .cico { vertical-align: -0.3em; }

.game-root .tab.on .ti .cico { transform: scale(1.06); }

/* 事件卡 / 设备行 */
.game-root .evc .evi .cico { vertical-align: -0.34em; }

.game-root .rowi .icon .cico { vertical-align: -0.34em; }

.game-root .kpis .cico { vertical-align: -0.3em; }

.game-root .sec .cico { vertical-align: -0.26em; }

.game-root .fore .cico { vertical-align: -0.28em; }

/* ---------- avatar ảnh (sinh sẵn, đã tách nền) ---------- */
.game-root .avt { border-radius: 50%; background: #fff; border: 2px solid var(--line); object-fit: cover; display: block; }

.game-root .slot .face { position: relative; width: 38px; height: 38px; }

.game-root .slot .face .avt { width: 38px; height: 38px; }

.game-root .slot .face .cico { width: 34px; height: 34px; }

.game-root .avt-mood { position: absolute; right: -4px; bottom: -4px; line-height: 1; }

.game-root .rev .rface { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; }

.game-root .rev .rface .avt { width: 38px; height: 38px; }

.game-root .rev .rface .cico { width: 36px; height: 36px; }

.game-root .rowi .icon .avt { width: 40px; height: 40px; }

.game-root .slot.online .face .avt { border-color: #2b78c5; }

/* ---------- hộp thoại ---------- */
.game-root .modal {
  position: absolute; inset: 0; z-index: 40; background: rgba(58,35,23,.45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}

.game-root .modal[hidden] { display: none; }

.game-root .mbox {
  background: var(--panel); border-radius: 18px; padding: 16px 18px; width: 100%; max-width: 420px;
  max-height: 86vh; overflow-y: auto; text-align: center; box-shadow: 0 10px 30px rgba(58,35,23,.3);
}

.game-root .mbox h2 { margin: 6px 0; font-size: 1.2rem; }

.game-root .mbox p { font-size: .86rem; line-height: 1.45; color: var(--soft); }

.game-root .mbox .lvs { text-align: left; }

/* ---------- màn hình chào ---------- */
.game-root .splash {
  position: absolute; inset: 0; z-index: 50; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 22px;
}

.game-root .splash[hidden] { display: none; }

.game-root .sp-box { text-align: center; max-width: 380px; }

.game-root .sp-emo { font-size: 4rem; }

.game-root .sp-box h1 { margin: 6px 0; font-size: 1.7rem; }

.game-root .sp-box p { color: var(--soft); font-size: .9rem; line-height: 1.5; margin-bottom: 20px; }

.game-root .lnk { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--soft); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: .82rem; }

/* ---------- đánh giá của khách ---------- */
.game-root .rev { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--line); }

.game-root .rev:last-child { border-bottom: 0; }

.game-root .rev .rface { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--pink-ink); }

.game-root .rev .rtop { display: flex; align-items: center; gap: 2px; font-size: .8rem; }

.game-root .rev .rday { margin-left: auto; color: var(--soft); font-size: .7rem; }

.game-root .rev p { margin: 2px 0 0; font-size: .84rem; line-height: 1.35; color: var(--ink); }

.game-root .rev .rname { font-size: .72rem; color: var(--soft); margin-top: 1px; }

.game-root .lvl .lvi { display: inline-flex; gap: 1px; }

/* ---------- toast ---------- */
.game-root .toasts {
  position: absolute; left: 0; right: 0; bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none;
}

.game-root .toast {
  background: rgba(58,35,23,.9); color: #fff; border-radius: 12px; padding: 7px 14px;
  font-size: .8rem; font-weight: 700; max-width: 88vw; text-align: center;
}

/* tiêu đề splash (giữ nguyên dáng cũ của h1) */
.game-root .sp-title { font-size: 1.6rem; font-weight: 700; margin: 6px 0 10px; }
