/* Noto Sans Lao 可变字重子集，仅覆盖老挝文码位；自托管是为了离线也能显示。*/
@font-face{font-family:'Noto Sans Lao';font-style:normal;font-weight:100 900;font-display:swap;src:url(../fonts/NotoSansLao.woff2) format('woff2');unicode-range:U+0E81-0EDF,U+200C-200D,U+25CC}
/* 使用场景：户外、强光或夜间、单手、可能戴着手套或急着用。
   因此：高对比、超大点击区、零动画干扰、支持明暗模式无缝切换（跟随系统并支持手动持久化）。
   列表只给中文 + 淡化的读音提示 —— 老挝文使用者自己看不懂，占地方还挡检索；
   它只在大字卡上出现，那一屏是给对面的人看的。 */
:root{
  --bg:#f4f5f7; --card:#fff; --zebra:#eef1f6; --ink:#111318; --sub:#6b7280;
  --line:#e3e6ec; --accent:#0b62d6; --accent-ink:#fff; --warn:#b23c17;
  --press:#dce8fb; --press-ink:#111318;
  --mask:rgba(17,19,24,.32);
  --theme-btn-bg:#374151; --theme-btn-ink:#ffffff; --theme-btn-line:#4b5563;
  --brand-prefix:var(--ink); --brand-join:#57606a; --brand-country:#0b62d6;
  --brand-country-glow:0 0 8px rgba(11,98,214,.42);
  --pill-ok-ink:#0a7a3d; --pill-ok-line:#bfe6cf; --pill-ok-bg:#eefaf2;
  --pill-bad-ink:var(--warn); --pill-bad-line:#f0cfc2; --pill-bad-bg:#fdf1ec;
  --lao:"Noto Sans Lao","Lao Sangam MN","Lao UI",system-ui,sans-serif;
  --safe-b:env(safe-area-inset-bottom,0px);
  --sheet-bg:#fff;
  --sheet-hero-bg:#faecc3;
  --sheet-hero-ink:#111318;
  --sheet-aid-bg:#f3f5f8;
  --sheet-ctrl-bg:#e4e7ed;
  --sheet-btn-bg:#ffffff;
  --sheet-btn-ink:#111318;
  --sheet-btn-active-bg:#111318;
  --sheet-btn-active-ink:#ffffff;
  --sheet-zh-dim:#8a919e;
  --sheet-hint:#737b89;
  --board-opt-sub:#475569;
  --a2hs-bg:#eaf1fd;
  --a2hs-line:#cfe0fa;
  --a2hs-ink:#20304a;
}
:root[data-theme="dark"]{
  --bg:#121418;
  --card:#1a1d24;
  --zebra:#222731;
  --ink:#f0f3f8;
  --sub:#9ca3af;
  --line:#2c323f;
  --accent:#3b82f6;
  --accent-ink:#fff;
  --warn:#ef4444;
  --press:#2b394e;
  --press-ink:#f0f3f8;
  --mask:rgba(0,0,0,.6);
  --theme-btn-bg:#d1d5db;
  --theme-btn-ink:#111318;
  --theme-btn-line:#9ca3af;
  --brand-prefix:var(--ink);
  --brand-join:#9ca3af;
  --brand-country:#60a5fa;
  --brand-country-glow:0 0 10px rgba(96,165,250,.65);
  --pill-ok-ink:#4ade80;
  --pill-ok-line:#14532d;
  --pill-ok-bg:#052e16;
  --pill-bad-ink:#f87171;
  --pill-bad-line:#7f1d1d;
  --pill-bad-bg:#450a0a;
  --sheet-bg:#121418;
  --sheet-hero-bg:#382705;
  --sheet-hero-ink:#fff9e6;
  --sheet-aid-bg:#1c202a;
  --sheet-ctrl-bg:#15181f;
  --sheet-btn-bg:#d0d5dd;
  --sheet-btn-ink:#111318;
  --sheet-btn-active-bg:#111318;
  --sheet-btn-active-ink:#ffffff;
  --sheet-zh-dim:#8590a2;
  --sheet-hint:#7b8494;
  --board-opt-sub:#cbd5e1;
  --a2hs-bg:#1a2233;
  --a2hs-line:#26344d;
  --a2hs-ink:#cbd5e1;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#121418;
    --card:#1a1d24;
    --zebra:#222731;
    --ink:#f0f3f8;
    --sub:#9ca3af;
    --line:#2c323f;
    --accent:#3b82f6;
    --accent-ink:#fff;
    --warn:#ef4444;
    --press:#2b394e;
    --press-ink:#f0f3f8;
    --mask:rgba(0,0,0,.6);
    --theme-btn-bg:#d1d5db;
    --theme-btn-ink:#111318;
    --theme-btn-line:#9ca3af;
    --brand-prefix:var(--ink);
    --brand-join:#9ca3af;
    --brand-country:#60a5fa;
    --brand-country-glow:0 0 10px rgba(96,165,250,.65);
    --pill-ok-ink:#4ade80;
    --pill-ok-line:#14532d;
    --pill-ok-bg:#052e16;
    --pill-bad-ink:#f87171;
    --pill-bad-line:#7f1d1d;
    --pill-bad-bg:#450a0a;
    --sheet-bg:#121418;
    --sheet-hero-bg:#382705;
    --sheet-hero-ink:#fff9e6;
    --sheet-aid-bg:#1c202a;
    --sheet-ctrl-bg:#15181f;
    --sheet-btn-bg:#d0d5dd;
    --sheet-btn-ink:#111318;
    --sheet-btn-active-bg:#111318;
    --sheet-btn-active-ink:#ffffff;
    --sheet-zh-dim:#8590a2;
    --sheet-hint:#7b8494;
    --board-opt-sub:#cbd5e1;
    --a2hs-bg:#1a2233;
    --a2hs-line:#26344d;
    --a2hs-ink:#cbd5e1;
  }
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.5 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}
/* 这里曾经写着 overscroll-behavior-y:none，本意是防页面回弹，
   代价是把 iOS Safari 的橡皮筋与惯性手感一起关掉了，滑起来发涩。
   防穿透交给大字卡打开时的 body.sheet-open 锁定，不再牵连整页手感。 */

/* 右下角浮动分类按钮：固定在右下角，大拇指易触达，避让底部横条与离线状态条 */
#catBtn .caret{font-size:11px;opacity:.85}
#catBtn:active{transform:scale(0.96);opacity:.9}

/* 二级浮动菜单：点「分类」才出现，平时不占一行 */
.menu{position:fixed;inset:0;z-index:30}
.menu[hidden]{display:none}
.menu-back{position:absolute;inset:0;background:var(--mask)}
/* 菜单靠浮动按钮那一侧展开，宽度按内容收窄 —— 原来 left/right 各 12px 几乎占满屏宽，
   里面只有分类名和条数两列，空得发虚。 */
.menu-panel{position:absolute;right:16px;left:auto;width:min(62vw,248px);
  bottom:calc(66px + var(--safe-b));
  max-height:65vh;overflow-y:auto;background:var(--card);border-radius:14px;
  box-shadow:0 10px 30px rgba(17,19,24,.24);padding:4px;
  transform:translateY(10px) scale(.97);opacity:0;
  transform-origin:100% 100%;transition:transform .14s ease-out,opacity .14s ease-out;
  will-change:transform,opacity}
.menu.open .menu-panel{transform:none;opacity:1}
.menu-back{transition:opacity .14s ease-out;opacity:0}
.menu.open .menu-back{opacity:1}
.menu-panel button{display:flex;width:100%;align-items:center;gap:8px;
  min-height:46px;padding:0 12px;border:0;background:transparent;color:inherit;
  font-size:16px;text-align:left;border-radius:9px;white-space:nowrap;
  touch-action:manipulation}
/* 隔行底色，跟列表页一个道理，便于扫 */
.menu-panel button:nth-of-type(even){background:var(--zebra)}
.menu-panel button[aria-current="true"]{color:var(--accent);font-weight:700}
.menu-panel .n{margin-left:auto;font-size:13px;color:var(--sub);font-weight:400}
.menu-panel button:active{background:var(--zebra)}

/* 紧凑列表 + 隔行底色，便于快速扫；底部留足内边距防止浮动按钮遮挡最后一行 */
.row{display:flex;align-items:center;width:100%;margin:0;padding:0;
  min-height:44px;background:var(--card);border:0;
  border-bottom:1px solid var(--line);color:inherit;font:inherit;
  /* 屏外的行跳过布局与绘制。contain-intrinsic-size 给的是**内容盒**高度，
     不含 padding 与边框，直接填行的整体高度会把总高撑大（实测多算 8.7%，
     滚动条长度会跳）。用 auto 关键字让浏览器记住每行上次渲染的真实尺寸，
     后面的 45px 只是首次渲染前的估值（46 行高 − 1 边框）。 */
  content-visibility:auto;contain-intrinsic-size:auto 45px;
  touch-action:manipulation}
.row:nth-of-type(even){background:var(--zebra)}
.row:has(.row-main:active),.row-main:active{background:var(--press)}
.row-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;
  text-align:left;margin:0;padding:4px 4px 4px 14px;border:0;background:transparent;
  color:inherit;font:inherit;cursor:pointer;touch-action:manipulation;-webkit-appearance:none;appearance:none}
.row .zh{font-size:16px;font-weight:600;line-height:1.22;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .x{font-size:12px;color:var(--sub);margin-top:2px;line-height:1.2;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fav{flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;margin:0 4px 0 0;
  display:flex;align-items:center;justify-content:center;border:0;background:transparent;
  color:#9ca3af;font-size:20px;line-height:1;cursor:pointer;touch-action:manipulation;
  -webkit-appearance:none;appearance:none}
.fav[aria-pressed="true"]{color:#eab308}
.fav:active{transform:scale(1.25);transition:transform .08s}
.gtitle{padding:10px 14px 6px;font-size:12px;color:var(--sub);font-weight:700;
  letter-spacing:.08em;background:var(--bg)}
.empty{padding:48px 16px;text-align:center;color:var(--sub)}

#a2hs{display:flex;align-items:center;gap:8px;padding:7px 12px;
  background:var(--a2hs-bg);border-bottom:1px solid var(--a2hs-line);font-size:12px;color:var(--a2hs-ink)}
#a2hs[hidden]{display:none}
#a2hsText{flex:1 1 auto;min-width:0}
#a2hsGo{flex:0 0 auto;height:26px;padding:0 12px;border:0;border-radius:13px;
  background:var(--accent);color:#fff;font-size:12px;font-weight:600;
  touch-action:manipulation}
#a2hsX{flex:0 0 auto;width:26px;height:26px;border:0;background:transparent;
  color:var(--a2hs-ink);opacity:.7;font-size:18px;line-height:1;touch-action:manipulation}

/* 顶部细信息带：只放离线状态与句数，不放操作。 */
#topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;
  padding:calc(env(safe-area-inset-top,0px) + 5px) 12px 5px;background:var(--bg);
  border-bottom:1px solid var(--line);font-size:12px}
#brand{font-size:15px;font-weight:700;letter-spacing:.02em;white-space:nowrap;flex:0 0 auto}
.brand-flag{margin-right:2px}
.brand-prefix{color:var(--brand-prefix);font-weight:700}
.brand-join{font-size:12px;font-weight:400;color:var(--brand-join);margin:0 2px}
.brand-country{color:var(--brand-country);font-weight:800;text-shadow:var(--brand-country-glow)}
#topbar .pill{margin-left:auto;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#liveBtn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  height:28px;padding:0 9px;border-radius:14px;cursor:pointer;
  font-size:12px;font-weight:600;letter-spacing:.02em;
  border:1px solid var(--theme-btn-line);background:var(--theme-btn-bg);
  color:var(--theme-btn-ink);touch-action:manipulation;line-height:1;transition:all .15s}
#liveBtn:active{transform:scale(.92)}
#liveBtn[aria-pressed="true"]{
  background:#dc2626;color:#ffffff;border-color:#b91c1c;
  box-shadow:0 0 8px rgba(220,38,38,.5);
}
#themeBtn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:28px;padding:0;border-radius:14px;cursor:pointer;
  border:1px solid var(--theme-btn-line);background:var(--theme-btn-bg);
  color:var(--theme-btn-ink);touch-action:manipulation;line-height:1}
#themeBtn:active{transform:scale(.92)}
#themeBtn svg{display:block;pointer-events:none}

/* 底部浮动条：搜索框在前、分类按钮在后，同一行，都在拇指够得到的位置。
   这里不用 backdrop-filter —— 它压在滚动列表上每帧重做模糊合成，iOS 上很贵。 */
#dock{position:fixed;left:12px;right:12px;bottom:calc(14px + var(--safe-b));z-index:15;
  display:flex;align-items:center;gap:8px}
#dock .bar{flex:1 1 auto;position:relative;min-width:0}
#q{width:100%;height:38px;padding:0 36px 0 14px;border:1px solid var(--line);
  border-radius:19px;background:var(--card);font-size:16px;color:var(--ink);
  /* 轻微亮光边框：一圈淡蓝描边 + 外扩柔光，配底部的落影 */
  box-shadow:0 0 0 1px rgba(11,98,214,.30),
             0 0 12px 2px rgba(11,98,214,.22),
             0 4px 16px rgba(17,19,24,.12);
  touch-action:manipulation}
#q:focus{outline:2px solid var(--accent);outline-offset:-1px}
#clear{position:absolute;right:3px;top:2px;width:34px;height:34px;border:0;
  background:transparent;font-size:22px;color:var(--sub);touch-action:manipulation}
#catBtn{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;height:38px;
  padding:0 13px;border:0;border-radius:19px;background:var(--accent);
  color:var(--accent-ink);font-size:14px;font-weight:600;
  /* 同款亮光，蓝底上用一圈内侧高光把边缘提亮 */
  box-shadow:0 0 0 1px rgba(255,255,255,.45) inset,
             0 0 14px 2px rgba(11,98,214,.45),
             0 4px 16px rgba(11,98,214,.30);
  touch-action:manipulation}
#catBtn .caret{font-size:11px;opacity:.85}

/* 列表底部要让开浮动条：46 条高 + 10 底距 + 12 余量 */
main{padding:0 0 calc(74px + var(--safe-b))}


.pill{padding:3px 10px;border-radius:9px;background:var(--card);
  border:1px solid var(--line);color:var(--sub)}
.pill.ok{color:var(--pill-ok-ink);border-color:var(--pill-ok-line);background:var(--pill-ok-bg)}
.pill.bad{color:var(--pill-bad-ink);border-color:var(--pill-bad-line);background:var(--pill-bad-bg)}

/* 大字卡打开时锁定底层滚动：iOS Safari 下仅 overflow:hidden 挡不住手势穿透与橡皮筋，
   通过 position:fixed + top: -scrollY 配合内联样式封死滚动距离，关闭时无缝还原 */
body.sheet-open{position:fixed;left:0;right:0;width:100%;overflow:hidden}

/* 大字卡：核心不是给自己看，是把屏幕转过去给对方看。
   竖向分三段，三段背景色互不相同：
   1. 老挝文区（温暖淡金黄底色，最突出且醒目）
   2. 读音+中文区（整体淡化，明显退到次要位置）
   3. 控制区（三个按钮所在的底部条，贴底且避让 safe-area） */
.sheet{position:fixed;inset:0;z-index:20;display:flex;flex-direction:column;
  background:var(--sheet-bg);overscroll-behavior:none;overflow:hidden}
/* 必须显式压过 display:flex —— 否则藏起来的大字卡会挡住整屏，全站点不动 */
.sheet[hidden]{display:none}

/* 大字卡内容容器：将老挝文区与读音中文区作为一个整体弹性伸缩。
   在小屏（如 320×568）且内容超出视口时，内容能在卡内顺畅滚动；
   同时配合 flex: 1 1 auto 与 min-height: 0，确保底部三个按钮永远不被挤出屏幕 */
.sheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;display:flex;flex-direction:column}

/* 第一段：老挝文区（给对面看，最突出；温暖淡金黄底色，饱和度与明度达标且不刺眼） */
.sheet-hero{flex:1 0 auto;display:flex;align-items:center;justify-content:center;
  background:var(--sheet-hero-bg);padding:24px 20px;min-height:180px;text-align:center}
.sheet-t-wrap{width:100%;max-width:640px}
.sheet-t{font-family:var(--lao);font-weight:700;line-height:1.4;
  font-size:clamp(32px,8.5vw,58px);word-break:break-word;color:var(--sheet-hero-ink)}
/* 翻转只转老挝文：那是给对面看的；下面的读音和中文是给自己念和确认的，不能跟着转 */
.sheet.flipped .sheet-t{transform:rotate(180deg)}

/* 第二段：读音+中文区（整体淡化，明显退到次要位置） */
.sheet-aid{flex-shrink:0;background:var(--sheet-aid-bg);display:flex;flex-direction:column;align-items:center;
  justify-content:center;text-align:center;padding:16px 20px;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sheet-r{font-size:15px;color:var(--sub);letter-spacing:.02em;font-weight:500;line-height:1.3}
.sheet-x{margin-top:3px;font-size:13px;color:var(--sub);line-height:1.3}
.sheet-zh{margin-top:5px;font-size:13px;color:var(--sheet-zh-dim);line-height:1.3}

/* 第三段：控制区（屏幕最底部，避让 iPhone 底部横条） */
.sheet-ctrl{flex-shrink:0;background:var(--sheet-ctrl-bg);margin-top:auto;
  padding:10px 12px calc(10px + var(--safe-b))}
.sheet-btns{display:flex;gap:8px;max-width:640px;margin:0 auto}
/* 四个按钮是平等的四个动作，没有主次 —— 默认统一白底，
   各配直觉关联的彩色辉光边框（描边+外扩柔光）；
   只有真正带状态的那个（反转，aria-pressed=true）才变深色。 */
.big{flex:1;min-width:0;touch-action:manipulation;height:54px;border:0;border-radius:12px;
  background:var(--sheet-btn-bg);color:var(--sheet-btn-ink);display:flex;flex-direction:column;align-items:center;
  justify-content:center;line-height:1.25;padding:0 2px;cursor:pointer}
#again{box-shadow:0 0 0 1.5px rgba(14,116,228,.55),0 0 12px 2px rgba(14,116,228,.36),0 2px 6px rgba(0,0,0,.08)}
#slow{box-shadow:0 0 0 1.5px rgba(16,185,129,.55),0 0 12px 2px rgba(16,185,129,.36),0 2px 6px rgba(0,0,0,.08)}
#flip{box-shadow:0 0 0 1.5px rgba(139,92,246,.55),0 0 12px 2px rgba(139,92,246,.36),0 2px 6px rgba(0,0,0,.08)}
#oops{box-shadow:0 0 0 1.5px rgba(225,29,72,.55),0 0 12px 2px rgba(225,29,72,.36),0 2px 6px rgba(0,0,0,.08)}
.big .btn-r{display:block;font-size:14px;font-weight:600;letter-spacing:.02em;white-space:nowrap}
.big[aria-pressed="true"]{background:var(--sheet-btn-active-bg);color:var(--sheet-btn-active-ink)}
/* 明确的按下反馈：将来再遇到「没反应」，能一眼分辨是没收到点击还是收到了没执行 */
.big:active{background:var(--press);color:var(--press-ink);transform:scale(.97)}
.sheet-hint{margin-top:6px;text-align:center;font-size:11px;color:var(--sheet-hint)}

/* 大字卡回答板入口：老挝文下方醒目展示，非第五个按钮 */
.sheet-reply-btn{margin-top:14px;display:inline-flex;align-items:center;justify-content:center;
  gap:6px;height:44px;padding:0 20px;border-radius:22px;border:0;
  background:var(--accent);color:var(--accent-ink);font-size:15px;font-weight:700;
  cursor:pointer;box-shadow:0 4px 14px rgba(11,98,214,.35);touch-action:manipulation;
  -webkit-appearance:none;appearance:none}
.sheet-reply-btn:active{transform:scale(.96);opacity:.9}
.sheet-reply-btn[hidden]{display:none}

/* 直播模式：镜头内更清晰，大字卡与结果页中文不淡化且字号放大 */
:root[data-live="true"] .sheet-zh{color:var(--ink);font-size:22px;font-weight:700;line-height:1.35}
:root[data-live="true"] .result-zh{font-size:34px}

/* 回答板模态层（板面给对方看，结果页给使用者看） */
.board-modal{position:fixed;inset:0;z-index:25;background:var(--sheet-bg);
  display:flex;flex-direction:column;overflow:hidden}
.board-modal[hidden]{display:none}

/* 板面：继承大字卡翻转状态（flipped 时转 180° 给对面看） */
.board-view{flex:1 1 auto;min-height:0;width:100%;height:100%;display:flex;flex-direction:column;
  background:var(--sheet-bg);transform-origin:center center}
.board-view.flipped{transform:rotate(180deg)}
.board-view[hidden]{display:none}

.board-header{flex-shrink:0;position:relative;padding:calc(env(safe-area-inset-top,0px) + 12px) 16px 12px;
  background:var(--sheet-hero-bg);border-bottom:1px solid var(--line);text-align:center}
.board-close{position:absolute;left:12px;top:calc(env(safe-area-inset-top,0px) + 10px);
  width:36px;height:36px;border-radius:50%;border:0;background:rgba(0,0,0,.08);
  color:var(--sheet-hero-ink);font-size:16px;font-weight:700;cursor:pointer;
  display:flex;align-items:center;justify-content:center;touch-action:manipulation}
.board-close:active{transform:scale(.92)}
.board-prompt{font-family:var(--lao);font-size:22px;font-weight:700;color:var(--sheet-hero-ink);
  line-height:1.35;padding:0 40px}

/* 板面内容区：支持卡内顺畅滚动 */
.board-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;padding:12px 12px calc(14px + var(--safe-b));display:flex;flex-direction:column}

/* 选项网格：大块可点击格子，老挝文大、中文小，触控高度 ≥ 44px */
.board-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;width:100%;max-width:640px;margin:0 auto}
.board-grid[hidden]{display:none}
.board-opt{display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-height:48px;padding:6px 8px;border-radius:10px;border:1px solid var(--line);
  background:var(--card);color:var(--ink);cursor:pointer;touch-action:manipulation;
  -webkit-appearance:none;appearance:none}
.board-opt:active{background:var(--press);transform:scale(.98)}
.board-opt .opt-lo{font-family:var(--lao);font-size:17px;font-weight:700;line-height:1.25;text-align:center}
.board-opt .opt-zh{font-size:12px;color:var(--board-opt-sub);margin-top:2px;text-align:center}

/* 数字键盘板 */
.board-keypad{display:flex;flex-direction:column;width:100%;max-width:360px;margin:0 auto;gap:10px}
.board-keypad[hidden]{display:none}
.keypad-screen{background:var(--card);border:1px solid var(--line);border-radius:12px;
  padding:10px 16px;text-align:right}
.keypad-val{font-size:32px;font-weight:700;color:var(--ink);line-height:1.2;
  font-variant-numeric:tabular-nums;word-break:break-all}
.keypad-units{display:flex;gap:6px;justify-content:space-between}
.unit-btn{flex:1;min-height:44px;padding:2px 4px;border-radius:8px;border:1px solid var(--line);
  background:var(--card);color:var(--ink);cursor:pointer;touch-action:manipulation;
  display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.unit-btn[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.unit-btn .u-zh{font-size:12px;font-weight:600}
.unit-btn .u-lo{font-family:var(--lao);font-size:11px;opacity:.9}
.keypad-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.kp-btn{height:50px;border-radius:10px;border:1px solid var(--line);
  background:var(--sheet-btn-bg);color:var(--sheet-btn-ink);font-size:20px;font-weight:600;
  cursor:pointer;touch-action:manipulation;display:flex;align-items:center;justify-content:center}
.kp-btn:active{background:var(--press)}
.kp-back{font-size:20px}
.kp-ok-btn{height:46px;border-radius:12px;border:0;background:var(--accent);
  color:var(--accent-ink);font-size:17px;font-weight:700;cursor:pointer;touch-action:manipulation;margin-top:2px}
.kp-ok-btn:active{transform:scale(.98);opacity:.9}

/* 结果页：给使用者看，永远正向，不跟反转 */
.result-view{flex:1 1 auto;min-height:0;width:100%;height:100%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;padding:24px 20px calc(24px + var(--safe-b));
  background:var(--sheet-bg);transform:none}
.result-view[hidden]{display:none}
.result-card{width:100%;max-width:480px;background:var(--sheet-aid-bg);border:1px solid var(--line);
  border-radius:16px;padding:28px 20px;text-align:center;box-shadow:0 8px 24px rgba(17,19,24,.08)}
.result-badge{font-size:13px;font-weight:600;color:var(--board-opt-sub);letter-spacing:.04em;margin-bottom:12px}
.result-zh{font-size:26px;font-weight:700;color:var(--ink);line-height:1.3;margin-bottom:8px;word-break:break-word}
.result-lo{font-family:var(--lao);font-size:18px;color:var(--board-opt-sub);line-height:1.35;word-break:break-word}
.result-nav{display:flex;gap:12px;width:100%;max-width:480px;margin-top:24px}
.res-btn{flex:1;height:48px;border-radius:12px;font-size:15px;font-weight:600;
  cursor:pointer;touch-action:manipulation;display:flex;align-items:center;justify-content:center}
.res-btn-sec{border:1px solid var(--line);background:var(--sheet-btn-bg);color:var(--sheet-btn-ink)}
.res-btn-pri{border:0;background:var(--accent);color:var(--accent-ink);font-weight:700}
