/* ================= Quán Việt — MonBlock =================
   Tông sáng, chất Việt truyền thống: mái ngói đỏ, đèn lồng, gỗ, tường gạch bếp, ruộng xanh, hàng rào tre.
   Lớp dùng chung (me-card, big, small, tabs, item, modal…) do /sdk/game-light.css phủ lớp áo sáng của MonBlock. */
:root {
  --bg: #f2f4f5; --panel: #fff; --panel-2: #f2f4f5; --line: #e3e5e8; --txt: #191b1d; --muted: #606368; --accent: #c8102e;
  --red: #c8102e; --gold: #f2b705; --wood: #a8642b; --wood-lo: #7a4419; --cream: #fff8e7; --jade: #2e8b57; --soil: #8a5a35;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--txt); font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 14px 28px; }
.screen { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h2 { font-size: 17px; margin: 18px 0 10px; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- trang chủ ---------- */
.xpbar { display: block; height: 6px; border-radius: 9px; background: #e3e5e8; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--jade); border-radius: 9px; transition: width .3s; }
.big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0 0 10px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; font-size: 17px; font-weight: 800; text-align: left; }
.big small { color: var(--muted); font-size: 13px; font-weight: 600; }
.small { padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 700; }
.small:disabled { opacity: .45; cursor: default; }


/* Màn chơi toàn màn hình (dọc lẫn ngang): canvas phủ kín, các thanh nổi đè lên cảnh, chừa vùng tai thỏ / thanh home. */
.world { position: fixed; inset: 0; z-index: 60; overflow: hidden; background: #efe6d2; touch-action: none; user-select: none; -webkit-user-select: none; }
.world canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.world canvas.drag { cursor: grabbing; }
.ov { position: absolute; z-index: 2; }
.ov-top { left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); top: calc(8px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 6px; }
.ov-btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; background: rgba(255, 255, 255, .94);
  font-size: 20px; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
#btnBack { font-size: 26px; line-height: 1; }
.hud-coin { padding: 8px 12px; border-radius: 999px; background: #fff6db; border: 1px solid #f6dc8f; font-weight: 800; color: #8a5a00; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.hud-lv { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 50px; max-width: 220px; white-space: nowrap; overflow: hidden; padding: 5px 10px; border-radius: 12px; background: rgba(255, 255, 255, .9); font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ov-tip { left: 50%; transform: translateX(-50%); top: calc(58px + env(safe-area-inset-top)); width: max-content; max-width: calc(100% - 24px); margin: 0; padding: 9px 14px; border-radius: 999px;
  background: rgba(25, 27, 29, .82); color: #fff; font-size: 14px; font-weight: 700; text-align: center; pointer-events: none; }
.ov-tip:empty { display: none; }
.ov-tip.tap { pointer-events: auto; cursor: pointer; background: rgba(20, 90, 60, .9); }

.counter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 8px; border-radius: 12px; background: #fff; border: 1px solid #e8cf9f;
  min-height: 40px; font-size: 13px; font-weight: 700; color: #6a4a28; }
.counter b { margin-right: 2px; }
.counter em { font-style: normal; color: var(--muted); font-weight: 600; }
.counter span { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; background: #fff6db; border: 1px solid #f2d27a; font-size: 18px; }
.counter span small { font-size: 12px; font-weight: 800; color: #7a5200; }

/* ---------- hộp chọn (nấu / gieo / chợ / kho) ---------- */
.picks { display: flex; flex-direction: column; gap: 8px; max-height: 60dvh; overflow: auto; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.pick > i { font-size: 32px; font-style: normal; line-height: 1; }
.pick .pk-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick .pk-body b { font-size: 15px; }
.pick .pk-body small { color: var(--muted); font-size: 12px; font-weight: 600; }
.pick .need { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; font-weight: 700; }
.pick .need span { padding: 0 6px; border-radius: 999px; background: #eef7f1; color: #1d6a40; }
.pick .need span.lack { background: #fdecee; color: #c41d3a; }
.pick .go { padding: 8px 12px; border: 0; border-radius: 10px; background: var(--jade); color: #fff; font-weight: 800; white-space: nowrap; }
.pick .go.buy { background: #ff7a1a; }
.pick .go:disabled { background: #c9ccd1; }
.pick.want { border-color: #ffb020; background: #fffaeb; }
.pick.lock { opacity: .55; }
.stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stock span { display: flex; flex-direction: column; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 26px; }
.stock span small { font-size: 12px; font-weight: 700; color: var(--muted); }
.stock span b { font-size: 14px; }

/* ---------- cửa hàng ---------- */
.shop-top { display: flex; justify-content: flex-end; gap: 16px; margin: 4px 0; font-size: 17px; font-weight: 800; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; text-align: center; }
.item .ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(#fff3d6, #ffe0a3); font-size: 38px; line-height: 1; }
.item.locked { opacity: .55; }
.item b { font-size: 14px; }
.item .rar { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.item .eff { font-size: 12px; font-weight: 700; color: #1d6a40; }
.item .act { font-size: 13px; font-weight: 800; color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.tabs { display: flex; gap: 6px; margin: 6px 0 10px; overflow-x: auto; }
.tabs button { flex: 1; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; }

/* ---------- thực đơn ---------- */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.recipe { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.recipe > i { font-size: 36px; font-style: normal; line-height: 1; }
.recipe div { display: flex; flex-direction: column; gap: 3px; }
.recipe b { font-size: 15px; }
.recipe small { color: var(--muted); font-size: 12px; font-weight: 600; }
.recipe.lock { opacity: .5; }

/* ---------- xếp hạng ---------- */
.rank .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rank .no { width: 28px; color: var(--muted); font-weight: 800; text-align: center; }
.rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rank .nm small { color: var(--muted); font-weight: 600; }
.rank .sc { font-weight: 900; color: #b87400; }
.help { line-height: 1.6; }
.help ul { padding-left: 20px; }

/* ---------- hộp thoại ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.dialog { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 18px; border-radius: 16px; background: #fff; }
.dialog h3 { margin: 0 0 8px; font-size: 20px; }
.dialog p { line-height: 1.5; }
.dialog .score { margin: 4px 0; font-size: 40px; font-weight: 900; text-align: center; color: #b87400; }
.dialog .rw { padding-left: 18px; line-height: 1.8; font-weight: 700; }
.dlg-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; position: sticky; bottom: -18px; margin-bottom: -18px; padding: 10px 0 18px; background: #fff; }
.dlg-btns button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; }
.dlg-btns button.pri { border-color: var(--pri, #335fff); background: var(--pri, #335fff); color: #fff; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: #191b1d; color: #fff;
  font-weight: 700; max-width: 92vw; text-align: center; }
.updatebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; background: #fff; }
.updatebar button { padding: 8px 12px; border: 0; border-radius: 10px; background: #335fff; color: #fff; font-weight: 800; }

/* ---------- sự kiện (sdk/events.js): thẻ món giới hạn ---------- */
.evtag { display: inline-block; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: linear-gradient(90deg, #ff9a3c, #ff4fa0); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; }
.item.ev { border-color: #ff9a3c; }

/* ---------- nhập vai: thanh trên phụ, món đang bê, phóng to, joystick, nút hành động, thanh dưới ---------- */
.hud-pill { padding: 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
/* 📜 Nhiệm vụ: a small glossy icon on the left edge (badge = rewards waiting) */
.ov-quest { left: calc(10px + env(safe-area-inset-left)); top: calc(150px + env(safe-area-inset-top)); display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 14px; background: rgba(255, 255, 255, .95); box-shadow: 0 3px 8px rgba(20, 30, 60, .22); }
.ov-quest .qi { width: 34px; height: 34px; }
.ov-quest:active { transform: scale(.92); }
.ov-quest.ready { box-shadow: 0 0 0 2px #f2b705, 0 3px 10px rgba(242, 183, 5, .5); }
.q-badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; background: #e8414f; color: #fff;
  font: 800 11px/15px "Segoe UI", Roboto, sans-serif; font-style: normal; text-align: center; }
.qv-design .ov-quest, .qv-move .ov-quest { display: none; }
.quests h4 { margin: 10px 0 6px; font-size: 14px; }
.quests h4 small { color: var(--muted); font-weight: 700; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qrow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e3e5e8; border-radius: 12px; background: #fff; }
.qrow.ready { border-color: #f2b705; background: #fffaf0; }
.qrow.got { opacity: .6; }
.q-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2f4f5; font-size: 20px; }
.q-ic img { width: 30px; height: 30px; object-fit: contain; -webkit-user-drag: none; user-select: none; }
/* Hand-drawn pictures in cards + dialogs (artImg / critterPic / slotPic in main.js) */
.dialog .rw li.lv-new .lv-pic { flex: none; width: 48px; height: 48px; object-fit: contain; }
.ic.plus { font-size: 30px; font-weight: 800; color: #335fff; }
.q-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.q-body b { font-size: 14px; }
.q-body small { color: var(--muted); font-size: 12px; font-weight: 600; }
.q-bar { display: block; height: 7px; border-radius: 4px; background: #e9ecef; overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #00a862, #5fd08e); }
.qrow.ready .q-bar i { background: linear-gradient(90deg, #f2b705, #ffd23f); }
.q-claim { flex: none; padding: 8px 10px; border: 0; border-radius: 10px; background: #00a862; color: #fff; font-weight: 800; font-size: 13px; white-space: nowrap; }
.q-claim.off { background: #e9ecef; color: #9aa0a6; }
.q-hard { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #ffe2d6; color: #c2410c; font-style: normal; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.q-gem { color: #2563eb; font-weight: 800; }
.q-done { flex: none; color: #1d6a40; font-style: normal; font-weight: 800; font-size: 13px; }
.q-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.ov-zoom { right: calc(10px + env(safe-area-inset-right)); top: calc(150px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; }
.ov-zoom button { width: 40px; height: 40px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; background: rgba(255, 255, 255, .9); font-size: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.joy { position: absolute; left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); width: 45%; height: 40%; z-index: 1; touch-action: none; }
.joy-base { position: fixed; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: rgba(255, 255, 255, .35); border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2); pointer-events: none; }
.joy-base i { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transform: translate(-50%, -50%); }
body:not(.touch) .joy { display: none; }
.joy-base.ghost { opacity: .55; animation: joyhint 1.6s ease-in-out infinite; }
@keyframes joyhint { 50% { opacity: .25; } }
.act-btn { position: absolute; z-index: 2; right: calc(14px + env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); width: 96px; height: 96px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; }
.act-btn b { font-size: 34px; line-height: 1; }
.act-btn small { font-size: 10.5px; font-weight: 800; line-height: 1.15; text-align: center; color: #5a3a1a; max-width: 84px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.act-btn:disabled { background: #f4efe6; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.act-btn:disabled b { opacity: .45; }
/* The dish in hand: a badge on the ✋ button */
.nw { white-space: nowrap; }
@media (max-width: 480px) { .hud-pill .meal { display: none; } }
@media (max-width: 380px) { .ov-top { gap: 4px; } .hud-coin { padding: 8px 9px; } .hud-pill { padding: 7px 7px; } }
.act-carry { position: absolute; left: -6px; top: -6px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff6db;
  border: 2px solid #f2d27a; font-size: 22px; font-style: normal; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.act-btn.go { background: #00a862; box-shadow: 0 0 0 4px rgba(0, 168, 98, .3), 0 4px 14px rgba(0, 0, 0, .25); animation: actpulse 1.1s ease-in-out infinite; }
.act-btn.go small { color: #fff; }
@keyframes actpulse { 50% { transform: scale(1.06); } }
/* Toolbar: icon-only (aria-label / title name them), floating over the scene; icons + chips at the end of this file */
.ov-bottom { left: 50%; transform: translateX(-50%); bottom: calc(6px + env(safe-area-inset-bottom)); display: flex; gap: 6px; padding: 0; background: none; }
/* While playing, messages sit under the tip on one line — never over the ✋ button */
.toast.toast-play { z-index: 70; top: calc(104px + env(safe-area-inset-top)); bottom: auto; max-width: calc(100vw - 120px); padding: 8px 12px; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .ov-tip { top: auto; bottom: calc(66px + env(safe-area-inset-bottom)); }
  .toast.toast-play { top: calc(56px + env(safe-area-inset-top)); }
  .ov-zoom { top: calc(58px + env(safe-area-inset-top)); }
  .ov-quest { top: calc(64px + env(safe-area-inset-top)); width: 42px; height: 42px; }
  .ov-quest .qi { width: 30px; height: 30px; }
  /* Quest board fits a phone held sideways without scrolling: a wider dialog, today's quests left, the milestone right, tighter rows */
  .dialog:has(.quests) { width: min(780px, 100%); padding: 10px 14px; }
  .dialog:has(.quests) h3 { margin: 0 0 2px; }
  .dialog:has(.quests) .dlg-btns { margin: 4px 0 -10px; padding: 4px 0 10px; bottom: -10px; }
  .quests { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 12px; align-items: start; }
  .quests h4 { margin: 4px 0; }
  .qlist { gap: 4px; }
  .qrow { padding: 5px 8px; }
  .q-ic { width: 28px; height: 28px; }
  .q-ic img { width: 24px; height: 24px; }
  .q-body small { font-size: 11.5px; }
  .quests > .q-note:last-child { display: none; }
  .picks { max-height: none; overflow: visible; }
  .act-btn { width: 84px; height: 84px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .joy { bottom: 0; height: 60%; }
}

/* ---------- mini-game nấu ăn ---------- */
.cg-dish { display: flex; align-items: center; gap: 10px; font-size: 40px; }
.cg-dish b { font-size: 18px; }
.cg-steps { display: flex; gap: 4px; padding: 0; margin: 8px 0; list-style: none; counter-reset: st; }
.cg-steps li { flex: 1; padding: 5px 4px; border-radius: 8px; background: #f2f4f5; font-size: 11.5px; font-weight: 700; text-align: center; color: #9aa0a8; }
.cg-steps li.on { background: #fff1d6; color: #8a5a00; box-shadow: inset 0 0 0 1px #f2c14e; }
.cg-steps li.done { background: #e6f6ee; color: #1d6a40; }
.cg-ing { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.cg-ing button { width: 58px; height: 58px; border: 1px solid #e8cf9f; border-radius: 14px; background: #fff8e7; font-size: 32px; transition: transform .15s, opacity .2s; }
.cg-ing button:disabled { opacity: .25; transform: translateY(14px) scale(.6); }
.cg-bar { height: 12px; border-radius: 9px; background: #eee; overflow: hidden; margin: 8px 0 12px; }
.cg-bar i { display: block; height: 100%; background: #ff7a1a; transition: width .1s; }
.cg-big { display: block; width: 100%; padding: 14px; border: 0; border-radius: 14px; background: #ff7a1a; color: #fff; font-size: 20px; font-weight: 900; }
.gauge { position: relative; height: 22px; margin: 10px 0 14px; border-radius: 11px; background: linear-gradient(90deg, #ffd0c4, #fff3d6 30%, #fff3d6 70%, #ffd0c4); overflow: hidden; }
.gauge .zone { position: absolute; top: 0; bottom: 0; background: #7ed9a4; }
.gauge .needle { position: absolute; top: -2px; bottom: -2px; width: 4px; margin-left: -2px; background: #191b1d; border-radius: 2px; left: 0; }

/* ---------- quản lý nhân viên ---------- */
.staffs { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.staff { display: flex; align-items: center; gap: 12px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; }
.staff.on { border-color: #7ccf9e; background: #f4fbf6; }
.staff.locked { opacity: .65; }
.staff .ic { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 14px; background: linear-gradient(#fff3d6, #ffe0a3); font-size: 36px; line-height: 1; }
.sf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sf-body b { font-size: 16px; }
.sf-body .st { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: #f2f4f5; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.sf-body .st.on { background: #e6f6ee; color: #1d6a40; }
.sf-body .st.free { background: #fff1d6; color: #8a5a00; }
.sf-body .st.lock { background: #fdecee; color: #a01830; }
.sf-body .rar { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.sf-body small { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.sf-body small.what { color: #1d6a40; font-weight: 700; }
.sf-body small.now { color: #191b1d; font-weight: 800; }
.sf-body small.ladder { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.sf-body small.ladder span { padding: 1px 7px; border-radius: 999px; background: #f2f4f5; border: 1px solid #e3e5e8; white-space: nowrap; }
.sf-body small.ladder span.got { background: #e7f7ee; border-color: #9bd8b4; color: #1d6a40; }
.sf-body small.ladder span.ok { background: #eef2ff; border-color: #b7c6ff; color: #2a47c9; font-weight: 800; }
.sf-body small.ladder span.no { color: #9aa0a6; }
.staff .go { flex: none; padding: 9px 14px; border: 0; border-radius: 12px; background: var(--jade); color: #fff; font-weight: 800; white-space: nowrap; }
.staff .go.see { background: #335fff; }
.staff .go.off { background: #c9ccd1; }

/* ---------- 🛠️ thiết kế: bảng dưới thay cho thanh công cụ (gợi ý · món đang chọn · thẻ Tủ đồ / Cửa hàng / Mở rộng · danh sách cuộn ngang) ---------- */
.ov-design { left: 50%; transform: translateX(-50%); bottom: calc(6px + env(safe-area-inset-bottom)); width: min(640px, calc(100% - 12px)); display: flex; flex-direction: column; gap: 5px;
  padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 2px 14px rgba(0, 0, 0, .22); color: #3a2a1a; }
.ov-design button { font-weight: 800; }
.dz-top { display: flex; align-items: center; gap: 6px; padding-left: 6px; min-height: 34px; font-size: 13px; font-weight: 800; }
.dz-top #designTip { flex: 1; min-width: 0; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dz-top > button { flex: none; padding: 7px 12px; border: 0; border-radius: 11px; background: #00a862; color: #fff; }
.dz-sel { display: flex; gap: 4px; flex: none; }
.dz-sel button { width: 34px; height: 34px; padding: 0; border: 1px solid #e8cf9f; border-radius: 10px; background: #fff6db; font-size: 16px; }
.dz-tabs { display: flex; gap: 4px; }
.dz-tabs button { flex: 1; padding: 6px 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 12.5px; white-space: nowrap; }
.dz-tabs button.on { border-color: #335fff; background: #335fff; color: #fff; }
.dz-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.dz-cats:empty { display: none; }
.dz-cats button { flex: none; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #f2f4f5; font-size: 12px; white-space: nowrap; }
.dz-cats button.on { border-color: #191b1d; background: #191b1d; color: #fff; }
.dz-list { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.dz-card { flex: none; position: relative; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 3px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; text-align: center; }
.dz-card .ic { font-size: 22px; line-height: 1.15; }
/* Card text ≥ 12px (design system --ds-fs-xs, 21/11/2026): names wrap on two lines instead of being cut */
.dz-card b { width: 100%; min-height: 2.4em; font-size: 12px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.dz-card small { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-card em { font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: #00a862; border-radius: 6px; padding: 1px 6px; margin-top: 2px; }
.dz-card.sel { border-color: #ffb000; background: #fff6db; }
.dz-card.on { border-color: #7ccf9e; background: #f4fbf6; }
.dz-card.stored { border-style: dashed; }
.dz-card.locked { opacity: .55; }
.dz-card.r-rare { border-color: #9cc2fb; } .dz-card.r-epic { border-color: #c9a8f7; } .dz-card.r-legend { border-color: #f3c86b; }
.dz-card.dz-grow { width: 128px; }
.dz-card.dz-grow.can { border-color: #00a862; background: #effaf4; }
.dz-card.dz-more { background: #f2f4f5; }
.dz-note { flex: none; align-self: center; max-width: 260px; margin: 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.item.link { border-style: dashed; border-color: #335fff; }
/* Landscape: the design panel is a column docked on the right (the scene stays usable on the left; designCam frames the place there).
   Portrait keeps the bottom sheet above. */
.world { --dzw: min(340px, 42vw); }
@media (orientation: landscape) {
  .ov-design { left: auto; transform: none; right: calc(6px + env(safe-area-inset-right)); top: calc(6px + env(safe-area-inset-top)); bottom: calc(6px + env(safe-area-inset-bottom));
    width: var(--dzw); gap: 4px; padding: 6px; }
  .dz-top { flex-wrap: wrap; min-height: 30px; }
  .dz-top #designTip { flex-basis: 100%; order: 3; font-size: 12px; }
  .dz-top > button { margin-left: auto; }
  .dz-tabs button { padding: 5px 3px; font-size: 12px; }
  .dz-cats { flex-wrap: wrap; overflow: visible; gap: 3px; }
  .dz-cats button { padding: 3px 8px; font-size: 11px; }
  .dz-list { flex: 1; min-height: 0; flex-wrap: wrap; align-content: flex-start; overflow-x: hidden; overflow-y: auto; }
  .dz-card { width: calc((100% - 10px) / 3); padding: 3px; }
  .dz-card .ic { font-size: 20px; }
  .dz-card.dz-grow { width: calc((100% - 5px) / 2); }
  .dz-note { flex: 1 1 100%; max-width: none; }
  .qv-design .ov-top { right: calc(var(--dzw) + 16px + env(safe-area-inset-right)); }
  .qv-design .ov-zoom { right: auto; left: calc(10px + env(safe-area-inset-left)); top: calc(58px + env(safe-area-inset-top)); }
  .qv-design .toast.toast-play { left: calc((100vw - var(--dzw) - 12px) / 2); max-width: calc(100vw - var(--dzw) - 40px); }
}
/* Staff cards: x / cap of the role */
.staff .cap { display: inline-block; align-self: flex-start; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: #eef2ff; color: #1d3fb8; font-size: 12px; font-weight: 800; }
.staff .cap.full { background: #e6f6ee; color: #1d6a40; }
.recipe .lk { font-size: 12px; font-weight: 700; color: #b87400; }
/* 🧑‍🍳 character editor: live preview + option rows (side by side when the screen is wide or landscape) */
.look { display: flex; flex-direction: column; gap: 10px; }
.look-stage { position: relative; height: 230px; border-radius: 16px; background: linear-gradient(#fff6e0, #f6e8cc); border: 1px solid var(--line); overflow: hidden; }
.look-stage canvas { display: block; width: 100%; height: 100%; }
.look-btns { display: flex; gap: 8px; }
.look-btns .small { flex: 1; }
.lk-row { margin: 8px 0; }
.lk-row > b { display: block; margin-bottom: 4px; font-size: 13px; }
.lk-row > b small { font-weight: 600; color: var(--muted); }
.lk-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-opts .chip { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; }
.lk-opts .chip.on { border-color: #335fff; background: #335fff; color: #fff; }
.lk-opts .sw { width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.lk-opts .sw.on { box-shadow: 0 0 0 3px #335fff; }
.look-save { width: 100%; margin: 8px 0 4px; padding: 12px; border: 0; border-radius: 14px; background: #00a862; color: #fff; font-size: 16px; font-weight: 900; }
@media (min-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .look { flex-direction: row; align-items: flex-start; }
  .look-stage { flex: 0 0 38%; height: max(170px, min(320px, calc(100dvh - 200px))); position: sticky; top: 8px; }
  .look-side { flex: 1; min-width: 0; }
}
/* Six tools in the bottom bar: a little tighter so they fit a 360px phone */
/* Dish pictures (QVArt data URLs) wherever a dish shows in the DOM */
.dish-ic { display: inline-block; width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: middle; -webkit-user-drag: none; user-select: none; }
.pick > i .dish-ic, .recipe > i .dish-ic { width: 52px; height: 52px; }
.stock span .dish-ic { width: 40px; height: 40px; }
.act-btn b .dish-ic { width: 46px; height: 46px; }
.act-carry .dish-ic { width: 32px; height: 32px; }
/* Staff screen: places used / available + several people per role */
.staff-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0 8px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.staff-slots b { font-size: 17px; }
.staff-slots .full { color: #c41d3a; font-weight: 800; }
.staff-slots small { flex-basis: 100%; color: var(--muted); font-size: 12px; font-weight: 600; }
.staff-slots .go { padding: 7px 12px; border: 0; border-radius: 10px; background: #00a862; color: #fff; font-weight: 800; }
.staff .ic { position: relative; }
.staff .ic .cnt { position: absolute; right: -6px; bottom: -6px; padding: 1px 6px; border-radius: 999px; background: #335fff; color: #fff; font-size: 12px; font-style: normal; font-weight: 800; }
.staff .sf-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
/* Level-up box: the menu item this level opens */
.dialog .rw li.lv-new { display: flex; align-items: center; gap: 10px; margin: 0 0 6px -18px; padding: 8px 10px; list-style: none; border-radius: 12px; background: #fff4d6; box-shadow: inset 0 0 0 1px #f2c14e; line-height: 1.3; }
.dialog .rw li.lv-new .dish-ic { width: 48px; height: 48px; }
.dialog .rw li.lv-new span { display: flex; flex-direction: column; }
.dialog .rw li.lv-new small { font-size: 12px; color: #8a5a00; }
.dialog .rw li.lv-next { color: var(--muted); }
/* Thực đơn: the newest item + the next one, then tabs per category */
.menu-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 4px; }
.mh-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #f2c14e; border-radius: 12px; background: #fff8e6; }
.mh-item.next { border-color: var(--line); background: #fff; }
.mh-item .dish-ic { width: 44px; height: 44px; flex: none; }
.mh-item.next .dish-ic { filter: grayscale(.6); opacity: .75; }
.mh-item span { display: flex; flex-direction: column; min-width: 0; }
.mh-item small { font-size: 11px; font-weight: 700; color: var(--muted); }
.mh-item b { font-size: 14px; }
.mh-note { grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
#menuTabs button small { font-size: 11px; opacity: .7; }
.recipe.lock .dish-ic { filter: grayscale(1); }
.recipe.newest { border-color: #f2c14e; box-shadow: inset 0 0 0 1px #f2c14e; }
.recipe .nw-tag { padding: 1px 7px; border-radius: 999px; background: #ff7a1a; color: #fff; font-size: 11px; font-weight: 800; }
/* Drinks counter mini-game: a glass, a target line, hold to pour */
.bg-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 18px; margin: 10px 0 4px; }
.bg-glass { position: relative; width: 74px; height: 120px; border: 3px solid #4a2a14; border-top: 0; border-radius: 4px 4px 16px 16px; background: linear-gradient(90deg, rgba(220,240,255,.7), rgba(255,255,255,.9) 40%, rgba(210,232,250,.7)); overflow: hidden; }
.bg-glass.cup { width: 96px; height: 90px; border-radius: 6px 6px 44px 44px; }
.bg-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(#ffcf6e, #e8892a); box-shadow: inset 0 3px 0 rgba(255,255,255,.55); }
.bg-line { position: absolute; left: -3px; right: -3px; height: 3px; background: #f2b705; box-shadow: 0 0 0 1px #8a5a00; }
.bg-band { position: absolute; left: 0; right: 0; background: rgba(46, 204, 113, .18); }
.cg-big.bg-hold { touch-action: none; user-select: none; -webkit-user-select: none; }
.picks .pk-head { margin: 6px 2px 0; font-size: 13px; font-weight: 800; color: #1d6a40; }
/* 📊 Báo cáo nhà hàng */
.report h2 { margin: 16px 0 8px; font-size: 16px; }
.rp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.rp-card { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.rp-card small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rp-card b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-card span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.rp-chart { display: grid; grid-template-columns: repeat(14, 1fr); align-items: end; gap: 3px; height: 150px; padding: 10px 8px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rp-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.rp-bar i { width: 100%; max-width: 20px; border-radius: 5px 5px 2px 2px; background: linear-gradient(#5aa9ff, #335fff); }
.rp-bar i.nil { background: #e3e5e8; }
.rp-bar.today i { background: linear-gradient(#ffb347, #ff7a1a); }
.rp-bar small { margin: 3px 0 4px; font-size: 9px; font-weight: 700; color: var(--muted); white-space: nowrap; transform: scale(.92); }
.rp-items, .rp-notes { display: flex; flex-direction: column; gap: 6px; }
.rp-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rp-item .no { width: 20px; font-weight: 900; color: #b87400; text-align: center; }
.rp-item .dish-ic { width: 38px; height: 38px; }
.rp-item .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-item .nm b { font-size: 14px; }
.rp-meter { display: block; height: 6px; border-radius: 6px; background: #eef1f4; overflow: hidden; }
.rp-meter i { display: block; height: 100%; background: #00a862; }
.rp-item .ct { display: flex; flex-direction: column; align-items: flex-end; }
.rp-item .ct b { font-size: 16px; }
.rp-item .ct small { font-size: 11.5px; font-weight: 700; color: #c41d5a; }
.rp-staffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.rp-staff { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rp-staff .ic { grid-row: span 3; font-size: 28px; }
.rp-staff small, .rp-staff span { font-size: 12px; font-weight: 600; color: var(--muted); }
.rp-note { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rp-note .st { color: #f2a900; font-size: 13px; letter-spacing: -1px; }
.rp-note .st i { font-style: normal; color: #d9dce1; }
.rp-note p { margin: 0; font-size: 14px; font-weight: 600; }
.rp-note small { grid-column: 2; font-size: 11px; color: var(--muted); }
.rp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px; font-size: 44px; text-align: center; }
.rp-empty b { font-size: 18px; }
.rp-empty span { font-size: 14px; color: var(--muted); }
#menuTabs { overflow: visible; }
#menuTabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; font-size: 13.5px; min-width: 0; }
#menuTabs button small { font-size: 11px; font-weight: 700; opacity: .65; }
.rp-bar small em { font-style: normal; opacity: .7; }

/* ===== Bếp Việt icon set (sprite #qi-*) — usage: <svg class="qi"><use href="#qi-shop"/></svg> =====
   Icons are drawn in one language (outline #23304a, shared gradients qg-*); size them only with width/height here. */
.qi { display: block; flex: none; width: 24px; height: 24px; overflow: visible; pointer-events: none; }

/* ---------- In-game toolbar: icon-only, floating over the scene ----------
   Each icon sits on its own white rounded chip (::before) so it reads on any part of the colourful city.
   The 54px button stays the tap target; the chip is 46px. */
#scPlay .ov-bottom { gap: 6px; }
#scPlay .ov-bottom button { position: relative; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 16px;
  background: none; filter: none; -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
#scPlay .ov-bottom button::before { content: ''; position: absolute; inset: 4px; border-radius: 14px; background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(35, 48, 74, .08), 0 3px 8px rgba(20, 30, 60, .22); }
#scPlay .ov-bottom button .qi { position: relative; width: 36px; height: 36px; filter: none; }
#scPlay .ov-bottom button:active { transform: scale(.9); }
#scPlay .ov-bottom button:focus-visible::before { box-shadow: 0 0 0 2px #335fff, 0 3px 8px rgba(20, 30, 60, .22); }
/* Toggled / current tool (e.g. design mode on) */
#scPlay .ov-bottom button.on::before, #scPlay .ov-bottom button[aria-pressed="true"]::before { background: #eef2ff; box-shadow: 0 0 0 2px #335fff, 0 3px 8px rgba(20, 30, 60, .22); }
@media (max-width: 440px) {
  #scPlay .ov-bottom { gap: 2px; }
  #scPlay .ov-bottom button { width: 50px; height: 50px; }
  #scPlay .ov-bottom button::before { inset: 3px; border-radius: 13px; }
  #scPlay .ov-bottom button .qi { width: 33px; height: 33px; }
}
@media (max-width: 370px) {
  #scPlay .ov-bottom button { width: 46px; height: 48px; }
  #scPlay .ov-bottom button::before { inset: 3px 2px; }
  #scPlay .ov-bottom button .qi { width: 30px; height: 30px; }
}
/* Landscape phones (844×390): same chips, a little smaller so the row stays short */
@media (orientation: landscape) and (max-height: 500px) {
  #scPlay .ov-bottom { gap: 4px; }
  #scPlay .ov-bottom button { width: 50px; height: 50px; }
  #scPlay .ov-bottom button::before { inset: 3px; border-radius: 13px; }
  #scPlay .ov-bottom button .qi { width: 32px; height: 32px; }
}

/* ---------- HUD round buttons: back, zoom, sound — same white chip as the toolbar ---------- */
#scPlay .ov-btn, #scPlay .ov-zoom button { display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(35, 48, 74, .08), 0 3px 8px rgba(20, 30, 60, .2); }
#scPlay #btnBack { width: 40px; min-width: 40px; height: 40px; }
#scPlay .ov-zoom button { width: 40px; height: 40px; }
#scPlay .ov-btn .qi, #scPlay .ov-zoom button .qi { width: 24px; height: 24px; }
#scPlay .ov-btn:active, #scPlay .ov-zoom button:active { transform: scale(.92); }
/* #btnSound lives outside the screens (top level of <body>): swap #qi-sound-on / #qi-sound-off in the <use> when toggling */
#btnSound .qi { width: 24px; height: 24px; }

/* ---------- Move-furniture bar (#designSel inside #scPlay) ---------- */
#scPlay .dz-sel button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #e3e5e8; border-radius: 10px; background: #fff; }
#scPlay .dz-sel button .qi { width: 26px; height: 26px; }

/* ---------- In-game HUD: my character, first thing top-left (tap = 🧑‍🍳 Nhân vật editor, back to play after) ---------- */
.hud-me { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid #fff; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a);
  box-shadow: 0 0 0 1px rgba(35, 48, 74, .12), 0 3px 8px rgba(20, 30, 60, .25); -webkit-tap-highlight-color: transparent; }
.hud-me canvas { display: block; width: 100%; height: 100%; }
.hud-me:active { transform: scale(.92); }
/* Narrow phones: the portrait joined the top row — tighter chips so the clock still fits */
@media (max-width: 440px) {
  #scPlay .ov-top { gap: 4px; }
  .hud-me { width: 46px; height: 46px; }
  #scPlay #btnBack { width: 34px; min-width: 34px; }
  .hud-coin { padding: 8px 9px; }
  .hud-pill { padding: 7px 8px; }
  .hud-lv { padding: 5px 8px; }
}

/* ---------- A lifted piece: floating toolbar next to it (main.js placeLiftBar moves it with transform only) + the hold ring ---------- */
.lift-bar { position: fixed; left: 0; top: 0; z-index: 30; display: flex; align-items: center; gap: 2px; padding: 4px 5px; border-radius: 999px; background: rgba(255, 255, 255, .97);
  box-shadow: 0 0 0 1px rgba(35, 48, 74, .12), 0 8px 20px rgba(20, 30, 60, .28); will-change: transform; animation: liftpop .18s ease-out; }
.lift-bar.hidden { display: none; }
.lift-bar #liftName { max-width: 104px; padding: 0 4px 0 8px; overflow: hidden; font-size: 12px; font-weight: 800; color: #191b1d; white-space: nowrap; text-overflow: ellipsis; }
.lift-bar button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; -webkit-tap-highlight-color: transparent; }
.lift-bar button:active { transform: scale(.9); }
.lift-bar button .qi { width: 34px; height: 34px; filter: drop-shadow(0 1px 1px rgba(20, 30, 60, .25)); }
.lift-bar button.pri { width: 48px; height: 48px; }
.lift-bar button.pri .qi { width: 44px; height: 44px; }
.lift-bar button.pri[disabled] .qi { filter: grayscale(1); opacity: .4; }
.lift-bar.bad { box-shadow: 0 0 0 2px #e74c3c, 0 8px 20px rgba(20, 30, 60, .28); }
@keyframes liftpop { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 380px) { .lift-bar #liftName { display: none; } }
.qv-move .ov-bottom, .qv-move #btnAct, .qv-move .joy, .qv-move .ov-tip { display: none; }
.hold-ring { position: fixed; z-index: 60; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#ffb000 calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .35) 0); -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px);
  animation: holdfill .45s linear forwards; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes holdfill { from { --p: 0; } to { --p: 1; } }

/* ---------- Ingredient pictures (QVArt 'i:<id>') ---------- */
.ing-ic { display: inline-block; width: 1.4em; height: 1.4em; object-fit: contain; vertical-align: middle; -webkit-user-drag: none; user-select: none; }
.stock span .ing-ic { width: 46px; height: 46px; }
.cg-ing button .ing-ic { width: 34px; height: 34px; }
.pick > i .ing-ic { width: 52px; height: 52px; }

/* ---------- Chợ / Siêu thị: a shop grid like the reference (big glossy picture, × stock, name, green price button) ---------- */
#dialog.mk { padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #eef3f7; }
.mk-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; background: linear-gradient(#4aa3ff, #2f7fe8); color: #fff; }
.mk-head h3 { flex: 1; margin: 0; font-size: 20px; font-weight: 900; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.mk-head .mk-coins { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 800; white-space: nowrap; }
.mk-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 2px solid #fff; border-radius: 10px; background: #e5374f; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.mk-close .qi { width: 24px; height: 24px; }
.mk-body { overflow: auto; padding: 10px 12px 14px; }
.mk-body h4 { margin: 10px 2px 6px; font-size: 13px; color: #4a5568; }
.mk-note { margin: 0 2px 6px; font-size: 12px; color: #606368; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mk-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 6px 6px; border: 1px solid #dfe5ec; border-radius: 12px; background: #fff;
  box-shadow: 0 2px 0 rgba(35, 48, 74, .06); }
.mk-card .ing-ic { width: 64px; height: 64px; }
.mk-card .mk-n { position: absolute; left: 7px; top: 4px; font-size: 13px; font-weight: 900; color: #23304a; }
.mk-card b { margin: 2px 0 5px; font-size: 13px; text-align: center; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
.mk-card .mk-buy { width: 100%; padding: 6px 0; border: 0; border-radius: 8px; background: linear-gradient(#5fd35f, #2fae3a); color: #fff; font-weight: 900; font-size: 14px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.mk-card .mk-buy[disabled] { background: #c8ced6; text-shadow: none; }
.mk-card .mk-five { margin-top: 4px; width: 100%; padding: 3px 0; border: 1px solid #b7e4bd; border-radius: 8px; background: #effaf0; color: #1d7a34; font-size: 12px; font-weight: 800; }
.mk-card .mk-five[disabled] { color: #9aa1ab; border-color: #e3e5e8; background: #f6f7f8; }
.mk-card.pop { animation: mkpop .25s ease; }
/* Ingredients that open with a later menu item: greyed, no buy buttons, when they open */
.mk-card.lock { background: #f4f6f8; border-style: dashed; }
.mk-card.lock .ing-ic { filter: grayscale(.85) opacity(.55); }
.mk-card.lock b { color: #7a818c; }
.mk-card .mk-why { margin-top: 3px; font-size: 11px; font-weight: 700; line-height: 1.25; color: #8a6a2a; text-align: center; }
.stock span.lock { background: #f4f6f8; border-style: dashed; }
.stock span.lock .ing-ic { filter: grayscale(.85) opacity(.55); }
@keyframes mkpop { 50% { transform: scale(1.06); } }

/* ---------- v9: drawn pictures (furniture previews from the scene's drawers, staff portraits), restaurant name ---------- */
.pv, .pt { display: block; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.ic.has-pv { display: grid; place-items: center; }
.ic.has-pv .pv { width: 100%; height: 100%; object-fit: contain; }
.dz-card .ic.has-pv { width: 56px; height: 52px; font-size: 22px; }
.item .ic.has-pv { padding: 2px; }
.dialog .score .pv, .dialog .score .pt { width: 112px; height: 112px; margin: 0 auto; }
.dialog .score .pt { border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.pt { border-radius: 50%; }
.staff .ic.face, .staff .ic:has(.pt) { overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.staff .ic .pt { width: 100%; height: 100%; }
.staff .ic .cnt { z-index: 1; }
.staff .crew { display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.staff .crew-p { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 1px solid #e3e5e8; border-radius: 999px; background: #fff; text-align: left; font: inherit; color: inherit; }
.staff .crew-p .pt { flex: none; width: 36px; height: 36px; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.staff .crew-p span { display: flex; flex-direction: column; min-width: 0; }
.staff .crew-p b { font-size: 13px; }
.staff .crew-p small.now { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff .unis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e3e5e8; }
.staff .u-lab { flex-basis: 100%; color: #191b1d !important; font-weight: 800 !important; }
.staff .uni { display: flex; flex-direction: column; align-items: center; width: 74px; padding: 4px 3px 5px; border: 2px solid #e3e5e8; border-radius: 12px; background: #fff; font: inherit; color: inherit; }
.staff .uni.on { border-color: #335fff; background: #eef2ff; }
.staff .uni .pt { width: 44px; height: 44px; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.staff .uni b { margin-top: 2px; font-size: 10.5px; line-height: 1.2; text-align: center; }
.staff .uni small { font-size: 11px !important; font-weight: 800 !important; color: #1d3fb8 !important; }
.staff .uni.on small { color: #1d6a40 !important; }
.staff-pick i .pt { width: 48px; height: 48px; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.rp-staff .ic .pt { width: 40px; height: 40px; background: radial-gradient(circle at 50% 35%, #fff7e0, #ffd98a); }
.me-shop { position: relative; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; min-height: 32px; margin: 1px 0 2px; padding: 2px 10px; border: 1px solid #e3e5e8; border-radius: 999px; background: #fff7e6;
  color: #8a3a00; font: inherit; font-size: 12.5px; font-weight: 800; }
.me-shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-shop i { font-style: normal; font-size: 12px; }
/* Drawn 32px, tap area 44px (rule: small secondary buttons keep a ≥ 44px hit zone) */
.me-shop::after { content: ""; position: absolute; inset: -6px -2px; }
.rp-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff7e6; }
.rp-head span { font-size: 22px; }
.rp-head b { flex: 1; min-width: 0; font-size: 18px; color: #8a3a00; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-rename { flex: none; padding: 6px 10px; border: 1px solid #e3e5e8; border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 800; }
.dialog .name-in { display: block; width: 100%; box-sizing: border-box; margin: 8px 0 4px; padding: 10px 12px; border: 2px solid #335fff; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 700; }
.staff { flex-wrap: wrap; align-items: flex-start; }
.staff .sf-wide { flex-basis: 100%; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.staff .sf-wide small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.staff .crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.staff .crew-p { border-radius: 14px; }
/* Event-limited card in 🛠️ Thiết kế › Cửa hàng: the event ribbon across the top of the small card */
.dz-card .evtag { background: linear-gradient(90deg, #3a8ae8, #ff4fa0); position: absolute; z-index: 2; top: 3px; left: 2px; right: 2px; margin: 0; padding: 0 4px; font-size: 9px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* ===== Trang chủ tranh vẽ (design system 17/11/2026 — bố cục chuẩn: ‹ trên trái, loa + sách trên phải, logo + CHƠI, 4 ô đáy) ===== */
#scHome { position: fixed; inset: 0; z-index: 5; overflow: hidden; padding: 0; max-width: none; background: #c9b48a; animation: none; container-type: size; }
#scHome .hm-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
body:has(#scHome:not(.hidden)) .mb-nav { display: none !important; }
#scHome button { -webkit-appearance: none; appearance: none; font-family: inherit; }
.hm-back, .hm-gear { position: absolute; top: max(10px, env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); }
.hm-back { left: max(10px, env(safe-area-inset-left)); background: #fff; border: 3px solid #e3e5e8; color: #191b1d; font: 700 28px/1 system-ui; padding-bottom: 4px; }
.hm-gear { right: max(10px, env(safe-area-inset-right)); border-radius: 12px; background: linear-gradient(#5ab4ff, #2a6fd8); border: 3px solid #e8f7ff; color: #fff; }
.hm-gear svg { width: 26px; height: 26px; display: block; }
.hm-mute { display: none; position: absolute; left: 7px; right: 7px; top: 50%; height: 3px; background: #ff4d4d; border-radius: 2px; transform: rotate(-45deg); }
.hm-gear.off .hm-mute { display: block; }
.hm-book { top: calc(max(10px, env(safe-area-inset-top)) + 54px); border-radius: 50%; }
.hm-top { position: absolute; left: calc(max(10px, env(safe-area-inset-left)) + 52px); top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.hm-av { position: relative; flex: none; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 3px solid #d8a13a; background: #fff3d6; display: grid; place-items: center; box-shadow: 0 3px 6px rgba(0, 0, 0, .35); cursor: pointer; }
.hm-av .me-avemo { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; line-height: 1; border-radius: 50%; overflow: hidden; color: var(--px, #e5484d); font-weight: 900; background: #fff3d6 center 18% / 150% auto no-repeat; }
.hm-lv { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 8px; background: #7a4a1c; border: 2px solid #d8a13a; color: #fff; font: 900 12px/1.2 system-ui, sans-serif; white-space: nowrap; }
.hm-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hm-xp, .hm-pts { display: none !important; }
.hm-bar { display: flex; align-items: center; gap: 4px; min-width: 84px; height: 32px; padding: 0 10px 0 4px; border-radius: 16px; background: rgba(20, 60, 90, .78); border: 2px solid rgba(255, 255, 255, .55); }
.hm-bar img { width: 24px; height: auto; flex: none; }
.hm-bar b { flex: 1; color: #fff !important; font: 900 14px/1 system-ui, sans-serif; text-align: center; }
.hm-stack { position: absolute; left: 0; right: 0; top: calc(max(10px, env(safe-area-inset-top)) + 64px); bottom: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqh; padding: 0 5cqw; }
.hm-logo { flex: 0 1 auto; min-height: 0; max-height: 16cqh; max-width: 84cqw; width: auto; height: auto; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .3)); pointer-events: none; }
.hm-hero { flex: 0 1 auto; min-height: 0; max-height: 28cqh; max-width: 72cqw; width: auto; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); pointer-events: none; }
.hm-play { flex: none; width: min(70cqw, 330px); padding: 1.2cqh 3cqw 1.4cqh; border-radius: 999px; text-align: center; color: #fff; background: linear-gradient(#8aea5a, #2fae2a 60%, #238a22); border: 4px solid #fff5cf; box-shadow: 0 5px 0 #1b6b1a, 0 9px 12px rgba(0, 0, 0, .35); }
.hm-play b { display: block; font: 900 clamp(26px, 5.2cqh, 44px)/1.05 "Arial Rounded MT Bold", system-ui, sans-serif; -webkit-text-stroke: .12em #1d6a1d; paint-order: stroke fill; letter-spacing: 2px; }
.hm-play small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 clamp(12px, 1.8cqh, 15px)/1.2 system-ui, sans-serif; -webkit-text-stroke: .2em #1d6a1d; paint-order: stroke fill; }
.hm-play:active, .hm-ic:active { transform: scale(.96); }
.hm-row { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 2cqw; }
.hm-ic { position: relative; width: min(21cqw, 96px); padding: 0; background: none; border: 0; box-shadow: none; color: #fff; }
.hm-ic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; display: block; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.hm-ic span { display: block; margin-top: -2px; text-align: center; font: 900 clamp(12px, 1.7cqh, 14px)/1.1 system-ui, sans-serif; -webkit-text-stroke: .22em #4a2a14; paint-order: stroke fill; white-space: nowrap; }
.hm-dot { position: absolute; top: 2px; right: 2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e5374f; border: 2px solid #fff; color: #fff; font: 900 12px/18px system-ui; font-style: normal; }
.hm-dot.hidden { display: none; }
.hm-dot-s { min-width: 16px; width: 16px; height: 16px; padding: 0; top: 6px; right: 10px; }
#scHome .hm-seo { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
#scBook a.bk-link { display: flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--skin-card-line, #e3e5e8); border-radius: 12px; background: var(--skin-card, #f7f8f9); color: var(--skin-ink, #191b1d); font-size: 15px; font-weight: 700; text-decoration: none; }
#scBook .bk-list { display: flex; flex-direction: column; gap: 8px; }
/* Kitchen / farm shortcuts under CHƠI: one glass strip (like the Tìm Đồ picture strip), CHƠI itself opens the restaurant */
.hm-go { flex: none; display: flex; gap: 2px; margin-top: .6cqh; padding: 3px; border-radius: 999px; background: rgba(20, 60, 90, .78); border: 2px solid rgba(255, 255, 255, .55); }
.hm-go button { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; background: none; box-shadow: none; color: #fff; font: 800 13px/1 system-ui, sans-serif; white-space: nowrap; }
.hm-go button + button { border-left: 1px solid rgba(255, 255, 255, .3); border-radius: 0 999px 999px 0; }
.hm-go .qi { width: 32px; height: 32px; flex: none; }
.hm-go button:active { transform: scale(.96); }
/* Khung ngang thấp (điện thoại cầm ngang 844×390): logo + hình chính to hơn, gọn giữa thanh trên và 4 ô */
@container (orientation: landscape) {
  .hm-stack { top: calc(max(10px, env(safe-area-inset-top)) + 58px); bottom: calc(max(10px, env(safe-area-inset-bottom)) + min(11cqw, 22cqh) + 22px); gap: 1.2cqh; }
  .hm-logo { max-height: 19cqh; max-width: 46cqw; }
  .hm-hero { max-height: 22cqh; max-width: 40cqw; }
  .hm-play { width: min(46cqw, 340px); padding: 0.8cqh 3cqw 1cqh; }
  .hm-play small { font-size: clamp(12px, 3.2cqh, 15px); }
  .hm-play b { font-size: clamp(24px, 7cqh, 40px); }
  .hm-row { bottom: max(10px, env(safe-area-inset-bottom)); gap: 1.6cqw; }
  .hm-ic { width: min(11cqw, 22cqh, 96px); }
  .hm-ic span { font-size: clamp(12px, 3.2cqh, 14px); }
}

/* ---------- Mẫu A: bảng gỗ + giấy kem (chủ dự án duyệt mẫu A 19/11/2026, làm lại bảng thông báo + bảng nấu 22/11/2026) ----------
   Ngoại lệ ghi trong design system (Bếp Việt đại chiến — hộp thoại + bảng nấu kiểu gỗ Hội An): hộp = giấy kem viền gỗ --ds-wood 3px,
   tiêu đề là tấm gỗ, nút phụ kem viền gỗ có đế nổi, nút chính xanh dương --ds-primary, nút làm / nấu xanh lá như nút "Nấu món" của mẫu.
   Chợ / siêu thị (#dialog.mk) giữ khung riêng. */
body.mb-light .dialog:not(.mk) { --pp: #f8e9c6; padding: 0 16px 16px; border: 3px solid #7a4a1c; border-radius: 18px; color: #4a2a14;
  background: radial-gradient(120% 80% at 50% 0%, #fdf3dc, var(--pp) 70%); box-shadow: inset 0 0 0 3px #ecd09a, 0 10px 30px rgba(0, 0, 0, .18); }
body.mb-light .dialog:not(.mk) h3 { position: sticky; top: 0; z-index: 3; margin: 0 -16px 12px; padding: 12px 16px; text-align: center; font-size: 17px; font-weight: 900; color: #fff6df;
  text-shadow: 0 2px 0 #3b2414; background: linear-gradient(#a8692e, #7a4a1c 62%, #5e3714); border-bottom: 3px solid #4a2a14;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .2); }
body.mb-light .dialog:not(.mk) .note, body.mb-light .dialog:not(.mk) .pick .pk-body small { color: #7a5634; }
body.mb-light .dialog:not(.mk) .dlg-btns { background: var(--pp); }
body.mb-light .dialog:not(.mk) .dlg-btns button { min-height: 44px; padding: 10px 16px; border: 2px solid #7a4a1c; border-radius: 12px; background: #fff8e0; color: #4a2a14;
  font-weight: 900; box-shadow: 0 3px 0 #7a4a1c; }
body.mb-light .dialog:not(.mk) .dlg-btns button.pri { border-color: #1d3a5a; background: linear-gradient(#5b80ff, #335fff); color: #fff; box-shadow: 0 3px 0 #1d3a5a; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
body.mb-light .dialog:not(.mk) .dlg-btns button:active, body.mb-light .dialog:not(.mk) .pick .go:active, .cg-big:active { transform: translateY(3px); box-shadow: none; }
body.mb-light .dialog:not(.mk) .score { color: #b8651c; text-shadow: 0 2px 0 #fff, 0 3px 0 rgba(122, 74, 28, .35); }
body.mb-light .dialog:not(.mk) .rw li.lv-new { background: #fff1cc; box-shadow: inset 0 0 0 2px #d8a13a; }
/* Danh sách chọn món / gieo hạt: thẻ kem viền gỗ nhạt, nút xanh lá có đế */
body.mb-light .dialog:not(.mk) .pick { border: 2px solid #dcb980; border-radius: 14px; background: #fffaf0; }
body.mb-light .dialog:not(.mk) .pick.want { border-color: #f0a020; background: #fff1cc; }
body.mb-light .dialog:not(.mk) .pick > i { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #f3e1bd); box-shadow: inset 0 0 0 2px #e2c58f; }
body.mb-light .dialog:not(.mk) .pick .need span { background: #fff1d6; color: #6b4423; }
body.mb-light .dialog:not(.mk) .pick .need span.lack { background: #fde3e3; color: #e5374f; }
body.mb-light .dialog:not(.mk) .pick .go { min-height: 44px; padding: 8px 14px; border: 2px solid #1d6a1d; border-radius: 12px; background: linear-gradient(#8aea5a, #2fae2a 60%, #238a22); color: #fff;
  font-weight: 900; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); box-shadow: 0 3px 0 #1d6a1d; }
body.mb-light .dialog:not(.mk) .pick .go.buy { border-color: #8a4a00; background: linear-gradient(#ffd36a, #f09a1c); color: #4a2a14; text-shadow: none; box-shadow: 0 3px 0 #8a4a00; }
body.mb-light .dialog:not(.mk) .pick .go:disabled { border-color: #9a9a9a; background: #d2d2d2; color: #6a6a6a; box-shadow: 0 3px 0 #9a9a9a; text-shadow: none; }
body.mb-light .dialog:not(.mk) .picks .pk-head { color: #7a4a1c; }

/* Bảng nấu / pha: đĩa món, thẻ bước bằng gỗ, khu làm trên tấm thớt */
.cg-dish { gap: 12px; margin-bottom: 4px; }
.cg-plate { display: grid; place-items: center; width: 84px; height: 84px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #d9a465, #b0743a 70%, #8a5426);
  box-shadow: 0 0 0 3px #4a2a14, inset 0 3px 0 rgba(255, 255, 255, .3), 0 4px 0 #3b2414; }
.cg-plate .dish-ic.cg-pic { width: 86px; height: 86px; filter: drop-shadow(0 2px 1px rgba(59, 36, 20, .45)); }
.cg-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cg-name b { font-size: 22px; font-weight: 900; color: #4a2a14; }
.cg-name small { font-size: 13px; font-weight: 700; color: #7a5634; }
.cg-steps { gap: 6px; margin: 12px 0 10px; }
.cg-steps li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border: 2px solid #4a2a14; border-radius: 10px;
  background: linear-gradient(#8a5426, #6b3d17); color: #fff6df; font-size: 12px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 0 #3b2414; box-shadow: 0 2px 0 #4a2a14; }
.cg-steps li i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff6df; color: #7a4a1c; font-style: normal; font-size: 12px; font-weight: 900; text-shadow: none; }
.cg-steps li.on { border-color: #1d3a5a; background: linear-gradient(#5b80ff, #335fff); color: #fff; box-shadow: 0 2px 0 #1d3a5a, 0 0 0 3px rgba(51, 95, 255, .25); }
.cg-steps li.on i { color: #335fff; }
.cg-steps li.done { border-color: #1d6a1d; background: linear-gradient(#2f9a2a, #1f7a1f); color: #fff; box-shadow: 0 2px 0 #1d6a1d; }
.cg-steps li.done i { color: #2fae2a; }
.cg-stage { display: flex; align-items: center; gap: 10px; padding: 12px; border: 3px solid #7a4a1c; border-radius: 16px;
  background: repeating-linear-gradient(92deg, rgba(122, 74, 28, .07) 0 3px, transparent 3px 14px), linear-gradient(#e9c48c, #d6a465); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 3px 0 #5e3714; }
.cg-stage .cg-work { flex: 1; min-width: 0; }
.cg-stage p { margin: 0 0 8px; text-align: center; font-size: 14px; font-weight: 800; color: #4a2a14; }
.cg-stove { width: 92px; height: auto; flex: none; align-self: flex-end; filter: drop-shadow(0 3px 2px rgba(74, 42, 20, .4)); }
.cg-ing { gap: 8px; margin: 4px 0; }
.cg-ing button { width: 64px; height: 64px; border: 2px solid #7a4a1c; border-radius: 14px; background: #fff8e0; box-shadow: 0 3px 0 #7a4a1c; }
.cg-ing button .ing-ic { width: 52px; height: 52px; }
.cg-ing button:disabled { box-shadow: none; }
.cg-bar { height: 16px; margin: 6px 0 12px; border: 2px solid #4a2a14; border-radius: 10px; background: #5e3714; }
.cg-bar i { background: linear-gradient(#ffd36a, #f09a1c); }
.gauge { height: 24px; margin: 6px 0 14px; border: 2px solid #4a2a14; border-radius: 12px; background: linear-gradient(90deg, #f3a58e, #fff3d6 30%, #fff3d6 70%, #f3a58e); }
.gauge .zone { background: linear-gradient(#7fe0a6, #00a862); }
.gauge .needle { width: 6px; margin-left: -3px; background: #4a2a14; box-shadow: 0 0 0 2px #fff6df; }
.cg-big { min-height: 52px; border: 3px solid #1d6a1d; border-radius: 16px; background: linear-gradient(#8aea5a, #2fae2a 60%, #238a22); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); box-shadow: 0 4px 0 #1d6a1d; }
.cg-stage .bg-wrap { margin: 4px 0 0; }

/* Bảng thông báo trong quán: cuộn giấy treo có hai thanh gỗ (như "Nấu Rau xào tỏi" của mẫu A) */
.ov-tip { overflow: visible; padding: 9px 18px; border: 2px solid #7a4a1c; border-radius: 8px; background: linear-gradient(#fffaf0, #f6e6c4); color: #4a2a14;
  font-weight: 800; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.ov-tip::before, .ov-tip::after { content: ''; position: absolute; left: -8px; right: -8px; height: 8px; border: 2px solid #4a2a14; border-radius: 6px;
  background: linear-gradient(#b87a3c, #7a4a1c); }
.ov-tip::before { top: -7px; }
.ov-tip::after { bottom: -7px; }
.ov-tip.tap { background: linear-gradient(#fffaf0, #f6e6c4); border-color: #2fae2a; box-shadow: 0 0 0 3px rgba(47, 174, 42, .35), 0 4px 10px rgba(0, 0, 0, .25); }
/* Thông báo nhanh: tấm gỗ nhỏ chữ kem */
body.mb-light .toast { border: 2px solid #4a2a14; background: linear-gradient(#a8692e, #7a4a1c 62%, #5e3714); color: #fff6df; text-shadow: 0 1px 0 #3b2414; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
/* Cầm ngang thấp: bảng nấu chia hai cột (trái món + các bước, phải khu làm) để nút làm luôn trong màn, không phải cuộn */
@media (orientation: landscape) and (max-height: 500px) {
  body.mb-light .dialog:not(.mk):has(.cg) { width: min(680px, 100%); }
  body.mb-light .dialog:not(.mk) h3 { padding: 8px 16px; margin-bottom: 8px; }
  .cg { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; }
  .cg .cg-dish { grid-column: 1; grid-row: 1; }
  .cg .cg-steps { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: 1fr 1fr; align-content: start; margin: 8px 0 0; }
  .cg .cg-stage { grid-column: 2; grid-row: 1 / 3; }
  .cg-plate { width: 64px; height: 64px; }
  .cg-plate .dish-ic.cg-pic { width: 66px; height: 66px; }
  .cg-name b { font-size: 17px; }
  .cg-stove { width: 76px; }
}

/* Sheet skin "wood": small sheets take the colours of the painted home (owner 30/11/2026). */
body.mb-light { --skin-frame: #6b3d17; --skin-head: linear-gradient(#93592a, #6b3d17); --skin-head-ink: #fff3d6; --skin-line: #d8a13a;
  --skin-paper: #f4e6c6; --skin-card: #fffaf0; --skin-card-line: #d6b886; --skin-ink: #3a1d0c; --skin-muted: #765536; --skin-hover: #fff3dc; }
