:root {
  --bg: #fffaf3; --card: #fff; --ink: #2b2118; --muted: #7a6a5a; --line: #eadfce;
  --brand: #e8590c; --brand-d: #c44a08; --ok: #2f9e44; --warn: #f08c00; --bad: #e03131; --info: #1c7ed6;
  --radius: 12px; --shadow: 0 2px 8px rgba(80, 50, 10, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: var(--brand-d); }
h1, h2, h3 { margin: .4em 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 12px 16px 120px; }
header.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
header.top a { color: #fff; text-decoration: none; }
header.top .brand { font-weight: 700; font-size: 1.2rem; }
header.top nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.muted { color: var(--muted); font-size: .9rem; }
.price { color: var(--brand-d); font-weight: 700; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; background: #eee; color: #444; white-space: nowrap; }
.badge.ok { background: #d3f9d8; color: #1b6b2b; } .badge.warn { background: #fff3bf; color: #8a5a00; }
.badge.bad { background: #ffe3e3; color: #a61e1e; } .badge.info { background: #d0ebff; color: #0b5394; }
button, .btn { font: inherit; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--brand-d); }
button.sec { background: #fff; color: var(--ink); border: 1px solid var(--line); } button.sec:hover { background: #f6efe4; }
button.danger { background: var(--bad); } button.good { background: var(--ok); } button.warnb { background: var(--warn); }
button.sm { padding: 4px 10px; font-size: .85rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
label { display: block; font-size: .9rem; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 3px; color: var(--ink); }
label.inline { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
form .fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .92rem; }
th { background: #faf1e2; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.tabs button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #f1e6d4; display: flex; align-items: center; justify-content: center; font-size: 28px; flex: none; }
.item { display: flex; gap: 10px; }
.item .body { flex: 1; min-width: 0; }
.item.off { opacity: .55; }
.cover { height: 120px; background: linear-gradient(135deg, #ffd8a8, #ffa94d) center/cover; border-radius: var(--radius) var(--radius) 0 0; margin: -14px -14px 10px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 100; max-width: 90vw; }
.toast.err { background: var(--bad); } .toast.ok { background: var(--ok); }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 24px 12px; }
.modal { background: #fff; border-radius: var(--radius); padding: 18px; width: 100%; max-width: 560px; }
.modal.wide { max-width: 860px; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0, 0, 0, .08); z-index: 30; }
.cartbar .inner { max-width: 1040px; margin: 0 auto; padding: 10px 16px; }
.pickno { font-size: 2rem; font-weight: 800; color: var(--brand-d); line-height: 1; }
.notice { background: #fff3bf; border: 1px solid #ffe066; border-radius: 8px; padding: 10px 12px; }
.notice.bad { background: #ffe3e3; border-color: #ffa8a8; } .notice.ok { background: #d3f9d8; border-color: #8ce99a; }
.docs img { width: 180px; max-height: 140px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.preview img { width: 90px; height: 64px; object-fit: cover; border-radius: 6px; margin-top: 4px; }
.opt-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.opt-group legend { font-weight: 600; padding: 0 6px; }
.hidden { display: none !important; }
/* 廚房看板 */
body.kitchen { background: #1f1b16; color: #f5eee3; }
body.kitchen .wrap { max-width: none; padding-bottom: 24px; }
.board { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col h2 { position: sticky; top: 52px; background: #1f1b16; padding: 6px 0; z-index: 5; }
.kcard { background: #2c261f; border: 2px solid #4a4034; border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.kcard.preparing { border-color: var(--warn); } .kcard.ready { border-color: var(--ok); } .kcard.late { box-shadow: 0 0 0 3px var(--bad); }
.kcard .pickno { color: #ffd8a8; }
.kcard ul { margin: 6px 0; padding-left: 0; list-style: none; }
.kcard li { font-size: 1.05rem; padding: 2px 0; }
.kcard li .opt { color: #c9bba6; font-size: .9rem; }
.summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.summary span { background: #2c261f; border: 1px solid #4a4034; border-radius: 8px; padding: 4px 10px; }
body.kitchen .muted { color: #b3a58f; }
body.kitchen button.sec { background: #3a322a; color: #f5eee3; border-color: #5a4d3e; }
