/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #fdf6ec;
  color: #1a1a1a;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== Screen management ========== */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: block;
}

/* ========== 歡迎畫面 ========== */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #efe8de url('assets/home-breakfast.jpg') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.welcome-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 252, 247, .28);
  pointer-events: none;
}

.welcome-logo {
  display: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.welcome-title {
  font-family: "Noto Serif TC", "Songti TC", STSong, serif;
  font-size: 38px;
  font-weight: 800;
  color: #3f2e22;
  margin-bottom: 8px;
  letter-spacing: .1em;
  text-shadow: none;
  position: relative;
}

.welcome-subtitle {
  font-size: 15px;
  color: rgba(63,46,34,.74);
  margin-bottom: 20px;
  letter-spacing: .12em;
  font-weight: 600;
}

.welcome-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  position: relative;
}

.welcome-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
  position: relative;
  overflow: hidden;
}

.welcome-btn:active {
  transform: translateY(1px);
}

.welcome-btn.dine-in {
  background: #fffdf9;
  color: #49362a;
  border-color: #bcae9f;
  box-shadow: none;
}

.welcome-btn.takeout {
  background: #49362a;
  color: #fff;
  box-shadow: none;
}

.welcome-btn-icon {
  font-size: 48px;
}

.welcome-btn-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .06em;
}

.admin-link {
  margin-top: 48px;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.admin-link:active {
  color: rgba(255,255,255,0.5);
}

/* ========== LINE 點餐首頁／我的訂單 ========== */
.welcome-container {
  justify-content: center;
  padding: 108px 20px 102px;
}

.home-header {
  position: absolute;
  z-index: 1;
  top: 22px;
  left: 20px;
  right: 20px;
  max-width: 440px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #49362a;
}

.home-store-label {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .4px;
}

.home-store-note {
  margin-top: 3px;
  font-size: 14px;
  color: rgba(109, 66, 32, .62);
}

.home-orders-btn {
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #49362a;
  min-height: 42px;
  padding: 6px 0;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.welcome-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.welcome-logo {
  display: none;
}

.welcome-title {
  font-size: 42px;
  letter-spacing: .1em;
}

.welcome-subtitle {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: .1em;
}

.line-member-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  margin-bottom: 18px;
  border: 1px solid rgba(73,54,42,.18);
  border-radius: 9px;
  color: #413b36;
  background: #fffdf9;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.line-friend-link {
  margin-top: 18px;
  margin-bottom: 0;
  text-decoration: none;
}

.line-member-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 7px;
  background: #4f7d57;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.line-member-copy { display: grid; gap: 3px; min-width: 0; }
.line-member-copy strong { font-size: 14px; }
.line-member-copy small { color: #766f68; font-size: 12px; }
.line-member-arrow { margin-left: auto; color: #a59a90; font-size: 25px; line-height: 1; }

.welcome-buttons {
  z-index: 1;
  margin-top: 26px;
  flex-direction: row;
  gap: 14px;
  max-width: 440px;
}

.welcome-btn.takeout,
.welcome-btn.dine-in {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 0;
}

.welcome-btn.dine-in {
  box-shadow: none;
}

.welcome-btn .welcome-btn-text { font-size: 26px; line-height: 1; }

.my-orders-container {
  min-height: 100vh;
  padding: 0 16px 94px;
  background: #fffaf4;
}

.my-orders-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  margin: 0 -16px;
  padding: 12px 16px;
  background: rgba(255,250,244,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(115, 82, 47, .08);
}

.my-orders-header h2 { font-size: 24px; color: #3d2b1f; }
.my-orders-header p { margin-top: 3px; color: #877568; font-size: 15px; }
.my-orders-refresh {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  color: #8a5a30;
  background: #f7e9d8;
  font-size: 24px;
  cursor: pointer;
}

.my-orders-content { width: 100%; max-width: 520px; margin: 22px auto 0; }
.my-orders-loading { padding: 48px 12px; color: #857466; text-align: center; }

.section-kicker {
  margin: 0 0 8px 4px;
  color: #9d7448;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
}

.pickup-number-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e8a731, #d18436);
  color: #fff;
  box-shadow: 0 10px 28px rgba(197,126,39,.24);
}

.pickup-number { display: block; font-size: 48px; font-weight: 900; line-height: 1; letter-spacing: 1px; }
.pickup-number small { margin-left: 3px; font-size: 20px; }
.pickup-number-card p { margin-top: 8px; font-size: 15px; opacity: .9; }
.order-state { display: inline-block; border-radius: 999px; padding: 7px 10px; font-size: 14px; font-weight: 800; }
.order-state.pending { color: #9a5918; background: #fff1cf; }
.pickup-number-card .order-state.pending { color: #fff; background: rgba(255,255,255,.2); }
.order-state.done { color: #087343; background: #dff8e8; }

.no-active-order {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid #f0e3d5;
  border-radius: 18px;
  background: #fff;
}

.no-active-order > span { font-size: 29px; }
.no-active-order strong { color: #4c3c30; font-size: 17px; }
.no-active-order p { margin-top: 5px; color: #8b7c70; font-size: 15px; line-height: 1.5; }

.order-history-section { margin-top: 28px; }
.order-history-section h3 { margin: 0 0 12px 4px; color: #4c3c30; font-size: 19px; }
.order-history-card {
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid #f0e7df;
  border-radius: 16px;
  background: #fff;
}

.order-history-top, .order-history-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-history-top > div { display: grid; gap: 4px; }
.order-history-top strong { color: #3f3127; font-size: 19px; }
.order-history-top span { color: #9b8c80; font-size: 14px; }
.order-history-items { overflow: hidden; margin: 13px 0; color: #716258; font-size: 16px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.order-history-bottom { padding-top: 11px; border-top: 1px solid #f6eee7; color: #9b8c80; font-size: 14px; }
.order-history-bottom strong { color: #b66e29; font-size: 19px; }
.empty-history { padding: 24px 18px; border: 1px dashed #decbbb; border-radius: 17px; background: rgba(255,255,255,.7); }
.empty-history p { color: #88776b; font-size: 13px; line-height: 1.6; }

.my-orders-start {
  position: fixed;
  z-index: 20;
  bottom: 20px;
  left: 50%;
  width: calc(100% - 32px);
  max-width: 488px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 12px;
  padding: 17px;
  background: #065f46;
  box-shadow: none;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
}

.my-orders-start:active { background: #047857; }

.my-orders-error { padding: 42px 16px; color: #735c4b; text-align: center; }
.my-orders-error strong { display: block; color: #4c3c30; font-size: 17px; }
.my-orders-error p { margin: 8px 0 18px; font-size: 16px; }
.my-orders-error button { border: 0; border-radius: 999px; padding: 12px 18px; background: #f2dfc9; color: #8a5a30; font-size: 16px; font-weight: 800; cursor: pointer; }

/* ========== 點餐畫面 ========== */
.menu-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 13px 16px;
  background: #426a53;
  color: #fff;
  border-bottom: 0;
  box-shadow: none;
}

.menu-header .back-btn { color: #fff; }

.back-btn {
  background: none;
  border: none;
  color: rgba(122,90,62,0.85);
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s;
}
.back-btn:active { color: #e8a731; }

.menu-header h2 {
  flex: 1;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
}

.header-spacer {
  width: 44px;
}

/* ========== 分類標籤 ========== */
.category-tabs-wrapper {
  position: fixed;
  z-index: 90;
  top: 70px;
  bottom: 0;
  left: 0;
  width: 110px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f1f1ee;
  border-right: 1px solid #e3e3de;
  padding: 0 0 92px;
}

.category-tabs-wrapper .scroll-arrow {
  display: none;
}

.category-tabs-wrapper .scroll-arrow.hidden {
  opacity: 0;
}

.category-tabs-wrapper .scroll-arrow span {
  font-size: 18px;
  color: #9a958e;
  animation: bounceRight 1.5s ease-in-out infinite;
}

@keyframes bounceRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.category-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.cat-tab {
  width: 100%;
  min-height: 70px;
  padding: 10px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6e716c;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  text-align: center;
  word-break: break-word;
}

.cat-tab:active {
  transform: scale(0.96);
}

.cat-tab.active {
  background: #fff;
  color: #315e47;
  box-shadow: inset 4px 0 0 #426a53;
}

/* ========== 餐點列表 ========== */
.menu-items {
  min-height: calc(100vh - 70px);
  margin-left: 110px;
  padding: 0 14px 104px;
  background: #fff;
}

.category-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 2px 16px;
  font-size: 27px;
  font-weight: 800;
  color: #262b27;
}

.category-section-title .cat-subtitle {
  font-size: 16px;
  color: #9a958e;
  font-weight: 500;
}

.menu-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 106px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e6e6e2;
  border-radius: 0;
  padding: 17px 4px;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.menu-item-card:active {
  background: #f7f8f5;
  transform: none;
  box-shadow: none;
}

.menu-item-card.sold-out {
  opacity: 0.4;
  pointer-events: none;
}

/* 交給命運特殊卡片 */
.menu-item-card.fate-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e6e6e2;
  box-shadow: none;
}
.menu-item-card.fate-card:active {
  background: #f7f8f5;
}
.fate-add-icon {
  font-size: 22px !important;
  border: none !important;
  background: none !important;
}

.menu-item-emoji {
  font-size: 34px;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fdf3e7;
  border-radius: 12px;
}

.menu-item-card.fate-card .menu-item-emoji {
  display: none;
}

.menu-item-info {
  flex: 1;
}

.menu-item-name {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #262b27;
}

.menu-item-name .tag-seasonal {
  display: inline-block;
  font-size: 11px;
  background: none;
  color: #426a53;
  padding: 0;
  border-radius: 0;
  margin-left: 6px;
  font-weight: 700;
  border: 0;
}

.menu-item-name .tag-soldout {
  display: inline-block;
  font-size: 11px;
  background: none;
  color: #dc2626;
  padding: 0;
  border-radius: 0;
  margin-left: 6px;
  font-weight: 700;
}

.menu-item-desc {
  font-size: 16px;
  color: #858984;
  margin-top: 2px;
}

.menu-item-price {
  font-size: 22px;
  font-weight: 800;
  color: #315e47;
  margin-right: 8px;
}

.menu-item-add {
  width: 42px;
  height: 42px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #426a53;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.menu-item-add:active {
  background: transparent;
  color: #274d3a;
}

/* ========== 購物車浮動按鈕 ========== */
.cart-float {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 122px;
  transform: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #426a53;
  color: #fff;
  justify-content: center;
  padding: 17px 16px;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  z-index: 90;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  display: none;
}

.cart-float.show {
  display: flex;
}

.cart-float:active {
  transform: translateY(1px);
}

.cart-float-icon {
  font-size: 22px;
}

.cart-float-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.cart-float-badge {
  background: #f5e3be;
  color: #49362a;
  font-size: 16px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}

.cart-float-total {
  font-size: 23px;
  font-weight: 800;
}

/* ========== Modal 共用 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(21, 30, 25, .42);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  animation: fadeIn .16s;
}
.modal-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ========== 餐點選項 Modal ========== */
.modal-content {
  background: #fff;
  border-radius: 10px 10px 0 0;
  padding: 28px 20px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp .2s ease-out;
  box-shadow: none;
}

.modal-item-name {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #1a1a1a;
}

.modal-item-price {
  font-size: 24px;
  font-weight: 700;
  color: #315e47;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 12px;
  padding: 14px 0;
  background: transparent;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #e6e6e2;
}

.modal-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #4a4540;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* ===== pill 風格選項 ===== */
.pill-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-option {
  flex: 1;
  min-width: 80px;
  padding: 14px 10px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: #353b36;
  position: relative;
}

.pill-option.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

.pill-option:active {
  transform: none;
}

.pill-option .pill-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #9a958e;
  margin-top: 2px;
}

.pill-option.active .pill-sub {
  color: #315e47;
}

.pill-option.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ===== 客製化選項 toggle ===== */
.custom-toggle-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-toggle {
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: #353b36;
  text-align: center;
}

.custom-toggle.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

.custom-toggle:active {
  transform: none;
}

/* ===== 加料 toggle (起司/蛋/豬排) ===== */
.addon-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: #353b36;
  width: 100%;
}

.addon-toggle:active {
  transform: none;
}

.addon-toggle .addon-icon {
  font-size: 22px;
}

/* 起司 active */
.addon-toggle.cheese.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

/* 蛋 active */
.addon-toggle.egg.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

/* 豬排 active */
.addon-toggle.pork.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

/* ===== 口味選擇 ===== */
.flavor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.flavor-chip {
  flex: 1;
  min-width: 70px;
  padding: 14px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
  color: #4a4540;
}

.flavor-chip.active {
  border-color: #426a53;
  background: #edf4ee;
  color: #315e47;
  box-shadow: none;
}

.flavor-chip:active {
  transform: none;
}

.combo-choice-group {
  margin-bottom: 14px;
}

.combo-choice-label {
  font-size: 15px;
  font-weight: 700;
  color: #4a4540;
  margin-bottom: 10px;
}

/* ===== 套餐飲料升級 ===== */
.combo-drink-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.combo-drink-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.combo-drink-option.active {
  border-color: #426a53;
  background: #edf4ee;
}

.combo-drink-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d2a26;
}

.combo-drink-diff {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.combo-drink-diff.included {
  background: #ecfdf5;
  color: #047857;
}

.combo-drink-diff.upgrade {
  background: #fef3c7;
  color: #b45309;
}

/* ===== 數量控制 ===== */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 18px;
  border-top: 1px solid #e6e6e2;
}

.qty-label {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qty-btn {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid #cfd4cf;
  background: #fff;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #315e47;
  transition: all 0.2s;
}

.qty-btn:active {
  background: #edf4ee;
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.qty-value {
  font-size: 28px;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
  color: #1a1a1a;
}

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.modal-btn-cancel {
  flex: 1;
  padding: 17px;
  border-radius: 6px;
  border: 1px solid #9ea9a0;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  color: #536158;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-btn-cancel:active {
  background: #edf4ee;
}

.modal-btn-add {
  flex: 1.5;
  padding: 17px;
  border-radius: 6px;
  border: none;
  background: #426a53;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  box-shadow: none;
}

.modal-btn-add:active {
  transform: none;
  background: #315e47;
}

/* ========== 交給命運 Modal ========== */
.fate-header {
  text-align: center;
  margin-bottom: 20px;
}

.fate-title {
  font-size: 30px;
  font-weight: 800;
  color: #1a1a1a;
}

.fate-price {
  font-size: 24px;
  font-weight: 700;
  color: #e8a731;
  margin-top: 4px;
}

.fate-reveal {
  background: linear-gradient(135deg, #fffbf0, #fff8e8);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(232,167,49,0.2);
  box-shadow: 0 2px 12px rgba(232,167,49,0.06);
}

.fate-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 1px solid rgba(232,167,49,0.1);
}

.fate-item:last-child {
  border-bottom: none;
}

.fate-item-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.fate-item.fate-drink {
  color: #cc8443;
}

.fate-drink-options {
  margin-bottom: 10px;
}

.fate-buttons {
  display: flex;
  gap: 10px;
}

.fate-buttons .modal-btn-cancel {
  flex: 0.8;
}

.fate-reroll-btn {
  flex: 1;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid #e8a731;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  color: #e8a731;
  cursor: pointer;
  transition: all 0.2s;
}

.fate-reroll-btn:active {
  background: #fffbeb;
  transform: scale(0.97);
}

.fate-buttons .modal-btn-add {
  flex: 1;
  background: linear-gradient(135deg, #e8a731, #d4942a);
  box-shadow: 0 2px 12px rgba(232,167,49,0.25);
}

/* ========== 購物車 ========== */
.cart-panel {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.1);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cart-header h3 {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
}

.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f3f0;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6560;
  transition: background 0.2s;
}

.close-btn:active {
  background: #e8e5e0;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: #b5b0a8;
  font-size: 18px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f3f0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 21px;
  font-weight: 700;
  color: #1a1a1a;
}

.cart-item-options {
  font-size: 16px;
  color: #9a958e;
  margin-top: 3px;
}

.cart-item-price {
  font-size: 21px;
  font-weight: 700;
  color: #cc8443;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e0dcd5;
  background: #fff;
  font-size: 21px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4a4540;
  transition: all 0.15s;
}

.cart-qty-btn:active {
  background: #f5f3f0;
}

.cart-qty-btn.danger {
  border-color: #fca5a5;
  color: #ef4444;
}

.cart-qty-val {
  font-size: 20px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: #1a1a1a;
}

.cart-note {
  padding: 0 20px 14px;
}

.cart-note label,
#table-select-area label {
  font-size: 17px;
  font-weight: 700;
  color: #4a4540;
  display: block;
  margin-bottom: 8px;
}

.cart-note input,
#table-select-area select {
  width: 100%;
  padding: 14px 14px;
  border: 2px solid #e0dcd5;
  border-radius: 12px;
  font-size: 18px;
  outline: none;
  transition: border 0.2s;
  background: #faf8f5;
}

.cart-note input:focus,
#table-select-area select:focus {
  border-color: #cc8443;
  background: #fff;
}

#table-select-area {
  padding: 0 20px 14px;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cart-total-row span:first-child {
  font-size: 20px;
  font-weight: 700;
  color: #4a4540;
}

.cart-total-price {
  font-size: 36px;
  font-weight: 800;
  color: #cc8443;
}

.submit-order-btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 10px;
  background: #49362a;
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  box-shadow: none;
  letter-spacing: 1px;
}

.submit-order-btn:active {
  transform: scale(0.98);
}

.submit-order-btn:disabled {
  background: #c5c0b8;
  box-shadow: none;
  cursor: default;
}

/* ========== 成功畫面 ========== */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #f5f0e9;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 20px;
  animation: none;
}

.success-container h2 {
  font-size: 32px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 10px;
}

.success-container p {
  font-size: 18px;
  color: #047857;
  text-align: center;
  line-height: 1.6;
}

.success-details {
  margin-top: 24px;
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  width: 100%;
  max-width: 380px;
  border: 1px solid #e6ddd3;
  box-shadow: none;
}

.success-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid #f5f3f0;
  color: #4a4540;
}

.success-details .detail-row.total-row,
.success-details .detail-row:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 19px;
  padding-top: 12px;
  color: #cc8443;
}

.line-notify-btn {
  width: 100%;
  max-width: 380px;
  margin-top: 16px;
  padding: 15px 18px;
  border: 2px solid #06c755;
  border-radius: 14px;
  background: #06c755;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.line-notify-btn:active { transform: scale(0.98); }

.line-notify-hint {
  margin-top: 8px;
  color: #6b6560 !important;
  font-size: 13px !important;
}

.success-receipt-hint {
  max-width: 340px;
  margin: 17px auto 0;
  color: #766b61 !important;
  font-size: 13px !important;
  line-height: 1.55;
}

.success-view-order {
  width: 100%;
  max-width: 380px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid #b98b58;
  border-radius: 12px;
  background: #fffdf9;
  color: #704929;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.success-view-order:active { background: #f8ecde; }

.success-btn {
  margin-top: 28px;
  padding: 18px 48px;
  border: none;
  border-radius: 18px;
  background: #065f46;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(6,95,70,0.25);
  transition: all 0.2s cubic-bezier(.4,0,.2,1);
  letter-spacing: 1px;
}

.success-btn:active {
  transform: scale(0.96);
  background: #047857;
}

/* ========== Toast 通知 ========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #e2a059, #d3833a);
  color: #fff;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  z-index: 999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== 店家公告 popup ========== */
.announce-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(40,28,18,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.2s;
}

.announce-box {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 40px 24px 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  animation: slideUp 0.3s cubic-bezier(.4,0,.2,1);
}

.announce-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #f5efe6;
  color: #8a6a4e;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.announce-close:active {
  background: #ece3d6;
  transform: scale(0.94);
}

.announce-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.announce-title {
  font-size: 20px;
  font-weight: 800;
  color: #c98a3c;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.announce-text {
  font-size: 19px;
  font-weight: 600;
  color: #2d2a26;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ========== Responsive ========== */
@media (min-width: 480px) {
  .menu-items {
    max-width: none;
    margin: 0 0 0 92px;
  }
  .category-tabs {
    max-width: none;
    margin: 0;
  }
}
