/* shell.css — nền UI (B5a + V4 khoá ux): lớp + zone của ui/layout.js, vùng chạm .tap, bảng Cài đặt, hộp thoại (msgbox), lời nhắc
   nhanh, lớp phủ xoay ngang. CHỈ dùng token (tokens.css); nút/✕/tab/công tắc dùng chung ở kit.css (V4_ux_spec §4).
   Mọi kích thước rem (html font-size = 16px × --ui-scale); chữ = token --fs-* (có sàn px). Không backdrop-filter; bóng chỉ desktop;
   hover chỉ trong @media (hover:hover). */

/* ── Lớp (Layout._build) — thứ tự z: §2.5 đặc tả V4 ─────────────────────────────────────────────────────────── */
#hud > .l-layer { position: absolute; inset: 0; pointer-events: none; }
#hud > .l-frames { z-index: var(--z-hud); }
#hud > .l-tracker { z-index: var(--z-tracker); }
#hud > .l-controls { z-index: var(--z-controls); }
#hud > .l-hint { z-index: var(--z-hint); }                 /* gợi ý TeachingAim/“Đang tự đi” — DƯỚI bảng (UX-04) */
#hud > .l-sheet { z-index: var(--z-sheet); }
#hud > .l-modal { z-index: var(--z-modal); }
#hud > .l-toast { z-index: var(--z-feed); }
#hud > .l-system { z-index: var(--z-system); }             /* lớp phủ xoay, mất kết nối — trên mọi thứ (kể cả banner tên vùng) */
#hud > .sh-safe-probe {
  position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#hud [hidden] { display: none !important; }
#hud { -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
#hud button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Zone: hộp đã neo (toạ độ px do Layout đặt mỗi resize). Zone trong suốt với chạm; con trực tiếp nhận chạm. */
.zone { position: absolute; box-sizing: border-box; pointer-events: none; min-width: 0; }
.zone > * { pointer-events: auto; }
.z-joystick > * { pointer-events: none; }           /* đế/núm joystick (B2) không bao giờ chặn chạm canvas */
.z-toast { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }

/* Bảng trái cảm ứng 2 tab Nhiệm vụ | Tổ đội (§3.4 bổ sung). Desktop: display:contents ⇒ zone con tự định vị. Mặt --sf-hud (.86):
   mọi màu chữ ≥ 4,5:1 cả trên trời sáng (UX-06). */
.lpanel:not(.on), .lpanel:not(.on) > .lp-body { display: contents; }
.lpanel:not(.on) > .lp-head { display: none; }
.lpanel.on {
  position: absolute; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--sf-hud); border: 1px solid var(--ln-1); border-radius: var(--r-m);
  font-family: var(--font); color: var(--tx-1);
}
.lpanel.on > .lp-head { position: relative; z-index: 1; flex: none; display: flex; height: 1.93rem; border-bottom: 1px solid var(--ln-1); }
.lpanel.on.collapsed { height: auto !important; }
.lpanel.on.collapsed > .lp-head { border-bottom: 0; }
.lpanel.on.collapsed > .lp-body { display: none; }
.lpanel.on > .lp-body { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 var(--r-m) var(--r-m); }
.lpanel.on > .lp-body > .zone { position: static; width: auto; height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  scrollbar-width: none; }
.lpanel.on > .lp-body > .zone::-webkit-scrollbar { display: none; }
/* [V4 ux vòng 2 R2-12] cảm ứng: vùng chạm 44 px (::after) của tab "Nhiệm vụ/Tổ đội" lấn ~8 px xuống dòng ĐẦU danh sách ⇒ chạm mép trên
   dòng đầu (chọn đồng đội / mở NV) thành chạm tab đang chọn = GẬP bảng. Chừa đúng phần lấn: 22 px − nửa cao đầu bảng (1,93rem). */
html:not([data-ui="desktop"]) .lpanel.on > .lp-body > .zone { padding-top: max(0px, calc(22.5px - .965rem)); }
/* dấu hiệu còn nội dung bên dưới (UX-13) — lớp .lp-more do layout.js đặt khi cuộn được */
.lpanel.on > .lp-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1rem; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, var(--sf-hud)); transition: opacity var(--dur-fast) var(--ease); }
.lpanel.on.lp-more > .lp-body::after { opacity: 1; }
.lpanel.on > .lp-body > .zone.lp-off { display: none; }
.lp-tab, .lp-fold {
  appearance: none; border: 0; background: none; color: var(--tx-2); cursor: pointer; padding: 0 var(--sp-1);
  font: 600 var(--fs-xs)/1.25 var(--font); display: flex; align-items: center; justify-content: center; gap: var(--sp-1);
}
.lp-tab { flex: 1; min-width: 0; }
.lp-tab.on { color: var(--ac); box-shadow: inset 0 -2px 0 var(--ac); }
.lp-fold { flex: none; width: 1.93rem; font-size: var(--fs-sm); border-left: 1px solid var(--ln-1); }
.lp-badge {
  min-width: 1.1rem; padding: .0625rem .3rem; border-radius: var(--r-pill); background: var(--ac-2); color: var(--sf-sunken);
  font: 700 var(--fs-2xs)/1.2 var(--font); text-align: center;
}
@media (hover: hover) { .lp-tab:hover, .lp-fold:hover { color: var(--tx-1); } }

/* Cột "feed" trên-giữa ở cảm ứng: toast → lỗi → thông báo xếp dọc, không bao giờ chồng nhau (tối đa 3 mục — notice.js). */
.feed:not(.on) { display: contents; }
.feed.on { position: absolute; display: flex; flex-direction: column; gap: var(--sp-1); overflow: hidden; pointer-events: none;
  max-height: max(0px, calc(var(--feed-h, 100%) - var(--hint-h, 0px))); }       /* co đúng phần gợi ý (đáy cột) đang chiếm */
.feed.on > .zone { position: static; width: auto; height: auto; flex: none; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.feed.on > .zone:empty { display: none; }
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog) .feed.on { left: var(--aside-x) !important; width: var(--aside-w) !important; }   /* --hint-h: nhãn trạng thái theo sang (R2-2) */
/* dòng lỗi/thông báo chỉ để đọc: không chặn chạm/click của bảng bên dưới (chủ zone muốn nút thì tự ghi đè) */
.z-error > *, .z-notice > * { pointer-events: none; }

/* [V4 ux] Gợi ý (zone 'hint', lớp z 25): cảm ứng = ĐÁY cột feed, hộp cao theo nội dung (Layout đặt top=đáy cột + translateY(-100%),
   ResizeObserver ghi --hint-h cho cột feed co lại); có bảng/cửa sổ mở ⇒ tạm ẩn (guide_hint.js giữ phần giờ còn lại) */
html:not([data-ui="desktop"]) .z-hint { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: var(--sp-1); }
html:not([data-ui="desktop"]) .z-hint > .q-hint { order: -1; }       /* gợi ý trên, nhãn trạng thái (tự đi…) dính đáy cột */
/* [V4 ux vòng 2 R2-2] zone 'hint' chứa CẢ gợi ý TeachingAim (.q-hint) LẪN nhãn trạng thái của plugin (feat/pathfind "Tự đi tới … ✕" —
   plugin tự ẩn nhãn dưới cửa sổ desktop, GIỮ nhãn ở cảm ứng): có bảng/cửa sổ (desktop) hoặc cột thông báo đầy (cảm ứng, hint-yield) ⇒ CHỈ
   gợi ý tạm ẩn; cảm ứng có sheet/hội thoại bên phải ⇒ cột gợi ý theo cột thông báo sang khoảng trống cạnh bảng, gợi ý rời khỏi luồng
   (display:none — cột thông báo chỉ chừa chỗ cho nhãn), nhãn tự đi + ✕ vẫn thấy (như production: nhãn nằm trong cột thông báo). */
html[data-ui="desktop"]:is(.has-sheet, .has-dialog, .has-window, .it-sheet-open) #hud > .l-hint .q-hint,
html[data-ui="desktop"]:has(.it-win:not(.hidden), .hud-middle:not(.hidden), .wm:not(.hidden), .hud-revive:not(.hidden)) #hud > .l-hint .q-hint,
html:not([data-ui="desktop"]).hint-yield #hud > .l-hint .q-hint { visibility: hidden; }
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog) #hud .z-hint { left: var(--aside-x) !important; width: var(--aside-w) !important; }
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog) #hud > .l-hint .q-hint { display: none; }
html:not([data-ui="desktop"]):is(.has-window, .it-sheet-open) #hud > .l-hint,
html.rotate-lock #hud > .l-hint,
html:not([data-ui="desktop"]):has(.it-win:not(.hidden), .hud-middle:not(.hidden), .wm:not(.hidden), .hud-revive:not(.hidden)) #hud > .l-hint { visibility: hidden; }

/* Cảm ứng: bảng (sheet/dialog) mở ⇒ ẩn cụm điều khiển (§2.2 mục 5, §3.4). Lớp phủ xoay ⇒ ẩn HUD bên dưới. */
html:not([data-ui="desktop"]).has-sheet #hud > .l-controls,
html:not([data-ui="desktop"]).has-dialog #hud > .l-controls,
html:not([data-ui="desktop"]).has-window #hud > .l-controls,
html:not([data-ui="desktop"]):is(.has-modal, .has-revive, .has-drawer) #hud > .l-controls { visibility: hidden; }   /* [V4 ux] hộp/hồi sinh/ngăn kéo chặn cảnh rồi */
/* [V4 ux] thanh kinh nghiệm 3 px đáy màn: bảng/ngăn kéo cảm ứng phủ tới đáy ⇒ ẩn (không lòi 1 vạch dưới mép bảng) */
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog, .has-drawer, .has-fullsheet) #hud [data-zone="exp"] { visibility: hidden; }
html.rotate-lock #hud > :is(.l-frames, .l-tracker, .l-controls, .l-hint, .l-sheet, .l-modal, .l-toast) { visibility: hidden; }
/* [V4 ux] cảm ứng: bảng phủ kín màn (.k-full — Cài đặt, Nhật ký) ⇒ HUD bên dưới ẩn hẳn: không chạm nhầm nút bị che,
   trình đọc màn hình không đọc HUD khuất, GPU điện thoại khỏi vẽ lớp bị che. */
html:not([data-ui="desktop"]):is(.has-fullsheet, .shop-open) #hud > :is(.l-frames, .l-tracker, .l-controls, .l-hint) { visibility: hidden; }   /* + Cửa hàng cảm ứng = sheet toàn màn (R2-9) */

/* Vùng chạm tối thiểu 44 px ở cảm ứng cho nút nhìn nhỏ hơn (U7 §7): ::after phủ 44×44 quanh tâm.
   Nút ≥ 44 thì ::after = đúng hộp nút (không lấn nút bên). Bo góc theo nút (nút tròn ⇒ vùng chạm tròn ∅44).
   Không đặt overflow:hidden trên .tap (cắt mất vùng chạm). Zero-specificity để position:absolute của chủ thắng. */
:where(.tap) { position: relative; }
html:not([data-ui="desktop"]) .tap::after { content: ""; position: absolute; inset: min(0px, calc(50% - 22px)); border-radius: inherit; }

/* ── Bảng chung (Cài đặt): cửa sổ desktop trong VÙNG TRỐNG; cảm ứng = full sheet, tab dọc trái 160 px (§5.3) ─────────── */
.sh-panel, .mb-card, .rot-wrap, .sh-prompt {
  font-family: var(--font); color: var(--tx-1); font-size: var(--fs-md); line-height: var(--lh-body);
  -webkit-user-select: none; user-select: none;
}
.sh-panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; contain: layout paint style;
  background: var(--sf-panel); border: 1px solid var(--ln-1); border-radius: var(--r-m);      /* đặc: hết bảng tên 3D xuyên chữ (UX-24) */
  animation: sh-pop var(--dur) var(--ease);
}
html[data-ui="desktop"] .sh-panel { box-shadow: var(--elev-2); }
html:not([data-ui="desktop"]) .sh-panel {
  position: fixed; inset: 0; border: 0; border-radius: 0; animation-name: sh-slide;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  display: grid; grid-template-columns: 160px 1fr; grid-template-rows: auto 1fr auto;
}
@keyframes sh-pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sh-slide { from { opacity: 0; transform: translateX(1rem); } to { opacity: 1; transform: none; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html:not(.motion-ok) :is(.sh-panel, .mb-wrap) { animation: none; } }

.sh-head { flex: none; display: flex; align-items: center; gap: var(--sp-2); min-height: max(36px, 2.5rem); padding: var(--sp-1) var(--sp-2) var(--sp-1) var(--sp-4);
  border-bottom: 1px solid var(--ln-2); }
.sh-title { flex: 1; margin: 0; font: 600 var(--fs-xl)/1.25 var(--font-title); color: var(--ac); letter-spacing: .02em; }
.sh-tabs { flex: none; display: flex; gap: var(--sp-1); padding: 0 var(--sp-3); border-bottom: 1px solid var(--ln-1); overflow-x: auto; scrollbar-width: none; }
.sh-tabs > .sh-tab { flex: 1 0 auto; }
.sh-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: var(--sp-1) var(--sp-4) var(--sp-4);
}
html:not([data-ui="desktop"]) .sh-panel > .sh-head { grid-column: 1 / -1; min-height: 56px; }
html:not([data-ui="desktop"]) .sh-panel > .sh-tabs { grid-column: 1; grid-row: 2; flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2) 0;
  border-bottom: 0; border-right: 1px solid var(--ln-1); overflow-y: auto; }
html:not([data-ui="desktop"]) .sh-panel > .sh-tabs > .sh-tab { flex: none; justify-content: flex-start; min-height: 48px; padding: 0 var(--sp-4);
  box-shadow: inset 3px 0 0 transparent; text-align: left; white-space: normal; }
html:not([data-ui="desktop"]) .sh-panel > .sh-tabs > .sh-tab.on { box-shadow: inset 3px 0 0 var(--ac); background: var(--sf-selected); }
html:not([data-ui="desktop"]) .sh-panel > .sh-body { grid-column: 2; grid-row: 2; padding-right: max(var(--sp-4), env(safe-area-inset-right, 0px)); }
html:not([data-ui="desktop"]) .sh-panel > .sh-foot { grid-column: 1 / -1; }
.sh-page { display: flex; flex-direction: column; }
.sh-sec { margin-top: var(--sp-3); }
.sh-sec-title {
  margin-bottom: var(--sp-2); color: var(--ac-2); font: 700 var(--fs-xs)/1.25 var(--font);
  letter-spacing: .04em; text-transform: uppercase;
}
.sh-row { display: grid; align-items: center; gap: var(--sp-1) var(--sp-3); min-height: 2.25rem; margin-bottom: var(--sp-2); }
.sh-row.off { opacity: .5; }
.sh-row-range { grid-template-columns: minmax(6rem, 36%) 1fr 3.6rem; }
.sh-row-switch { grid-template-columns: 1fr auto; }
.sh-row-seg { grid-template-columns: 1fr; }
.sh-row-btn { grid-template-columns: 1fr auto; }
.sh-label { color: var(--tx-1); font-size: var(--fs-md); }
.sh-hint { color: var(--tx-2); font-size: var(--fs-sm); line-height: 1.4; font-weight: 400; }
.sh-label .sh-hint { margin-top: .125rem; }
.sh-row-range > .sh-hint { grid-column: 1 / -1; }
.sh-val { text-align: right; color: var(--ac); font: 600 var(--fs-md)/1.25 var(--font); font-variant-numeric: tabular-nums; }
.sh-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--ln-2);
}
.sh-note { color: var(--tx-2); font-size: var(--fs-sm); text-align: right; }

/* nhóm nút chọn 1 (segmented) */
.sh-seg { display: flex; border: 1px solid var(--ln-field); border-radius: var(--r-s); background: var(--sf-sunken); overflow: hidden; }
.sh-seg-btn {
  appearance: none; flex: 1; min-width: 0; min-height: var(--k-h-md); padding: 0 var(--sp-1); border: 0; cursor: pointer;
  border-left: 1px solid var(--ln-1); background: none; color: var(--tx-2);
  font: 600 var(--fs-md)/1.2 var(--font);
}
.sh-seg-btn:first-child { border-left: 0; }
.sh-seg-btn.on { color: var(--tx-on-ac); background: linear-gradient(180deg, var(--ac-hi), var(--ac-lo)); }
.sh-seg-btn:active { transform: scale(.97); }
@media (hover: hover) { .sh-seg-btn:not(.on):hover { color: var(--tx-1); background: var(--sf-hover); } }
:is(.sh-seg-btn, .sh-switch, .sh-range, .sh-iconbtn):focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(0, 0, 0, .55); }

/* thanh trượt */
.sh-range { -webkit-appearance: none; appearance: none; width: 100%; height: 2rem; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.sh-range::-webkit-slider-runnable-track { height: .375rem; border-radius: var(--r-pill); background: var(--sf-sunken); border: 1px solid var(--ln-field); }
.sh-range::-moz-range-track { height: .375rem; border-radius: var(--r-pill); background: var(--sf-sunken); border: 1px solid var(--ln-field); }
.sh-range::-moz-range-progress { height: .375rem; border-radius: var(--r-pill); background: var(--ac-lo); }
.sh-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 1.125rem; height: 1.125rem; margin-top: calc(-.375rem - 1px); border-radius: 50%;
  background: var(--ac); border: 2px solid var(--ink-0); box-shadow: 0 0 0 1px var(--ac-lo);
}
.sh-range::-moz-range-thumb { width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--ac); border: 2px solid var(--ink-0); }
.sh-range:disabled { cursor: default; }

/* công tắc (role=switch): nút trong suốt cao đủ chạm, rãnh vẽ bằng ::before */
.sh-switch { appearance: none; position: relative; width: 3rem; height: 2rem; padding: 0; border: 0; background: none; cursor: pointer; }
.sh-switch::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5rem; transform: translateY(-50%);
  border-radius: var(--r-pill); background: var(--sf-sunken); border: 1px solid var(--ln-field);
  transition: background var(--dur-fast) var(--ease);
}
.sh-knob {
  position: absolute; left: .25rem; top: 50%; width: 1.125rem; height: 1.125rem; margin-top: -.5625rem; border-radius: 50%;
  background: var(--tx-3); transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.sh-switch.on::before { background: var(--ac-2); border-color: var(--ac-2); }
.sh-switch.on .sh-knob { transform: translateX(1.375rem); background: var(--tx-1); }

/* Cảm ứng: mọi đích chạm trong bảng/hộp ≥ 44 px THẬT (bảng có overflow nên không dựa vào ::after) */
html:not([data-ui="desktop"]) :is(.sh-panel, .mb-card, .rot-wrap, .sh-prompt) :is(.sh-btn, .sh-x, .sh-tab, .sh-seg-btn, .sh-switch) { min-height: 44px; }
html:not([data-ui="desktop"]) :is(.sh-panel, .mb-card, .rot-wrap, .sh-prompt) :is(.sh-x, .sh-switch) { min-width: 44px; }
html:not([data-ui="desktop"]) .sh-range { height: 44px; }
html:not([data-ui="desktop"]) .sh-range::-webkit-slider-thumb { width: 1.5rem; height: 1.5rem; margin-top: calc(-.5625rem - 1px); }
html:not([data-ui="desktop"]) .sh-row { min-height: 44px; }

/* ── Hộp thoại (msgbox §4.9 — dùng kit: k-modal-wrap / k-panel k-modal; lớp mb-* giữ cho test) ───────────────────── */
.mb-wrap { touch-action: none; }
.mb-card { display: flex; flex-direction: column; gap: 0; }
.mb-title { margin: 0; }
.mb-body { min-height: 0; overflow-y: auto; touch-action: pan-y; color: var(--tx-1); -webkit-user-select: text; user-select: text; }
.mb-text { margin: 0 0 .5em; white-space: pre-line; overflow-wrap: anywhere; }
.mb-text:last-child { margin-bottom: 0; }
.mb-actions { flex-wrap: wrap; }
.mb-btn { min-width: 6rem; }
html:not([data-ui="desktop"]) .mb-btn { min-height: 52px; }

/* ── Lời nhắc nhanh trong zone toast (máy lai: "Chuyển giao diện cảm ứng?", chia sẻ nhiệm vụ) ───────────────────── */
.sh-prompt {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: var(--sp-2);
  max-width: 100%; padding: var(--sp-2) var(--sp-3); background: var(--sf-hud);
  border: 1px solid var(--ac-lo); border-radius: var(--r-m); animation: sh-fade var(--dur) var(--ease);
}
html[data-ui="desktop"] .sh-prompt { box-shadow: var(--elev-1); }

/* ── Lớp phủ "Xoay ngang để chơi" (D9) — lớp system z 70 ───────────────────────────────────────────────────────── */
.rot-wrap {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); text-align: center; pointer-events: auto; touch-action: none;
  padding: calc(var(--st) + 1rem) calc(var(--sr) + 1rem) calc(var(--sb) + 1rem) calc(var(--sl) + 1rem);
  background: radial-gradient(ellipse at 50% 40%, rgba(20, 24, 30, .96), rgba(12, 15, 19, .99));
}
.rot-icon { width: 6rem; height: 6rem; display: grid; place-items: center; }
.rot-phone {
  position: relative; width: 2.6rem; height: 4.4rem; border: 3px solid var(--ac); border-radius: .6rem;
  animation: rot-turn 2.4s var(--ease) 3;
}
.rot-phone::after {
  content: ""; position: absolute; left: 50%; bottom: .3rem; width: .45rem; height: .45rem; margin-left: -.225rem;
  border-radius: 50%; background: var(--ac); opacity: .7;
}
@keyframes rot-turn { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .rot-phone { animation: none; transform: rotate(-90deg); } }
.rot-title { font: 600 var(--fs-xl)/1.3 var(--font-title); color: var(--ac); }
.rot-sub { max-width: 22rem; font-size: var(--fs-md); color: var(--tx-1); }
.rot-hint { max-width: 22rem; font-size: var(--fs-sm); color: var(--tx-2); }
.rot-wrap .sh-btn { min-height: 48px; }

/* ── Gỡ lỗi bố cục: <html data-zone-debug> (trang test) ──────────────────────────────────────────────────────── */
html[data-zone-debug] .zone:not([hidden]) { outline: 1px dashed var(--ac-2); }
html[data-zone-debug] .lpanel.on, html[data-zone-debug] .feed.on { outline: 1px solid var(--ac-lo); }

/* [W2fix] cảm ứng: sheet phải (hội thoại/nhật ký/cài đặt/menu/võ học) — minimap + [☰][Võ học] nằm dưới sheet bị ẩn; sheet đặc. */
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog) #hud [data-zone="minimap"],
html:not([data-ui="desktop"]):is(.has-sheet, .has-dialog) #hud [data-zone="menu"] { visibility: hidden; }
html:not([data-ui="desktop"]) :is(.q-dlg.touch, .q-log.touch, .hud-drawer-panel) { background: var(--sf-panel); }
