:root {
    color-scheme: light;
    --belay-deep: #0f6e56;
    --belay-deep-hover: #0b5946;
    --belay-teal: #1d9e75;
    --belay-mist: #e1f5ee;
    --canvas: #f7f9f8;
    --surface: #fff;
    --ink: #17211e;
    --muted-ink: #52605b;
    --hairline: #d8e0dd;
    --focus: #0f6e56;
    --shopee: #d84c2f;
    --shopee-bg: #fff0ec;
    --coupang: #275bc6;
    --coupang-bg: #eef4ff;
    --font-sans: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { font-family: var(--font-sans); background: var(--canvas); color: var(--ink); }

body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }

button, input { font: inherit; }

a { color: inherit; }

svg { display: block; }

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

.skip-link {
    position: fixed;
    z-index: 20;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--surface);
    transform: translateY(-140%);
    transition: transform 180ms var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.brand-mark { width: 44px; height: 32px; color: var(--belay-deep); flex: 0 0 auto; }

.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }

.brand-wordmark { display: inline-flex; align-items: baseline; gap: 6px; font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.brand-wordmark-divider { color: #98a5a0; font-weight: 400; }

/* Home */
.home-page { display: grid; grid-template-rows: 1fr auto; }

.home-main { display: grid; place-items: center; padding: 56px 20px 24px; }

.home-search-wrap { width: min(100%, 650px); text-align: center; transform: translateY(-4vh); }

.home-brand { display: flex; justify-content: center; align-items: center; gap: 18px; }

.home-brand-mark { width: 58px; height: 42px; }

.home-brand h1 {
    margin: 0;
    font-size: 3.5rem;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.home-brand h1 > span:first-child { color: var(--hairline); font-weight: 400; }

.home-tagline { margin: 16px 0 32px; color: var(--muted-ink); font-size: 1.125rem; letter-spacing: -.012em; }

.search-form { position: relative; display: flex; align-items: center; width: 100%; }

.search-form input {
    width: 100%;
    height: 58px;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 0 62px 0 54px;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.0625rem;
    letter-spacing: -.01em;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    -webkit-appearance: none;
}

.search-form input::placeholder { color: #68756f; opacity: 1; }

.search-form input:hover { border-color: #a9b7b2; }

.search-form input:focus { border-color: var(--belay-deep); box-shadow: 0 0 0 3px rgba(15, 110, 86, .12); }

.search-icon { position: absolute; left: 19px; z-index: 1; color: var(--muted-ink); pointer-events: none; }

.search-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.search-submit {
    position: absolute;
    right: 7px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--belay-deep);
    color: var(--surface);
    cursor: pointer;
    transition: background 160ms ease, transform 160ms var(--ease-out);
}

.search-submit:hover { background: var(--belay-deep-hover); }
.search-submit:active { transform: scale(.96); }
.search-submit svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.search-hint { margin: 14px 0 0; color: var(--muted-ink); font-size: .875rem; }

.home-page > .site-footer { padding: 18px 20px 24px; }

/* Results */
.results-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--hairline); background: rgba(247, 249, 248, .96); }

.results-header-inner { display: flex; justify-content: center; align-items: center; gap: 32px; width: min(100% - 40px, 1120px); min-height: 78px; margin: 0 auto; }

.results-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-home-link { flex: 0 0 auto; color: var(--ink); text-decoration: none; border-radius: 6px; }
.results-slogan { overflow: hidden; max-width: 220px; margin: 0; color: var(--muted-ink); font-size: .8125rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.results-slogan::before { content: "·"; margin-right: 14px; color: #98a5a0; }

.search-form--results { max-width: 620px; }
.search-form--results input { height: 48px; padding-left: 48px; }
.search-form--results .search-icon { left: 16px; }
.search-form--results .search-submit { right: 4px; width: 40px; height: 40px; }

.results-main { width: min(100% - 40px, 920px); margin: 0 auto; padding: 44px 0 72px; }

.preview-notice {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 24px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--belay-mist);
    color: #154c3e;
    font-size: .875rem;
}

.service-notice {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 24px;
    padding: 12px 14px;
    border: 1px solid #e5dcc4;
    border-radius: 8px;
    background: #fffaf0;
    color: #5f4b1d;
    font-size: .875rem;
}

.results-summary { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 16px; }
.results-summary h1 { margin: 2px 0 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.025em; }
.results-count { margin-bottom: 2px; text-align: right; }
.results-count p { margin: 0; color: var(--muted-ink); font-size: .875rem; white-space: nowrap; }
.results-count span { display: block; margin-top: 4px; color: var(--belay-deep); font-size: .75rem; font-weight: 600; }
.results-kicker { margin: 0; color: var(--muted-ink); font-size: .875rem; }

.dedupe-note {
    margin: 0 0 14px;
    color: var(--muted-ink);
    font-size: .75rem;
    line-height: 1.55;
}

.results-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 20px; }
.platform-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-filter { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface); color: var(--muted-ink); font-size: .8125rem; font-weight: 600; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.platform-filter span { font-variant-numeric: tabular-nums; }
.platform-filter:hover { border-color: #a9b7b2; color: var(--ink); }
.platform-filter.is-active { border-color: var(--belay-deep); background: var(--belay-mist); color: var(--belay-deep); }
.platform-filter--shopee.is-active { border-color: #ee4d2d; background: #fff0ec; color: #9f2c17; }
.platform-filter--coupang.is-active { border-color: #275bc6; background: #eef4ff; color: #1e4da9; }
.platform-filter:disabled { cursor: not-allowed; opacity: .45; }
.sort-control { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--muted-ink); font-size: .8125rem; font-weight: 600; }
.sort-control select { min-height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.sort-control select:hover { border-color: #a9b7b2; }

.product-list { display: flex; flex-direction: column; gap: 12px; }

.comparison-card {
    position: relative;
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    background: var(--surface);
}
.comparison-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; pointer-events: none; }
.comparison-card--shopee::after { background: #ee4d2d; }
.comparison-card--coupang::after { background: linear-gradient(90deg, #894f24, #e94b22, #fac000, #80bc27, #3dacdc); }
.comparison-card--multi::after { background: linear-gradient(90deg, #ee4d2d 0 50%, #894f24 50% 60%, #e94b22 60% 70%, #fac000 70% 80%, #80bc27 80% 90%, #3dacdc 90% 100%); }
.comparison-card[data-visible-platform="shopee"]::after { background: #ee4d2d; }
.comparison-card[data-visible-platform="coupang"]::after { background: linear-gradient(90deg, #894f24, #e94b22, #fac000, #80bc27, #3dacdc); }
.comparison-card[hidden], .offer-row[hidden], .product-platform-meta[hidden] { display: none !important; }

.comparison-product { display: contents; }

.comparison-image-wrap { grid-row: 1 / 3; aspect-ratio: 1; background: #f0f4f2; }
.comparison-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.comparison-product-copy { min-width: 0; padding: 18px 20px 15px; }
.comparison-product-copy h2 { margin: 8px 0 0; font-size: 1.0625rem; line-height: 1.45; font-weight: 600; letter-spacing: -.015em; text-wrap: pretty; }

.product-platform-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.product-platform-meta { display: flex; align-items: center; gap: 9px; min-width: 0; }
.platform-logo { display: block; flex: 0 0 auto; width: auto; height: 16px; max-width: 76px; }
.product-platform-meta--coupang .platform-logo { height: 17px; }
.product-platform-meta p { overflow: hidden; margin: 0; color: var(--muted-ink); font-size: .75rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

.match-badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--belay-mist);
    color: #155c49;
    font-size: .75rem;
    line-height: 1.35;
    font-weight: 600;
}

.comparison-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; }
.price-update { color: var(--muted-ink); font-size: .75rem; line-height: 1.4; }

.identity-facts { margin: 6px 0 0; color: var(--muted-ink); font-size: .8125rem; line-height: 1.5; }

.offer-list { grid-column: 2; border-top: 1px solid var(--hairline); }
.offer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 78px;
    padding: 14px 20px;
    background: #fbfcfb;
}
.offer-row + .offer-row { border-top: 1px solid var(--hairline); }
.offer-row.is-lowest-price { background: #f1f7f4; }

.offer-price { display: grid; justify-items: end; min-width: 112px; }
.offer-price-heading { display: flex; align-items: center; justify-content: flex-end; gap: 7px; width: 100%; margin-bottom: 5px; }
.offer-platform-logo { width: auto; height: 13px; max-width: 62px; }
.offer-price span { margin-bottom: 2px; color: var(--belay-deep); font-size: .75rem; font-weight: 600; }
.offer-price strong { color: var(--ink); font-size: 1.125rem; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; }
.offer-price del { margin-top: 2px; color: var(--muted-ink); font-size: .75rem; }
.offer-price .lowest-price-badge { margin: 0; padding: 3px 7px; border-radius: 999px; background: #155c49; color: #fff; font-size: .6875rem; line-height: 1.3; }
.offer-price .price-saving { margin-top: 3px; color: #155c49; }
.offer-price .offer-promo { color: #8a5a00; }
.offer-facts { overflow: hidden; max-width: 34ch; margin: 4px 0 0; color: var(--muted-ink); font-size: .6875rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }

.offer-actions { display: flex; align-items: center; gap: 8px; }

.copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 9px 13px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted-ink);
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.copy-link:hover { border-color: #a9b7b2; color: var(--ink); }
.copy-link:active { transform: scale(.98); }
.copy-link:disabled { cursor: wait; opacity: .62; transform: none; }
.copy-link.is-copied { border-color: transparent; background: var(--belay-mist); color: var(--belay-deep); }
.copy-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.purchase-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 999px; background: var(--belay-deep); color: var(--surface); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background 160ms ease, transform 160ms var(--ease-out); }
.purchase-link:hover { background: var(--belay-deep-hover); }
.purchase-link--shopee { background: #d84c2f; color: #fff; }
.purchase-link--shopee:hover { background: #c43f25; }
.purchase-link--coupang { background: #275bc6; color: #fff; }
.purchase-link--coupang:hover { background: #204ca8; }
.purchase-link:active { transform: scale(.98); }
.purchase-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.empty-state { max-width: 620px; margin: 12vh auto 0; text-align: center; }
.empty-state-mark { width: 56px; height: 40px; margin: 0 auto 20px; color: #6b8f84; }
.empty-state h1 { margin: 0; font-size: 1.75rem; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
.empty-state p { max-width: 46ch; margin: 12px auto 0; color: var(--muted-ink); line-height: 1.65; text-wrap: pretty; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--hairline); color: var(--muted-ink); font-size: .75rem; line-height: 1.55; }
.site-copyright { margin: 0; }
.site-copyright strong { color: var(--ink); font-weight: 600; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-ink); text-underline-offset: 3px; }
.site-footer-nav a:hover { color: var(--ink); }

/* Legal and source information */
.legal-page { display: flex; flex-direction: column; }
.legal-header { display: flex; align-items: center; width: min(100% - 40px, 760px); min-height: 78px; margin: 0 auto; border-bottom: 1px solid var(--hairline); }
.legal-main { width: min(100% - 40px, 680px); margin: 0 auto; padding: 48px 0 32px; }
.legal-back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 18px; color: var(--belay-deep); font-size: .875rem; font-weight: 600; text-underline-offset: 3px; }
.legal-main h1 { margin: 0; font-size: 1.75rem; line-height: 1.25; letter-spacing: -.025em; }
.legal-intro { margin: 14px 0 36px; color: var(--muted-ink); font-size: 1rem; line-height: 1.7; text-wrap: pretty; }
.legal-section + .legal-section { margin-top: 32px; }
.legal-section h2 { margin: 0 0 10px; font-size: 1.125rem; line-height: 1.4; letter-spacing: -.015em; }
.legal-section p { margin: 0; color: #35423e; font-size: .9375rem; line-height: 1.8; text-wrap: pretty; }
.legal-section p + p { margin-top: 10px; }
.legal-page > .site-footer { width: min(100% - 40px, 760px); margin-top: auto; padding-bottom: 28px; }

/* Add to Home Screen */
.install-prompt {
    position: fixed;
    z-index: 40;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: min(calc(100% - 24px), 420px);
    margin-inline: auto;
    padding: 18px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    opacity: 0;
    transform: translateY(calc(100% + 24px));
    transition: opacity 200ms ease, transform 220ms var(--ease-out);
}
.install-prompt.is-visible { opacity: 1; transform: translateY(0); }
.install-prompt[hidden] { display: none; }
.install-prompt [hidden] { display: none !important; }
.install-prompt-heading { display: flex; align-items: center; gap: 12px; padding-right: 32px; }
.install-prompt-heading img { flex: 0 0 auto; border-radius: 11px; }
.install-prompt-heading h2 { margin: 0; font-size: 1rem; line-height: 1.35; letter-spacing: -.015em; }
.install-prompt-heading p { margin: 3px 0 0; color: var(--muted-ink); font-size: .8125rem; line-height: 1.45; }
.install-prompt-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted-ink);
    cursor: pointer;
}
.install-prompt-close:hover { background: var(--canvas); color: var(--ink); }
.install-prompt-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.install-prompt-actions { display: flex; gap: 8px; margin-top: 16px; }
.install-prompt-primary,
.install-prompt-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}
.install-prompt-primary { flex: 1 1 auto; border: 0; background: var(--belay-deep); color: var(--surface); }
.install-prompt-primary:hover { background: var(--belay-deep-hover); }
.install-prompt-secondary { border: 1px solid var(--hairline); background: var(--surface); color: var(--muted-ink); }
.install-prompt-secondary:hover { border-color: #a9b7b2; color: var(--ink); }
.install-prompt-ios ol { margin: 16px 0 0; padding: 14px 16px 14px 38px; border-radius: 8px; background: var(--canvas); color: #35423e; font-size: .875rem; line-height: 1.65; }
.install-prompt-ios li + li { margin-top: 5px; }
.install-share-icon { display: inline-block; width: 21px; height: 21px; margin: 0 3px; vertical-align: -5px; fill: none; stroke: #0878f9; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 720px) {
    .home-main { padding-inline: 18px; }
    .home-search-wrap { transform: translateY(-2vh); }
    .home-brand { gap: 12px; }
    .home-brand-mark { width: 46px; height: 34px; }
    .home-brand h1 { font-size: 2.5rem; letter-spacing: -.03em; }
    .home-tagline { margin-top: 12px; margin-bottom: 28px; font-size: 1rem; }
    .search-form--hero input { height: 56px; }

    .results-header-inner { display: grid; grid-template-columns: 1fr; gap: 12px; width: calc(100% - 28px); padding: 14px 0; }
    .results-brand { width: 100%; gap: 10px; }
    .brand-home-link { justify-self: start; }
    .brand-home-link .brand-mark { width: 36px; height: 27px; }
    .brand-home-link .brand-wordmark { gap: 5px; font-size: 1rem; }
    .results-slogan { flex: 1 1 auto; max-width: none; font-size: .75rem; }
    .results-slogan::before { margin-right: 10px; }
    .search-form--results { max-width: none; }

    .results-main { width: calc(100% - 28px); padding: 28px 0 56px; }
    .preview-notice,
    .service-notice { align-items: flex-start; flex-direction: column; gap: 2px; }
    .results-summary { align-items: start; }
    .results-summary h1 { font-size: 1.5rem; }
    .results-controls { align-items: stretch; flex-direction: column; gap: 10px; }
    .platform-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .platform-filter { padding-inline: 8px; }
    .sort-control { width: 100%; }
    .sort-control select { flex: 1 1 auto; min-width: 0; }

    .comparison-card { display: block; }
    .comparison-product { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
    .comparison-image-wrap { grid-row: auto; min-height: 112px; }
    .comparison-product-copy { padding: 13px 14px; }
    .comparison-product-copy h2 { display: -webkit-box; overflow: hidden; margin-top: 6px; font-size: .9375rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .product-platform-list { gap: 6px; margin-bottom: 7px; }
    .product-platform-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
    .platform-logo { height: 14px; max-width: 68px; }
    .product-platform-meta--coupang .platform-logo { height: 15px; }
    .product-platform-meta p { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .identity-facts { display: -webkit-box; overflow: hidden; font-size: .75rem; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
    .offer-list { border-top: 1px solid var(--hairline); }
    .offer-row { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding: 13px 14px; }
    .comparison-status { gap: 5px 7px; }
    .price-update { font-size: .6875rem; }
    .offer-price { justify-items: start; min-width: 96px; }
    .offer-price-heading { justify-content: flex-start; }
    .offer-price strong { font-size: 1.0625rem; }
    .offer-actions { grid-column: 1; display: grid; grid-template-columns: 88px minmax(0, 1fr); width: 100%; }
    .copy-link,
    .purchase-link { width: 100%; }

    .site-footer { align-items: flex-start; flex-direction: column; margin-top: 32px; }
    .site-footer-nav { gap: 0 16px; }
    .legal-header { width: calc(100% - 28px); min-height: 66px; }
    .legal-main { width: calc(100% - 28px); padding-top: 32px; }
    .legal-page > .site-footer { width: calc(100% - 28px); }
}

@media (max-width: 390px) {
    .comparison-product { grid-template-columns: 104px minmax(0, 1fr); }
    .comparison-image-wrap { aspect-ratio: auto; min-height: 104px; }
    .comparison-product-copy { padding-left: 12px; }
    .offer-price del { display: none; }
}

@media (min-width: 721px) {
    .install-prompt { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
