/* 宿舍菜单 — 极简黑白 */

:root{
  --bg:#ffffff;
  --surface:#fafafa;
  --surface-2:#f1f1f1;
  --text:#0a0a0a;
  --muted:#8c8c8c;
  --faint:#b9b9b9;
  --line:#e7e7e7;
  --line-strong:#d4d4d4;
  --ink:#0a0a0a;
  --on-ink:#ffffff;
  --warn:#b45309;
  --accent:#2f54eb;
  --accent-2:#1d39c4;
  --on-accent:#ffffff;
  --accent-soft:rgba(47,84,235,.10);
  --shadow:0 1px 2px rgba(16,24,40,.05),0 4px 14px rgba(16,24,40,.05);
  --shadow-cta:0 4px 14px rgba(47,84,235,.30);
  --radius:16px;
  --tab-h:calc(58px + env(safe-area-inset-bottom, 0px));
}

[data-theme="dark"]{
  --bg:#0a0a0a;
  --surface:#131313;
  --surface-2:#1d1d1d;
  --text:#f3f3f3;
  --muted:#8a8a8a;
  --faint:#5c5c5c;
  --line:#242424;
  --line-strong:#343434;
  --ink:#f3f3f3;
  --on-ink:#0a0a0a;
  --warn:#d99a3f;
  --accent:#5b7cff;
  --accent-2:#4a6bff;
  --on-accent:#ffffff;
  --accent-soft:rgba(91,124,255,.18);
  --shadow:none;
  --shadow-cta:none;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none !important}
html,body{margin:0;padding:0}
/* 横屏或部分安卓浏览器会自动放大字号，摁住它 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overscroll-behavior-y:none;
}
h1,h2,h3,h4,p{margin:0}
button{font-family:inherit;font-size:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation}
input,textarea,select{font-family:inherit;font-size:inherit;color:inherit}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.muted{color:var(--muted)}

/* ---------- boot ---------- */
.boot{
  position:fixed;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:14px;background:var(--bg);z-index:200;
}
.boot-mark{font-size:34px;line-height:1;animation:blink 1.1s infinite}
.boot-text{font-size:13px;color:var(--muted);letter-spacing:.02em}
@keyframes blink{0%,100%{opacity:.15}50%{opacity:1}}

/* ---------- top bar ---------- */
.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px;
  /* 先给一个实色底：iOS 16.2 以前的 WebView 不认 color-mix，
     只写下面那行的话这块背景会整个失效，字和内容糊在一起 */
  background:var(--bg);
  background:color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar-l{min-width:0}
.logo-row{display:flex;align-items:center;gap:9px;min-width:0}
.logo{font-size:16.5px;font-weight:650;letter-spacing:-.02em;white-space:nowrap}
.logo-mark{
  width:29px;height:29px;border-radius:9px;flex:0 0 auto;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:grid;place-items:center;font-size:16px;line-height:1;
  box-shadow:var(--shadow-cta);
}
/* 在线人数：保持黑白，靠一个实心点提示，不用绿色 */
.online{
  display:inline-flex;align-items:center;gap:5px;flex-shrink:0;
  height:19px;padding:0 7px;border-radius:999px;
  border:1px solid var(--line);
  font-size:10.5px;color:var(--muted);white-space:nowrap;
}
.online i{width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.online:active{background:var(--surface-2)}
.roundline{
  font-size:12px;color:var(--muted);margin-top:1px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.topbar-r{display:flex;align-items:center;gap:8px;flex-shrink:0}
.chip{
  display:inline-flex;align-items:center;gap:5px;
  height:32px;padding:0 12px;border:1px solid var(--line-strong);border-radius:999px;
  font-size:12.5px;font-weight:500;white-space:nowrap;
}
.chip:active{background:var(--surface-2)}
.chip .dot{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.icon-btn{
  width:32px;height:32px;border-radius:999px;border:1px solid var(--line-strong);
  display:grid;place-items:center;font-size:14px;color:var(--muted);
}
.icon-btn:active{background:var(--surface-2)}

/* ---------- layout ---------- */
main{padding:0 16px calc(var(--tab-h) + 18px);max-width:600px;margin:0 auto}
.view{padding-top:14px;animation:fade .18s ease-out}
@keyframes fade{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}

.sec-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:26px 0 11px;
}
.sec-head:first-child{margin-top:4px}
.sec-title{font-size:14px;letter-spacing:-.01em;color:var(--text);font-weight:650;display:flex;align-items:center;gap:7px}
.sec-title::before{content:"";flex:0 0 auto;width:3px;height:15px;border-radius:2px;background:var(--accent)}
.sec-note{font-size:12px;color:var(--muted)}

/* ---------- empty ---------- */
.empty{
  border:1px dashed var(--line-strong);border-radius:var(--radius);
  padding:44px 24px;text-align:center;color:var(--muted);
}
.empty b{display:block;color:var(--text);font-size:15px;font-weight:600;margin-bottom:7px}
.empty p{font-size:13px;line-height:1.7;text-wrap:balance}
.steps{font-size:11.5px;color:var(--faint);letter-spacing:.1em;margin-top:18px}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:46px;padding:0 20px;border-radius:14px;white-space:nowrap;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:var(--on-accent);font-size:14.5px;font-weight:600;
  letter-spacing:.01em;box-shadow:var(--shadow-cta);
  transition:transform .08s ease,opacity .15s,box-shadow .15s;
}
.btn:active{transform:scale(.98);opacity:.92}
.btn.block{width:100%}
.btn.ghost{background:transparent;color:var(--text);border:1px solid var(--line-strong);box-shadow:none}
.btn.ghost:active{color:var(--accent);border-color:var(--accent)}
.btn.sm{height:36px;padding:0 14px;font-size:13px;border-radius:11px}
.btn[disabled]{opacity:.4;pointer-events:none}

/* ---------- filter pills ---------- */
.pills{display:flex;gap:8px;overflow-x:auto;padding:2px 0 4px;scrollbar-width:none}
.pills::-webkit-scrollbar{display:none}
.pill{
  flex:0 0 auto;height:36px;padding:0 14px;border-radius:999px;
  border:1px solid var(--line-strong);font-size:13px;color:var(--muted);
  display:inline-flex;align-items:center;gap:6px;transition:.15s;
}
.pill.on{background:var(--accent);color:var(--on-accent);border-color:var(--accent);box-shadow:var(--shadow-cta)}
.pill .c{font-size:11px;opacity:.6}

/* ---------- dish card ---------- */
.list{display:flex;flex-direction:column;gap:9px}
.dish{
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);transition:border-color .15s, background .15s;
}
.dish.picked{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent) inset}
.dish-ico{flex:0 0 auto;width:40px;height:40px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;font-size:20px;line-height:1;transition:background .15s}
.dish.picked .dish-ico{background:var(--accent-soft)}
.dish-main{flex:1;min-width:0}
.dish-name{
  font-size:16px;font-weight:600;letter-spacing:-.01em;
  overflow-wrap:anywhere;
}
.dish-sub{
  font-size:12px;color:var(--muted);margin-top:3px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.dish-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:5px}
.tag{
  font-size:11px;color:var(--muted);border:1px solid var(--line);
  padding:1px 6px;border-radius:6px;line-height:1.5;
}
.tag.spicy{letter-spacing:.5px}
.tag.warn{color:var(--warn);border-color:var(--warn)}
/* 自己点过的菜，卡上直接给个备注入口：往往就是看到这道菜才想起「少辣」，
   原来要切到总单页找自己的那条才能写 */
.tag.note{
  font-family:inherit;line-height:1.4;padding:2px 7px;cursor:pointer;
  background:transparent;color:var(--muted);border-style:dashed;
}
.tag.note.has{color:var(--text);border-style:solid;border-color:var(--line-strong)}
.tag.note:active{background:var(--surface-2)}
.who{
  font-size:11.5px;color:var(--muted);
  display:inline-flex;align-items:center;gap:4px;
}
.who .dot{width:5px;height:5px;border-radius:50%;background:var(--faint)}

.add{
  flex:0 0 auto;width:42px;height:42px;border-radius:999px;
  border:1px solid var(--line-strong);display:grid;place-items:center;
  font-size:20px;font-weight:300;color:var(--text);line-height:1;
  transition:transform .1s, background .15s;
}
.add:active{transform:scale(.9);background:var(--surface-2)}

.stepper{
  flex:0 0 auto;display:flex;align-items:center;
  height:44px;padding:0 3px;border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));color:var(--on-accent);
  box-shadow:var(--shadow-cta);
}
/* 38×38 而不是 33×33：这个加减是点菜页点得最多的东西，
   33 的方形对拇指偏小，误触一下就是多一份少一份 */
.stepper button{
  width:38px;height:38px;display:grid;place-items:center;
  font-size:17px;font-weight:400;color:inherit;line-height:1;border-radius:999px;
}
.stepper button:active{opacity:.55}
.stepper .n{min-width:17px;text-align:center;font-size:13.5px;font-weight:650}

/* ---------- summary blocks ---------- */
.card{
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);padding:15px 16px;box-shadow:var(--shadow);
}
.card + .card{margin-top:9px}
.kv{display:flex;align-items:center;justify-content:space-between;gap:12px}
.kv + .kv{margin-top:9px}
.kv .k{font-size:13px;color:var(--muted)}
.kv .v{font-size:14px;font-weight:600}

.stat-row{display:flex;gap:9px}
.stat{
  flex:1;border:1px solid var(--line);border-radius:var(--radius);
  padding:12px 13px;background:var(--surface);box-shadow:var(--shadow);
}
.stat .lab{font-size:11px;color:var(--muted);letter-spacing:.06em}
.stat .val{font-size:21px;font-weight:650;letter-spacing:-.03em;margin-top:3px}
.stat .sub{font-size:11.5px;color:var(--muted);margin-top:3px}

/* 点菜页：这一顿点菜进度 */
.progress{
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);padding:13px 15px;margin-top:2px;box-shadow:var(--shadow);
}
.progress-h{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.progress-t{font-weight:600;display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.progress-pct{font-size:12px;color:var(--accent);font-weight:650;flex:0 0 auto}
.progress-bar{height:7px;background:var(--surface-2);border-radius:99px;overflow:hidden;margin-top:9px}
.progress-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent-2));border-radius:99px;transition:width .35s ease}
.progress-who{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.5}

/* ---------- order rows ---------- */
.orow{
  display:flex;align-items:flex-start;gap:11px;padding:12px 0;
  border-bottom:1px solid var(--line);
}
.orow:last-child{border-bottom:0;padding-bottom:2px}
.orow:first-child{padding-top:2px}
.orn{font-size:15px;font-weight:600;letter-spacing:-.01em}
.orn .x{font-size:12px;color:var(--muted);font-weight:500;margin-left:5px}
.osub{font-size:12px;color:var(--muted);margin-top:3px;line-height:1.5}
.osub em{font-style:normal;color:var(--text)}
.pcount{
  flex:0 0 auto;min-width:38px;text-align:right;font-size:12.5px;color:var(--muted);font-weight:500;
  padding-top:2px;
}
.taste{
  display:inline-block;margin-top:4px;font-size:12px;color:var(--text);
  border-left:2px solid var(--line-strong);padding-left:7px;
}

/* ---------- person block ---------- */
.person{
  border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);
  padding:13px 15px;box-shadow:var(--shadow);
}
.person + .person{margin-top:9px}
.person.me{border-color:var(--line-strong)}
.person-h{display:flex;align-items:center;justify-content:space-between;gap:10px}
.person-n{font-size:14.5px;font-weight:650;display:flex;align-items:center;gap:7px}
.badge{
  font-size:10px;font-weight:600;letter-spacing:.06em;color:var(--muted);
  border:1px solid var(--line-strong);border-radius:5px;padding:0 4px;line-height:1.6;
}
.person-m{font-size:12px;color:var(--muted)}
.person-items{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.pi{
  font-size:12.5px;padding:3px 9px;border-radius:8px;
  background:var(--surface-2);color:var(--text);
}
.pi.mine{outline:1px solid var(--line-strong)}

/* ---------- money ---------- */
.big{
  font-size:34px;font-weight:650;letter-spacing:-.04em;line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.big .cn{font-size:16px;font-weight:500;color:var(--muted);margin-right:2px}
.money-input{
  width:100%;background:transparent;border:0;border-bottom:1px solid var(--line-strong);
  padding:8px 0;font-size:30px;font-weight:650;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;outline:none;
}
.money-input::placeholder{color:var(--faint);font-weight:500}
.money-input:focus{border-bottom-color:var(--accent)}

.seg{
  display:flex;border:1px solid var(--line-strong);border-radius:12px;overflow:hidden;
}
.seg button{
  flex:1;height:38px;font-size:12.5px;font-weight:500;color:var(--muted);
  display:grid;place-items:center;transition:.15s;
}
.seg button + button{border-left:1px solid var(--line)}
.seg button.on{background:var(--accent);color:var(--on-accent);font-weight:600}

/* ---------- manage ---------- */
.mrow{
  display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);
}
.mrow:last-child{border-bottom:0}
.mrow-main{flex:1;min-width:0}
.mrow-t{font-size:14.5px;font-weight:550}
.mrow-s{font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini{
  height:34px;padding:0 12px;border-radius:9px;border:1px solid var(--line-strong);
  font-size:12.5px;color:var(--muted);display:inline-flex;align-items:center;
}
.mini:active{background:var(--surface-2)}
.mini.dark{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.mini.danger{color:#dc2626;border-color:#dc2626}
.mini.danger:active{background:rgba(220,38,38,.08)}
[data-theme="dark"] .mini.danger{color:#f87171;border-color:#f87171}
.switch{
  width:42px;height:25px;border-radius:999px;border:1px solid var(--line-strong);
  position:relative;flex:0 0 auto;transition:.18s;
}
.switch::after{
  content:"";position:absolute;top:2px;left:2px;width:19px;height:19px;border-radius:50%;
  background:var(--faint);transition:.18s;
}
.switch.on{background:var(--accent);border-color:var(--accent)}
.switch.on::after{left:20px;background:var(--on-ink)}

/* ---------- tabbar ---------- */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:40;
  display:flex;padding-bottom:env(safe-area-inset-bottom,0px);
  background:var(--bg);
  background:color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  backdrop-filter:saturate(180%) blur(16px);
  border-top:1px solid var(--line);
}
.tab{
  flex:1;height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:var(--faint);font-size:11.5px;letter-spacing:.04em;transition:color .15s;
}
.tab .tico{font-size:21px;line-height:1;font-style:normal;transition:transform .18s cubic-bezier(.22,1,.36,1),filter .18s;filter:grayscale(1) opacity(.5)}
.tab.is-on{color:var(--accent);font-weight:600}
.tab.is-on .tico{transform:translateY(-1px) scale(1.08);filter:none}

/* ---------- sheet ---------- */
.sheet-mask{
  position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.42);
  display:flex;align-items:flex-end;justify-content:center;
  animation:maskIn .2s ease-out;
}
[data-theme="dark"] .sheet-mask{background:rgba(0,0,0,.62)}
@keyframes maskIn{from{opacity:0}to{opacity:1}}
.sheet{
  width:100%;max-width:600px;max-height:88vh;max-height:88dvh;overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  background:var(--bg);border-radius:22px 22px 0 0;
  padding:10px 18px calc(20px + env(safe-area-inset-bottom,0px));
  animation:sheetIn .24s cubic-bezier(.22,1,.36,1);
  border-top:1px solid var(--line);
}
@keyframes sheetIn{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
.sheet-grab{width:36px;height:4px;border-radius:99px;background:var(--line-strong);margin:0 auto 14px}
.sheet h3{font-size:17px;font-weight:650;letter-spacing:-.02em}
.sheet .desc{font-size:12.5px;color:var(--muted);margin-top:5px;line-height:1.55}
.field{margin-top:15px}
.field label{display:block;font-size:11.5px;color:var(--muted);letter-spacing:.08em;margin-bottom:6px;text-transform:uppercase}
.input{
  width:100%;height:44px;padding:0 13px;border:1px solid var(--line-strong);border-radius:12px;
  background:var(--surface);outline:none;font-size:16px;
}
.input:focus{border-color:var(--accent);background:var(--bg)}
textarea.input{height:auto;padding:11px 13px;resize:vertical;min-height:76px;line-height:1.5}
.field-2{display:flex;gap:9px}
.field-2 > *{flex:1;min-width:0}
.guess-hint{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.5}
.guess-hint:empty{display:none}
.sheet-actions{display:flex;gap:9px;margin-top:22px}
.sheet-actions .btn{flex:1}

.pick{
  /* button 的 width:auto 会按内容收缩（div 同样的声明会撑满），
     身份弹窗就是这么变成一小块方块的，显式给满宽 */
  width:100%;text-align:left;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 15px;border:1px solid var(--line);border-radius:14px;
  background:var(--surface);margin-top:9px;
}
.pick:active{background:var(--surface-2)}
.pick.on{border-color:var(--text)}
.pick-n{font-size:15px;font-weight:600}
.pick-s{font-size:12px;color:var(--muted);margin-top:2px}
/* 单选标记：没选是空心圈，选了填色打勾。火锅、掌勺、身份三处共用，
   以前一处是 ✓ 一处是 →，同一个「点一下选中」的动作长得不一样 */
.pick-r{
  width:21px;height:21px;border-radius:50%;flex:0 0 auto;
  border:1.5px solid var(--line-strong);
  display:grid;place-items:center;font-size:11px;line-height:1;
  color:transparent;transition:background .12s ease,border-color .12s ease,color .12s ease;
}
.pick.on .pick-r{border-color:var(--accent);background:var(--accent);color:var(--on-accent)}

/* ---------- toast ---------- */
.toast{
  position:fixed;left:50%;bottom:calc(var(--tab-h) + 16px);transform:translate(-50%,10px);
  background:var(--ink);color:var(--on-ink);font-size:13px;padding:10px 16px;border-radius:11px;
  opacity:0;pointer-events:none;transition:.22s ease;z-index:150;max-width:88vw;text-align:center;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

.hint{font-size:12px;color:var(--muted);line-height:1.65;margin-top:10px}
.hr{height:1px;background:var(--line);margin:20px 0}
/* 删除这类不可逆的操作单独隔出来，别和「取消 / 保存」挤在一行等宽并排：
   三个按钮平分一行时，最容易点错的就是最左边那个删除 */
.danger-row{
  margin-top:22px;padding-top:16px;border-top:1px dashed var(--line);
}
.danger-row .hint{margin-top:9px}
.danger-row .mini{align-self:flex-start}
.link{color:var(--accent);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--line-strong)}
.rowb{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}

/* ---------- cook bar ---------- */
.cookbar{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:9px 9px 9px 14px;border:1px solid var(--line);border-radius:14px;
  background:var(--surface);font-size:13px;margin-bottom:9px;color:var(--text);
}
.cookbar .muted{color:var(--muted)}
.cookbar b{font-weight:650}

/* ---------- clickable rows ---------- */
.mrow[data-hist]{cursor:pointer}
.mrow[data-hist]:active{opacity:.6}
/* 管理页菜单分组：整条贴到卡片边上，扫一眼就知道到哪一类了 */
.mgroup{
  display:flex;align-items:center;justify-content:space-between;
  margin:12px -16px 0;padding:7px 16px;
  background:var(--surface-2);
  font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--muted);
}
.mgroup:first-child{margin-top:-15px;border-radius:var(--radius) var(--radius) 0 0}
.mgroup .n{font-weight:400;letter-spacing:0;color:var(--faint)}
.mgroup.mgfold{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.mgroup.mgfold:active{opacity:.65}
.mgroup .l{display:flex;align-items:center;gap:5px;min-width:0}
.mgroup .arw{width:12px;color:var(--muted);font-size:12px;line-height:1;transition:transform .15s}
.mgroup.mgfold.open .arw{color:var(--text)}
.pick{cursor:pointer}

/* ---------- 饭后摇签 ---------- */
.kv .chore-name{font-size:19px;font-weight:650;letter-spacing:-.01em}
.chore-name.rolling{color:var(--muted);animation:choreBlur .12s linear}
@keyframes choreBlur{0%{opacity:.35}100%{opacity:1}}
.chore-name.hit{color:var(--text);animation:choreHit .5s cubic-bezier(.2,1.4,.4,1)}
@keyframes choreHit{0%{transform:scale(1.4)}100%{transform:scale(1)}}

/* ---------- 还没点的人 ---------- */
.absent{
  margin-top:9px;padding:11px 14px;
  border:1px dashed var(--line-strong);border-radius:12px;
  font-size:12.5px;color:var(--muted);
}

/* ---------- 随便来一道：摇中的那道闪一下 ---------- */
.dish.flash{animation:flashRing .55s ease-in-out 3}
@keyframes flashRing{
  0%,100%{box-shadow:0 0 0 0 transparent}
  50%{box-shadow:0 0 0 2px var(--text)}
}

/* 金额比份数长，小一号免得撑破格子 */
.stat .val.sm{font-size:18px}

/* 垫钱的人：自己那份弱化，垫的金额留在主位 */
.split-self{color:var(--muted);font-weight:500;margin-right:6px}

/* ---------- 忌口 ---------- */
/* 点菜页顶部的一条提示，标色弱一点，不抢戏 */
.avoid-banner{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px 10px 14px;margin-top:2px;
  border:1px solid var(--warn);border-radius:12px;
  font-size:12.5px;color:var(--text);
}
.avoid-banner span{min-width:0;line-height:1.5}
/* 总单里每个人卡片下面那行忌口 */
.person-avoid{
  margin-top:8px;font-size:12px;color:var(--warn);
  border-left:2px solid var(--warn);padding-left:7px;line-height:1.5;
}

/* 键盘操作时给个明确焦点，手指点的时候不出现（:focus-visible 只在键盘/读屏时匹配） */
.btn:focus-visible,.mini:focus-visible,.pill:focus-visible,.add:focus-visible,
.stepper button:focus-visible,.tab:focus-visible,.pick:focus-visible,.switch:focus-visible,
.chip:focus-visible,.icon-btn:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;
}

/* 系统开了「减弱动态效果」就把过渡和动画关掉 */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .dish.flash{animation:none;outline:2px solid var(--text)}
}

/* ---------- 火锅/打边炉入口 ---------- */
.hotpot-card{
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;margin-top:14px;
  border:1px solid var(--accent);border-radius:var(--radius);
  background:var(--accent-soft);
  cursor:pointer;transition:transform .08s ease,box-shadow .15s;
}
.hotpot-card:active{transform:scale(.99)}
.hotpot-ico{background:linear-gradient(135deg,var(--accent),var(--accent-2));box-shadow:var(--shadow-cta)}
.hotpot-go{flex:0 0 auto;font-size:22px;color:var(--accent);font-weight:500;line-height:1}
.tag.hot{color:var(--accent);border-color:var(--accent);font-weight:600}

/* ---------- 买菜清单（勾选） ---------- */
.buy-list{padding:6px 4px 6px 6px}
.buy-row{
  display:flex;align-items:flex-start;gap:10px;
  padding:11px 10px;border-radius:11px;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.buy-row + .buy-row{border-top:1px solid var(--line)}
.buy-row:active{background:var(--surface-2)}
.buy-row input[type="checkbox"]{
  flex:0 0 auto;appearance:none;-webkit-appearance:none;
  width:19px;height:19px;margin:1px 0 0;border:1.5px solid var(--line-strong);
  border-radius:6px;background:var(--bg);position:relative;cursor:pointer;
  transition:background .12s ease,border-color .12s ease;
}
.buy-row input[type="checkbox"]:checked{background:var(--accent);border-color:var(--accent)}
.buy-row input[type="checkbox"]:checked::after{
  content:"";position:absolute;left:5.5px;top:2px;
  width:5px;height:9px;border:2px solid var(--on-accent);border-top:0;border-left:0;
  transform:rotate(42deg);
}
.buy-row input[type="checkbox"]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.buy-n{flex:1 1 auto;min-width:0;font-size:14px;font-weight:600;line-height:1.45;letter-spacing:-.01em}
.buy-n .num{font-weight:500;font-size:12px;color:var(--muted);margin-left:3px}
.buy-ing{
  flex:0 0 auto;max-width:42%;text-align:right;
  font-size:11.5px;color:var(--muted);line-height:1.5;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical;
}
/* 买好了：整行褪色 + 划线，一眼扫过去就知道还剩什么 */
.buy-row.done .buy-n,
.buy-row.done .buy-ing{color:var(--faint);text-decoration:line-through;text-decoration-thickness:1px}
.buy-row.done .buy-n .num{color:var(--faint)}

/* ---------- 搜索框 + 最近点过 ---------- */
.searchbar{
  position:relative;display:flex;align-items:center;gap:8px;
  margin-top:14px;padding:0 12px;height:40px;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;
  transition:border-color .12s ease,background .12s ease;
}
.searchbar:focus-within{border-color:var(--line-strong);background:var(--bg)}
.sico{flex:0 0 auto;font-size:13px;line-height:1;opacity:.55}
.sinput{
  flex:1 1 auto;min-width:0;height:100%;border:0;background:transparent;
  font-size:14px;color:var(--text);font-family:inherit;outline:none;
  -webkit-appearance:none;appearance:none;
}
.sinput::placeholder{color:var(--faint)}
.sinput::-webkit-search-cancel-button{display:none}
.sclear{
  flex:0 0 auto;width:22px;height:22px;padding:0;line-height:1;
  display:flex;align-items:center;justify-content:center;
  font-size:15px;color:var(--muted);background:var(--surface-2);
  border:0;border-radius:50%;cursor:pointer;-webkit-tap-highlight-color:transparent;
}
.sclear:active{background:var(--line)}

.recent{margin-top:12px}
.recent-h{
  font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--muted);
  margin:0 0 7px 2px;
}
.recent-row{display:flex;gap:7px;overflow-x:auto;padding-bottom:2px;-webkit-overflow-scrolling:touch}
.recent-row::-webkit-scrollbar{display:none}
.qchip{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;
  /* 整行 36 高：这排是「最近点过」的快捷入口，点得比分类还勤，32 偏窄 */
  padding:9px 12px;font-size:12.5px;font-weight:600;font-family:inherit;
  color:var(--text);background:var(--surface);border:1px solid var(--line);
  border-radius:999px;cursor:pointer;white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
}
.qchip:active{background:var(--surface-2)}
.search-meta{
  margin:4px 0 -2px 2px;font-size:12px;color:var(--muted);line-height:1.5;
}
.search-meta b{color:var(--text)}

/* ---------- 收款标记（已给 / 未给） ---------- */
.kv-right{display:flex;align-items:center;gap:10px;margin-left:auto}
.settle{
  display:inline-flex;align-items:center;gap:6px;
  /* 账本页最核心的动作就是点这个「已给」，原来只有 25 高，
     收钱时拇指点空一次就得重来，撑到 35 左右 */
  padding:9px 13px 9px 10px;font-size:12px;font-weight:600;font-family:inherit;
  color:var(--muted);background:var(--bg);border:1px solid var(--line-strong);
  border-radius:999px;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:color .12s ease,background .12s ease,border-color .12s ease;
}
.settle .bx{
  width:15px;height:15px;display:inline-flex;align-items:center;justify-content:center;
  border:1.5px solid var(--line-strong);border-radius:4px;font-size:10px;line-height:1;
  flex:0 0 auto;
}
.settle.on{color:var(--accent-2);background:var(--accent-soft);border-color:transparent}
.settle.on .bx{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.settle:active{transform:scale(.97)}
.settle-line{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-top:9px;padding:10px 13px;border-radius:12px;
  font-size:12.5px;line-height:1.45;color:var(--warn);
  background:var(--surface);border:1px solid var(--line);
}
.settle-line.ok{color:var(--accent-2);background:var(--accent-soft);border-color:transparent}
.settle-line .muted{color:var(--muted)}
/* 还没指定垫钱人时的引导句，颜色压淡一点，不要像「还差 N 人」那样报警 */
.settle-line.tip{color:var(--muted);font-size:12px}

/* ---------- 可折叠的分区标题（总单页「这一顿」） ---------- */
.sec-head.foldable{
  cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;
  margin-left:-8px;margin-right:-8px;padding:6px 8px;border-radius:10px;
  transition:background .12s ease;
}
.sec-head.foldable:active{background:var(--surface-2)}
.sec-head.foldable .fold-r{display:flex;align-items:center;gap:7px}
.sec-head.foldable .arw{color:var(--muted);font-size:13px;line-height:1;transition:color .12s ease}
.sec-head.foldable:active .arw{color:var(--text)}
/* 收起来时那一行菜名：一行省略号，扫一眼就知道点了什么；点它也能展开 */
.fold-brief{
  cursor:pointer;-webkit-tap-highlight-color:transparent;
  padding:11px 14px;border:1px dashed var(--line-strong);border-radius:14px;
  font-size:12.5px;line-height:1.5;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.fold-brief:active{background:var(--surface-2)}

/* 收款行右侧：进度 + 「全都给了」 */
.settle-line .rgt{display:flex;align-items:center;gap:8px;flex:0 0 auto}
