:root {
  /* 品牌色 */
  --gold:        #b08a44;   /* 琥珀金 */
  --gold-deep:   #8a6a30;
  --plum:        #c47b91;   /* 梅花粉 */
  --ink-green:   #20342b;   /* 深墨綠 */
  --ink-green-2: #2c4438;
  --rice:        #f6f1e6;   /* 米白 */
  --rice-2:      #fbf8f1;
  --mist:        #9a968b;   /* 霧灰 */
  --clay:        #9c5f3c;   /* 陶土棕 */
  --line:        #e3dccc;
  --shadow:      0 10px 40px rgba(32, 52, 43, .10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--rice);
  color: var(--ink-green);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* 警語條 */
.warning-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink-green);
  color: var(--rice-2);
  text-align: center;
  font-size: 13px;
  letter-spacing: .5px;
  padding: 8px 12px;
}

/* 共用：品牌標 */
.brand-mark {
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-green);
  letter-spacing: 2px;
}
.brand-mark span {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 3px;
  font-weight: 500;
}
.brand-mark.large { font-size: 34px; }
.brand-mark.large span { font-size: 18px; }

/* 按鈕 */
.btn {
  font-family: inherit;
  font-size: 17px;
  border: none;
  border-radius: 999px;
  padding: 15px 22px;
  cursor: pointer;
  transition: transform .08s ease, opacity .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink-green);
  color: var(--rice-2);
  font-weight: 500;
  letter-spacing: 1px;
}
.btn-primary:hover { background: var(--ink-green-2); }
.btn-ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid var(--line);
}
.btn[disabled] { opacity: .55; cursor: default; }

/* 年齡 gate */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(176,138,68,.14), transparent 60%),
    var(--rice);
}
.age-card {
  text-align: center;
  max-width: 420px;
}
.age-title {
  font-family: "Noto Serif TC", serif;
  font-size: 26px;
  margin: 18px 0 8px;
  color: var(--ink-green);
}
.age-sub { color: var(--mist); margin: 0 0 26px; font-size: 15px; }
.age-actions { display: flex; flex-direction: column; gap: 12px; }

/* App / Hero */
.app { max-width: 560px; margin: 0 auto; padding: 0 22px 40px; }

.hero {
  text-align: center;
  padding: 28px 6px 22px;
}
.brand-logo {
  width: 96px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}
.banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.banner-awards { margin: 16px 0 0; }
.banner-activity { margin: 6px 0 20px; }
.tagline {
  color: var(--gold-deep);
  font-family: "Noto Serif TC", serif;
  letter-spacing: 4px;
  font-size: 15px;
  margin: 14px 0 22px;
}
.hero-title {
  font-family: "Noto Serif TC", serif;
  font-size: 30px;
  margin: 0 0 14px;
  position: relative;
  display: inline-block;
}
.hero-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  background: var(--gold);
  margin: 14px auto 0;
}
.hero-desc { color: var(--ink-green); opacity: .82; font-size: 16px; margin: 0 4px 18px; }
.notice-pill {
  display: inline-block;
  background: rgba(196,123,145,.12);
  color: var(--clay);
  border: 1px solid rgba(196,123,145,.3);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  margin: 0;
}

/* 表單 */
.form {
  background: var(--rice-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 26px 22px 28px;
  margin-top: 8px;
}
.field { margin-bottom: 22px; }
.field > label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 16px;
}
.req {
  font-size: 12px;
  color: var(--clay);
  background: rgba(156,95,60,.1);
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 4px;
  font-weight: 400;
}
.opt {
  font-size: 12px;
  color: var(--mist);
  margin-left: 4px;
  font-weight: 400;
}

input[type="text"], input[type="tel"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink-green);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,138,68,.15);
}
textarea { resize: vertical; }
.hint { display: block; color: var(--mist); font-size: 13px; margin-top: 6px; }

/* 商品多筆列 */
.item-rows { display: flex; flex-direction: column; gap: 14px; }
.item-row { display: flex; flex-direction: column; gap: 8px; }
.item-main { display: flex; gap: 8px; align-items: stretch; }
.item-main select { flex: 1; min-width: 0; }
.item-main .qty {
  width: 64px;
  text-align: center;
}
.item-main .remove {
  flex: 0 0 auto;
  width: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  color: var(--mist);
  font-size: 20px;
  cursor: pointer;
}
.item-main .remove:hover { color: var(--clay); border-color: var(--clay); }
.item-cat { width: 100%; }
.item-name:disabled { color: var(--mist); background: #faf8f3; }

/* 價格列 */
.price-line { font-size: 14px; padding: 2px 2px 0; }
.price-line:empty { display: none; }
.pl-unit { color: var(--mist); margin-right: 8px; }
.pl-orig { color: var(--mist); text-decoration: line-through; margin-right: 8px; }
.pl-disc { color: var(--gold-deep); font-weight: 700; }

/* 獲獎組固定內容 */
.fixed6-row { font-size: 15px; padding: 4px 0; }

/* 自由混搭湊6面板 */
.mix-panel {
  background: rgba(176, 138, 68, .06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.mix-panel.invalid {
  border-color: #c0573e;
  box-shadow: 0 0 0 3px rgba(192, 87, 62, .12);
}
.mix-hint { font-size: 13px; color: var(--mist); margin-bottom: 6px; }
.mix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.mix-row:last-of-type { border-bottom: none; }
.mix-name { font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .step {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-green);
  cursor: pointer;
}
.stepper .step:hover { border-color: var(--gold); }
.stepper .qty-input {
  width: 44px;
  text-align: center;
  padding: 6px 0;
  -moz-appearance: textfield;
}
.stepper .qty-input::-webkit-outer-spin-button,
.stepper .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mix-counter { margin-top: 10px; text-align: right; font-size: 14px; color: var(--clay); }
.mix-counter b { font-size: 16px; }
.mix-panel.full .mix-counter { color: var(--gold-deep); }

/* 目錄：三類可展開 */
.items-tip { font-size: 13px; color: var(--mist); margin: 0 0 12px; }
.catalog-link { margin: -4px 0 14px; }
.catalog-link a { color: var(--gold-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.catalog-link a:hover { color: var(--gold); }
.pickup-hint:empty { display: none; }
.pickup-hint { margin-top: 10px; padding: 11px 13px; background: #faf6ec; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; font-size: 13.5px; line-height: 1.7; color: var(--ink-green); }
.pickup-hint a { color: var(--gold-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.pickup-hint .pickup-sub { color: var(--mist); font-size: 12.5px; }
.birthday-row { display: flex; gap: 8px; align-items: stretch; }
.birthday-row > #birthday { flex: 1 1 auto; min-width: 0; }
.birthday-cal-wrap { position: relative; flex: 0 0 54px; }
.birthday-cal { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 20px; line-height: 1; }
.birthday-cal-wrap:hover .birthday-cal { border-color: var(--gold); }
.birthday-pick { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; }
#catalog { display: flex; flex-direction: column; gap: 10px; }
.cat-section { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.cat-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  background: var(--rice-2);
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-green);
  cursor: pointer;
}
.cat-title { flex: 1; text-align: left; }
.cat-arrow { color: var(--gold-deep); transition: transform .2s ease; }
.cat-section.open .cat-arrow { transform: rotate(90deg); }
.cat-badge {
  font-size: 12px;
  color: var(--gold-deep);
  background: rgba(176, 138, 68, .14);
  border-radius: 999px;
  padding: 2px 10px;
}
.cat-badge:empty { display: none; }
.cat-body { padding: 4px 16px 12px; }

.catalog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.catalog-row:last-child { border-bottom: none; }
.cr-info { flex: 1; min-width: 0; }
.cr-name { font-size: 15px; }
.cr-price { font-size: 13px; margin-top: 3px; }
.cr-price:empty { display: none; }

.fixed6-box {
  background: rgba(176, 138, 68, .06);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0 10px;
}
.mix-block { padding-top: 10px; }
.mix-block-title { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.mix-price { color: var(--gold-deep); font-size: 13px; margin-left: 8px; }
.mix-slot { margin-bottom: 12px; }
.mix-slot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mix-slot-no { font-size: 14px; font-weight: 500; color: var(--gold-deep); }
.mix-remove {
  background: none;
  border: none;
  color: var(--mist);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.mix-remove:hover { color: var(--clay); }
.btn-add-mix {
  width: 100%;
  background: transparent;
  color: var(--gold-deep);
  border: 1px dashed var(--gold);
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.cart-total {
  margin-top: 14px;
  text-align: right;
  font-size: 15px;
  color: var(--ink-green);
}
.cart-total:empty { display: none; }
.cart-total b { color: var(--gold-deep); font-size: 17px; }
.items-status {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--mist);
}
.items-status:empty { display: none; }
.items-status.loading::before { content: "○ "; }
.items-status.error { color: var(--clay); }

.dev-banner {
  background: #fff4d6;
  color: #7a5a12;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 12px;
  border-bottom: 1px solid #ead9a6;
}

.btn-add {
  margin-top: 10px;
  background: transparent;
  color: var(--gold-deep);
  border: 1px dashed var(--gold);
  padding: 11px;
  width: 100%;
  border-radius: 12px;
  font-size: 15px;
}

/* 勾選 */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(176,138,68,.07);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 6px;
}
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold-deep); flex: 0 0 auto; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  color: var(--clay);
  font-size: 14px;
  margin: 12px 0 0;
  text-align: center;
}
.form-error:empty { display: none; }
.form-error.show {
  background: rgba(196, 123, 145, .12);
  border: 1px solid rgba(196, 123, 145, .4);
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 500;
}
/* 必填未完成：欄位標紅 */
.field.invalid > label { color: #b4502f; }
/* 只標欄位的直接 input/select/textarea（姓名、電話、取貨、備註），
   不波及「想要的商品」目錄裡深層的數量框 */
.field.invalid > input,
.field.invalid > select,
.field.invalid > textarea {
  border-color: #c0573e;
  box-shadow: 0 0 0 3px rgba(192, 87, 62, .14);
}
.check.invalid {
  border-color: #c0573e;
  background: rgba(192, 87, 62, .07);
}
.btn-submit { width: 100%; margin-top: 8px; font-size: 18px; }

.privacy {
  color: var(--mist);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  margin: 18px 0 0;
}

/* 官方 LINE 行動呼籲 */
.line-cta {
  margin-top: 20px;
  text-align: center;
  background: rgba(6, 199, 85, .07);
  border: 1px solid rgba(6, 199, 85, .3);
  border-radius: 16px;
  padding: 18px 16px;
}
.line-cta-msg { font-size: 14px; color: var(--ink-green); margin: 0 0 12px; line-height: 1.7; }
.line-cta-msg strong { color: #06a34a; }
.line-qr {
  width: 170px; height: 170px;
  display: block;
  margin: 0 auto 14px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.line-btn {
  display: inline-block;
  background: #06C755;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
}
.line-btn:hover { background: #05b34c; }
.line-meta { font-size: 12px; color: var(--mist); margin: 12px 0 0; }
.line-cta-note { font-size: 13px; color: var(--ink-green); margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line); line-height: 1.6; }
.line-cta-note strong { color: var(--gold-deep); }

/* 成功頁 */
.success {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(176,138,68,.16), transparent 60%),
    var(--rice);
}
.success-card { text-align: center; max-width: 420px; }
.success-mark {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--ink-green);
  color: var(--gold);
  font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.success-title {
  font-family: "Noto Serif TC", serif;
  font-size: 26px;
  margin: 16px 0 10px;
}
.success-desc { color: var(--ink-green); opacity: .8; }
.success-meta { color: var(--mist); font-size: 13px; margin-top: 18px; }

/* 頁尾 */
.foot {
  text-align: center;
  color: var(--mist);
  font-size: 12.5px;
  padding: 26px 20px 40px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.foot p { margin: 4px 0; }
.foot-warn { color: var(--clay); }

@media (min-width: 600px) {
  body { font-size: 17px; }
  .hero { padding-top: 52px; }
}
