/* MonBlock app shell (sdk/shell.js): top bar + navigation, the same on the portal and every game.
   Phone: nav is a bottom tab bar. Wide screen (≥ 860px): the nav sits inside the top bar. */
:root { --mb-top: 52px; --mb-nav: 60px; --mb-bg: #0c1118; --mb-line: #222d3b; --mb-txt: #e8eef6; --mb-mut: #8d9bb0; --mb-acc: #ffcf5a;
  --mb-hover: #18212d; --mb-btn: #141b25; --mb-on: #1a2230; --mb-brand2: #a98bff; }
/* Light shell (<body class="mb-light">: portal, admin, every game page) — flat Roblox-like greys; the logo keeps its colours. */
body.mb-light { --mb-bg: #ffffff; --mb-line: #e3e5e8; --mb-txt: #191b1d; --mb-mut: #606368; --mb-acc: #191b1d; --mb-hover: #f2f4f5; --mb-btn: #ffffff; --mb-on: #f2f4f5; --mb-brand2: #6c4dff; }

body.mb-shell { padding-top: calc(var(--mb-top) + env(safe-area-inset-top)) !important; padding-bottom: calc(var(--mb-nav) + 12px + env(safe-area-inset-bottom)) !important; }
body.mb-shell.mb-play { padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important; }
body.mb-shell.mb-full { padding: 0 !important; }
body.mb-full .mb-top { display: none; }

/* Static page <h1> (SEO): same words as the shell title, so only for crawlers / screen readers. */
.mb-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mb-top { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding-top: env(safe-area-inset-top); background: var(--mb-bg); border-bottom: 1px solid var(--mb-line);
  color: var(--mb-txt); font: 15px/1.3 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.mb-top-in { display: flex; align-items: center; gap: 8px; max-width: 1100px; height: var(--mb-top); margin: 0 auto; padding: 0 10px; }
.mb-top .hidden { display: none !important; }
.mb-back { flex: none; width: 40px; height: 40px; margin-left: -4px; padding: 0 0 4px; border: 0; border-radius: 12px; background: none; color: var(--mb-txt); font: 700 32px/1 system-ui, sans-serif; cursor: pointer; }
.mb-back:hover, .mb-back:focus-visible { background: var(--mb-hover); }
/* Logo: the cube "M" (icons/mark.png, from .ai/scripts/brand-icons.py) + "Mon" / "Block" in the logo's two colours. */
.mb-brand { display: flex; align-items: center; gap: 7px; color: var(--mb-txt); font: 900 24px/1 ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", Roboto, sans-serif; letter-spacing: -.3px; text-decoration: none; white-space: nowrap; }
.mb-brand b { color: inherit; font-weight: 900; }
.mb-mark { width: 42px; height: 42px; display: block; transition: transform .2s; } /* Bigger logo (owner 29/11/2026) */
.mb-brand:hover .mb-mark { transform: rotate(-8deg) scale(1.08); }
.mb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.mb-title b, .mb-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-title b { font-size: 17px; font-weight: 800; }
.mb-title small { color: var(--mb-mut); font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.mb-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.mb-actions > button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--mb-line); border-radius: 12px; background: var(--mb-btn); color: var(--mb-txt); font-size: 17px; cursor: pointer; }

/* Phone: bottom tab bar */
.mb-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; height: calc(var(--mb-nav) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
  background: var(--mb-bg); border-top: 1px solid var(--mb-line); }
body.mb-play .mb-nav { display: none; }
.mb-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; border: 0; background: none;
  color: var(--mb-mut); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mb-tab .mb-ic { position: relative; display: grid; place-items: center; height: 26px; min-width: 26px; font-size: 21px; line-height: 1; filter: grayscale(.55); opacity: .8; }
.mb-tab .mb-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.mb-tab.on { color: var(--mb-acc); }
.mb-tab.on .mb-ic { filter: none; opacity: 1; }
.mb-tab.on .mb-ic::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 16px; height: 3px; margin-left: -8px; border-radius: 2px; background: var(--mb-acc); }
.mb-badge { position: absolute; top: -5px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-style: normal; }
.mb-badge.hidden { display: none; }

/* Wide screen: the same tabs inside the top bar, icon + label side by side */
@media (min-width: 860px) {
  body.mb-shell { padding-bottom: 24px !important; }
  .mb-nav { position: static; flex: none; height: auto; padding: 0; gap: 2px; background: none; border: 0; }
  body.mb-play .mb-nav { display: flex; }
  .mb-tab { flex: none; flex-direction: row; gap: 6px; height: 40px; padding: 0 11px; border-radius: 12px; }
  .mb-tab:hover { background: var(--mb-hover); color: var(--mb-txt); }
  .mb-tab .mb-ic { height: auto; min-width: 0; font-size: 17px; }
  .mb-tab .mb-lb { max-width: 130px; font-size: 13.5px; }
  .mb-tab.on { background: var(--mb-on); }
  .mb-tab.on .mb-ic::after { display: none; }
  .mb-badge { top: -8px; right: -12px; }
}

/* Phone held sideways on a game page (19/11/2026, owner: "chơi ngang, danh sách màn / hướng dẫn bị ẩn một nửa"): the full shell
   (top bar + event banner + bottom nav ≈ 44 % of a 390 px screen) shrinks to ONE slim bar — ‹ top left, screen title, page
   actions. Nav + banner stay on the portal / portrait. Checked by .ai/scripts/orient-audit.js (bars ≤ 12 % of the height). */
@media (orientation: landscape) and (max-height: 500px) {
  body.mb-game { --mb-top: 44px; }
  body.mb-shell.mb-game:not(.mb-full) { padding-bottom: env(safe-area-inset-bottom) !important; }
  body.mb-game .mb-nav, body.mb-game .mb-event { display: none; }
  body.mb-game .mb-top-in { max-width: none; padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); }
  body.mb-game .mb-back { width: 44px; height: 44px; }
  body.mb-game .mb-title { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; }
  body.mb-game .mb-title b { font-size: 16px; }
  body.mb-game .mb-title small { order: 2; font-size: 12px; }
  /* Drawn 38 px inside the slim bar, touch area 44 px */
  body.mb-game .mb-actions > button { position: relative; }
  body.mb-game .mb-actions > button::after { content: ''; position: absolute; inset: -3px; }
}

/* Event banner (sdk/events.js, filled by PortalShell.renderEvent): one line per running event, tap for details. Not while playing. */
.mb-event { display: block; width: calc(100% - 20px); max-width: 1080px; margin: 8px auto 0; padding: 9px 14px; border: 1px solid #7a4a10; border-radius: 14px;
  background: linear-gradient(90deg, #3a1f08, #2a1430 60%, #13243a); color: #ffe7b0; font: 600 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; text-align: left; cursor: pointer; }
.mb-event.hidden, body.mb-play .mb-event, body.mb-full .mb-event { display: none; }
.mb-ev-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mb-ev-line b { color: #ffd76a; font-size: 15px; }
.mb-ev-line i { padding: 1px 8px; border-radius: 999px; background: #ffcf5a; color: #2a1800; font-style: normal; font-weight: 900; font-size: 12px; animation: mb-ev-pulse 1.6s ease-in-out infinite; }
.mb-ev-line small { margin-left: auto; color: #ffcf9a; font-weight: 700; }
.mb-ev-more { display: none; margin-top: 4px; color: #f2dcc0; font-weight: 500; font-size: 13px; }
.mb-event.open .mb-ev-more { display: block; }
@keyframes mb-ev-pulse { 50% { transform: scale(1.08); } }
/* Pages whose <body> is a flex row (Bóng Đá): the banner takes a full row of its own above the page. */
.mb-event { flex: 0 0 calc(100% - 20px); }
body.mb-shell:has(> .mb-event:not(.hidden)) { flex-wrap: wrap; align-content: flex-start; }
/* Hộp quà (PortalShell.gift) */
.mb-gift { position: fixed; z-index: 120; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 240px; padding: 14px 20px 12px; border: 1px solid #7a6324; border-radius: 18px; background: linear-gradient(160deg, #3a2c12, #151c26 70%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55); color: #e8eef6; font: 600 15px "Segoe UI", Roboto, sans-serif; animation: mb-gift-in .35s ease-out; }
.mb-gift b { font-size: 17px; color: #ffcf5a; }
.mb-gift button { margin-top: 6px; min-height: 44px; padding: 7px 26px; border: 0; border-radius: 12px; background: #ffcf5a; color: #1c1608; font: 800 14px inherit; cursor: pointer; }
.mb-gift.out { opacity: 0; transition: opacity .5s; }

/* Welcome card for guests + starter-gift card after registering (shell.js welcome() / starterGift()): white card, rounded font,
   brand purple (logo "Block" #6c4dff) for the call to action, a bouncing diamond. */
.mb-welcome { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 18px; background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: mbw-fade .25s ease-out; }
.mb-welcome.out { opacity: 0; transition: opacity .25s; }
.mbw-card { position: relative; width: min(360px, 100%); padding: 26px 22px 18px; border-radius: 28px; text-align: center; color: #3b2f5c;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Varela Round", "Segoe UI", Roboto, sans-serif;
  background: #fff; border: 0; box-shadow: 0 0 0 2px #ece7ff, 0 16px 40px rgba(108, 77, 255, .14); animation: mbw-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.mbw-x { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: #9b8cc4;
  font: 700 15px inherit; cursor: pointer; box-shadow: 0 0 0 1px #ece8f8; }
.mbw-gem { position: relative; width: 96px; height: 96px; margin: -62px auto 6px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #f3f0ff 60%, #e6dfff); border: 4px solid #fff; box-shadow: 0 8px 20px rgba(108, 77, 255, .15); }
.mbw-gem span { font-size: 50px; line-height: 1; animation: mbw-bob 1.6s ease-in-out infinite; }
.mbw-gem i { position: absolute; font-style: normal; color: #ffc93c; font-size: 16px; animation: mbw-twinkle 1.4s ease-in-out infinite; }
.mbw-gem i:nth-child(1) { left: -10px; top: 18px; }
.mbw-gem i:nth-child(2) { right: -12px; top: 6px; font-size: 20px; animation-delay: .45s; }
.mbw-gem i:nth-child(3) { right: -4px; bottom: 2px; font-size: 13px; animation-delay: .9s; }
.mbw-card h2 { margin: 4px 0 2px; font-size: 25px; font-weight: 900; letter-spacing: -.2px; color: #8a6dff; }
.mbw-lead { margin: 0; font-size: 16px; font-weight: 700; color: #5a4a86; }
.mbw-amount { margin: 8px auto 12px; display: inline-block; padding: 6px 18px; border-radius: 999px; background: #faf8ff; color: #5a4a86;
  font-size: 18px; font-weight: 800; box-shadow: inset 0 0 0 2px #efeaff; }
.mbw-amount b { font-size: 34px; font-weight: 900; color: #8a6dff; vertical-align: -3px; margin-right: 4px; }
.mbw-perks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; text-align: left; }
.mbw-perks li { padding: 8px 12px; border-radius: 14px; background: #faf9fd; font-size: 15px; font-weight: 700; color: #5a5070; }
.mbw-go { display: block; padding: 14px 16px; border-radius: 18px; text-decoration: none; color: #fff; font-size: 18px; font-weight: 900;
  border: 0; width: 100%; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #a993ff, #8f74ff); box-shadow: 0 4px 0 #7258e8, 0 8px 16px rgba(108, 77, 255, .2); animation: mbw-pulse 1.8s ease-in-out infinite; }
.mbw-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #7258e8; }
/* Game pages colour links themselves (game-light.css): keep the card's own colours. */
.mb-welcome a.mbw-go, .mb-welcome a.mbw-go:visited { color: #fff; }
.mb-welcome .mbw-foot a, .mb-welcome .mbw-foot a:visited { color: #6c4dff; }
.mbw-foot { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.mbw-foot a { color: #6c4dff; text-decoration: none; }
.mbw-later { border: 0; background: none; color: #9b8cc4; font: 700 14px inherit; cursor: pointer; padding: 6px; }
@keyframes mbw-fade { from { opacity: 0; } }
@keyframes mbw-pop { from { opacity: 0; transform: scale(.8) translateY(20px); } }
@keyframes mbw-bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
@keyframes mbw-twinkle { 50% { opacity: .2; transform: scale(.6); } }
@keyframes mbw-pulse { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .mbw-card, .mbw-gem span, .mbw-gem i, .mbw-go { animation: none; } }
@keyframes mb-gift-in { from { transform: translate(-50%, -12px) scale(.9); opacity: 0; } }

/* Light variants of the event banner + gift popup (flat). */
body.mb-light .mb-event { border: 1px solid #ffd59a; border-radius: 10px; background: #fff7e8; color: #5a3a00; font-family: inherit; }
body.mb-light .mb-ev-line b { color: #191b1d; }
body.mb-light .mb-ev-line i { background: #ff8a00; color: #fff; }
body.mb-light .mb-ev-line small { color: #a05a00; }
body.mb-light .mb-ev-more { color: #5a3a00; }
body.mb-light .mb-gift { border: 1px solid #e3e5e8; border-radius: 12px; background: #fff; color: #191b1d; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-family: inherit; }
body.mb-light .mb-gift b { color: #191b1d; }
body.mb-light .mb-gift button { border-radius: 8px; background: #335fff; color: #fff; }

/* Gold coin shown in place of every 🪙 (sdk/shell.js goldCoins) */
img.mb-coin { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin: 0 .04em; pointer-events: none; user-select: none; }

/* Share to social networks (sdk/shell.js share): top-bar button + bottom sheet (centred card on wide screens). */
.mb-actions > .mb-share-btn { display: grid; place-items: center; color: #335fff; }
body.mb-play .mb-share-btn { display: none !important; }
.mb-share { position: fixed; inset: 0; z-index: 960; display: flex; align-items: flex-end; justify-content: center; background: rgba(16, 20, 28, .45);
  font: 15px/1.35 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; animation: mbw-fade .2s ease-out; }
.mb-share.out { opacity: 0; transition: opacity .2s; }
.mbsh-card { position: relative; width: min(460px, 100%); max-height: 94%; overflow-y: auto; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0; background: #fff; color: #191b1d; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); animation: mbsh-up .22s ease-out; }
@keyframes mbsh-up { from { transform: translateY(30px); } to { transform: none; } }
@media (min-width: 600px) { .mb-share { align-items: center; } .mbsh-card { border-radius: 20px; padding-bottom: 18px; } }
.mbsh-card h2 { margin: 0 34px 12px 2px; font-size: 18px; font-weight: 800; }
.mbsh-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f2f4f5; color: #606368; font-size: 16px; cursor: pointer; }
.mbsh-game { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid #e3e5e8; border-radius: 14px; background: #f8f9fa; }
.mbsh-game img { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #e3e5e8; }
.mbsh-game div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mbsh-game b { font-size: 16px; }
.mbsh-game span { color: #606368; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mbsh-nets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; margin: 16px 0 14px; }
.mb-share .mbsh-net, body.mb-light .mb-share a.mbsh-net { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #191b1d; font: 600 12.5px/1.2 inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mbsh-net i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; transition: transform .12s; }
.mb-share .mbsh-net:active i, .mbsh-net:hover i { transform: scale(1.07); }
.mbsh-link { display: flex; gap: 8px; }
.mbsh-link input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #e3e5e8; border-radius: 10px; background: #f8f9fa; color: #191b1d; font: 13px/1 inherit; }
.mbsh-link button { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: #335fff; color: #fff; font: 700 14px/1 inherit; cursor: pointer; }
.mbsh-note { margin: 10px 2px 0; color: #606368; font-size: 12.5px; }
.mbsh-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 970; transform: translateX(-50%); max-width: 90vw; padding: 10px 16px;
  border-radius: 999px; background: #191b1d; color: #fff; font: 600 14px/1.3 "Segoe UI", Roboto, sans-serif; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
@media (max-height: 500px) and (min-width: 600px) { .mbsh-nets { grid-template-columns: repeat(7, 1fr); margin: 12px 0; } .mbsh-card h2 { margin-bottom: 8px; } }

/* Short landscape screens (phone held sideways, or a portrait phone turned by sdk/land.js): keep the welcome card inside the screen */
@media (max-height: 460px) {
  .mbw-card { width: min(420px, 100%); padding: 14px 18px 12px; }
  .mbw-gem { width: 64px; height: 64px; margin: -40px auto 2px; }
  .mbw-gem span { font-size: 34px; }
  .mbw-card h2 { font-size: 21px; margin: 0; }
  .mbw-amount { margin: 4px auto 8px; padding: 3px 14px; }
  .mbw-amount b { font-size: 26px; }
  .mbw-perks { display: none; }
  .mbw-go { padding: 10px 14px; font-size: 16px; }
  .mbw-foot { margin-top: 6px; }
}
html.ls .mbw-card { width: min(420px, 100%); padding: 14px 18px 12px; }
html.ls .mbw-gem { width: 64px; height: 64px; margin: -40px auto 2px; }
html.ls .mbw-gem span { font-size: 34px; }
html.ls .mbw-card h2 { font-size: 21px; margin: 0; }
html.ls .mbw-amount { margin: 4px auto 8px; padding: 3px 14px; }
html.ls .mbw-amount b { font-size: 26px; }
html.ls .mbw-perks { display: none; }
html.ls .mbw-go { padding: 10px 14px; font-size: 16px; }
html.ls .mbw-foot { margin-top: 6px; }

/* Hộp nổi nhỏ PortalShell.sheet() (design system 17/11/2026): màn phụ ngắn (Cách chơi, chọn kiểu chơi) mở nổi giữa màn, trang chủ
   game vẫn thấy phía sau. Giá trị = token --ds-* (nền trắng, bo --ds-r-3xl 18, bóng --ds-sh-pop, ✕ = --ds-tap 44, lớp --ds-z-modal 80). */
.mb-sheet-bg { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  background: rgba(0, 0, 0, .45); animation: mb-sheet-fade .18s ease; }
html.ls .mb-sheet-bg { padding: calc(12px + var(--sat)) calc(16px + var(--sar)) calc(12px + var(--sab)) calc(16px + var(--sal)); }
.mb-sheet { display: flex; flex-direction: column; width: min(440px, 100%); max-height: min(560px, 100%); overflow: hidden;
  background: #ffffff; color: #191b1d; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  font-family: "Builder Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: mb-sheet-in .2s ease-out; }
.mb-sheet-hd { flex: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 8px 4px 16px; }
.mb-sheet-hd h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 800; line-height: 1.25; color: #191b1d; }
.mb-sheet-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #f7f8f9; color: #191b1d; font: 700 18px/1 system-ui, sans-serif; cursor: pointer; }
.mb-sheet-x:active { transform: scale(.96); }
.mb-sheet-bd { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px 16px; }
.mb-sheet-bd > .mb-in-sheet { display: block !important; position: static !important; inset: auto !important; width: auto !important; max-width: none !important;
  min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 0 !important; transform: none !important; animation: none !important;
  background: none !important; box-shadow: none !important; }
.mb-sheet-bd .mb-sheet-dup { display: none !important; }
@keyframes mb-sheet-fade { from { opacity: 0; } }
@keyframes mb-sheet-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.mb-sheet-bd > .mb-in-sheet > .help { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; color: #191b1d !important; }
.mb-sheet-bd .help h2, .mb-sheet-bd .help h3 { color: #191b1d !important; font-size: 15px !important; margin: 12px 0 4px !important; }
.mb-sheet-bd .help li, .mb-sheet-bd .help p { color: #191b1d; }
/* App feel (owner 19/11/2026): touch screens never select text or pop the copy menu, except where people type;
   a mouse grabbing the page to scroll it (shell.js dragScroll) shows the grab hand and selects nothing. */
@media (pointer: coarse) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  input, textarea, [contenteditable], .mb-sel, .mb-sel * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
}
html.mb-grab, html.mb-grab * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }

/* Painted skin for small sheets (owner 30/11/2026: "đồng bộ với giao diện của từng game"). A game on a painted home sets
   on body.mb-light: --skin-frame (rail), --skin-head (header gradient), --skin-head-ink, --skin-line (inner thread),
   --skin-paper (body), --skin-card + --skin-card-line (cards), --skin-ink, --skin-muted, --skin-hover. shell.js adds
   .mb-skin when --skin-frame is set; without it the sheet stays the flat white card. */
body.mb-light .mb-sheet.mb-skin { background: var(--skin-paper); color: var(--skin-ink); border: 4px solid var(--skin-frame);
  box-shadow: inset 0 0 0 2px var(--skin-line), var(--ds-sh-pop, 0 10px 30px rgba(0, 0, 0, .18)); }
body.mb-light .mb-skin .mb-sheet-hd { margin: 0 0 12px; padding: 8px 8px 8px 16px; background: var(--skin-head); border-bottom: 2px solid var(--skin-line); }
body.mb-light .mb-skin .mb-sheet-hd h2 { color: var(--skin-head-ink); text-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
body.mb-light .mb-skin .mb-sheet-x { background: var(--ds-cream, #fff8e0); color: var(--skin-frame); box-shadow: inset 0 0 0 2px var(--skin-line); }
body.mb-light .mb-skin .mb-sheet-bd { color: var(--skin-ink); }
body.mb-light .mb-skin .big, body.mb-light .mb-skin .small, body.mb-light .mb-skin .lv, body.mb-light .mb-skin .seg button,
body.mb-light .mb-skin .tabs button, body.mb-light .mb-skin .opt, body.mb-light .mb-skin .rules button, body.mb-light .mb-skin .vgrid button,
body.mb-light .mb-skin .vcard, body.mb-light .mb-skin .cth, body.mb-light .mb-skin .card, body.mb-light .mb-skin .stats > div,
body.mb-light .mb-skin .daily-box, body.mb-light .mb-skin .bk-link, body.mb-light .mb-skin .qd-card, body.mb-light .mb-skin .mis li, body.mb-light .mb-skin .quest {
  border-color: var(--skin-card-line); background: var(--skin-card); color: var(--skin-ink); box-shadow: none; }
body.mb-light .mb-skin .big:hover, body.mb-light .mb-skin .small:hover, body.mb-light .mb-skin .lv:hover, body.mb-light .mb-skin .opt:hover,
body.mb-light .mb-skin .seg button:hover, body.mb-light .mb-skin .tabs button:hover { border-color: var(--skin-frame); background: var(--skin-hover); }
body.mb-light .mb-skin .seg button.active, body.mb-light .mb-skin .tabs button.on, body.mb-light .mb-skin .lv.active,
body.mb-light .mb-skin .rules button.active, body.mb-light .mb-skin .opt.on { border-color: var(--ds-primary, #335fff); background: var(--ds-primary-soft, #eef2ff); color: #2448d8; }
body.mb-light .mb-skin small, body.mb-light .mb-skin .note, body.mb-light .mb-skin .muted, body.mb-light .mb-skin .mis li span { color: var(--skin-muted); }
body.mb-light .mb-skin .mb-sheet-bd > .mb-in-sheet > .help { color: var(--skin-ink) !important; }
body.mb-light .mb-skin .help h2, body.mb-light .mb-skin .help h3, body.mb-light .mb-skin .help li, body.mb-light .mb-skin .help p,
body.mb-light .mb-skin .help b, body.mb-light .mb-skin .help strong { color: var(--skin-ink) !important; }
/* Green go / claim buttons keep their colour inside a skinned sheet. */
body.mb-light .mb-skin .big-go, body.mb-light .mb-skin .big-claim { border-color: var(--ok, #00a862); background: var(--ok, #00a862); color: #fff; }
