/* =========================================================
   升職慶祝點餐系統 — 清爽明亮風格
   相容性：Chrome/Edge/Safari/Firefox（含 iOS 14+ / Android 8+）
   ========================================================= */

:root {
  --pink: #ff4f81;
  --pink-dark: #e63a6b;
  --orange: #ff9f43;
  --yellow: #ffd93d;
  --green: #22c55e;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --ink: #1f2430;
  --ink-2: #4b5468;
  --muted: #8a92a6;
  --line: #e6e9f0;
  --bg: #f7f8fc;
  --card: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 6px rgba(31, 36, 48, .05), 0 12px 28px rgba(31, 36, 48, .07);
  --shadow-sm: 0 1px 3px rgba(31, 36, 48, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.ta-r { text-align: right; }
.row-gap { display: flex; gap: 8px; align-items: center; }
.spacer { height: 96px; }
[hidden] { display: none !important; }

/* ---------------- View 切換 ---------------- */
.view { display: none; min-height: 100vh; }
@supports (min-height: 100dvh) { .view { min-height: 100dvh; } }
.view.is-active { display: block; }
.center-box {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--pink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 首頁 ---------------- */
#view-home {
  position: relative;
  background:
    radial-gradient(1100px 520px at 12% -10%, #fff2f6 0%, rgba(255,255,255,0) 60%),
    radial-gradient(900px 480px at 92% 4%, #fff8e6 0%, rgba(255,255,255,0) 62%),
    radial-gradient(900px 600px at 50% 110%, #eef4ff 0%, rgba(255,255,255,0) 65%),
    #ffffff;
}
.home-wrap {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-t)) 18px calc(28px + var(--safe-b));
}
.home-card {
  width: 100%; max-width: 520px;
  text-align: center;
  padding: 34px 24px 30px;
}
.home-emoji { font-size: 42px; line-height: 1; margin-bottom: 12px; }
.home-emoji span { display: inline-block; margin: 0 4px; animation: bob 2.4s ease-in-out infinite; }
.home-emoji span:nth-child(2) { animation-delay: .25s; }
.home-emoji span:nth-child(3) { animation-delay: .5s; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }

.home-sub {
  font-size: 12px; letter-spacing: .28em; font-weight: 700;
  color: var(--orange); text-transform: uppercase;
}
.home-title {
  margin: 8px 0 14px;
  font-size: 40px; line-height: 1.2; font-weight: 900;
  letter-spacing: -.5px;
  background: linear-gradient(96deg, var(--pink) 0%, var(--orange) 55%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--pink);
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  display: inline-block;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .home-title { -webkit-text-fill-color: currentColor; color: var(--pink); }
}
/* emoji 用原本的彩色字型顯示，不被漸層裁成剪影 */
.home-title .emo {
  -webkit-text-fill-color: initial;
  color: initial;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}
.home-msg { color: var(--ink-2); white-space: pre-line; margin-bottom: 24px; }
.home-foot { margin-top: 14px; font-size: 13px; }

/* 彩帶 */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti i {
  position: absolute; top: -12vh;
  width: 9px; height: 14px; border-radius: 2px;
  opacity: .85;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--dx, 20px), 112vh, 0) rotate(680deg); }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .home-emoji span { animation: none; }
}

/* ---------------- 卡片 / 按鈕 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.block { padding: 18px 16px; margin-bottom: 14px; }
.block-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; margin-bottom: 14px;
}
.block-title .ico { font-size: 20px; }
.req, .opt {
  font-style: normal; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; margin-left: auto;
}
.req { color: #b42318; background: #fee4e2; }
.opt { color: #175cd3; background: #e5efff; }

.btn {
  -webkit-appearance: none; appearance: none;
  border: 1px solid transparent;
  background: #eef0f6; color: var(--ink);
  font-size: 15px; font-weight: 700;
  padding: 12px 18px; border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, opacity .12s ease;
  touch-action: manipulation;
  line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(96deg, var(--pink) 0%, var(--orange) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 79, 129, .28);
}
.btn-lg { width: 100%; max-width: 320px; font-size: 18px; padding: 16px 26px; }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-danger { background: #fff; border-color: #fda29b; color: #b42318; }
.btn-danger-solid { background: #d92d20; color: #fff; }
.btn-block { width: 100%; }

/* ---------------- 上方 / 下方列 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .topbar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.topbar-inner {
  max-width: 880px; margin: 0 auto;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.who { display: flex; flex-direction: column; min-width: 0; }
.who-label { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.who strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs {
  max-width: 880px; margin: 0 auto;
  display: flex; gap: 4px;
  padding: 0 8px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  -webkit-appearance: none; appearance: none;
  border: 0; background: transparent;
  color: var(--muted); font-weight: 700; font-size: 14px;
  padding: 9px 14px; border-radius: 999px;
  white-space: nowrap; cursor: pointer;
}
.tab.is-active { background: #fff0f5; color: var(--pink-dark); }

.page { max-width: 880px; margin: 0 auto; padding: 16px 14px 0; }
.tip {
  background: #fffbea; border: 1px solid #fdeeb5; color: #8a6100;
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 13px; margin-bottom: 14px;
}
.tip:empty { display: none; }

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .bottombar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.bottombar-inner {
  max-width: 880px; margin: 0 auto;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
}
.bb-summary {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bottombar .btn { flex: 0 0 auto; }

/* ---------------- 選項 pills ---------------- */
.sub-group { margin-bottom: 14px; }
.sub-group:last-child { margin-bottom: 0; }
.label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  -webkit-appearance: none; appearance: none;
  border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 15px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; cursor: pointer;
  transition: all .14s ease; touch-action: manipulation;
}
.pill:active { transform: scale(.97); }
.pill.is-on {
  border-color: var(--pink); background: #fff0f5; color: var(--pink-dark);
  box-shadow: 0 2px 8px rgba(255, 79, 129, .16);
}

/* ---------------- 飲料 ---------------- */
.drink-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 620px) { .drink-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .drink-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.drink {
  -webkit-appearance: none; appearance: none;
  border: 1.5px solid var(--line); background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 10px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all .14s ease; touch-action: manipulation;
}
.drink:active { transform: scale(.98); }
.drink.is-on { border-color: var(--pink); background: #fff0f5; }
.drink-ico { font-size: 24px; line-height: 1; }
.drink-name { font-size: 14px; font-weight: 800; color: var(--ink); word-break: break-word; }
.drink-meta { font-size: 11px; color: var(--muted); }
.empty { text-align: center; padding: 18px 0; font-size: 14px; }
.hint { font-size: 12.5px; margin-top: 10px; line-height: 1.5; }
.picked-clear { margin-top: 10px; }

.picked {
  margin-top: 12px; padding: 12px;
  border: 1px dashed #ffc2d4; border-radius: var(--radius-sm);
  background: #fff8fa;
}
.picked-top { display: flex; align-items: flex-start; gap: 10px; }
.picked-name { font-weight: 800; }
.picked-detail { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.picked-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; }

/* ---------------- 對話框 ---------------- */
.backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 27, 36, .48);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  animation: fadein .18s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 560px) {
  .backdrop { align-items: center; padding: 24px 18px; }
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@supports (min-height: 100dvh) {
  .home-wrap, .center-box { min-height: 100dvh; }
  .modal { max-height: 92dvh; }
  @media (min-width: 560px) { .modal { max-height: 88dvh; } }
}

.modal {
  background: #fff;
  width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
  animation: slideup .24s cubic-bezier(.2, .8, .2, 1);
  max-height: 92vh;
  display: flex; flex-direction: column;
  margin-top: auto;
}
@media (min-width: 560px) {
  .modal { border-radius: 20px; margin-top: 0; max-height: 88vh; animation: pop .2s ease; }
}
@keyframes slideup { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }
@keyframes pop { from { transform: scale(.96); opacity: .6 } to { transform: none; opacity: 1 } }

.modal-head {
  padding: 18px 20px 8px;
  flex: 0 0 auto;
}
.modal-head h3 { font-size: 19px; font-weight: 900; }
.modal-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.modal-body {
  padding: 8px 20px 4px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.modal-foot {
  padding: 14px 20px calc(18px + var(--safe-b));
  display: flex; gap: 10px;
  flex: 0 0 auto;
  border-top: 1px solid #f1f3f8;
  background: #fff;
  border-radius: 0 0 20px 20px;
}
.modal-foot .btn { flex: 1 1 0; }

/* ---------------- 表單 ---------------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--ink-2); margin-bottom: 6px;
}
.field .star { color: #d92d20; }
.input, .select, .textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  font-family: inherit;
  font-size: 16px;               /* 16px 以避免 iOS 自動放大 */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a92a6' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 79, 129, .15);
}
.input.is-bad, .select.is-bad { border-color: #f04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, .12); }
.err { color: #b42318; font-size: 12.5px; margin-top: 6px; min-height: 1px; }
.err:empty { display: none; }

.checks { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; cursor: pointer; background: #fff;
  font-size: 15px; min-height: 46px;
}
.check.is-on { border-color: var(--pink); background: #fff6f9; }
.check input {
  width: 20px; height: 20px; accent-color: var(--pink);
  flex: 0 0 20px; margin: 0;
}
.check .cname { padding-left: 2px; }
/* .field > label 會把 label 變成 block，這裡把 .check 版面救回來 */
label.check {
  display: flex; align-items: center;
  font-size: 15px; font-weight: 400; color: var(--ink);
  margin-bottom: 0;
}
label.check .cname { font-weight: 600; }
.check .cname { font-weight: 600; }
.check .cprice { margin-left: auto; font-size: 13px; color: var(--muted); }

.opt-rows { display: flex; flex-direction: column; gap: 8px; }
.opt-row { display: flex; gap: 8px; align-items: center; }
.opt-row .input { flex: 1 1 auto; }
.opt-row .input.w-price { flex: 0 0 92px; text-align: right; }
.icon-btn {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff;
  color: var(--muted); font-size: 17px; cursor: pointer; line-height: 1;
}
.icon-btn:active { transform: scale(.94); }
.add-link {
  -webkit-appearance: none; appearance: none;
  border: 0; background: transparent; color: var(--pink-dark);
  font-weight: 700; font-size: 13px; padding: 6px 0; cursor: pointer;
}

/* ---------------- 收據 / 確認摘要 ---------------- */
.receipt {
  text-align: left;
  background: #fbfcff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin: 4px 0 16px;
}
.receipt-row { display: flex; gap: 12px; padding: 5px 0; font-size: 14.5px; }
.receipt-row span:first-child { color: var(--muted); flex: 0 0 74px; }
.receipt-row span:last-child { flex: 1 1 auto; font-weight: 600; word-break: break-word; white-space: pre-line; }

/* ---------------- 完成頁 ---------------- */
.done-card { width: 100%; max-width: 520px; text-align: center; padding: 30px 22px; }
.done-check {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 50%; background: #e7f8ef; color: var(--green);
  font-size: 32px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.done-title { font-size: 24px; font-weight: 900; margin-bottom: 14px; }
#view-done { background: #fff; }

/* ---------------- 管理頁 ---------------- */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.panel-head h2 { font-size: 18px; font-weight: 900; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 13px 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.admin-item .ai-main { flex: 1 1 auto; min-width: 0; }
.admin-item .ai-name { font-weight: 800; font-size: 15.5px; }
.admin-item .ai-price { color: var(--pink-dark); font-weight: 800; font-size: 13px; }
.admin-item .ai-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; word-break: break-word; }
.admin-item .ai-actions { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px;
  margin-bottom: 14px;
}
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 8px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 20px; font-weight: 900; }
.stat span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
@media (min-width: 620px) {
  .stat { padding: 12px; }
  .stat span { font-size: 12px; }
}

.table-scroll {
  display: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f3f8;
  vertical-align: top;
}
.table th { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; background: #fbfcff; }
.table td.msg { max-width: 220px; white-space: pre-line; word-break: break-word; }
.table tfoot td { font-weight: 800; border-bottom: 0; }
.table .nowrap { white-space: nowrap; }
.table .btn { white-space: nowrap; }

/* 分類設定（可開合，預設收起） */
.cat-card { padding: 0; margin-bottom: 14px; overflow: hidden; }
.cat-toggle {
  -webkit-appearance: none; appearance: none;
  width: 100%; border: 0; background: transparent;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 15px; font-weight: 800; color: var(--ink);
}
.cat-toggle .cat-ttl { display: flex; align-items: center; gap: 8px; }
.cat-toggle .cat-count {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted);
}
.cat-toggle .cat-arrow {
  flex: 0 0 auto; font-size: 12px; color: var(--muted);
  transition: transform .18s ease;
}
.cat-card.is-open .cat-toggle .cat-arrow { transform: rotate(180deg); }
.cat-card.is-open .cat-toggle { border-bottom: 1px solid var(--line); }
.cat-body { padding: 14px 16px 16px; }
.cat-card .cat-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.cat-fixed {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  background: #f4f6fb; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 8px;
}
.cat-fixed em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 8px; }

/* 每筆紀錄的分類下拉 */
.cat-select {
  -webkit-appearance: none; appearance: none;
  font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--pink-dark); background-color: #fff0f5;
  border: 1.5px solid #ffd3e1; border-radius: 999px;
  padding: 6px 26px 6px 12px; cursor: pointer; max-width: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23e63a6b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.cat-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(255, 79, 129, .15); }

/* 分類群組標題 */
.table tr.grp td {
  background: #fbfcff; font-weight: 800; font-size: 13.5px;
  color: var(--ink); border-top: 1px solid var(--line);
}
.table tr.grp .g-sum { color: var(--pink-dark); }
.grp-head {
  display: flex; align-items: baseline; gap: 8px;
  margin: 16px 2px 8px; font-size: 14px; font-weight: 800;
}
.grp-head:first-child { margin-top: 0; }
.grp-head .g-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.grp-head .g-sum { margin-left: auto; color: var(--pink-dark); }

.order-cards { display: flex; flex-direction: column; gap: 10px; }
.order-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 13px 14px;
}
.oc-head { display: flex; align-items: baseline; gap: 8px; }
.oc-head .oc-name { font-weight: 800; }
.oc-head .oc-dept { font-size: 12px; color: var(--muted); }
.oc-head .oc-total { margin-left: auto; font-weight: 900; color: var(--pink-dark); }
.oc-line { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; word-break: break-word; }
.oc-msg {
  font-size: 13.5px; margin-top: 8px; padding: 8px 10px;
  background: #fbfcff; border-radius: 10px; white-space: pre-line; word-break: break-word;
}
.oc-foot { display: flex; align-items: center; margin-top: 10px; gap: 8px; }
.oc-foot .oc-time { font-size: 12px; color: var(--muted); }
.oc-foot .btn { margin-left: auto; }

@media (min-width: 760px) {
  .table-scroll { display: block; }
  .order-cards { display: none; }
}

/* ---------------- Toast ---------------- */
#toast-root {
  position: fixed; left: 0; right: 0; bottom: calc(88px + var(--safe-b));
  z-index: 200; display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast {
  background: rgba(31, 36, 48, .94); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  animation: toastin .2s ease;
  max-width: 90%; text-align: center;
}
.toast.is-bad { background: #b42318; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

body.modal-open { overflow: hidden; }

/* 大螢幕微調 */
@media (min-width: 1024px) {
  .home-title { font-size: 52px; }
  .page { padding-top: 22px; }
}
