:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #FBFBF9;
  --text: #17181A;
  --muted: #6A6E76;
  --line: #E5E5E0;
  --line-strong: #D5D5CE;
  --accent: #E5484D;
  --accent-dark: #C13338;
  --accent-soft: #FDECEC;
  --teal: #0E7C6B;
  --teal-soft: #E4F5F1;
  --blue: #2563EB;
  --blue-soft: #EAF0FE;
  --amber: #B45309;
  --amber-soft: #FDF1E3;
  --gray-soft: #F0F0EC;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23, 24, 26, .05), 0 8px 24px -12px rgba(23, 24, 26, .18);
  --wrap: 1120px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 示範提示 ---------- */
.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #FFF8E1; border-bottom: 1px solid #F0E0AE;
  padding: 9px 20px; font-size: 13px; color: #6B4E00;
}
.notice strong { color: #8A6200; }
.notice button {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: #8A6200; padding: 0 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 246, 243, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  width: 36px; height: 36px; object-fit: contain; flex: none;
}
.footer-logo {
  display: block; width: 44px; height: 44px; object-fit: contain;
  margin-bottom: 8px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.nav { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .15s, transform .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  background: var(--surface); border-color: var(--line-strong); color: var(--text);
}
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 34px; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: .12em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; font-weight: 600;
}
.hero h1 { max-width: 620px; }
.lede { max-width: 640px; margin-top: 14px; color: var(--muted); font-size: 15px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-top: 28px; max-width: 640px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.stat b { display: block; font-size: 22px; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.updated { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ---------- Controls ---------- */
#deals { padding-top: 6px; }
.controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 0 20px; border-top: 1px solid var(--line); margin-top: 18px;
}
.chips { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; cursor: pointer;
  font-family: inherit; color: var(--muted); transition: all .15s;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.controls-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.search input, .select select {
  height: 38px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); padding: 0 15px; font-size: 14px; font-family: inherit;
  color: var(--text); outline: none; transition: border-color .15s;
}
.search input { width: 240px; }
.search input:focus, .select select:focus { border-color: var(--text); }
.search input::placeholder { color: #A2A5AB; }
.toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- Deal cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; padding-bottom: 20px;
}

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card.is-expired { opacity: .58; }
.card.is-expired:hover { transform: none; box-shadow: none; }

.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  border-radius: 5px; padding: 3px 8px;
}
.badge-flight { background: var(--blue-soft); color: var(--blue); }
.badge-dining { background: var(--amber-soft); color: var(--amber); }
.badge-hotel { background: var(--teal-soft); color: var(--teal); }
.badge-urgent { background: var(--accent-soft); color: var(--accent); }
.badge-expired { background: var(--gray-soft); color: var(--muted); }
.badge-sample { background: var(--gray-soft); color: var(--muted); }

.card h3 { font-size: 17px; line-height: 1.45; }
.card .sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.card .route {
  font-size: 12px; color: var(--muted); margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.price { font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.price-was { font-size: 13px; color: #9CA0A6; text-decoration: line-through; }
.save { font-size: 12px; font-weight: 600; color: var(--teal); background: var(--teal-soft); border-radius: 5px; padding: 2px 7px; }

.summary { font-size: 14px; color: #43474D; margin-top: 10px; }

.card ul { margin: 12px 0 0; padding: 0; list-style: none; }
.card li {
  position: relative; font-size: 13px; color: var(--muted);
  padding-left: 15px; margin-bottom: 5px;
}
.card li::before {
  content: ""; position: absolute; left: 3px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong);
}

.card-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line);
}
.card-foot .period { font-size: 12px; color: var(--muted); }
.card-foot .actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.link-btn {
  font-size: 13px; font-weight: 600; color: var(--accent);
  border-bottom: 1px solid transparent; cursor: pointer; background: none;
  border-top: 0; border-left: 0; border-right: 0; padding: 0; font-family: inherit;
}
.link-btn:hover { border-bottom-color: var(--accent); }
.icon-btn {
  border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer;
  font-family: inherit; color: var(--muted); transition: all .15s;
}
.icon-btn:hover { border-color: var(--text); color: var(--text); }

.source { margin-top: 10px; font-size: 11.5px; color: #9CA0A6; }
.source a { text-decoration: underline; text-underline-offset: 2px; }
.source a:hover { color: var(--text); }

.empty { text-align: center; color: var(--muted); padding: 48px 0 64px; font-size: 14px; }

/* ---------- How it works ---------- */
.how { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 52px 0; margin-top: 40px; }
.how h2 { margin-bottom: 26px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.how-grid article { border-left: 2px solid var(--accent); padding-left: 16px; }
.how-grid .step { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.how-grid h3 { margin: 6px 0 6px; }
.how-grid p { font-size: 14px; color: var(--muted); }

/* ---------- Subscribe ---------- */
.subscribe { padding: 52px 0 8px; }
.subscribe-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.subscribe h2 { font-size: 20px; }
.subscribe p { font-size: 14px; color: var(--muted); margin-top: 6px; max-width: 420px; }
.sub-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; position: relative; }
.sub-form input {
  height: 42px; width: 260px; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0 18px; font-size: 14px; font-family: inherit; outline: none; background: var(--surface);
}
.sub-form input:focus { border-color: var(--text); }
.sub-msg {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  font-size: 12.5px; color: var(--teal); width: 100%; text-align: right;
}
.sub-msg.is-error { color: var(--accent); }

/* ---------- About ---------- */
.about { padding: 48px 20px 56px; max-width: 720px; margin: 0 auto; }
.about h2 { margin-bottom: 14px; }
.about p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.about .disclaimer {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px;
}

/* ---------- Footer ---------- */
.site-footer { background: #1C1D1F; color: #C9CBCE; padding: 40px 0 26px; margin-top: 8px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.site-footer strong { color: #fff; font-size: 15px; }
.site-footer p { font-size: 13px; color: #8E9296; margin-top: 6px; }
.footer-links { display: flex; gap: 20px; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid #2C2E31; }
.footer-bottom p { font-size: 12px; color: #7C8084; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .controls-right { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .search { flex: 1 1 200px; }
}

@media (max-width: 720px) {
  h1 { font-size: 24px; }
  .hero { padding: 34px 0 24px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .controls { gap: 10px; }
  .chips { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .subscribe-inner { gap: 18px; }
  .sub-form { margin-left: 0; width: 100%; }
  .sub-form input { width: 100%; flex: 1 1 200px; }
  .header-inner { gap: 12px; }
  .brand-text small { display: none; }
}
