/* 语义色分离：亮橙用作填充，深橙用于浅底文字，危险状态独立。 */
:root[data-theme="forest"] {
  --brand: #173F35; --brand-dark: #123329; --brand-soft: #E9F0EB;
  --brand-text: #173F35; --on-brand: #FFFFFF; --sidebar: #173F35;
  --ink: #25332D; --ink-2: #4E5E55; --bg: #FAF9F6;
  --gold: #795A28; --gold-soft: #F5EBDD; --line: #E3E7E2; --muted: #626B65;
}
:root[data-theme="orange"] {
  --brand: #FF8811; --brand-dark: #E57500; --brand-soft: #FFF0E0;
  --brand-text: #A94300; --on-brand: #282522; --sidebar: #282522;
  --ink: #282522; --ink-2: #5B544E; --bg: #FAF8F5;
  --gold: #895321; --gold-soft: #FFF0E0; --line: #EAE3DB; --muted: #70665E;
}
body { background: var(--bg); }
.btn.primary, .btn.primary:hover, .toast > div.ok, .brand .dot {
  color: var(--on-brand);
}
a, .btn.link, .tabbar button.on { color: var(--brand-text); }
.btn.ghost, .tag:not(.danger):not(.grey):not(.gold), .chip.on, .slot.on,
.paychannel .chip.on, select.need { color: var(--brand-text); }
.side { background: var(--sidebar); position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: flex-start; }
.side nav { min-height: 0; }
.side .foot { flex-shrink: 0; }
.side nav button.on { background: var(--brand-soft); color: var(--brand-text); }
.side nav button.on:hover { background: var(--brand-soft); color: var(--brand-text); }
.side .logo small, .side .foot .small { opacity: 1; color: #DCE4DF; }
.st-pay .val { color: var(--brand-text); }
.theme-picker { position: relative; margin: 8px 0; font-size: 13px; }
.theme-picker summary { list-style: none; cursor: pointer; border: 1px solid currentColor; border-radius: 8px; padding: 10px; text-align: center; }
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-options { position: absolute; bottom: calc(100% + 8px); left: 0; width: 232px; max-width: calc(100vw - 32px); z-index: 100; padding: 16px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px #0002; }
.theme-options button { display: block; min-height: 44px; margin-top: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.theme-options button::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; background: #173F35; vertical-align: middle; }
.theme-options button[data-theme-choice="orange"]::before { background: #FF8811; }
.theme-options button[aria-pressed="true"] { border-color: var(--brand-text); background: var(--brand-soft); font-weight: 600; }
.theme-options p { margin: 12px 0 4px; }
.theme-options small { color: var(--muted); }
.login-card .theme-options { top: calc(100% + 8px); bottom: auto; }
.theme-picker summary:focus-visible, .theme-options button:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; }
/* 触摸设备增加点击面积，PC 鼠标密度保持不变；表格仍按内容滚动。 */
@media (pointer: coarse) {
  .btn, .bell, .chip, .slot, .side nav button, .tabs button, .theme-picker summary,
  .side .foot .btn, .settle .btn-draft, .paychannel .chip, .pos-tab { min-height: 44px; }
  input[type=text], input[type=tel], input[type=number], input[type=date], select, textarea,
  .tb-store select, .tb-right #pickDate, .field input:not([type=checkbox]):not([type=radio]),
  .field select, .field textarea { min-height: 44px; font-size: 16px; }
  .bell { width: 44px; flex-basis: 44px; }
  .pos-search input, .pos-search > .btn { height: 44px; }
  .topbar { height: auto; min-height: 64px; }
  .pos-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 820px) {
  .theme-picker summary { padding: 10px 2px; font-size: 12px; }
}
