/* 禮物所 — 配色與規格依 palette.md（2026-11-16 定案） */
:root {
  --primary: #82696A;        /* 主色：按鈕、連結、優惠碼框線 */
  --primary-hover: #6E5957;  /* 主色 hover／按下 */
  --primary-edge: #5A4846;   /* 凸起按鈕底邊（裝飾） */
  --text: #3D3532;
  --background: #F6F4F0;     /* 中間容器底色 */
  --accent: #DACFCC;         /* 輔色：卡片邊框、徽章、hover 位移陰影 */
  --highlight: #5A695F;      /* 跳色：只放標籤 */
  --card: #FFFDFC;
  --text-muted: #5F5552;
  --price: #A31F1F;          /* 只用於價格，字重 700 */
  --footer: #B3A49F;         /* 頁尾色塊，上面只放 --text */
  --input-border: #857D7A;
  --number: #B3A6A2;         /* 卡片編號，純裝飾 */
  --page-fallback: #DED6D3;
  --white: #FFFFFF;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 40px 16px;
  background: var(--page-fallback) url("paper_1600_q70.webp") center / cover scroll;
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
@media (min-width: 768px) { body { background-attachment: fixed; } }
@media (max-width: 479px) { body { padding: 16px 8px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 500; }
h1 { font-size: clamp(1.6rem, 5vw, 1.9rem); letter-spacing: 2px; }
h1.title-rule { padding-bottom: .5em; margin-bottom: .9em; border-bottom: 2px solid var(--footer); }
h2 { font-size: 1.2rem; margin-top: 2em; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 1em; }

.container {
  max-width: 800px; margin: 0 auto;
  background: var(--background); border-radius: 16px;
  box-shadow: 0 2px 24px rgba(61, 53, 50, .12); overflow: hidden;
}
.wrap { padding: 0 24px; }
@media (max-width: 479px) { .wrap { padding: 0 16px; } }
.visually-hidden, .hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

.draft-banner { margin: 0; padding: 8px 16px; text-align: center; background: var(--text); color: var(--background); font-size: .9rem; }

/* 頁首 */
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 1.25rem; letter-spacing: 2px; color: var(--text); text-decoration: none; }
.brand img { height: 22px; width: auto; }
.nav { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; font-size: .9rem; }
.nav li { display: flex; align-items: center; }
.nav li + li::before { content: "|"; color: var(--text-muted); margin: 0 4px; }
.nav a { display: block; padding: 10px 6px; text-decoration: none; border-radius: 8px; transition: background-color .15s ease; }
.nav a[aria-current="page"] { font-weight: 700; }
/* 送禮對象子選單 */
.nav-sub { position: relative; }
.nav-sub summary { list-style: none; cursor: pointer; padding: 10px 6px; color: var(--primary); text-decoration: none; border-radius: 8px; transition: background-color .15s ease; }
.nav-sub summary::-webkit-details-marker { display: none; }
.nav-sub details[data-current="true"] summary { font-weight: 700; }
.submenu { list-style: none; margin: 0; padding: 6px; position: absolute; top: 100%; left: 0; z-index: 20; min-width: 9em; background: var(--card); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 2px 12px rgba(61,53,50,.12); }
.submenu li { display: block; }
.nav .submenu li::before { content: none; }
.submenu a { padding: 10px 12px; white-space: nowrap; }
.nav-sub summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* 導覽 icon：淡色圓底 + 主色線條。場合粉、標籤綠、嗜好奶茶色。 */
.nav-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.6em; height: 1.6em; margin-right: .35em; border-radius: 50%; vertical-align: -.45em; color: var(--primary); }
.nav-icon svg { width: 1em; height: 1em; stroke-width: 2.2; }
.nav-icon-occasion { background: #F4DEDC; }
.nav-icon-tag { background: #DCE6DE; }
.nav-icon-hobby { background: #EFE2D0; }
.nav-icon-budget { background: #F3E7C6; }
.nav .submenu-heading { padding: 8px 12px 2px; font-size: .78rem; color: var(--text-muted); letter-spacing: 1px; }
.nav .submenu-heading ~ .submenu-heading { margin-top: 4px; border-top: 1px solid var(--accent); padding-top: 10px; }
.submenu a, .nav-sub summary { display: flex; align-items: center; }
/* 滑鼠移過：整塊淡色背景；子選單是整行。展開中的主分類也維持色塊。 */
.nav-sub details[open] > summary { background: rgba(130, 105, 106, .2); color: var(--primary-hover); }
@media (hover: hover) { .nav a:hover, .nav-sub summary:hover { background: rgba(130, 105, 106, .2); color: var(--primary-hover); } }
.search-link { border-radius: 8px; transition: background-color .15s ease; }
@media (hover: hover) { .search-link:hover { background: rgba(130, 105, 106, .2); } }
@media (prefers-reduced-motion: reduce) { .nav a, .nav-sub summary, .search-link { transition: none; } }

/* 手機漢堡選單：寬度 767px 以下且有 JavaScript 時，導覽收進右側滑出面板。桌機與無 JavaScript 時維持原樣。 */
.nav-panel { display: contents; }
.nav-toggle, .nav-close, .nav-backdrop { display: none; }
@media (max-width: 767px) {
  .js .header-inner { flex-wrap: nowrap; }
  .js .site-header nav { gap: 0; }
  .js .search-link { order: 1; }
  .js .nav-toggle { order: 2; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: none; border: 0; cursor: pointer; }
  .js .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--primary); }
  .js .nav-panel { display: block; position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(80vw, 300px); padding: 56px 20px 24px; overflow-y: auto; background: var(--background); box-shadow: -4px 0 24px rgba(61, 53, 50, .18); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .js.nav-open .nav-panel { transform: none; visibility: visible; transition: transform .25s ease; }
  .js .nav-close { display: block; position: absolute; top: 6px; right: 8px; width: 44px; height: 44px; background: none; border: 0; font: inherit; font-size: 1.8rem; line-height: 1; color: var(--primary); cursor: pointer; }
  .js .nav-panel .nav { flex-direction: column; align-items: stretch; font-size: 1rem; }
  .js .nav-panel .nav li { display: block; }
  .js .nav-panel .nav > li { border-bottom: 1px solid var(--accent); }
  .js .nav-panel .nav li + li::before { content: none; }
  .js .nav-panel .nav a, .js .nav-panel .nav-sub summary { padding: 12px 8px; }
  .js .nav-panel .submenu { position: static; min-width: 0; padding: 0 0 8px 12px; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .js .nav-panel .submenu a { padding: 8px 8px; white-space: normal; }
  .js .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(61, 53, 50, .35); }
  .js .nav-backdrop[hidden] { display: none; }
  .nav-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .nav-panel { transition: none !important; } }

main { padding-top: 8px; padding-bottom: 40px; }
.lead { max-width: 40em; }
.meta, .crumbs { font-size: .9rem; color: var(--text-muted); }
.crumbs { margin-bottom: 14px; }

/* 首頁主視覺 */
.hero { text-align: center; padding: 16px 0 4px; }
.badge { display: inline-block; background: var(--accent); color: var(--text); font-size: .8rem; padding: 6px 16px; border-radius: 999px; margin-bottom: 14px; }
.ribbon {
  display: inline-block; margin: 16px 0 0; padding: 6px 44px;
  background: var(--primary); color: var(--white); font-size: .9rem;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}

/* 按鈕：凸起 */
.btn, .filter {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-size: .9rem; text-decoration: none; text-align: center;
  background: var(--primary); color: var(--white); padding: 11px 24px; min-height: 44px; border-radius: 8px;
  box-shadow: 0 3px 0 var(--primary-edge);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover, .filter:hover { color: var(--white); background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 0 var(--primary-edge); text-decoration: none; }
.btn:active, .filter:active { transform: translateY(3px); box-shadow: 0 0 0 var(--primary-edge); }
.btn-buy { display: block; width: 100%; }

/* 預算篩選（白底外框，選中變主色） */
.filters { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 20px 0 28px; padding: 0; }
.filter { border-radius: 6px; padding: 10px 26px; font-size: .95rem; background: var(--card); color: var(--primary); border: 1px solid var(--primary); box-shadow: 0 3px 0 var(--primary); }
.filter:hover { background: var(--card); color: var(--primary-hover); box-shadow: 0 4px 0 var(--primary); }
.filter:active { box-shadow: 0 0 0 var(--primary); }
.filter[aria-pressed="true"] { background: var(--primary); color: var(--white); box-shadow: 0 3px 0 var(--primary-edge); }
.filter[aria-pressed="true"]:hover { background: var(--primary-hover); color: var(--white); }
.filter-more { text-align: center; margin: 16px 0 20px; font-size: .9rem; }
.filter-more[hidden] { display: none; }

.disclosure-note { font-size: .85rem; padding: 10px 14px; margin: 0 0 20px; background: var(--card); border-left: 4px solid var(--accent); border-radius: 4px; color: var(--text-muted); }

/* 照片濾鏡（overlay）：飽和度 -25%、主色 22%、下半部文字色漸層 */
.photo { position: relative; overflow: hidden; background: var(--accent); }
.photo img { filter: saturate(.75); }
.photo:has(.card-icon)::after { display: none; }
.photo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 20%, rgba(61, 53, 50, .55)),
    linear-gradient(rgba(130, 105, 106, .22), rgba(130, 105, 106, .22));
}

/* 卡片 */
.card {
  background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) { .card:hover { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent); } }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--accent); background: var(--accent); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: .9rem; color: var(--text); }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-rank { font-size: 1.6rem; line-height: 1; color: var(--number); margin: 0 0 6px; }
.card-shop { font-size: .88rem; color: var(--text-muted); margin-bottom: .6em; }
.card-reason { margin-bottom: .6em; }
.card-caution { font-size: .92rem; margin-bottom: .8em; }
.gd-notfor { font-size: .92rem; color: var(--text-muted); margin-bottom: .8em; }
.price { margin: auto 0 .6em; padding-top: .4em; }
.price-old { font-size: .9rem; margin-right: 10px; color: var(--text-muted); }
.price-now strong { font-size: 1.35rem; font-weight: 700; color: var(--price); }
.coupon { margin: 0 0 .8em; padding: 8px 12px; border: 1px dashed var(--primary); border-radius: 8px; font-size: .9rem; }
.coupon div { display: flex; gap: 10px; }
.coupon dt { flex: 0 0 4.5em; color: var(--text-muted); }
.coupon dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.coupon code { color: var(--primary); font-size: 1.05rem; letter-spacing: 1px; }
.card-icon { width: 100%; height: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--background); color: var(--primary); }
.card-icon .product-icon { width: 38%; height: auto; max-width: 120px; stroke-width: 1.5; }
.img-source { font-size: .75rem; color: var(--text-muted); margin: 4px 0 6px; }
.verified { font-size: .8rem; color: var(--text-muted); margin-bottom: .9em; }
.copy-status { min-height: 1.6em; margin: 6px 0 0; font-size: .88rem; color: var(--text-muted); }

.cards { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 16px 0; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 600px) {
  .cards--wide { grid-template-columns: 1fr; }
  .cards--wide .card { flex-direction: row; }
  .cards--wide .card-media { flex: 0 0 200px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--accent); }
}

/* 首頁：緊湊卡片 3 欄 × N 列 */
.grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
@media (max-width: 719px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .grid { grid-template-columns: 1fr; } }
.mini { padding: 12px; position: relative; }
.mini-head { display: flex; align-items: center; gap: 8px; }
.mini .num { font-size: 1.4rem; line-height: 1; color: var(--number); }
.mini h3 { font-size: .9rem; margin: 0; line-height: 1.35; }
.mini h3 a { color: var(--text); text-decoration: none; }
.mini h3 a::after { content: ""; position: absolute; inset: 0; }
.mini h3 a:hover { text-decoration: underline; }
.mini-budget { display: block; font-size: .75rem; font-weight: 400; color: var(--text-muted); }
.mini .photo { margin-top: 10px; border-radius: 6px; aspect-ratio: 4 / 3; }
.mini .photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-price { font-size: 1rem; font-weight: 700; color: var(--price); margin: 8px 0 0; }
.mini-reason { font-size: .78rem; color: var(--text-muted); margin: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-notfor { font-size: .78rem; color: var(--text-muted); margin: 4px 0 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.section-title { margin: 36px 0 12px; }
.notice { border-left: 5px solid var(--primary); padding: 2px 0 2px 16px; margin-top: 32px; }
.notice h2 { margin: 0 0 .3em; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.notice h2::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: .8rem; font-weight: 700; line-height: 1; }
.notice p { margin: 0; }
.plain { padding-left: 1.3em; }
.plain li { margin-bottom: .4em; }
.more { font-weight: 500; }

/* 訂閱欄位 */
.subscribe { margin: 40px 0 56px; padding: 6px 22px 22px; border-radius: var(--radius); background: var(--accent); border: 2px solid var(--primary); box-shadow: 6px 6px 0 var(--primary); }
.subscribe h2::before { content: ""; flex: none; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2382696A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.subscribe h2 { display: flex; align-items: center; gap: 8px; margin-top: .9em; font-size: 1.05rem; }
.subscribe label { display: block; font-weight: 500; margin-bottom: 4px; }
.subscribe-row { display: flex; flex-wrap: wrap; gap: 10px; }
.subscribe-row input { flex: 1 1 220px; min-height: 44px; padding: 8px 12px; font: inherit; font-size: .9rem; color: var(--text); background: var(--card); border: 1px solid var(--input-border); border-radius: 8px; }
.subscribe-row input::placeholder { color: var(--text-muted); }
.form-note { font-size: .82rem; color: var(--text-muted); margin: 10px 0 0; }

.result { padding: 40px 0; }

/* 頁尾：調暗的輔色，上面只放文字色 */
.site-footer { background: var(--footer); color: var(--text); padding: 20px 0 24px; font-size: .85rem; }
.site-footer p { margin: 0 0 .6em; }
.site-footer a { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { padding: 6px 0; }
.copyright { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .card, .btn, .filter { transition: none; }
  .card:hover, .btn:hover, .filter:hover { transform: none; }
}

.site-footer { text-align: center; }
.footer-links { justify-content: center; }
.article-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; }
.article-list li { position: relative; background: var(--white); border: 1px solid var(--accent); border-radius: 10px; padding: 14px 18px; color: var(--text); transition: background-color .15s ease; }
.article-list h2 { margin: 0; font-size: 1.1rem; }
.article-list h2 a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.article-list h2 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.article-list h2 a:focus-visible { outline: none; }
.article-list li:has(h2 a:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.article-list li p { margin: 4px 0 0; color: var(--text-muted); font-size: .9rem; }
@media (hover: hover) { .article-list li:has(h2):hover { background: rgba(130, 105, 106, .15); } }
@media (prefers-reduced-motion: reduce) { .article-list li { transition: none; } }
.article-list a { font-weight: 700; color: var(--primary); }
.article-list span { display: block; margin-top: 4px; color: var(--text-muted); font-size: .9rem; }

.filters[hidden] { display: none; }
.filters--who { margin-top: -8px; }
.site-search { display: flex; gap: 10px; max-width: 460px; margin: 18px auto 0; }
.site-search input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 14px; font: inherit; font-size: .95rem; color: var(--text); background: var(--card); border: 1px solid var(--input-border); border-radius: 6px; }
.site-search input::placeholder { color: var(--text-muted); }
.site-search .btn { border-radius: 6px; padding: 8px 20px; }
.search-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--primary); }
.site-header nav { display: flex; align-items: center; gap: 6px; }

.filterbar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 10px; margin: 20px 0 28px; padding: 2px 2px 6px; overflow-x: auto; scrollbar-width: thin; }
.filter-label { flex: none; font-size: .85rem; color: var(--text-muted); }
.filterbar .filter { flex: none; white-space: nowrap; padding: 0 16px; min-height: 36px; height: 36px; display: inline-flex; align-items: center; }
.budget-select { flex: none; min-height: 36px; padding: 4px 34px 4px 16px; font: inherit; font-size: .95rem; color: var(--primary); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2382696A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; border: 1px solid var(--primary); border-radius: 6px; box-shadow: 0 3px 0 var(--primary); appearance: none; -webkit-appearance: none; cursor: pointer; }
@media (max-width: 520px) { .filterbar { justify-content: flex-start; } }

/* 附禮盒：顯示在價格旁邊的小標示 */
.giftbox {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: normal;
  vertical-align: middle;
}

/* 環境友善：icon + 文字，線框白底（跳色 --highlight 在白底對比度 5.80） */
.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 8px 1px 6px;
  color: var(--highlight);
  background: var(--white);
  border: 1px solid var(--highlight);
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: normal;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
.eco-badge__icon { flex: none; }
a.eco-badge { text-decoration: none; position: relative; z-index: 1; }
a.eco-badge:hover { text-decoration: underline; }
.gift-for a.tag-link { color: var(--highlight); font-weight: 700; }
a.eco-badge:focus-visible, .gift-for a.tag-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.notice-few { padding: 12px 16px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--card); }

/* 單一文章頁 */
.article-body { max-width: 42em; }
.article-body h2 { margin-top: 2.6em; padding: .5em .9em; background: color-mix(in srgb, var(--accent) 45%, var(--card)); border-radius: var(--radius); }
.article-body hr { display: none; }
.article-body .wavy { text-decoration: underline wavy var(--primary); text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.article-body > p:not(.meta):not(.lead):not(.back-link), .article-body h2 ~ ol, .article-body h2 ~ ul { margin-left: 1.08rem; }
.article-body > h1, .article-body > p.meta { margin-left: 1.08rem; }
.article-body h2 ~ ol, .article-body h2 ~ ul { padding-left: 1.3em; }
.article-body { padding-bottom: 3em; }
.article-body a:not(.btn):hover { font-weight: 700; }
/* ===== 單一文章頁模板：購買鈕（buy-link）、商品區塊（item-row / item-img）。由 build.mjs 的 renderArticleMd 產生 ===== */
.article-body a.buy-link { display: inline; color: var(--highlight); text-decoration: none; font-weight: 400; }
.article-body a.buy-link { background: color-mix(in srgb, var(--highlight) 12%, transparent); padding: .35em .8em; border-radius: .5em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.article-body a.buy-link:hover { text-decoration: none; background: color-mix(in srgb, var(--highlight) 20%, transparent); }
.article-body a.buy-link::before { content: "▶"; display: inline-block; margin-right: .5em; font-size: .7em; animation: buy-nudge 1.2s ease-in-out infinite; }
.article-body .buy-name { font-weight: 700; }
@keyframes buy-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .article-body a.buy-link::before { animation: none; } }
@media (max-width: 600px) { .article-body a.buy-link { display: block; } }
.article-body li.buy-li { list-style: none; margin: .4em 0 0 -1.3em; }
.article-body .item-row { display: block; }
.article-body .item-row.has-img { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; align-items: start; margin-left: 1.08rem; }
.article-body .item-row.has-img .item-body ul { margin-left: 0; padding-left: 1.3em; }
.article-body .item-img { margin: .3em 0 0; }
.article-body .item-img a { display: block; border-radius: var(--radius); transition: transform .2s ease, box-shadow .2s ease; }
.article-body .item-img a:hover, .article-body .item-img a:focus-visible { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
@media (prefers-reduced-motion: reduce) { .article-body .item-img a { transition: none; } .article-body .item-img a:hover { transform: none; } }
.article-body .item-img img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 600px) { .article-body .item-row.has-img { grid-template-columns: 1fr; } .article-body .item-img { max-width: 12rem; } }
.article-body h3 { margin: 1.6em 0 .6em 1.08rem; padding: 0 0 .3em; border-bottom: 1px dashed var(--accent); }

.article-body p { line-height: 1.8; }
.article-body .back-link { margin-top: 1.5em; }

/* 首頁跳窗：一次看一個禮物 */
.card.mini { cursor: pointer; }
.gift-dialog { width: min(760px, 94vw); max-height: 90vh; border: 0; border-radius: var(--radius); padding: 24px; background: var(--card); color: var(--text); }
.gift-dialog::backdrop { background: rgba(61, 53, 50, .55); }
.gd-close { position: absolute; top: 8px; right: 12px; font-size: 1.6rem; line-height: 1; background: none; border: 0; color: var(--text); cursor: pointer; padding: 4px 8px; }
.gd-main { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.gd-photo img, .gd-photo .card-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gd-info h2 { font-size: 1.2rem; margin: 0 0 8px; padding-right: 28px; }
.gd-price { font-size: 1.25rem; font-weight: 700; color: var(--price); margin: 0 0 8px; }
.gift-for { margin: 0 0 12px; font-size: .9rem; }
.gift-for span { color: var(--highlight); font-weight: 700; }
.gd-reason { margin: 0 0 8px; line-height: 1.7; }
.gd-caution { margin: 0 0 12px; font-size: .9rem; color: var(--text-muted); }
.gd-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gd-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--accent); }
.gd-nav button, .gd-related button { background: none; border: 0; color: var(--primary); font: inherit; cursor: pointer; padding: 6px 4px; }
.gd-nav button:hover, .gd-related button:hover { color: var(--primary-hover); text-decoration: underline; }
.gd-related { margin-top: 16px; }
.gd-related h3 { font-size: 1rem; margin: 0 0 8px; }
.gd-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gd-related button { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; font-size: .85rem; }
.gd-related img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
@media (max-width: 600px) {
  .gd-main { grid-template-columns: 1fr; }
  .gd-related ul { grid-template-columns: repeat(2, 1fr); }
}

/* 留意事項前面的小圖示 */
.caution-icon { display: inline-block; width: 1em; height: 1em; margin-right: 4px; vertical-align: -.15em; color: var(--highlight); }
.caution-icon svg { width: 100%; height: 100%; }

/* 購禮指南子選單：在導覽最右邊，往左展開才不會超出畫面 */
.nav-sub--end .submenu { left: auto; right: 0; }

/* 單一文章頁：麵包屑、文章目錄、手機回到頂端 */
.article-body .article-crumbs { margin: 0 0 10px 1.08rem; line-height: 1.7; }
.article-crumbs a { color: var(--text-muted); }
.article-crumbs a:hover { color: var(--primary-hover); }
.crumb-current { color: var(--text); }
@media (max-width: 600px) { .crumb-current { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; } }
.article-body h2[id] { scroll-margin-top: 16px; }
.toc { margin: 1.6em 0 0 1.08rem; padding: 14px 20px; background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius); }
.toc summary { cursor: pointer; font-weight: 700; color: var(--text); list-style: none; display: flex; align-items: center; gap: .4em; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: ""; width: .45em; height: .45em; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); transition: transform .15s ease; }
.toc[open] summary::before { transform: rotate(45deg); }
.toc ol { margin: 10px 0 0; padding-left: 1.5em; }
.article-body .toc ol { margin-left: 0; }
.toc li { margin: 4px 0; line-height: 1.6; }
.toc li::marker { color: var(--number); }
.toc a { color: var(--primary); text-decoration: none; }
.toc a:hover { text-decoration: underline; font-weight: 400; }
.to-top { display: none; }
@media (max-width: 767px) {
  .js .to-top { position: fixed; right: 16px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; color: var(--white); background: var(--primary); box-shadow: 0 3px 0 var(--primary-edge), 0 6px 14px rgba(61, 53, 50, .2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
  .js .to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .js .to-top[hidden] { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .to-top, .toc summary::before { transition: none !important; } }

/* 購禮指南列表：分類／標籤篩選 */
.article-filter { display: none; }
.js .article-filter { display: grid; gap: 10px; margin: 18px 0 20px; }
.af-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.af-row .filter-label { width: 2.6em; }
.af-btn, .af-tag { font: inherit; cursor: pointer; min-height: 36px; padding: 0 14px; border-radius: 6px; transition: background-color .15s ease, color .15s ease; }
.af-btn { font-size: .95rem; color: var(--primary); background: var(--card); border: 1px solid var(--primary); box-shadow: 0 2px 0 var(--primary); }
.af-btn[aria-pressed="true"] { color: var(--white); background: var(--primary); box-shadow: 0 2px 0 var(--primary-edge); }
.af-tag { font-size: .88rem; min-height: 32px; padding: 0 12px; border-radius: 999px; color: var(--highlight); background: color-mix(in srgb, var(--highlight) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--highlight) 35%, transparent); }
.af-tag[aria-pressed="true"] { color: var(--white); background: var(--highlight); border-color: var(--highlight); }
@media (hover: hover) { .af-btn:hover { color: var(--primary-hover); background: color-mix(in srgb, var(--primary) 12%, var(--card)); } .af-btn[aria-pressed="true"]:hover { color: var(--white); background: var(--primary-hover); } .af-tag:hover { background: color-mix(in srgb, var(--highlight) 20%, var(--card)); } .af-tag[aria-pressed="true"]:hover { background: var(--highlight); } }
.af-btn:focus-visible, .af-tag:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.af-result { margin: 0; font-size: .85rem; color: var(--text-muted); }
.af-empty { color: var(--text-muted); }
.af-reset { font: inherit; color: var(--primary); background: none; border: 0; padding: 0 4px; text-decoration: underline; cursor: pointer; }
.article-list li[hidden] { display: none; }
.article-list .article-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.article-list .article-meta span { display: inline-block; margin: 0; font-size: .8rem; line-height: 1.6; padding: 0 8px; border-radius: 999px; }
.article-list .article-meta .article-cat { color: var(--primary); background: color-mix(in srgb, var(--accent) 55%, var(--card)); }
.article-list .article-meta .tag { color: var(--highlight); background: color-mix(in srgb, var(--highlight) 10%, var(--card)); }
@media (max-width: 479px) { .af-row .filter-label { width: 100%; } }

/* 合作聯絡：彈窗、表單、關於頁入口 */
.contact-cta { margin: 0 0 48px; }
.contact-dialog { width: min(92vw, 520px); max-height: 90vh; overflow-y: auto; padding: 22px 22px 18px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--background); color: var(--text); box-shadow: 6px 6px 0 var(--primary); }
.contact-dialog::backdrop { background: rgba(61, 53, 50, .45); }
.contact-dialog h2 { margin: 0 0 .4em; font-size: 1.15rem; }
.contact-intro { margin: 0 0 14px; font-size: .92rem; color: var(--text-muted); }
.contact-close { position: absolute; top: 6px; right: 8px; width: 44px; height: 44px; background: none; border: 0; font: inherit; font-size: 1.8rem; line-height: 1; color: var(--primary); cursor: pointer; }
.contact-page { max-width: 560px; }
.contact-form .field { margin: 0 0 12px; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 4px; }
.contact-form input, .contact-form select, .contact-form textarea { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: .95rem; color: var(--text); background: var(--card); border: 1px solid var(--input-border); border-radius: 8px; }
.contact-form textarea { resize: vertical; }
.contact-form ::placeholder { color: var(--text-muted); }
.contact-actions { margin: 14px 0 0; }
.contact-status { margin: 8px 0 0; font-size: .9rem; }
.contact-status:empty { display: none; }
