:root {
  color-scheme: light;
  --paper: #fcfaf8;
  --white: #fff;
  --ink: #251c1a;
  --muted: #6f625e;
  --line: #eee3dd;
  --accent: #be351d;
  --accent-strong: #ae2c18;
  --accent-wash: #fff0e9;
  --action: linear-gradient(105deg, #c7321b, #d64e23);
  --radius: 19px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 1rem; line-height: 1.55; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #bd442d; outline-offset: 4px; }
.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; }
.skip { position: fixed; inset: .7rem auto auto .7rem; z-index: 10; transform: translateY(-150%); padding: .65rem 1rem; border-radius: 8px; background: var(--ink); color: white; }
.skip:focus { transform: none; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: #fffdfb; }
.header-inner { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.6rem; }
.brand { display: inline-flex; justify-self: start; align-items: center; gap: .6rem; font-size: 1.34rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.brand > span:last-child > span { color: var(--accent); }
.brand-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--action); color: white; box-shadow: 0 3px 8px #a43e2330; }
.brand-mark svg { width: 1.3rem; height: 1.3rem; stroke-width: 2; }
nav { display: flex; align-items: center; gap: 2.05rem; align-self: stretch; }
.nav-link { color: var(--muted); position: relative; display: inline-flex; align-items: center; font-size: .9rem; font-weight: 680; white-space: nowrap; }
.nav-link:hover, .nav-link.current { color: var(--accent-strong); }
.nav-link.current::after { content: ""; position: absolute; background: #d74928; height: 2px; border-radius: 100px; left: 0; right: 0; bottom: 0; }
.header-save { justify-self: end; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; background: var(--white); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); padding: .52rem .75rem; font-size: .9rem; font-weight: 680; }
.header-save:hover, .header-save[aria-pressed="true"] { color: var(--accent-strong); background: var(--accent-wash); border-color: #f2cbbf; }
.header-save[aria-pressed="true"] svg { fill: currentColor; }
.saved-count { display: grid; place-items: center; min-width: 1.28rem; height: 1.28rem; padding: 0 .2rem; border-radius: 100px; background: var(--accent-wash); color: var(--accent-strong); font-size: .76rem; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 262px; display: flex; align-items: center; border: 1px solid #f2e2d9; border-radius: 24px; background: #fff1e7; margin-top: 25px; }
.hero-photo { position: absolute; inset: 0 0 0 36%; z-index: -2; background-color: #f3b898; background-image: url("flight-sunset.webp"); background-size: cover; background-position: 59% 46%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #fff1e7 0%, #fff1e7 34%, #fff1e7f5 39%, #fff1e78a 52%, #fff1e700 71%); pointer-events: none; }
.hero-content { padding: 33px clamp(32px, 5vw, 70px); }
.edition { display: inline-flex; align-items: center; gap: .45rem; padding: .37rem .65rem; border: 1px solid #efc9b8; border-radius: 7px; color: #983720; background: #fff8f3c7; font-size: .85rem; font-weight: 700; }
.edition svg, .hero-meta svg { width: .97rem; height: .97rem; }
h1 { margin: .55rem 0 .36rem; font-size: clamp(2.65rem, 5vw, 4.55rem); font-weight: 850; line-height: 1.17; letter-spacing: -.065em; }
h1 em { font-style: normal; color: var(--accent); background: linear-gradient(115deg, #bb2d19 12%, #cb4c20 93%); background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -.045em; }
.hero-description { color: #56423b; font-size: clamp(1rem, 1.7vw, 1.19rem); font-weight: 630; }
.hero-meta { display: flex; align-items: center; gap: .38rem; margin-top: 1.22rem; color: #745a50; font-size: .87rem; }
.hero-meta time { font-variant-numeric: tabular-nums; }

.deals { margin-top: 28px; }
#deals, #guide, #faq { scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 16px; }
h2 { font-size: clamp(1.55rem, 2.7vw, 1.95rem); font-weight: 810; line-height: 1.25; letter-spacing: -.045em; }
.section-heading p { color: var(--muted); margin-top: .3rem; font-size: .92rem; }
.code-filter { min-height: 32px; display: flex; align-items: center; gap: .48rem; color: var(--muted); font-size: .9rem; cursor: pointer; white-space: nowrap; }
.code-filter input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); cursor: pointer; }
.filter-panel { display: grid; gap: .75rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.filter-top, .filter-bottom { display: flex; align-items: center; gap: .65rem; }
.search-box, .sort-box { display: flex; align-items: center; gap: .5rem; min-height: 43px; border: 1px solid var(--line); border-radius: 10px; background: #fcfaf9; color: #756660; }
.search-box { padding-inline: .75rem; flex: 1; min-width: 0; }
.search-box:focus-within, .sort-box:focus-within { border-color: #ce735d; box-shadow: 0 0 0 2px #fce1d8; }
.search-box input { border: 0; border-radius: 0; width: 100%; min-width: 0; background: none; color: var(--ink); outline: none; padding: .6rem 0; font-size: .95rem; }
.search-box input::placeholder { color: #756660; opacity: 1; }
.sort-box { position: relative; flex: 0 0 154px; }
.sort-box > span:not(.sr-only) { position: absolute; pointer-events: none; }
.sort-box > span:first-child { left: .6rem; }
.sort-box > span:last-child { right: .6rem; }
.sort-box > span:last-child svg { width: .83rem; }
.sort-box select { width: 100%; align-self: stretch; min-width: 0; appearance: none; border: 0; outline: none; border-radius: inherit; background: transparent; color: var(--ink); padding: .5rem 1.65rem .5rem 2rem; font-size: .9rem; font-weight: 640; cursor: pointer; }
.filter-bottom { justify-content: space-between; flex-wrap: wrap; }
.categories { display: flex; flex-wrap: wrap; gap: .48rem; }
.category-button, .reset { display: inline-flex; align-items: center; justify-content: center; gap: .32rem; min-height: 35px; white-space: nowrap; border: 1px solid #eee5df; border-radius: 100px; padding: .26rem .75rem; color: #534640; background: #fbf7f4; font-size: .89rem; font-weight: 660; }
.category-button svg, .reset svg { width: 1rem; height: 1rem; }
.category-button:hover { color: var(--accent-strong); border-color: #efbfb0; }
.category-button[data-category="hidden"][aria-pressed="false"] { background: var(--accent-wash); color: var(--accent-strong); border-color: #f2cbbf; }
.category-button[aria-pressed="true"] { color: white; background: var(--action); border-color: transparent; box-shadow: 0 2px 5px #bd422824; }
.reset { color: var(--accent-strong); border-color: transparent; background: #fff2ec; }
.reset:hover { border-color: #efbfb0; }

.offer-grid { margin-top: 17px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.offer { min-width: 0; display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 3px 10px #44211306; transition: border-color .2s, box-shadow .2s; }
.offer:hover { border-color: #e6c6b9; box-shadow: 0 8px 18px #612d1811; }
.offer-top, .offer-meta { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.category-label { display: inline-flex; align-items: center; gap: .34rem; border-radius: 7px; padding: .27rem .48rem; background: #fff0e8; color: #9e411f; font-size: .84rem; font-weight: 740; }
.category-label svg { width: 1rem; height: 1rem; }
.offer[data-category="flight"] .category-label { background: #eaf2fd; color: #295781; }
.offer[data-category="ticket"] .category-label { background: #f4ebfa; color: #75448b; }
.offer[data-category="car"] .category-label { background: #e7f4ee; color: #286247; }
.offer[data-category="train"] .category-label { background: #faf2df; color: #76560f; }
.heart-button { display: grid; place-items: center; flex: 0 0 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; color: #716461; background: var(--white); }
.heart-button:hover, .heart-button[aria-pressed="true"] { color: var(--accent); border-color: #f0c9bc; background: var(--accent-wash); }
.heart-button[aria-pressed="true"] svg { fill: currentColor; }
.offer-main { flex: 1; }
.discount { display: flex; align-items: baseline; gap: .25rem; color: var(--accent-strong); font-size: .9rem; font-weight: 700; margin: .34rem 0 .18rem; white-space: nowrap; }
.discount strong { font-size: 2.5rem; line-height: 1.12; font-weight: 820; letter-spacing: -.055em; font-family: "Segoe UI", sans-serif; font-variant-numeric: lining-nums tabular-nums; }
.discount-unit { font-size: 1rem; }
.offer h3 { font-weight: 800; letter-spacing: -.025em; font-size: 1.14rem; line-height: 1.35; }
.description { margin-top: .3rem; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.offer-meta { border-top: 1px solid #f3e9e4; margin-top: .88rem; padding-top: .75rem; font-size: .85rem; }
.offer-meta > span:first-child { display: flex; align-items: center; gap: .34rem; color: var(--muted); }
.offer-meta svg { width: 1rem; height: 1rem; }
.type-tag { color: #695650; background: #f7f2ee; border-radius: 6px; padding: .15rem .39rem; white-space: nowrap; }
.offer-actions { display: flex; gap: .5rem; margin-top: .75rem; }
.offer-link, .copy-button { display: flex; align-items: center; justify-content: center; min-height: 41px; border-radius: 8px; font-size: .9rem; font-weight: 750; }
.offer-link { flex: 1; white-space: nowrap; padding: .42rem .55rem; color: white; background: var(--action); border: 1px solid transparent; text-align: center; }
.offer-link:hover { background: linear-gradient(105deg, #a92813, #b73919); }
.copy-button { flex: 1.15; min-width: 0; gap: .25rem; justify-content: space-between; padding: .4rem .53rem .4rem .64rem; background: #fff7f2; color: var(--accent-strong); border: 1px dashed #da9d8a; }
.copy-button:hover, .copy-button.copied { background: var(--accent-wash); border-color: var(--accent); }
.copy-code { font-family: "Consolas", "Courier New", monospace; font-size: clamp(.74rem, 1.08vw, .94rem); overflow-wrap: anywhere; user-select: text; }
.copy-button svg { width: 1rem; height: 1rem; }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: .6rem; padding: 3.25rem 1rem; text-align: center; border: 1px dashed #e7cec0; border-radius: var(--radius); background: var(--white); }
.empty > span, .step-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 12px; background: var(--accent-wash); color: var(--accent-strong); }
.empty p { color: var(--muted); }
.empty-reset { padding: .45rem .8rem; border: 1px solid #f0c9bc; background: var(--accent-wash); color: var(--accent-strong); border-radius: 8px; font-weight: 700; }
.empty-reset:hover { border-color: var(--accent); }

.guide, .faq { margin-top: 45px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 14px; }
.steps > div { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.steps h3 { margin-top: .6rem; font-size: 1.04rem; }
.steps p, .faq details p { color: var(--muted); margin-top: .25rem; }
.faq { padding-bottom: 45px; }
.faq h2 { margin-bottom: 14px; }
.faq details { padding: .85rem 1.05rem; background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .48rem; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary > span { color: var(--accent); }
.faq details[open] summary > span { transform: rotate(45deg); }
.faq details p { margin-top: .5rem; }
.site-footer { border-top: 1px solid var(--line); background: #fff8f2; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 26px; }
.footer-brand { font-size: 1.15rem; }
.footer-brand .brand-mark { width: 1.95rem; height: 1.95rem; border-radius: 8px; }
.footer-inner p { color: var(--muted); margin-top: .5rem; font-size: .89rem; }
.source-links { display: flex; flex-wrap: wrap; gap: .7rem 1.15rem; color: var(--accent-strong); font-size: .88rem; font-weight: 650; }
.source-links a:hover { text-decoration: underline; }
.toast { position: fixed; z-index: 5; right: 1.25rem; bottom: 1.25rem; max-width: calc(100% - 2.5rem); padding: .75rem 1.15rem; border-radius: 10px; background: #34241e; color: white; font-size: .95rem; font-weight: 700; box-shadow: 0 5px 20px #3d211e32; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copy-code { font-size: .91rem; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 0; grid-template-columns: 1fr auto; gap: 0 .65rem; padding-top: 9px; }
  .brand { font-size: 1.23rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
  nav { grid-row: 2; grid-column: 1 / -1; gap: 1.5rem; justify-content: center; min-height: 38px; }
  .header-save { grid-row: 1; grid-column: 2; font-size: .86rem; }
  .hero { min-height: 227px; margin-top: 15px; border-radius: 17px; }
  .hero-content { padding: 22px 15px 22px 17px; }
  .hero-photo { inset-inline-start: 22%; background-position: 57% 49%; }
  .hero::after { background: linear-gradient(90deg, #fff1e7 0%, #fff1e7fa 33%, #fff1e7d9 53%, #fff1e757 76%, #fff1e723 100%); }
  h1 { font-size: clamp(2rem, 8.45vw, 3.05rem); }
  .edition { font-size: .81rem; }
  .hero-meta { margin-top: .9rem; }
  .deals { margin-top: 24px; }
  .section-heading { margin-bottom: 11px; }
  .section-heading p { font-size: .88rem; }
  .code-filter { font-size: .83rem; }
  .filter-panel { padding: 9px; gap: .55rem; }
  .filter-top { gap: .4rem; }
  .sort-box { flex-basis: 114px; }
  .sort-box > span:first-child { display: none; }
  .sort-box select { padding-left: .58rem; }
  .category-button, .reset { padding-inline: .52rem; font-size: .84rem; min-height: 36px; }
  .categories { gap: .34rem; }
  .offer-grid, .steps { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .offer-grid { margin-top: 12px; }
  .offer { padding: 15px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
