/* ================= 手机 · 骨架：全局 / 顶栏 / 弹窗 / toast / 菜单 =================
   归属：骨架线（fmobile）（方案 / 分工见 docs/mobile-a.md）。
   每条规则都挂在 html.m 下（js/core/mobile.js 判断是手机才加），电脑版一条都不命中；tests/mobile.test.js 逐条查。
   下面「旧规则」是从原 css/mobile.css 原样搬来的（第一遍 + mcity 的通用部分），A 方向的新骨架写在文件末尾「A 骨架」一节。 */

/* 手机模式插进来的元素：默认不显示（这些元素电脑上根本不存在） */
.m-x{display:none;}
/* ============ 0. 全局：视口、安全区、触控 ============ */
html.m{
  --m-top:44px;                                   /* 顶栏高 */
  --m-safe-t:env(safe-area-inset-top,0px);
  --m-safe-r:env(safe-area-inset-right,0px);
  --m-safe-b:env(safe-area-inset-bottom,0px);
  --m-safe-l:env(safe-area-inset-left,0px);
  --m-rail:68px;                                  /* 牌桌 rail 高 */
  touch-action:manipulation;                      /* 不要双击放大（误触），双指缩放照旧能用（无障碍） */
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
html.m.m-land{--m-top:40px;}
html.m body{min-height:0;height:100%;-webkit-tap-highlight-color:transparent;overscroll-behavior:none;}
html.m *{-webkit-touch-callout:none;}
html.m input,html.m select,html.m textarea{-webkit-touch-callout:default;user-select:text;font-size:16px;}   /* ≥16px：iOS 聚焦输入框不自动放大 */
/* 画面容器：避开刘海 / 圆角 / 底部横条；背景照样铺满 */
html.m .screen{padding-left:var(--m-safe-l);padding-right:var(--m-safe-r);}
html.m .screen > .content{margin-top:calc(var(--m-top) + var(--m-safe-t));}

/* ============ 1. 顶栏：一行紧凑（时间 · 现金 · 会员卡 · ATM · 抽屉键） ============ */
html.m #topbar{height:calc(var(--m-top) + var(--m-safe-t));padding:var(--m-safe-t) calc(8px + var(--m-safe-r)) 0 calc(10px + var(--m-safe-l));gap:8px;}
html.m #topbar .logo,html.m #topbar > .sep,html.m #hStatus{display:none;}
html.m #topbar .hitem{gap:5px;}
html.m #topbar .hitem .ic{width:15px;height:15px;}
html.m #topbar .hitem b{font-size:15px;}
html.m #topbar .grow{min-width:0;}
html.m #topbar .kv b{font-size:16px;}
html.m #topbar .kv small{font-size:10px;}
html.m #topbar .btn,html.m #topbar .badge{position:relative;flex:none;}
html.m #topbar .btn{height:34px;padding:0 10px;font-size:12px;gap:5px;}
html.m #topbar .badge{height:26px;padding:0 8px;font-size:11px;}
/* 触控：顶栏按钮看着 34px，点得到的范围 ≥ 44px */
html.m #topbar .btn::before,html.m #topbar .badge::before{content:"";position:absolute;left:-3px;right:-3px;top:50%;height:44px;margin-top:-22px;}
html.m #topbar .m-x.btn{display:inline-flex;}
html.m #topbar .m-x.btn .ic{width:16px;height:16px;}
html.m.m-port #topbar .m-roadbtn span,html.m.m-port #webSaveBtn{font-size:0;gap:0;}
html.m.m-port #webSaveBtn .ic{width:16px;height:16px;}
/* 竖屏 390 宽：ATM 只留字，现金去掉小标签 */
html.m.m-port #topbar{gap:6px;}
html.m.m-port #topbar .kv small{display:none;}
html.m.m-port #topbar .hitem > .ic{display:none;}
html.m.m-port #topbar .btn:not(.m-x) > .ic{display:none;}
/* 网页版「存档」键：竖屏只留图标（字号 0）——上一条把图标也收了，只剩一个空框：图标放回来 */
html.m.m-port #topbar #webSaveBtn > .ic{display:inline-block;}
/* 375 宽 + 网页版「存档」键 + 现金八位数（$52,345,678）：原来多出 2px 把齿轮挤出屏——现金、存档键左右内距各收一点 */
html.m.m-port #topbar #webSaveBtn{padding:0 8px;}
html.m.m-port #topbar .hcash{padding:0 3px;}
/* 行为镜子「Reality Check」原来塞在顶栏中间：手机上改成顶栏下面一条横幅 */
html.m #topbar .mr-top{position:fixed;left:calc(8px + var(--m-safe-l));right:calc(8px + var(--m-safe-r));top:calc(var(--m-top) + var(--m-safe-t) + 6px);
  max-width:none;height:auto;min-height:48px;padding:6px 6px 6px 12px;z-index:31;
  background:linear-gradient(180deg,#221913,#120c09);border:1px solid var(--brass-500);border-radius:var(--r-1);box-shadow:var(--shadow-2);}
html.m #topbar .mr-top .btn{height:36px;padding:0 12px;font-size:12px;}
html.m #topbar .mr-top-t{white-space:normal;}

/* ============ 2. 抽屉：右边（其它桌 / 会员卡 · 钱包 · 账本）· 左边（路单屏） ============ */
html.m.m-drawer .screen.active,html.m.m-road .screen.active{z-index:40;}
html.m .m-scrim{display:block;position:fixed;inset:0;z-index:48;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .2s ease;}
html.m.m-drawer .m-scrim,html.m.m-road .m-scrim{opacity:1;pointer-events:auto;}
html.m .screen .lt-layout > aside.lt-side,
html.m #floorScreen .concierge{
  position:fixed !important;top:0;right:0;bottom:0;left:auto;z-index:50;width:min(340px,88vw);height:auto;
  padding:var(--m-safe-t) var(--m-safe-r) var(--m-safe-b) 0;
  transform:translateX(104%);transition:transform .22s ease;visibility:hidden;
  box-shadow:-18px 0 40px rgba(0,0,0,.7);border-left:1px solid var(--brass-700);
}
html.m.m-drawer .screen.active .lt-layout > aside.lt-side,
html.m.m-drawer #floorScreen.active .concierge{transform:none;visibility:visible;}
/* 抽屉里的桌行、按钮：点得到 */
html.m .lt-side .tcard{padding:12px 14px;min-height:56px;}
html.m .lt-side .foot{padding:12px 14px calc(12px + var(--m-safe-b));}
html.m .lt-side .foot .btn{height:44px;}
html.m .lt-side .sh{padding:12px 14px;}

/* ============ 3. 弹窗：全屏；小确认框变成整宽的一块 ============ */
html.m .modal{align-items:stretch;justify-content:stretch;backdrop-filter:none;}
html.m .modal-box,
html.m .modal-box.w440,html.m .modal-box.w520,html.m .modal-box.w600,html.m .modal-box.w760{
  width:100% !important;max-width:none !important;height:100%;max-height:none !important;border-radius:0;border-left:0;border-right:0;
  padding:var(--m-safe-t) var(--m-safe-r) var(--m-safe-b) var(--m-safe-l);
}
html.m .modal-box > h3,html.m .modal-box .mh{flex:none;min-height:52px;padding:10px 6px 8px 16px;font-size:16px;letter-spacing:.08em;}
html.m .modal-box .mh span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html.m .modal-box .mh .x{width:16px;height:16px;padding:14px;box-sizing:content-box;margin:-10px 0 -10px auto;flex:none;}
html.m .modal-box .mb{flex:1 1 auto;padding:14px 16px;font-size:14px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
html.m .modal-box .mf,html.m .modal-box .modal-actions{flex:none;flex-wrap:wrap;padding:10px 16px 12px;border-top:1px solid var(--brass-900);}
html.m .modal-box .mf .btn,html.m .modal-box .modal-actions .btn{height:44px;min-width:96px;font-size:14px;}
/* 确认框（askConfirm）/ 网页版欢迎：内容少，整宽贴在中间，不铺满 */
html.m .modal.ask-modal,html.m .modal.web-modal{align-items:center;padding:12px calc(12px + var(--m-safe-r)) 12px calc(12px + var(--m-safe-l));}
html.m .ask-modal .modal-box,html.m .web-modal .modal-box{height:auto;max-height:100% !important;border-radius:var(--r-2);border:1px solid var(--brass-700);padding:0;}
html.m .ask-modal .mf .btn,html.m .web-modal .mf .btn{flex:1 1 0;}

/* ============ 4. Toast：放到顶栏下面正中，不盖 rail 和按钮 ============ */
/* v75 游戏自己的说明框（.ui-tip，手机上长按出，js/core/mobile.js）· (i) 弹层（.ui-pop，城里店铺）：不超过屏宽，字 13 */
html.m .ui-tip{max-width:min(320px,calc(100vw - 16px));padding:8px 12px;font-size:13px;}
html.m .th-pop.ui-pop{max-width:calc(100vw - 16px);}
html.m.m-col .ui-tip,html.m.m-col .th-pop.ui-pop{max-width:calc(100% - 16px);}
html.m #toasts{left:calc(10px + var(--m-safe-l));right:calc(10px + var(--m-safe-r));bottom:auto;top:calc(var(--m-top) + var(--m-safe-t) + 8px);align-items:center;gap:6px;pointer-events:none;}
html.m .toast{max-width:min(520px,100%);font-size:13px;pointer-events:auto;transform:translateY(-12px);}
html.m .toast.in{transform:none;}
html.m .toast .toast-btn{height:44px;padding:0 16px;font-size:14px;}   /* v74 券的 [去吧台] / [接下来] 也是它：手指点得到 */
/* 横屏牌桌：正中上方是荷官的牌，toast 放左上（那里是远处的座位） */
html.m.m-land.m-game #toasts{right:auto;align-items:flex-start;width:min(380px,46vw);}
/* 牌桌上 toast 不挡手指：点得穿（下面的注区 / 倒计时环照样能点），只有 toast 里的按钮接点击 */
html.m.m-game .toast{pointer-events:none;}
html.m.m-game .toast .toast-btn,html.m.m-game .toast button,html.m.m-game .toast a{pointer-events:auto;}
/* Craps 倒计时环在左上角：toast 往右让开它 */
html.m.m-land[data-mscreen="crScreen"] #toasts{left:calc(62px + var(--m-safe-l));}
/* ============ 5.（原「竖屏拿着进了牌桌：请横过来」整页提示）A 方向去掉了：竖屏有自己的牌桌框架，见 css/m/table.css ============ */
/* ---- 从原 §14 搬来：横屏弹窗头 / 脚再薄一点（通用） ---- */
/* 横屏弹窗头 / 脚再薄一点，正文多留高度 */
html.m.m-land .modal-box > h3,html.m.m-land .modal-box .mh{min-height:44px;padding-top:6px;padding-bottom:6px;}
html.m.m-land .modal-box .mf,html.m.m-land .modal-box .modal-actions{padding-top:6px;padding-bottom:6px;}
html.m.m-land .modal-box .mf .btn,html.m.m-land .modal-box .modal-actions .btn{height:40px;}
/* ---- 从原 §17 搬来（通用）---- */
/* 画面里面的弹窗（百家乐桌规 / 扑克买入这类，在 .screen 这一层里，盖不过顶栏）：从顶栏下沿开始铺 */
html.m .screen .modal{top:calc(var(--m-top) + var(--m-safe-t));}
/* ---- 从原「第二轮大厅」搬来：顶栏现金 / 筹码两格（通用顶栏） ---- */
html.m #topbar .hcash small{display:none;}
/* 场外带着筹码（Money.carry）：手机上现金不带字，筹码这一格留一个小字「筹码」叠在数上面，免得两个数分不清 */
html.m #topbar .hcash.hchips{flex-direction:column;justify-content:center;gap:0;line-height:1;}
html.m #topbar .hcash.hchips small{display:block;font-size:10px;letter-spacing:.06em;}
html.m #topbar .hcash.hchips b{font-size:15px;}
html.m #topbar .hcash.split{flex-direction:column;justify-content:center;gap:0;line-height:1;}   /* 带着筹码时现金格也带小字「现金」，两格对齐 */
html.m #topbar .hcash.split small{display:block;font-size:10px;letter-spacing:.06em;}
html.m #topbar .hcash.split b{font-size:15px;}
/* ---------- mcity 1. 顶栏：竖屏 375 宽放得下（星期 / 声音收起，声音挪进齿轮菜单第一行，js/core/lobby-ui.js）---------- */
html.m #topbar .lp-cal,html.m #topbar .lp-mail{margin-left:0;}
html.m #topbar .lp-nw{margin-right:0;}
html.m #topbar .ibtn{position:relative;flex:none;width:44px;height:var(--m-top);border-radius:var(--r-1);}
html.m #topbar .ibtn::before{content:"";position:absolute;left:0;right:0;top:50%;height:44px;margin-top:-22px;}   /* 横屏顶栏 40 高：点击范围扩到 44 */
html.m #topbar .ibtn .ic{width:18px;height:18px;}
html.m #topbar .hitem .ibtn .ic{width:17px;height:17px;}
html.m #topbar .hitem{align-items:center;gap:2px;}
html.m #topbar .hcash{align-items:center;justify-content:center;min-width:44px;height:var(--m-top);padding:0 6px;flex:none;}
html.m #topbar .hcash b{font-size:17px;}
html.m #topbar .mcard{height:var(--m-top);padding:0 4px;gap:6px;flex:none;}
html.m #topbar .mcard .tx{min-width:0;}
html.m #topbar .lp-cal b{top:4px;right:2px;}
html.m #topbar .lp-mail i,html.m #topbar .fl-ph i{top:9px;right:7px;}
html.m.m-port #topbar{gap:0;padding-left:calc(8px + var(--m-safe-l));padding-right:calc(4px + var(--m-safe-r));}
html.m.m-port #topbar .grow{flex:1 1 0;}
html.m.m-port #topbar .hitem{margin-right:2px;}
html.m.m-port #topbar .hitem b{font-size:16px;}
html.m.m-port #hDay,html.m.m-port #hSound{display:none;}
html.m #topbar #hDay{margin-left:4px;}   /* .hitem 间距收到 2（给声音键）后「14:10周二」贴死了：星期前面空一点 */
html.m.m-port #topbar .mcard .face{width:38px;height:24px;}
/* 齿轮菜单 / 日历 / 饮食档：贴顶栏下沿，行高 44；日历整宽一块（原来贴着按钮往右开，会出屏） */
html.m .ui-menu{top:calc(var(--m-top) + var(--m-safe-t) + 4px) !important;right:calc(8px + var(--m-safe-r)) !important;max-width:calc(100vw - 16px);
  max-height:calc(var(--m-vh,100vh) - var(--m-top) - 16px);overflow-y:auto;overscroll-behavior:contain;}
html.m .ui-menu .row{min-height:44px;padding-top:0;padding-bottom:0;font-size:14px;}
html.m .lp-cal-pop{left:calc(8px + var(--m-safe-l)) !important;right:calc(8px + var(--m-safe-r));width:auto;max-width:440px;
  top:calc(var(--m-top) + var(--m-safe-t) + 4px) !important;max-height:calc(var(--m-vh,100vh) - var(--m-top) - 16px);overscroll-behavior:contain;}
html.m .cal-h{min-height:44px;padding-top:0;padding-bottom:0;}
html.m .cal-h .ibtn{width:44px;height:44px;margin:0 -10px 0 auto;}
html.m .cal-row{min-height:48px;padding-top:6px;padding-bottom:6px;}
html.m .cal-f{min-height:44px;padding-top:0;padding-bottom:0;}
html.m .fl-diet{left:auto !important;right:calc(8px + var(--m-safe-r)) !important;top:calc(var(--m-top) + var(--m-safe-t) + 4px) !important;max-width:calc(100vw - 16px);}
html.m .fl-diet .seg{display:flex;}
html.m .fl-diet .seg button{flex:1 1 0;height:44px;padding:0 10px;font-size:14px;}
/* ---------- mcity 5. 右上角一行消息（客户经理 / 事件 / 成就）：顶栏下面整宽（横屏靠右），按钮 44 ---------- */
html.m #lpPops{top:calc(var(--m-top) + var(--m-safe-t) + 6px);left:calc(8px + var(--m-safe-l));right:calc(8px + var(--m-safe-r));align-items:stretch;}
html.m.m-land #lpPops{left:auto;width:min(420px,60vw);}
html.m .lp-pop{max-width:none;min-height:48px;}
html.m .lp-pop .acts .btn{height:44px;min-width:64px;}

/* ---------- mcity 6. 弹窗通用：标题栏 (i) 44 见方；脚上的键 44 高（竖屏等宽排满，放不下再折行）；正文里的分段键 44 高 ---------- */
html.m .modal-box .mh .cm-i,html.m .modal-box .mh .th-i,html.m .modal-box .mf .th-i{width:44px;height:44px;margin-top:-6px;margin-bottom:-6px;margin-right:0;flex:none;}
html.m.m-land .modal-box .mf .btn,html.m.m-land .modal-box .modal-actions .btn{height:44px;}
html.m.m-port .modal-box .mf .btn,html.m.m-port .modal-box .modal-actions .btn{flex:1 1 auto;padding:0 12px;}
html.m.m-port .modal-box .mf .sp{flex:0 0 0;min-width:0;}
html.m .modal-box .mb .seg button{min-height:44px;}

/* ======================================================================================================
   A 骨架（docs/mobile-a.md · 样稿 design-options/mobile/A）：竖屏为主场的「单手 App」
   · html.m-port = 按竖屏排（场外一律竖排；牌桌跟着手机）· html.m-col = 手机横着拿、场外按竖屏排成居中一列（最宽 480，两边台布纹理，不弹「请转回来」）
   · html.m-off = 场外画面（大厅 / 分厅 / 城市 / 扑克房…）· html.m-tabs = 这一屏有底部 5 个标签
   · 尺寸：顶栏行 48（安全区下面）· 标签栏 56 + 安全区 · 抽屉三段 · 触控 ≥ 44 · 正文 ≥ 13 · 标签字 11（只有这里）
   ====================================================================================================== */
html.m{--m-tabh:56px;--ma-hair:rgba(201,160,82,.26);--ma-hair2:rgba(201,160,82,.55);--ma-tx3:#9a8f78;}
html.m.m-off{--m-top:48px;}
html.m.m-col{--m-tabh:48px;}
html.m.m-col.m-off{--m-top:44px;}   /* 横着拿只有 393（工具栏时 340）高：顶栏 44、标签栏 48（样稿横屏也是这么收的） */

/* ---------- 横着拿 · 场外：竖版一列居中（body 当容器：里面所有 fixed 的画面 / 弹窗 / toast 都落在这一列里） ---------- */
html.m.m-col{background:radial-gradient(ellipse at 50% 40%,rgba(255,200,130,.05),transparent 60%),
  repeating-linear-gradient(45deg,rgba(255,255,255,.012) 0 2px,transparent 2px 5px),linear-gradient(180deg,#0d2a20,#06140f);}
html.m.m-col body{position:fixed;top:0;bottom:0;left:max(0px,calc(50% - 240px));width:min(480px,100%);height:auto;overflow:hidden;transform:translateZ(0);
  box-shadow:0 0 0 1px rgba(201,160,82,.12),0 0 60px rgba(0,0,0,.8);--m-safe-l:0px;--m-safe-r:0px;}
/* body 带 transform，里面 fixed 的画面都算 body 的溢出：scrollIntoView 会把 body（hidden 也能被脚本滚）推上去、顶栏没了。clip = 脚本也滚不动（老 iOS 由 js/m/lobby.js 拉回 0） */
html.m.m-col body{overflow:clip;}

/* ---------- 顶栏（场外竖排）：左 时间 / 星期 · 右 现金 · 存款（都带标签）· 齿轮；会员卡 / 消息 / 日历 / 声音挪进标签和菜单 ---------- */
html.m.m-off.m-port #topbar{height:calc(var(--m-top) + var(--m-safe-t));padding:var(--m-safe-t) calc(4px + var(--m-safe-r)) 0 calc(16px + var(--m-safe-l));gap:4px;
  background:linear-gradient(180deg,#140e0a,#100b08);border-bottom:1px solid var(--ma-hair);}
html.m.m-off.m-port #topbar .hitem{flex-direction:column;align-items:flex-start;justify-content:center;gap:0;line-height:1.15;margin-right:0;}
html.m.m-off.m-port #topbar .hitem b{font-size:17px;}
html.m.m-off.m-port #topbar #hDay{display:block;margin-left:0;font-size:12px;color:var(--ma-tx3);letter-spacing:.04em;}
html.m.m-off.m-port #topbar #hTier,html.m.m-off.m-port #topbar #hNw,html.m.m-off.m-port #topbar #hCal,html.m.m-off.m-port #topbar #hPark,html.m.m-off.m-port #topbar #hMail,html.m.m-off.m-port #topbar #hPhone,html.m.m-off.m-port #topbar #hSound,html.m.m-off.m-port #topbar .m-roadbtn,html.m.m-off.m-port #topbar .m-navbtn{display:none;}
html.m.m-off.m-port #topbar .hcash{flex-direction:column;align-items:flex-end;justify-content:center;gap:0;line-height:1.15;height:var(--m-top);min-width:44px;padding:0 8px;}
html.m.m-off.m-port #topbar .hcash small{display:block;font-size:12px;color:var(--ma-tx3);letter-spacing:.04em;opacity:1;}
html.m.m-off.m-port #topbar .hcash b{font-size:17px;line-height:1.2;}
html.m.m-off.m-port #topbar .hcash.zero b{color:var(--ma-tx3);}
html.m.m-off.m-port #topbar #hGear{width:44px;}

/* ---------- 「没筹码了」提示条：没筹码时大厅列表最上面一条（不再是盖住列表的气泡）；有钱直接一键换（$1,000 / $10,000 / 全部），放不下就换到第二行 ---------- */
html.m.m-port #lobby.broke .m-notice{display:flex;}
html.m .m-notice{align-items:center;gap:12px;min-height:56px;margin:12px 16px 2px;padding:10px 12px 10px 14px;border-radius:12px;
  background:linear-gradient(180deg,rgba(247,164,60,.10),rgba(247,164,60,.05));border:1px solid rgba(247,164,60,.35);color:var(--tx-1);}
html.m .m-notice p{flex:1;min-width:0;margin:0;font-size:14px;line-height:1.35;}
html.m .m-notice p b{font-weight:400;}
html.m .m-notice p small{display:block;font-size:13px;color:var(--ma-tx3);opacity:1;}
html.m .m-notice{flex-wrap:wrap;row-gap:8px;} html.m .m-notice p{flex:1 0 auto;}
html.m .m-notice .mq{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex:1 1 auto;}
html.m .m-notice .btn{height:44px;padding:0 14px;flex:none;} html.m .m-notice .mq .btn{flex:1 1 auto;}
html.m.m-port #lobbyCoach{display:none !important;}   /* 原来盖在列表上的「身上没带钱」气泡（内联 display）：A 换成上面那条 */

/* ---------- 底部 5 个标签：赌场 / 城市 / 商店 / 手机 / 家（js/m/shell.js） ---------- */
html.m.m-tabs .m-tabs{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--m-tabh) + var(--m-safe-b));
  padding:0 var(--m-safe-r) var(--m-safe-b) var(--m-safe-l);background:linear-gradient(180deg,#120d0a,#0b0806);border-top:1px solid var(--ma-hair);}
html.m .m-tabs button{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative;
  border:0;background:none;color:var(--ma-tx3);font-family:var(--sans);font-size:11px;letter-spacing:.06em;cursor:pointer;-webkit-tap-highlight-color:transparent;}
html.m .m-tabs button .ic{width:24px;height:24px;}
html.m .m-tabs button.on{color:var(--brass-300);}
html.m .m-tabs button.on::before{content:"";position:absolute;top:-1px;left:30%;right:30%;height:2px;border-radius:0 0 2px 2px;background:var(--brass-300);}
html.m .m-tabs .m-badge{display:none;position:absolute;top:8px;left:calc(50% + 7px);width:9px;height:9px;border-radius:50%;background:#c4402f;box-shadow:0 0 0 2px #0e0a07;}
html.m .m-tabs button.dot .m-badge{display:block;}
/* 有标签栏的画面：底边让出标签栏；里面再用到的「底部安全区」归零（标签栏已经让过了） */
/* bottom 要用 html 上记的那份原值（--m-tabsb）：同一个元素上 --m-safe-b 已经归零，直接用它会少让横条那 34（场外线集成时并进来） */
html.m{--m-tabsb:var(--m-safe-b);}
html.m.m-tabs .screen.active{bottom:calc(var(--m-tabh) + var(--m-tabsb));--m-safe-b:0px;}
html.m.m-tabs #toasts{bottom:calc(var(--m-tabh) + var(--m-safe-b) + 8px);}

/* ---------- 底部抽屉（MobileA.sheet）：三段高度，拖把手 / 甩 ---------- */
html.m .m-sheet{display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:57;max-height:calc(100% - var(--m-safe-t) - 8px);
  padding:0 var(--m-safe-r) 0 var(--m-safe-l);border-radius:18px 18px 0 0;background:linear-gradient(180deg,#1b130f,#120d0a);color:var(--tx-1);
  box-shadow:0 -1px 0 var(--ma-hair2),0 -18px 40px rgba(0,0,0,.6);transform:translateY(calc(100% + 24px));visibility:hidden;
  transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear .28s;}
html.m .m-sheet.on{transform:translateY(var(--m-sheet-y,0px));visibility:visible;transition:transform .28s cubic-bezier(.2,.8,.2,1);}
html.m .m-sheet.drag{transition:none;}
html.m .m-grab{flex:none;height:28px;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab;}
html.m .m-grab::before{content:"";width:40px;height:5px;border-radius:3px;background:rgba(232,222,198,.28);}
html.m .m-sheet-h{flex:none;display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:0 18px 8px;touch-action:none;}
html.m .m-sheet-h:empty{display:none;}
html.m .m-sheet-h b{font-family:var(--serif);font-weight:400;font-size:20px;color:var(--brass-100);}
html.m .m-sheet-h small{font-size:13px;color:var(--ma-tx3);opacity:1;}
html.m .m-sheet-b{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(12px + var(--m-safe-b));}
html.m .m-sheet-scrim{display:block;position:fixed;inset:0;z-index:56;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .25s;}
html.m .m-sheet-scrim.on{opacity:1;pointer-events:auto;}
/* 抽屉里的列表菜单（「⋯」/「手机」）：一行 56，图标 · 字 · 小字 · 右箭头 */
html.m .m-menu{display:flex;flex-direction:column;padding:0 8px;}
html.m .m-mi{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:6px 12px;border:0;border-top:1px solid rgba(201,160,82,.1);background:none;
  color:var(--tx-1);font-family:var(--sans);font-size:16px;text-align:left;cursor:pointer;position:relative;border-radius:10px;}
html.m .m-mi:first-child{border-top:0;}
html.m .m-mi:active{background:rgba(201,160,82,.08);}
html.m .m-mi .mi-ic{width:36px;height:36px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#0c0806;border:1px solid var(--ma-hair);color:var(--brass-300);}
html.m .m-mi .mi-ic .ic{width:20px;height:20px;}
html.m .m-mi .mi-t{flex:1;min-width:0;line-height:1.3;}
html.m .m-mi .mi-t small{display:block;font-size:13px;color:var(--ma-tx3);opacity:1;}
html.m .m-mi > .ic{width:18px;height:18px;color:var(--brass-700);flex:none;}
html.m .m-mi em{font-style:normal;font-size:14px;color:var(--tx-2);flex:none;}
html.m .m-mi .mi-dot{width:9px;height:9px;border-radius:50%;background:#c4402f;flex:none;}
html.m .m-mi.danger{color:#f0c4c9;}
html.m .m-mi.danger .mi-ic{color:#f0c4c9;border-color:rgba(138,34,48,.7);}

/* ---------- 可滚动的整页：场外画面里的长内容用 .m-scroll（自然滚动，不再整站 fixed 不能滑） ---------- */
html.m .m-scroll{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
