/* ============================================================
   顧客點餐前台 — 手機優先（二版：浮世繪 × 莫蘭迪）
   版面切割：手機單欄＋sticky 分類籤＋底部結帳列
             平板同構加寬雙欄；桌機三欄（直式分類欄｜菜單｜常駐購物袋）
   ============================================================ */

/* ---------- 品牌門面：版畫紙上的青海波 ---------- */
.site-head {
  background:
    linear-gradient(180deg, rgba(74, 93, 120, 0.06), transparent 70%),
    var(--seigaiha),
    var(--bg);
  border-bottom: 2px solid var(--line-ink);
}
.site-head-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 18px;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}
.head-logo {
  width: 64px;
  color: var(--aka-600);
  flex-shrink: 0;
  animation: head-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.head-text { animation: head-in 0.6s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.eyebrow {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em; /* 中英混排的長句，字距收斂避免手機斷行難看 */
  text-transform: uppercase;
  color: var(--ai-600);
  margin-bottom: 2px;
  line-height: 1.7;
}
.nw { white-space: nowrap; } /* 詞組不內斷，只在頓點處換行 */
.head-title {
  /* 「現點現做，請足量點餐，依序出單」共 14 字：依視窗寬扣掉 logo 與邊距後
     以 15 等分計算字級，任何手機寬度都恰好一行跑完 */
  font-size: clamp(14px, calc((100vw - 122px) / 15), 26px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--tx);
  white-space: nowrap;
}
.head-sub {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--tx-soft);
  margin-top: 3px;
}
/* 直排「御品書」印記：手機隱藏、平板以上顯示 */
.head-seal {
  display: none;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--aka-700);
  border: 1.5px solid var(--aka-600);
  background: var(--bg-card);
  padding: 12px 6px;
  border-radius: 3px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  height: 68px; /* 固定高度，確保單欄直排（3 字×21px＋餘裕） */
  box-sizing: content-box;
  box-shadow: var(--print-shadow);
}
@keyframes head-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 置頂區（品牌門面＋分類導覽整塊跟著捲動） ---------- */
.top-pin {
  position: sticky;
  top: 0;
  z-index: 30;
}
/* LOGO 即「回到最上方」按鈕 */
.head-home {
  background: none;
  border: 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  line-height: 0;
}
.head-home:focus-visible {
  outline: 2px solid var(--aka-600);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- 分類導覽（橫向，在置頂區內） ---------- */
.cat-nav {
  background: rgba(239, 233, 221, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-strong);
}
.cat-nav-inner {
  display: flex;
  align-items: stretch;
  max-width: 1240px;
  margin: 0 auto;
}
.cat-nav-track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 12px;
  flex: 1;
  min-width: 0;
}
.cat-nav-track::-webkit-scrollbar { display: none; }

/* 我的訂單常駐入口（釘在分類籤右端） */
.my-orders-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  border-left: 1px solid var(--line-strong);
  background: none;
  color: var(--ai-700);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0 14px;
  min-height: 48px;
  white-space: nowrap;
}
.my-orders-btn:hover { color: var(--ai-600); background: var(--ai-glaze); }
.orders-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--aka-700);
  color: var(--bg-card);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cat-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--tx-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 10px 11px;
  white-space: nowrap;
  min-height: 48px;
  transition: color 0.18s;
}
.cat-tab:hover { color: var(--tx); }
.cat-tab[aria-current="true"] {
  color: var(--aka-700);
  border-bottom-color: var(--aka-600);
  font-weight: 700;
}

/* ---------- 三欄骨架 ---------- */
.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.side-rail, .cart-rail { display: none; }

/* ---------- 本日推薦（錦繪卡） ---------- */
.featured-strip {
  margin-top: 22px;
  background:
    var(--seigaiha),
    var(--bg-card);
  border: 1.5px solid var(--line-ink);
  border-radius: var(--radius-m);
  box-shadow: var(--print-shadow);
  padding: 14px 16px 16px;
}
.featured-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.featured-head h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--aka-700);
}
.featured-kana {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ai-600);
  font-weight: 500;
}
.featured-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding: 2px;
}
.featured-track::-webkit-scrollbar { display: none; }
.featured-card {
  flex: 0 0 auto;
  width: 150px;
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.featured-card .f-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.featured-card .f-price {
  font-size: 13px;
  color: var(--tx-soft);
  font-variant-numeric: tabular-nums;
}
.featured-card .item-ctrl { margin-top: 4px; align-self: flex-end; }
/* 推薦區裡的自取品項：說明為什麼沒有加點鈕 */
.f-selfserve {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--amber-text);
  background: var(--amber-glaze);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 6px;
  letter-spacing: 0.06em;
}

/* ---------- 分類區塊 ---------- */
.menu-section { padding-top: 26px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--line-ink);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.section-kana {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ai-600);
  font-weight: 500;
  order: 2;
}
.section-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
/* 進場淡入（IntersectionObserver 掛 .revealed） */
.menu-section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.menu-section.revealed { opacity: 1; transform: translateY(0); }

/* ---------- 品項列 ---------- */
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}
.item-info { flex: 1; min-width: 0; }
.item-name {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.item-spec {
  font-size: 12px;
  color: var(--tx-soft);
  margin-top: 1px;
}
.item-alcohol {
  font-size: 10.5px;
  color: var(--tx-soft);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 6px;
  letter-spacing: 0.05em;
  vertical-align: 1px;
  white-space: nowrap;
}
.item-featured-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--aka-700);
  background: var(--aka-glaze);
  border: 1px solid var(--aka-500);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 6px;
  letter-spacing: 0.08em;
  vertical-align: 1px;
  white-space: nowrap;
}
.item-price {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--tx-soft);
  white-space: nowrap;
}
.item-price.market { color: var(--aka-700); font-size: 13.5px; letter-spacing: 0.06em; }

/* 售完：品名淡化＋章形標記 */
.item-row.soldout .item-name,
.item-row.soldout .item-spec,
.item-row.soldout .item-price { color: var(--tx-soft); }
.soldout-tag {
  display: inline-block;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--aka-700);
  border: 1.5px solid var(--aka-600);
  border-radius: 4px;
  padding: 4px 9px;
  transform: rotate(-5deg);
  white-space: nowrap;
}

/* 分類警示標語（例如酒水自取後結） */
.section-notice {
  margin: 10px 0 2px;
  padding: 10px 13px;
  background: var(--amber-glaze);
  border: 1px solid var(--amber-fill);
  border-left: 3px solid var(--amber-text);
  border-radius: var(--radius-s);
  color: var(--amber-text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* 加點按鈕與步進器 */
.add-btn {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-ink);
  background: var(--bg-card);
  color: var(--tx);
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 2px 2px 0 rgba(74, 93, 120, 0.18);
  transition: transform 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.add-btn:hover { border-color: var(--aka-600); color: var(--aka-700); }
.add-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--aka-600);
  border-radius: 999px;
  padding: 2px;
  box-shadow: 2px 2px 0 rgba(181, 84, 74, 0.18);
}
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--tx);
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s, transform 0.1s;
}
.stepper button:hover { background: var(--bg-inset); }
.stepper button:active { transform: scale(0.88); }
.stepper .qty {
  min-width: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--aka-700);
}

/* ---------- 載入 / 錯誤狀態 ---------- */
.menu-loading, .menu-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 80px 0;
  color: var(--tx-soft);
}
.loading-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--aka-600);
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: 0.35; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.menu-error { flex-direction: column; }
.btn-retry {
  border: 1.5px solid var(--line-ink);
  background: var(--bg-card);
  color: var(--tx);
  border-radius: var(--radius-s);
  padding: 10px 22px;
  min-height: 44px;
  box-shadow: var(--print-shadow);
}
.btn-retry:hover { border-color: var(--aka-600); color: var(--aka-700); }

/* ---------- 頁尾 ---------- */
.site-foot {
  border-top: 1px solid var(--line-strong);
  padding: 26px 20px 110px;
  max-width: 1240px;
  margin: 0 auto;
}
.foot-notes { color: var(--tx-soft); font-size: 12.5px; line-height: 2; }
.foot-notes p::before { content: "・"; color: var(--aka-600); }
.foot-brand {
  font-family: var(--serif);
  color: var(--tx-faint);
  letter-spacing: 0.2em;
  font-size: 11px;
  margin-top: 18px;
  text-transform: uppercase;
}

/* ---------- 手機底部結帳列 ---------- */
.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(247, 243, 234, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--line-ink);
  transform: translateY(0);
  animation: bar-up 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes bar-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cart-bar-info { display: flex; flex-direction: column; }
.cart-bar-count { font-size: 12px; color: var(--tx-soft); }
.cart-bar-count.pop { animation: count-pop 0.3s ease; }
@keyframes count-pop { 50% { transform: scale(1.25); } }
.cart-bar-total {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 按鈕 ---------- */
.btn-primary {
  border: none;
  background: var(--aka-700);
  color: var(--bg-card);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: var(--radius-s);
  padding: 13px 30px;
  min-height: 48px;
  box-shadow: var(--print-shadow-ink);
  transition: background 0.18s, transform 0.12s, box-shadow 0.12s;
}
.btn-primary:hover { background: var(--aka-600); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
.btn-primary:disabled {
  background: var(--bg-inset);
  color: var(--tx-faint);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  border: 1.5px solid var(--line-ink);
  background: var(--bg-card);
  color: var(--tx);
  font-size: 14.5px;
  border-radius: var(--radius-s);
  padding: 11px 26px;
  min-height: 44px;
  margin-top: 18px;
  box-shadow: var(--print-shadow);
  transition: transform 0.12s, box-shadow 0.12s, color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--aka-600); color: var(--aka-700); }
.btn-secondary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
.btn-secondary.full { width: 100%; margin-top: 4px; }

/* 結帳列的訂單狀態模式：實心改描邊，區隔「還沒點」與「已下單」 */
.cart-bar.status-mode .btn-primary {
  background: var(--bg-card);
  border: 1.5px solid var(--aka-600);
  color: var(--aka-700);
  box-shadow: var(--print-shadow);
}
.cart-bar.status-mode .btn-primary:hover { background: var(--aka-glaze); }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(59, 56, 51, 0.42);
  opacity: 1;
  transition: opacity 0.25s;
}
.sheet-backdrop.closing { opacity: 0; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 51;
  background: var(--bg-card);
  border-top: 2px solid var(--line-ink);
  border-radius: 14px 14px 0 0;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(59, 56, 51, 0.25);
}
.sheet.closing { transform: translateY(105%); }
.sheet.opening { transform: translateY(105%); }
.sheet-grip {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: 10px auto 0;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 20px; font-weight: 900; letter-spacing: 0.08em; }
.sheet-kana { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; color: var(--ai-600); margin-left: 10px; }
.sheet-close {
  width: 44px; height: 44px;
  border: none;
  background: none;
  color: var(--tx-soft);
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
}
.sheet-close:hover { color: var(--tx); background: var(--bg-inset); }
.sheet-body { overflow-y: auto; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); }

/* 小計＋送出鈕黏在面板底部，長清單不必捲到底也能送出 */
.sheet-cta {
  position: sticky;
  bottom: calc(-20px - env(safe-area-inset-bottom));
  background: var(--bg-card);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  margin-bottom: calc(-20px - env(safe-area-inset-bottom));
  box-shadow: 0 -14px 14px -8px rgba(247, 243, 234, 0.95);
}

/* 購物袋清單 */
.cart-list { display: flex; flex-direction: column; }
.cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-name { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.cart-row-price { font-size: 12.5px; color: var(--tx-soft); font-variant-numeric: tabular-nums; }
.cart-row-sub {
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
  color: var(--tx-soft);
  min-width: 68px;
  text-align: right;
}
/* 購物袋內的售完品：整列標紅提醒 */
.cart-row.soldout-row .cart-row-name { color: var(--aka-700); text-decoration: line-through; }
.cart-row.soldout-row .cart-row-price { color: var(--aka-700); }
.cart-empty {
  text-align: center;
  color: var(--tx-soft);
  padding: 44px 0;
  line-height: 2;
}
.cart-empty .empty-mark { font-family: var(--serif); font-size: 30px; color: var(--line-strong); display: block; }

/* 結帳表單 */
.form-block { margin-top: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--tx-soft);
  margin-bottom: 7px;
  font-weight: 500;
}
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-inset);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 4px;
}
.seg button {
  border: none;
  background: none;
  color: var(--tx-soft);
  font-size: 14.5px;
  font-weight: 500;
  padding: 10px 4px;
  min-height: 44px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.seg button[aria-pressed="true"] {
  background: var(--aka-700);
  color: var(--bg-card);
  font-weight: 700;
}
.from-qr {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--moss-text);
  background: var(--moss-glaze);
  border: 1px solid var(--moss-fill);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 8px;
}

.field { margin-top: 12px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--tx);
  font-size: 15px;
  padding: 11px 12px;
  min-height: 44px;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: var(--tx-soft); }
.field input:focus, .field textarea:focus { border-color: var(--ai-600); }

.alcohol-note, .market-note {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--tx);
  background: var(--aka-glaze);
  border: 1px solid var(--aka-500);
  border-radius: var(--radius-s);
  padding: 9px 12px;
  margin-top: 14px;
  line-height: 1.7;
}
.market-note { background: var(--amber-glaze); border-color: var(--amber-fill); }

.submit-errors {
  background: var(--aka-glaze);
  border: 1px solid var(--aka-600);
  border-radius: var(--radius-s);
  color: var(--aka-700);
  font-size: 13.5px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.8;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 2px solid var(--line-ink);
}
.checkout-total .label { font-size: 13px; color: var(--tx-soft); letter-spacing: 0.1em; }
.checkout-total .amount {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.checkout-total .amount small { font-size: 13px; font-weight: 400; color: var(--tx-soft); margin-left: 6px; }
.sheet .btn-primary.full { width: 100%; margin-top: 14px; }

/* ---------- 我的訂單列表 ---------- */
.orders-summary {
  font-size: 13px;
  color: var(--tx-soft);
  letter-spacing: 0.05em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line-ink);
}
.orders-summary small { color: var(--tx-soft); margin-left: 4px; }
.order-list { display: flex; flex-direction: column; }
.order-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 13px 2px;
  min-height: 64px;
  transition: background 0.15s;
}
.order-list-row:hover { background: var(--ai-glaze); }
.order-list-row .olr-no {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--aka-700);
  border: 1.5px solid var(--aka-600);
  border-radius: 6px;
  padding: 4px 7px;
  transform: rotate(-3deg);
  flex-shrink: 0;
}
.order-list-row .olr-info { flex: 1; min-width: 0; }
.order-list-row .olr-meta { display: block; font-size: 12px; color: var(--tx-soft); }
.order-list-row .olr-items {
  display: block;
  font-size: 13.5px;
  color: var(--tx);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-list-row .olr-right { text-align: right; flex-shrink: 0; }
.order-list-row .olr-total {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 14.5px;
}
.order-list-row .olr-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--tx-soft);
}
.order-list-row.cancelled .olr-items,
.order-list-row.cancelled .olr-total { color: var(--tx-soft); text-decoration: line-through; }
.order-list-row.cancelled .olr-no { color: var(--tx-soft); border-color: var(--line-strong); }

.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rail-orders { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }

/* ---------- 訂單完成：朱印 ---------- */
.success-view { text-align: center; padding: 10px 0 6px; }
.hanko {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  background: var(--aka-600);
  color: var(--bg-card);
  border-radius: 8px;
  transform: rotate(-3deg);
  box-shadow: 4px 4px 0 rgba(74, 93, 120, 0.25);
  animation: stamp 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  margin: 8px 0 4px;
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-8deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-3deg) scale(1); }
}
.hanko .no-label { font-size: 10px; letter-spacing: 0.3em; opacity: 0.85; }
.hanko .no-num { font-family: var(--serif); font-size: 40px; font-weight: 900; line-height: 1.1; }
.success-title { font-size: 20px; font-weight: 900; letter-spacing: 0.1em; margin-top: 10px; }
.success-desc { color: var(--tx-soft); font-size: 13.5px; margin-top: 6px; line-height: 1.9; }
.order-status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--tx-soft);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-text); }
.status-dot.accepted { background: var(--amber-text); }
.status-dot.new { background: var(--aka-600); }
.status-dot.done { background: var(--moss-text); }
.status-dot.cancelled { background: var(--tx-soft); }
.cancel-reason {
  margin-top: 8px;
  font-size: 13px;
  color: var(--aka-700);
  line-height: 1.7;
}
.cancel-reason::before { content: "取消原因："; font-weight: 700; }

.success-summary {
  text-align: left;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

/* ============================================================
   平板 ≥768px：加寬、雙欄品項
   ============================================================ */
@media (min-width: 768px) {
  .head-seal { display: block; }
  .head-logo { width: 76px; }
  .head-title { font-size: 30px; }
  .layout { padding: 0 24px 60px; }
  .section-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
  }
  .site-head-inner { padding: 28px 24px 24px; }
  .featured-card { width: 170px; }
}

/* ============================================================
   桌機 ≥1080px：三欄（直式分類欄｜菜單｜常駐購物袋）
   ============================================================ */
@media (min-width: 1080px) {
  /* 桌機有常駐左欄分類與右欄購物袋，門面不置頂、隨頁捲走 */
  .top-pin { position: static; }
  .cat-nav { display: none; }
  .cart-bar { display: none !important; }
  .layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 300px;
    gap: 40px;
    padding-top: 8px;
  }
  .side-rail {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    padding-top: 26px;
  }
  .rail-label {
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: 0.5em;
    color: var(--aka-700);
    border-left: 2px solid var(--aka-600);
    padding-left: 10px;
    margin-bottom: 18px;
    font-size: 13px;
  }
  .rail-list { display: flex; flex-direction: column; gap: 2px; }
  .rail-item {
    text-align: left;
    background: none;
    border: none;
    border-left: 2px solid transparent;
    color: var(--tx-soft);
    font-size: 14px;
    padding: 8px 0 8px 12px;
    letter-spacing: 0.05em;
    transition: color 0.15s, border-color 0.15s;
  }
  .rail-item .rail-kana { display: block; font-size: 10px; color: var(--tx-faint); letter-spacing: 0.12em; }
  .rail-item:hover { color: var(--tx); }
  .rail-item[aria-current="true"] {
    color: var(--aka-700);
    border-left-color: var(--aka-600);
    font-weight: 700;
  }
  .cart-rail {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    background: var(--bg-card);
    border: 1.5px solid var(--line-ink);
    border-radius: var(--radius-m);
    box-shadow: var(--print-shadow);
    padding: 18px 18px 20px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
  }
  .cart-rail-title {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--line-ink);
    padding-bottom: 10px;
  }
  .cart-rail-kana { font-family: var(--sans); font-size: 10px; font-weight: 500; color: var(--ai-600); letter-spacing: 0.18em; margin-left: 8px; }
  .cart-rail .cart-row { padding: 9px 0; }
  .cart-rail .btn-primary.full { width: 100%; margin-top: 14px; }
  .cart-rail .checkout-total { margin-top: 12px; }
  .cart-rail .checkout-total .amount { font-size: 22px; }
  .section-list { column-gap: 44px; }
  .menu-section { padding-top: 34px; }
  .featured-strip { margin-top: 30px; }
  .featured-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    overflow-x: visible;
  }
  .featured-card { width: auto; }
  /* 桌機時 sheet 改為置中彈窗 */
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 92vw);
    max-height: 86vh;
    border-radius: var(--radius-m);
    border: 1.5px solid var(--line-ink);
  }
  .sheet.closing, .sheet.opening { transform: translate(-50%, -46%); opacity: 0; }
  .sheet { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s; }
  .sheet-grip { display: none; }
}
