:root {
  --bg: #F0EFEB;
  --surface: #F8F7F4;
  --card: #FFFFFF;
  --text: #484E4D;
  --muted: #626968;
  --primary: #7A99AA;
  --primary-ink: #4A6878;
  --primary-soft: #E3EAED;
  --line: #D9D7D1;
  --warn-ink: #8A5A1C;
  --warn-soft: #F4ECDF;
  --radius: 4px;
  --max: 1040px;
  --read: 680px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --font: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
  --font-en: "Montserrat", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-ink); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 3px; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }
.read { max-width: var(--read); margin: 0 auto; padding: 0 var(--space-3); }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .here { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 10px; overflow: hidden; }
.site-header .here .zh { font-size: 17px; font-weight: 500; letter-spacing: 0.1em; color: var(--text); white-space: nowrap; }
.site-header .here .en { font-family: var(--font-en); font-size: 12px; letter-spacing: 0.2em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: var(--space-2); }
.logo { font-family: var(--font-en); font-weight: 600; font-size: 20px; letter-spacing: 0.06em; color: var(--text); text-decoration: none; }
.logo span { color: var(--primary-ink); }
.logo { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.logo .logo-zh { font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: 0.12em; color: var(--text); }
@media (max-width: 480px) { .logo .logo-zh { font-size: 12px; letter-spacing: 0.06em; } }
.nav { display: flex; gap: var(--space-3); font-size: 14px; }
.nav a { color: var(--text); text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary-ink); border-bottom: 1px solid var(--primary-ink); }

/* section label, like ABOUT / CHEF */
.label {
  display: block; text-align: center;
  font-family: var(--font-en); font-size: 12px; letter-spacing: 0.3em;
  color: var(--muted); margin-bottom: var(--space-2);
}
.label::after { content: ""; display: block; width: 24px; height: 1px; background: var(--muted); margin: 10px auto 0; }

.section { padding: var(--space-6) 0; }
.section.alt { background: var(--surface); }
.section.band { background: var(--primary-soft); }
.section h2 { text-align: center; font-size: 22px; font-weight: 500; letter-spacing: 0.08em; margin: 0 0 var(--space-4); }

/* hero */
.hero { padding: var(--space-6) 0 var(--space-5); text-align: center; }
.hero h1 { font-size: 30px; font-weight: 500; letter-spacing: 0.1em; line-height: 1.6; margin: 0 0 var(--space-3); }
.hero p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.hero p.hero-hi { color: var(--text); font-size: 17px; line-height: 1.9; margin: 0 auto var(--space-4); }
.hero p.hero-hi b { color: var(--primary-ink); font-weight: 600; }

/* ingredient grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-2); }
.tile {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-3) var(--space-2); text-align: center; text-decoration: none; color: var(--text);
  transition: border-color .2s ease;
}
a.tile:hover { border-color: var(--primary-ink); color: var(--text); }
.tile .zh { display: block; font-size: 18px; font-weight: 500; letter-spacing: 0.1em; }
.tile .en { display: block; font-family: var(--font-en); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); margin-top: 4px; }
.tile .status { display: inline-block; margin-top: var(--space-1); font-size: 12px; color: var(--muted); }
.tile.ready .status { color: var(--primary-ink); }
.tile.soon { opacity: .75; }

/* scene list */
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2); }
.scene { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); }
.scene .if { font-size: 13px; color: var(--muted); display: block; }
.scene h3 { font-size: 17px; font-weight: 500; margin: 2px 0 var(--space-1); }
.scene ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.scene li { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; }
.scene li > a { display: block; padding: 6px 14px; color: var(--primary-ink); text-decoration: none; border-radius: 999px; transition: background .15s, color .15s; }
.scene li > a:hover, .scene li > a:focus-visible { background: var(--primary-ink); color: #fff; }
.scene li:has(> a) { border-color: var(--primary); }
.scene li.off { padding: 6px 14px; color: var(--muted); border-style: dashed; }
.scene .soon { font-size: 12px; color: var(--muted); margin-top: var(--space-2); display: block; }

/* article */
.page-head { padding: var(--space-5) 0 var(--space-4); text-align: center; }
.page-head h1 { font-size: 26px; font-weight: 500; letter-spacing: 0.08em; line-height: 1.6; margin: 0 0 var(--space-1); }
.meta { font-size: 13px; color: var(--muted); }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: var(--space-2); }
.crumb a { color: var(--muted); }

.legend { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.legend th, .legend td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legend th { white-space: nowrap; font-weight: 500; width: 8em; }
.limit { margin-top: var(--space-3); background: var(--warn-soft); color: var(--warn-ink); padding: 12px 16px; border-radius: var(--radius); font-size: 15px; }

/* comparison table */
.compare-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-weight: 500; font-size: 13px; color: var(--muted); background: var(--surface); white-space: nowrap; }
.compare .prod { min-width: 150px; }
.compare .prod b { display: block; font-weight: 500; }
.compare .prod small { color: var(--muted); font-size: 12px; }
.compare .key { background: var(--primary-soft); font-weight: 700; color: var(--text); white-space: nowrap; }
.compare thead .key { color: var(--primary-ink); }
.pending { color: var(--muted); }
.btn {
  display: inline-block; border: 1px solid var(--text); color: var(--text); background: var(--card);
  padding: 8px 18px; border-radius: 2px; text-decoration: none; font-size: 13px; letter-spacing: 0.08em;
  min-height: 44px; line-height: 26px; transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--text); color: var(--card); }
.btn[aria-disabled="true"] { border-color: var(--line); color: var(--muted); pointer-events: none; }

/* notes */
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); margin-bottom: var(--space-2); }
.note h3 { font-size: 17px; font-weight: 500; margin: 0 0 var(--space-1); }
.note h3 small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0.1em; }
.note p:last-child { margin-bottom: 0; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 0 0 var(--space-2); padding: 12px 14px; background: var(--surface); border-radius: var(--radius); font-size: 13px; line-height: 1.6; }
.spec div { display: flex; gap: 8px; }
.spec dt { color: var(--muted); flex-shrink: 0; }
.spec dd { margin: 0; }
.compare td, .compare th { white-space: nowrap; }
.compare .prod { white-space: normal; }
.compare td[data-label="型態"] { white-space: normal; min-width: 110px; }
.btn { white-space: nowrap; }
@media (max-width: 760px) {
  .spec { grid-template-columns: 1fr; }
  .compare td, .compare th { white-space: normal; }
}

.outro { border-top: 1px solid var(--line); padding-top: var(--space-3); color: var(--muted); }

/* footer */
.site-footer { background: #484E4D; color: #E9E8E4; padding: var(--space-5) 0; font-size: 13px; }
.site-footer a { color: #E9E8E4; }
.site-footer .logo { color: #FFFFFF; }
.site-footer .logo span { color: #A9C0CC; }
.site-footer p { margin: var(--space-1) 0; color: #D2D1CC; }

/* mobile: compare table becomes cards */
@media (max-width: 760px) {
  .hero h1 { font-size: 24px; }
  .page-head h1 { font-size: 22px; }
  .section { padding: var(--space-5) 0; }
  .nav { gap: var(--space-2); }
  table.compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--space-2); background: var(--card); }
  table.compare { border: 0; background: transparent; }
  .compare td { display: flex; justify-content: space-between; gap: var(--space-2); border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .compare td::before { content: attr(data-label); color: var(--muted); font-size: 13px; flex-shrink: 0; }
  .compare td.prod { display: block; background: var(--surface); }
  .compare td.prod::before { content: none; }
  .compare td:last-child { border-bottom: 0; }
  .compare .key { white-space: normal; }
  .legend th { width: 6.5em; }
}

/* stars */
:root { --star: #B07A1E; --star-off: #D9D7D1; }
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; color: var(--star-off); vertical-align: middle; }
.stars::before { content: "★★★★★"; }
.stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--star); }
.stars-fill::before { content: "★★★★★"; }
.stars.sm { font-size: 13px; letter-spacing: 1px; }
.na { font-size: 12px; color: var(--muted); }
.score { margin-left: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.center-note { text-align: center; color: var(--muted); font-size: 14px; margin: var(--space-2) auto 0; max-width: var(--read); }
.compare .sub { display: block; color: var(--muted); font-size: 12px; }
.compare td { font-variant-numeric: tabular-nums; }

.prod-link { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.prod-link img { width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); flex-shrink: 0; }
.prod-link b { display: block; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.prod-link:hover b { color: var(--primary-ink); text-decoration-color: var(--primary-ink); }
.prod-link small { color: var(--muted); font-size: 12px; }

/* quick picks */
.picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.pick-meta { margin-top: 4px; min-height: 20px; }
.pick-nums { width: 100%; margin: auto 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; font-variant-numeric: tabular-nums; }
.pick-nums div { display: flex; justify-content: space-between; gap: 8px; }
.pick-nums dt { color: var(--muted); }
.pick-nums dd { margin: 0; }
.pick-nums .hl { font-weight: 700; color: var(--primary-ink); }
.pick-nums .hl dt { color: var(--primary-ink); }
.pick { justify-content: flex-start; }
@media (max-width: 1000px) { .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pick img { width: 96px; height: 96px; } .pick b { font-size: 15px; } }
.pick { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-2); color: var(--text); text-decoration: none; transition: border-color .2s ease; }
.pick:hover { border-color: var(--primary-ink); color: var(--text); }
.pick img { width: 120px; height: 120px; object-fit: contain; margin-bottom: var(--space-1); }
.pick-why { font-size: 13px; color: var(--primary-ink); letter-spacing: 0.08em; }
.pick b { font-weight: 500; font-size: 17px; }
.pick small { color: var(--muted); font-size: 12px; }

/* where to buy */
.buy-pair { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-shopee { border-color: #C2562D; color: #A3431F; }
.btn-shopee:hover { background: #A3431F; color: #fff; }
.btn-none {
  color: var(--muted);
  background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(200, 80, 70, .45) calc(50% - 1px), rgba(200, 80, 70, .45) calc(50% + 1px), transparent calc(50% + 1px)), var(--card);
}
.btn-coupang { border-color: #3A6EA5; color: #2F5C8C; }
.btn-coupang:hover { background: #2F5C8C; color: #fff; }
.where { margin: 0 0 var(--space-2); }
.where h4 { font-size: 14px; font-weight: 500; margin: 0 0 6px; color: var(--muted); letter-spacing: 0.1em; }
.where-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.where-table th, .where-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.where-table th { font-weight: 500; }
.where-table td:last-child { text-align: right; }
.where-table small { color: var(--muted); font-size: 12px; }
.best { display: inline-block; margin-left: 4px; font-size: 11px; color: #fff; background: var(--primary-ink); border-radius: 999px; padding: 0 8px; }
@media (max-width: 760px) {
  .where-table, .where-table tbody, .where-table tr, .where-table th, .where-table td { display: block; width: 100%; }
  .where-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .where-table th, .where-table td { border: 0; padding: 2px 0; }
  .where-table td:last-child { text-align: left; padding-top: 6px; }
}

/* product cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); margin-bottom: var(--space-3); scroll-margin-top: 16px; }
.card-top { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-2); }
.card-img { width: 160px; height: 160px; object-fit: contain; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.card-head { flex: 1; min-width: 0; }
.card-head small { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; }
.card-head h3 { font-size: 20px; font-weight: 500; margin: 0 0 6px; }
.card-total { margin-bottom: 6px; }
.card-price { font-size: 20px; font-weight: 700; margin-bottom: var(--space-2); font-variant-numeric: tabular-nums; }
.card-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.mini-stars { list-style: none; padding: 0; margin: 0 0 var(--space-2); display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mini-stars li { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--surface); border-radius: var(--radius); padding: 8px 4px; font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
  .card-top { flex-direction: column; align-items: center; text-align: center; }
  .card-img { width: 200px; height: 200px; }
  .mini-stars { grid-template-columns: repeat(3, 1fr); }
  .compare.rating td.prod { background: var(--surface); }
  .compare .prod-link img { width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
