/* 侘寂風（Wabi-Sabi）— 宣紙米白 × 深墨棕 × 溫銅色 */
:root {
  /* 主色 */
  --brand: #6B4B35;          /* 溫沙棕 */
  --brand-dark: #4A3222;     /* 深墨棕 */
  --brand-soft: rgba(107,75,53,0.15);
  --accent: #B87333;         /* 銅黃 */
  --accent-warm: #F0E8DC;    /* 淡奶色 */
  /* 中性 */
  --bg: #F5F0E8;             /* 宣紙米白 */
  --bg-deep: #EDE7DB;        /* 深一階米白 */
  --card: #FDFAF5;           /* 奶白卡片 */
  --ink: #2C1E14;            /* 深墨文字 */
  --muted: #9A8E82;          /* 溫灰 */
  --line: rgba(107,75,53,0.18);
  --line-soft: rgba(107,75,53,0.09);
  /* 狀態色 */
  --ok: #556B4F;             /* 鼠尾草綠 */
  --warn: #B87333;           /* 銅黃警示 */
  --danger: #C0392B;         /* 磚紅 */
  --info: #7B9E9A;           /* 青石 */
  /* 圓角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  /* 陰影 — 溫暖柔影 */
  --shadow-sm: 0 1px 4px rgba(46,30,20,0.07);
  --shadow-md: 0 6px 24px rgba(46,30,20,0.12);
  --shadow-lg: 0 16px 48px rgba(46,30,20,0.16);
  /* 邊框 */
  --glass-border: 1px solid rgba(107,75,53,0.2);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.02em;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(184,115,51,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(107,75,53,0.04) 0%, transparent 50%);
  min-height: 100vh;
}
h1, h2, h3, h4 {
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.nav {
  background: rgba(245,240,232,0.92);
  border-bottom: var(--glass-border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; max-width: 1100px; margin: 0 auto; min-height: 160px; }
.brand { font-family: "Noto Sans TC", sans-serif; font-weight: 700; font-size: 20px; color: var(--brand); letter-spacing: 0.06em; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-logo { height: 144px; width: 144px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; box-shadow: 0 2px 12px rgba(46,30,20,0.2); border: 2px solid rgba(107,75,53,0.3); }
@media (max-width: 600px) { .brand-logo { height: 80px; width: 80px; } }
.nav-links a { margin-left: 20px; color: var(--muted); font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--brand); }

/* ── Language Picker ────────────────────────────────────────────────────── */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 18px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--brand-dark);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.lang-btn:hover { background: var(--accent-warm); border-color: var(--brand-soft); }
.lang-globe { font-size: 14px; }
.lang-caret { font-size: 10px; opacity: 0.6; transition: transform .2s; }
.lang-dropdown.open ~ .lang-btn .lang-caret,
.lang-picker:has(.lang-dropdown.open) .lang-caret { transform: rotate(180deg); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 200;
  overflow: hidden;
  padding: 4px 0;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: background .12s;
  font-family: inherit;
  text-align: left;
}
.lang-option:hover { background: var(--bg-deep); }
.lang-option.active { background: var(--accent-warm); color: var(--brand-dark); font-weight: 600; }
.lang-option-flag { font-size: 16px; }
@media (max-width: 600px) {
  .lang-btn span:nth-child(2) { display: none; } /* hide label, show only globe + caret */
  .lang-picker { margin-left: 10px; }
}
.hero {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(184,115,51,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 60%, rgba(107,75,53,0.07) 0%, transparent 50%),
    linear-gradient(180deg, #EDE7DB 0%, #F5F0E8 100%);
  color: var(--ink); padding: 96px 20px 84px; text-align: center;
  position: relative; overflow: hidden;
  border-bottom: var(--glass-border);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(107,75,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,75,53,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(184,115,51,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  margin: 0 0 14px; font-size: 40px; letter-spacing: 0.10em;
  font-family: "Noto Sans TC", sans-serif; font-weight: 800;
  background: linear-gradient(135deg, #4A3222 30%, #6B4B35 70%, #B87333 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { margin: 0; color: var(--muted); font-size: 16px; letter-spacing: 0.08em; }
.section { padding: 64px 0; }
.section h2 {
  font-size: 26px; margin: 0 0 28px; text-align: center;
  font-family: "Noto Sans TC", sans-serif; font-weight: 700;
  letter-spacing: 0.08em; color: var(--ink);
  position: relative; padding-bottom: 14px;
}
.section h2::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 48px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), transparent);
}
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.plan-card {
  background: var(--card);
  border: var(--glass-border);
  border-radius: var(--r-xl); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
}
.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(107,75,53,0.4);
  background: rgba(184,115,51,0.04);
}
.plan-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h3 { margin: 0; color: var(--brand); font-size: 19px; font-weight: 700; }
.plan-card .price {
  font-size: 30px; font-weight: 700; color: var(--ink);
  font-family: "Noto Sans TC", sans-serif;
}
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-card .desc { color: var(--muted); font-size: 14px; line-height: 1.7; }
.ingredients { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ing {
  background: rgba(0,200,160,0.08); color: var(--brand);
  padding: 4px 11px; border-radius: 4px; font-size: 12px;
  border: 1px solid rgba(0,200,160,0.2);
  font-family: monospace; letter-spacing: 0.04em;
}
.tag.cold {
  background: #e8eef0; color: #5e7682;
  border: 1px solid #c5d2da;
}

/* carousel */
.carousel { position: relative; width: 100%; aspect-ratio: 16/10; background: #1a1a1a; overflow: hidden; }
.carousel.empty { display: flex; align-items: center; justify-content: center; color: #999; }
.carousel-track { width: 100%; height: 100%; }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px; color: white; font-weight: 600; font-size: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.85); color: var(--ink); cursor: pointer;
  font-size: 22px; line-height: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s, background .2s;
}
.carousel:hover .carousel-nav { opacity: 1; }
.carousel-nav:hover { background: white; }
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background .2s, width .2s; }
.dot.active { background: white; width: 18px; border-radius: 4px; }

.section-divider {
  font-size: 13px; color: var(--brand-dark); font-weight: 700; letter-spacing: 1px;
  border-top: 1px dashed var(--line); margin: 18px 0 10px; padding-top: 14px;
}
.section-divider:first-child { border-top: 0; padding-top: 0; }

/* brand showcase */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.brand-card {
  background: var(--card);
  border: var(--glass-border);
  border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: var(--ink); display: block;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(107,75,53,0.18);
  border-color: rgba(107,75,53,0.4);
  text-decoration: none;
}
.brand-img {
  width: 100%; aspect-ratio: 1/1; background-size: cover; background-position: center;
  background-color: #E8DFD2;
}
.brand-img.empty { background: linear-gradient(135deg, #DDD5C8, #E8DFD2); }
.brand-img.letter-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 700; color: var(--brand);
  background: linear-gradient(135deg, #E8DFD2 0%, #DDD5C8 100%);
  font-family: "Noto Sans TC", sans-serif;
}
.brand-card-body { padding: 12px 14px 14px; }
.brand-card .brand-name { padding: 0 0 4px; font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.3; }
.brand-card .brand-tag { padding: 0 0 8px; font-size: 12px; color: var(--muted); }
.brand-stock-bar { height: 5px; background: var(--line-soft); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.brand-stock-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .3s; }
.brand-stock-info { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: 0.04em; }
.brand-price {
  font-size: 22px; font-weight: 500; color: var(--brand-dark);
  margin: 6px 0 10px; font-family: "Noto Serif TC", serif;
}
.brand-grab-btn {
  width: 100%; background: var(--brand); color: var(--card);
  padding: 10px 12px; font-size: 13px;
  letter-spacing: 0.06em;
}
.brand-grab-btn:hover { background: var(--brand-dark); }
.brand-soldout {
  padding: 11px; text-align: center; background: var(--bg-deep);
  color: var(--muted); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
  border: 1px solid var(--line-soft);
}
.brand-paused {
  padding: 11px; text-align: center; background: var(--accent-warm);
  color: #8c6840; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  border: 1px solid #e6c9a8;
}
.brand-card.is-soldout { opacity: 0.65; }
.brand-card.is-soldout .brand-img { filter: grayscale(0.5); }

/* brand card stock badge — shown on all cards */
.brand-stock-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  color: var(--card);
  background: var(--brand);
  border-radius: 4px;
  padding: 1px 6px;
  margin-bottom: 6px;
  letter-spacing: 0;
}
.brand-stock-badge.low { background: #c0392b; }
/* hide grab button, progress bar, stock info, price everywhere */
.brand-grab-btn { display: none !important; }
.brand-stock-bar { display: none; }
.brand-stock-info { display: none; }
.brand-price { display: none; }

@media (max-width: 600px) {
  .plans { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .brand-img.letter-fallback { font-size: 24px; }
  .brand-card-body { padding: 4px 4px 5px; }
  .brand-card .brand-name {
    font-size: 10px; padding-bottom: 2px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .brand-card .brand-tag { display: none; }
  .brand-stock-badge {
    display: block;
    font-size: 10px;
    padding: 1px 4px;
    margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .brand-soldout { padding: 3px 2px; font-size: 10px; }
  .brand-paused { padding: 3px 2px; font-size: 10px; }
}

/* grab modal */
.grab-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.grab-modal.hidden { display: none !important; }
.grab-modal-inner { background: white; border-radius: 16px; padding: 28px; width: 380px; max-width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.grab-modal-inner h3 { margin: 0 0 4px; color: var(--brand-dark); }
.grab-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #f0ece2; cursor: pointer; font-size: 20px; line-height: 1; }
.grab-close:hover { background: #e0dbcb; }
.grab-price { font-size: 28px; font-weight: 700; color: #b8590a; margin-top: 14px; }
.qty-control { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-control button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: white; font-size: 18px; cursor: pointer; }
.qty-control button:hover { background: var(--brand); color: white; border-color: var(--brand); }
.qty-control input { width: 70px; text-align: center; font-size: 18px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }

/* allergen highlight in admin */
.allergen-tag {
  display: inline-block; background: #fbeaea; color: var(--danger); border: 1px solid #f0b8b8;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; margin: 0 2px;
}
.avoid-tag {
  display: inline-block; background: #fff4e0; color: #8a5a00; border: 1px solid #f0d4a0;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 0 2px;
}
.diet-badge {
  display: inline-block; background: #eef8e8; color: var(--brand-dark); border: 1px solid #b8dcc4;
  padding: 2px 8px; border-radius: 999px; font-size: 12px;
}
.warn-row { background: #fff7e0 !important; }
.danger-row { background: #fff0f0 !important; }

/* charity */
.charity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.charity-card {
  background: var(--card); border: var(--glass-border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.charity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(107,75,53,0.4); }
.charity-img { width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: #E8DFD2; }
.charity-img.empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--brand);
  background: linear-gradient(135deg, #DDD5C8, #E8DFD2);
}
.charity-body { padding: 14px 16px; }
.charity-name {
  font-weight: 700; color: var(--brand); margin-bottom: 8px;
  font-family: "Noto Sans TC", sans-serif; font-size: 16px;
}
.charity-stats-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.charity-stats-row strong { color: var(--ink); font-family: "Noto Sans TC", sans-serif; }

.donation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.donation-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.donation-photo { width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--bg-deep); cursor: pointer; }
.donation-photo.empty { display: flex; align-items: center; justify-content: center; font-size: 52px; cursor: default; color: var(--brand); }
.donation-info { padding: 16px 18px; }
.donation-charity {
  font-weight: 500; color: var(--brand-dark); margin-bottom: 6px;
  font-family: "Noto Serif TC", serif;
}
.donation-amount {
  font-size: 26px; font-weight: 500; color: var(--brand-dark);
  margin-bottom: 6px; font-family: "Noto Serif TC", serif;
}
.donation-meta { font-size: 12px; color: var(--muted); letter-spacing: 0.05em; }
.donation-note { font-size: 13px; color: var(--ink); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.7; }

/* exports / webhooks */
.exports-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.export-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.export-card h4 { margin: 0 0 6px; color: var(--brand-dark); font-size: 16px; }
.export-card p { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.security-banner {
  background: rgba(240,180,41,0.08);
  border: 1px solid rgba(240,180,41,0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.security-banner strong { color: var(--warn); }

/* mission / 企業理念 */
.mission-section {
  background: linear-gradient(180deg, #EDE7DB 0%, #E8E0D4 100%);
  padding: 72px 0;
  position: relative;
  border-top: var(--glass-border);
  border-bottom: var(--glass-border);
}
.mission-section::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(107,75,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,75,53,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.mission-head { text-align: center; margin-bottom: 36px; }
.mission-head h2 {
  color: var(--ink); font-size: 30px; margin: 0 0 10px;
  letter-spacing: 0.12em; font-family: "Noto Sans TC", sans-serif; font-weight: 800;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mission-head h2::after { display: none; }
.mission-head p { color: var(--muted); margin: 0; font-size: 15px; letter-spacing: 0.06em; }
.mission-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.mission-card {
  background: var(--card);
  border: var(--glass-border);
  border-radius: var(--r-xl); padding: 32px 24px;
  text-align: center; transition: all .25s ease;
  box-shadow: var(--shadow-sm);
}
.mission-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(107,75,53,0.4); background: rgba(184,115,51,0.05); }
.mission-card-charity {
  background: rgba(184,115,51,0.06);
  border-color: rgba(107,75,53,0.25);
}
.mission-icon { font-size: 38px; margin-bottom: 14px; }
.mission-card-title {
  font-weight: 700; font-size: 19px; color: var(--brand);
  margin-bottom: 10px; font-family: "Noto Sans TC", sans-serif;
  letter-spacing: 0.08em;
}
.mission-card-charity .mission-card-title { color: var(--accent); }
.mission-card-body { font-size: 14px; color: var(--muted); line-height: 1.85; }

@media (max-width: 640px) {
  .mission-section { padding: 36px 0; }
  .mission-section::before { display: none; }
  .mission-head { margin-bottom: 18px; }
  .mission-head h2 { font-size: 20px; }
  .mission-head p { font-size: 13px; }
  .mission-grid { gap: 10px; }
  .mission-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; text-align: left; border-radius: var(--r-lg);
  }
  .mission-card:hover { transform: none; }
  .mission-icon { font-size: 30px; margin-bottom: 0; flex-shrink: 0; width: 36px; text-align: center; }
  .mission-card-title { font-size: 14px; margin-bottom: 3px; white-space: nowrap; flex-shrink: 0; }
  .mission-card-body { font-size: 12px; line-height: 1.55; flex: 1; min-width: 0; }
  .mission-card-charity a.btn { display: none; }
  .ig-cta { padding: 8px 14px; font-size: 13px; gap: 7px; }
  .line-cta { background: #e8f8ee; color: #076e38 !important; }
  .line-cta:hover { background: #d0f0dd; }
  .line-cta svg { color: #06C755; }
  .line-stamp-cta { background: #fff3e0; color: #7a4500 !important; }
  .line-stamp-cta:hover { background: #ffe8c0; }
  .line-stamp-cta svg { color: #e8910a; }
}

/* short video wall */
.video-wall-section { background: linear-gradient(180deg, #EDE7DB 0%, #F5F0E8 100%) !important; border-top: var(--glass-border); }
.video-wall-section h2 { font-size: 24px; color: var(--brand) !important; }
.video-wall-head {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.ig-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(0,200,160,0.1); color: var(--brand) !important;
  padding: 11px 20px; border-radius: var(--r-md);
  font-weight: 600; font-size: 14px; text-decoration: none !important;
  border: 1px solid rgba(0,200,160,0.3);
  letter-spacing: 0.05em;
  transition: all .2s ease;
}
.ig-cta:hover { transform: translateY(-1px); background: rgba(0,200,160,0.18); box-shadow: 0 0 20px rgba(0,200,160,0.2); }
.ig-cta strong { font-weight: 700; }
.ig-cta svg { color: var(--accent); }

.video-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px) { .video-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .video-wall { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
@media (max-width: 700px) {
  .ig-cta { padding: 8px 14px; font-size: 13px; }
  .ig-cta strong { display: block; font-size: 12px; }
}
.vw-tile {
  position: relative; aspect-ratio: 9/16; background: #000;
  border-radius: 12px; overflow: hidden; cursor: pointer;
  text-decoration: none !important; color: white;
  transition: transform .2s, box-shadow .2s;
  display: block;
}
.vw-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(220, 39, 67, 0.4); }
.vw-tile video, .vw-tile .vw-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background-size: cover; background-position: center;
}
.vw-thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 48px; background: linear-gradient(135deg, #2a2a2a, #444); }
.vw-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.4) 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px;
}
.vw-meta { margin-top: auto; }
.vw-title { font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 4px; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.vw-caption { font-size: 12px; color: #e0e0e0; line-height: 1.35; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.vw-cta {
  align-self: flex-start;
  background: rgba(255,255,255,0.95); color: #1f2421;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.vw-tile:hover .vw-cta { opacity: 1; transform: translateY(0); }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: var(--r-md); border: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #FDFAF5; font-weight: 700; cursor: pointer; font-size: 14px;
  letter-spacing: 0.05em;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--brand);
  border: 1px solid var(--brand); box-shadow: none;
}
.btn-ghost:hover { background: rgba(107,75,53,0.08); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #cc2244); color: white; box-shadow: 0 0 16px rgba(255,77,109,0.25); }
.btn-danger:hover { box-shadow: 0 0 28px rgba(255,77,109,0.45); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.card {
  background: var(--card);
  border: var(--glass-border);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-row label { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.form-row input, .form-row select, .form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 15px; font-family: inherit;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(107,75,53,0.1);
  background: var(--card);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert.ok { background: rgba(0,200,160,0.08); color: var(--brand); border-color: rgba(0,200,160,0.3); }
.alert.err { background: rgba(255,77,109,0.08); color: #ff7a93; border-color: rgba(255,77,109,0.3); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table th {
  color: var(--brand); font-weight: 600; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(107,75,53,0.05);
}
table tr:last-child td { border-bottom: 0; }
table tr:hover td { background: rgba(107,75,53,0.04); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 28px; }
.kpi {
  background: var(--card);
  border: var(--glass-border);
  border-radius: var(--r-lg); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}
.kpi .label { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.kpi .value {
  font-size: 28px; font-weight: 700; margin-top: 6px;
  color: var(--ink); font-family: "Noto Sans TC", sans-serif;
}
.tag {
  display: inline-block; padding: 3px 10px; font-size: 11px;
  border-radius: 4px; font-family: monospace; letter-spacing: 0.04em;
  background: rgba(0,200,160,0.08); color: var(--brand);
  border: 1px solid rgba(0,200,160,0.2);
}
.tag.warn { background: rgba(240,180,41,0.1); color: var(--warn); border-color: rgba(240,180,41,0.3); }
.tag.danger { background: rgba(255,77,109,0.1); color: var(--danger); border-color: rgba(255,77,109,0.3); }
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin-bottom: 24px; flex-wrap: wrap;
}
.tab {
  padding: 11px 18px; cursor: pointer; border: none;
  background: transparent; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; font-family: inherit;
  letter-spacing: 0.05em; transition: color .15s;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
/* ── 舊 share-box (保留相容) ── */
.share-box {
  background: rgba(0,200,160,0.06);
  border: 1px solid rgba(0,200,160,0.25);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.share-link { display: flex; gap: 8px; margin-top: 12px; }
.share-link input {
  flex: 1; padding: 12px; border: 1px solid rgba(0,200,160,0.2);
  border-radius: var(--r-sm); font-family: monospace; font-size: 14px;
  background: rgba(0,200,160,0.04); color: var(--brand);
}

/* ── 推薦邀請卡 ── */
.ref-invite-card {
  background: rgba(0,200,160,0.06);
  border: 1px solid rgba(0,200,160,0.3);
  border-radius: var(--r-lg); padding: 20px 22px 18px;
  box-shadow: 0 0 24px rgba(0,200,160,0.08);
}
.ref-invite-title { font-family: "Noto Sans TC", sans-serif; font-size: 16px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.ref-invite-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.ref-link-row { display: flex; gap: 8px; align-items: center; }
.ref-link-input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid rgba(0,200,160,0.2); border-radius: var(--r-sm);
  font-family: monospace; font-size: 13px; background: rgba(0,200,160,0.04);
  color: var(--brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ref-copy-btn {
  flex-shrink: 0; padding: 10px 18px; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #060d14; border-radius: var(--r-sm);
  transition: box-shadow .2s; box-shadow: 0 0 12px rgba(0,200,160,0.25);
}
.ref-copy-btn:hover { box-shadow: 0 0 20px rgba(0,200,160,0.45); }
.ref-share-btn {
  flex-shrink: 0; padding: 10px 14px; font-size: 13px;
  background: rgba(0,229,255,0.1); color: var(--accent); border-radius: var(--r-sm);
  border: 1px solid rgba(0,229,255,0.25);
}
.ref-code-row { margin-top: 10px; font-size: 12px; color: var(--muted); }
.ref-code-val { font-family: monospace; font-size: 14px; color: var(--brand); letter-spacing: 0.12em; text-shadow: 0 0 8px rgba(0,200,160,0.3); }

/* ── 星級進度卡 ── */
.tier-card {
  background: rgba(255,255,255,0.03);
  border: var(--glass-border);
  border-radius: var(--r-lg); padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm); margin-top: 14px;
  backdrop-filter: blur(8px);
}
.tier-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.tier-header-left { display: flex; align-items: center; gap: 12px; }
.tier-medal { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 52px; height: 52px; }
.tier-label {
  font-family: "Noto Sans TC", sans-serif; font-size: 14px;
  font-weight: 700; color: var(--brand); letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.tier-stars { display: flex; gap: 3px; }
.tier-star { font-size: 18px; color: rgba(0,200,160,0.15); line-height: 1; transition: color .3s; }
.tier-star.on { color: var(--brand); text-shadow: 0 0 8px rgba(0,200,160,0.6); }
.tier-progress-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tier-progress-bar {
  height: 6px; background: rgba(0,200,160,0.08); border-radius: 99px;
  overflow: hidden; margin-bottom: 14px;
}
.tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--accent));
  border-radius: 99px; transition: width .7s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px rgba(0,200,160,0.4);
}
.tier-benefits-grid { display: flex; flex-direction: column; gap: 4px; }
.tier-benefit-row {
  display: grid; grid-template-columns: 42px 72px 1fr;
  align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); padding: 6px 10px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.tier-benefit-row .tb-n {
  font-weight: 700; font-size: 12px; color: var(--muted);
  background: rgba(0,200,160,0.06); border-radius: 4px;
  padding: 2px 5px; text-align: center; letter-spacing: 0; font-family: monospace;
}
.tier-benefit-row .tb-medal { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink); font-weight: 500; }
.tier-benefit-row .tb-desc { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-benefit-row.tb-achieved {
  background: rgba(0,200,160,0.08);
  border-color: rgba(0,200,160,0.2);
}
.tier-benefit-row.tb-achieved .tb-n { background: rgba(0,200,160,0.15); color: var(--brand); }
.tier-benefit-row.tb-achieved .tb-medal,
.tier-benefit-row.tb-achieved .tb-desc { color: var(--brand); }
.tier-benefit-row.tb-next {
  background: rgba(0,229,255,0.05);
  border-color: rgba(0,229,255,0.2);
}
.tier-benefit-row.tb-next .tb-n { background: rgba(0,229,255,0.15); color: var(--accent); }
.tier-benefit-row.tb-next .tb-medal,
.tier-benefit-row.tb-next .tb-desc { color: var(--ink); font-weight: 500; }
.footer {
  text-align: center; padding: 36px 0;
  color: var(--muted); font-size: 13px;
  letter-spacing: 0.1em;
  border-top: var(--glass-border);
  margin-top: 40px;
  background: rgba(0,0,0,0.3);
}
.muted { color: var(--muted); font-size: 13px; }
.referrer-banner {
  background: rgba(0,200,160,0.08); padding: 14px 18px;
  border-radius: var(--r-md); margin-bottom: 18px;
  font-size: 14px; color: var(--brand);
  border: 1px solid rgba(0,200,160,0.3);
}
.hidden { display: none !important; }
