/* ═══════════════════════════════════════════════════════════════════════
   Bellyhold　設計：「酒標」
   香檳淡黃紙、深酒紅印刷。今日總結是一張酒標，展開後是一封淺色信。
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --paper: #F6EFDD;      /* 香檳淡黃 */
  --paper-2: #FBF7EC;    /* 浮起的紙面 */
  --ink: #2A1B17;        /* 鐵膽墨 */
  --ink-2: #574339;
  --mute: #8A7465;
  --rule: #E2D3B5;
  --wine: #6A1B2A;       /* 酒紅 */
  --wine-2: #8E2B3D;
  --claret: #4A0F1C;     /* 酒標底色 */
  --claret-2: #64182A;
  --champ: #F6EFDD;      /* 酒標上的字 */
  --champ-2: #D8C4A2;
  --brass: #BF9A5F;      /* 金屬細節，只用於極少數位置 */
  --tint: #EFE2CE;
  --rose: #EDB9C1;       /* 酒標上的註腳 */
  --d-lg: #3E5A7A; --d-ec: #6B7A3A; --d-wd: #6E4A7E; --d-cn: #B5552F; --d-tc: #2F6E6A; --d-lf: #B2862F; --d-ot: #8A7465;

  --display: "Bodoni Moda", "Noto Serif TC", Georgia, serif;
  --serif: "Noto Serif TC", "Noto Serif CJK TC", "Noto Serif CJK HK", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Noto Sans CJK TC", "Noto Sans CJK HK", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --scale: 1;
  --bar: 56px;
  --max: 1160px;
  --gut: clamp(18px, 5vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-size="s"] { --scale: .92; }
:root[data-size="l"] { --scale: 1.12; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1012; --paper-2: #24171A; --ink: #F1E6D2; --ink-2: #D0BFA7; --mute: #9C8877; --rule: #3B2A2B;
    --wine: #E3A3AD; --wine-2: #F2BDC5; --claret: #3C0D18; --claret-2: #521324; --champ: #F6EFDD; --champ-2: #CDB696;
    --brass: #CCA66C; --tint: #2E1D1F; --rose: #F0BCC4; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B1012; --paper-2: #24171A; --ink: #F1E6D2; --ink-2: #D0BFA7; --mute: #9C8877; --rule: #3B2A2B;
  --wine: #E3A3AD; --wine-2: #F2BDC5; --claret: #3C0D18; --claret-2: #521324; --champ: #F6EFDD; --champ-2: #CDB696;
  --brass: #CCA66C; --tint: #2E1D1F; --rose: #F0BCC4; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: calc(100% * var(--scale)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 12px); }
body { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font: 400 1rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; padding: 8px 14px; border-radius: 4px; background: var(--claret); color: var(--champ); }
.textbtn { padding: 0; border: 0; background: none; color: var(--wine); font: 500 .92rem var(--sans); text-decoration: underline; text-underline-offset: .28em; text-decoration-thickness: 1px; cursor: pointer; }
.textbtn:hover { color: var(--wine-2); }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--wine); transform: scaleX(0); transform-origin: 0 50%; }

/* ─── 頂欄 ─────────────────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 40; height: var(--bar); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s; }
.bar.is-stuck { background: color-mix(in srgb, var(--paper) 86%, transparent); border-bottom-color: var(--rule);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.bar-in { display: flex; align-items: center; gap: 1rem; height: 100%; max-width: calc(var(--max) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.bar-logo { display: flex; align-items: center; gap: .55rem; color: var(--wine); font: 600 1.3rem/1 var(--display); letter-spacing: -.005em; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.bar-logo .mark { width: 22px; height: 22px; }
.bar.has-plate:not(.show-logo) .bar-logo { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.nav { display: flex; gap: clamp(.9rem, 2.4vw, 1.8rem); margin-left: auto; font: 500 .95rem var(--sans); }
.nav a { position: relative; padding: .4rem 0; color: var(--ink-2); transition: color .2s; }
.nav a:hover { color: var(--wine); }
.nav a[aria-current="page"] { color: var(--wine); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--wine); }
.gear { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.gear:hover { border-color: var(--wine); color: var(--wine); }
.gear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* ─── 刊名 ─────────────────────────────────────────────────────────── */
.plate { padding: clamp(.8rem, 3vw, 2rem) var(--gut) clamp(1.6rem, 4vw, 2.6rem); text-align: center; }
.plate-name { color: var(--wine); font: 500 clamp(3.1rem, 10vw, 5.8rem)/.95 var(--display); letter-spacing: -.012em; font-optical-sizing: auto; }
.plate-crest { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1rem 0 .85rem; color: var(--wine); }
.plate-crest i { width: clamp(40px, 8vw, 72px); height: 1px; background: currentColor; opacity: .45; }
.plate-crest .mark { width: 20px; height: 20px; }
.plate-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem 1.1rem; color: var(--ink-2); font: 600 .95rem var(--serif); letter-spacing: .08em; }

/* ─── 酒標：今日總結 ───────────────────────────────────────────────── */
.hero-wrap { max-width: calc(var(--max) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }   /* 與版面同寬，左右邊緣對齊 */
.alert { margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 4px; background: var(--tint); color: var(--wine); font: 500 .92rem/1.6 var(--sans); }
.hero { position: relative; padding: 10px; border-radius: 6px; color: var(--champ);
  background: radial-gradient(120% 90% at 12% 0%, var(--claret-2) 0%, transparent 60%), var(--claret);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -38px rgba(74, 15, 28, .55); }
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grain); opacity: .55; mix-blend-mode: overlay; pointer-events: none; }
.hero-frame { position: relative; padding: clamp(22px, 4.2vw, 50px) clamp(18px, 4.2vw, 54px) clamp(22px, 3.4vw, 40px);
  border: 1px solid rgba(246, 239, 221, .26); border-radius: 3px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; font: 500 .86rem var(--sans); }
.hero-k { color: var(--brass); font-weight: 700; letter-spacing: .16em; }
.hero-meta { display: flex; gap: 1rem; color: var(--champ-2); }
.hero-h { max-width: 24em; margin-top: 1.1rem; color: var(--champ); font: 900 clamp(1.7rem, 4.3vw, 2.95rem)/1.3 var(--serif); letter-spacing: .01em; text-wrap: balance; }
.hero-h::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 1.2rem; background: var(--brass); }
.hero-thesis { max-width: 38em; margin-top: 1.2rem; color: var(--champ); font-size: 1.08rem; line-height: 1.8; }
.hero-points { display: grid; margin-top: 1.5rem; padding: 0; list-style: none; }
.hero-points li { display: grid; grid-template-columns: 2.3rem minmax(0, 1fr); padding: .95rem 0; border-top: 1px solid rgba(246, 239, 221, .15); }
.hero-n { color: var(--brass); font: italic 500 1.6rem/1.1 var(--display); }
.hero-points p { color: var(--champ); font-size: 1.06rem; line-height: 1.72; text-wrap: pretty; }
.hero-h a, .hero-points a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.hero-h a:hover, .hero-points a:hover { background-size: 100% 1px; }
@media (min-width: 900px) {
  .hero-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.2rem; }
  .hero-points li { grid-template-columns: 1fr; align-content: start; gap: .5rem; padding: 1.2rem 0 .2rem; }
  .hero-n { font-size: 2rem; }
  .hero-lite .hero-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.fn { position: relative; margin: 0 1px; color: var(--wine); font: 700 .7em/0 var(--sans); vertical-align: super; }
.hero-points .fn { color: var(--rose); }
.fn-tip { position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translate(-50%, 4px); padding: 6px 10px; border-radius: 4px;
  background: var(--ink); color: var(--paper); font: 500 12.5px/1.4 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.fn:hover .fn-tip, .fn:focus-visible .fn-tip { opacity: 1; transform: translate(-50%, 0); }
.nw { white-space: nowrap; }

/* 展開：酒標向下打開，露出一封淺色信 */
.hero-fold { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .65s var(--ease); }
.js .hero:not(.open) .hero-fold { grid-template-rows: 0fr; }
.hero-inner { min-height: 0; overflow: hidden; }
.letter { margin-top: 1.6rem; padding: clamp(22px, 4vw, 48px); border-radius: 3px; background: var(--paper-2); color: var(--ink);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .6); transition: opacity .5s ease .1s, transform .6s var(--ease); }
.js .hero:not(.open) .letter { opacity: 0; transform: translateY(-14px); }
.letter > * { max-width: 38.9rem; margin-inline: auto; }   /* 內文置中，好似一封信；各部分同一寬度，左邊緣對齊 */
.letter > p { font: 400 1.08rem/2.02 var(--serif); text-wrap: pretty; }
.letter > p + p { margin-top: 1.05em; }
.letter-note, .letter-src { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: .95rem; line-height: 1.85; }
.letter-h { margin-bottom: .35rem; color: var(--wine); font: 700 .85rem var(--sans); letter-spacing: .08em; }
.letter-src ol { padding-left: 1.3em; columns: 2 12em; column-gap: 2rem; }
.letter-src a:hover { color: var(--wine); text-decoration: underline; }
.hero-actions { margin-top: 1.5rem; }
.hero-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .7rem 1.25rem .7rem 1.4rem; border: 1px solid rgba(246, 239, 221, .5); border-radius: 999px;
  background: transparent; color: var(--champ); font: 500 .95rem var(--sans); cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.hero-btn:hover { border-color: var(--champ); background: var(--champ); color: var(--claret); }
.hero-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .45s var(--ease); }
.hero.open .hero-btn svg { transform: rotate(180deg); }
.hero-btn .lbl-close, .hero.open .hero-btn .lbl-open { display: none; }
.hero.open .hero-btn .lbl-close { display: inline; }

/* ─── 版面：側欄＋新聞流 ───────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  max-width: calc(var(--max) + 2 * var(--gut)); margin: clamp(2.4rem, 5vw, 3.6rem) auto 0; padding: 0 var(--gut); }
.rail { position: sticky; top: calc(var(--bar) + 1.2rem); display: flex; flex-direction: column; gap: 1.6rem;
  max-height: calc(100vh - var(--bar) - 2.4rem); overflow-y: auto; scrollbar-width: thin; }
.search { display: flex; align-items: center; gap: .55rem; padding: .45rem 0; border-bottom: 1.5px solid var(--rule); transition: border-color .2s; }
.search:focus-within { border-bottom-color: var(--wine); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 1rem var(--sans); }
.search input::placeholder { color: var(--mute); }
.cats { display: flex; flex-direction: column; gap: 2px; }
.cat { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 0; border-radius: 4px;
  background: transparent; color: var(--ink-2); font: 400 .95rem var(--sans); text-align: left; cursor: pointer; transition: background-color .2s, color .2s; }
.cat:hover { background: var(--tint); color: var(--ink); }
.cat-n { color: var(--mute); font: 500 .95rem var(--display); font-variant-numeric: lining-nums tabular-nums; }
.cat[aria-pressed="true"] { background: var(--claret); color: var(--champ); }
.cat[aria-pressed="true"] .cat-n { color: var(--champ-2); }
.dot { display: inline-block; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--d-ot); }
.dot-lg { background: var(--d-lg); } .dot-ec { background: var(--d-ec); } .dot-wd { background: var(--d-wd); }
.dot-cn { background: var(--d-cn); } .dot-tc { background: var(--d-tc); } .dot-lf { background: var(--d-lf); }
.dot-all { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.cat[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--claret), 0 0 0 3px rgba(246, 239, 221, .55); }
.cat[aria-pressed="true"] .dot-all { box-shadow: inset 0 0 0 1.5px var(--champ); }
.meter { padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.meter-h { color: var(--ink-2); font: 700 .85rem var(--serif); letter-spacing: .08em; }
.meter-bar { height: 3px; margin: .7rem 0 .55rem; overflow: hidden; border-radius: 2px; background: var(--rule); }
.meter-bar i { display: block; height: 100%; background: var(--wine); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s linear; }
.meter-t { display: flex; justify-content: space-between; gap: .5rem; color: var(--mute); font: 400 .8rem var(--sans); }
.meter-t b { color: var(--wine); font: 600 .95rem var(--display); }
:root[data-read="off"] .meter-read { display: none; }

.stream { min-width: 0; }
.feed-meta { padding-bottom: .9rem; border-bottom: 1px solid var(--rule); color: var(--mute); font-size: .85rem; }
.feed { padding: 0; list-style: none; }
.it { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); column-gap: 1.1rem; padding: 1.55rem 0; border-bottom: 1px solid var(--rule); }
.it-rank { padding-top: .1rem; color: var(--mute); font: italic 500 1.5rem/1.1 var(--display); text-align: right; font-variant-numeric: lining-nums; transition: opacity .3s; }
.it-top .it-rank { color: var(--wine); font-size: 2.7rem; line-height: .92; }
.it-cat { margin-bottom: .45rem; }
.tag { display: inline-flex; align-items: center; gap: .45rem; padding: 0; border: 0; background: none; color: var(--ink-2); font: 500 .8rem var(--sans); letter-spacing: .03em; cursor: pointer; transition: color .2s; }
.tag:hover { color: var(--wine); }
.it-h { max-width: 34em; color: var(--ink); font: 700 1.22rem/1.55 var(--serif); letter-spacing: .005em; text-wrap: pretty; }
.it-top .it-h { font-size: 1.5rem; font-weight: 900; line-height: 1.45; }
.it-h a { background: linear-gradient(var(--wine), var(--wine)) 0 100% / 0 1.5px no-repeat; transition: background-size .4s var(--ease), color .25s; }
.it-h a:hover { color: var(--wine); background-size: 100% 1.5px; }
.it-line { max-width: 40em; margin-top: .45rem; color: var(--ink-2); font-size: 1rem; line-height: 1.8; text-wrap: pretty; }
.it-src { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; margin-top: .6rem; color: var(--mute); font-size: .8rem; }
.it-also { color: var(--ink-2); }
.it-read { display: none; color: var(--wine); font-weight: 500; }
:root:not([data-read="off"]) .it.is-read .it-h a { color: var(--mute); }
:root:not([data-read="off"]) .it.is-read .it-rank { opacity: .45; }
:root:not([data-read="off"]) .it.is-read .it-read { display: inline; }
:root[data-density="compact"] .it-line { display: none; }
:root[data-density="compact"] .it { padding: 1.05rem 0; }
:root[data-density="compact"] .it-src { margin-top: .35rem; }
.ten { display: flex; align-items: center; gap: 1rem; padding: 1.8rem 0 .5rem; color: var(--wine); font: 700 .9rem var(--serif); letter-spacing: .12em; }
.ten::before, .ten::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--brass)); }
.ten::after { background: linear-gradient(90deg, var(--brass), transparent); }
.empty { padding: 3.5rem 0; color: var(--mute); text-align: center; }
.empty p { margin-bottom: .8rem; }

/* 分類切換的過場（支援的瀏覽器） */
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: var(--ease); }

/* ─── 小螢幕：側欄變成黏頂的分類列 ────────────────────────────────── */
@media (max-width: 1023px) {
  .layout { display: block; margin-top: 2rem; }
  .rail { display: contents; }
  .search { margin-bottom: .6rem; }
  .cats { position: sticky; top: var(--bar); z-index: 30; flex-direction: row; gap: .5rem; margin: 0 calc(-1 * var(--gut)); padding: .65rem var(--gut);
    overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--paper) 90%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: none; grid-template-columns: auto auto auto; gap: .45rem; padding: .42rem .85rem; border: 1px solid var(--rule); border-radius: 999px; font-size: .9rem; }
  .cat[aria-pressed="true"] { border-color: var(--claret); }
  .meter { display: none; }
  .stream { max-width: none; }
  .feed-meta { margin-top: .6rem; }
}
@media (max-width: 560px) {
  .it { grid-template-columns: 2.1rem minmax(0, 1fr); column-gap: .8rem; padding: 1.3rem 0; }
  .it-rank { font-size: 1.2rem; }
  .it-top .it-rank { font-size: 2rem; }
  .it-h { font-size: 1.12rem; }
  .it-top .it-h { font-size: 1.28rem; }
  .it-line { font-size: .96rem; }
  .hero { padding: 7px; border-radius: 5px; }
  .bar-logo { font-size: 1.12rem; }
  .bar-logo .mark { width: 19px; height: 19px; }
}

/* ─── 閱讀設定 ─────────────────────────────────────────────────────── */
.sheet { width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0;
  background: var(--paper-2); color: var(--ink); box-shadow: -24px 0 60px -20px rgba(42, 20, 22, .35); }
.sheet::backdrop { background: rgba(42, 27, 23, .38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheet-side .42s var(--ease); }
.sheet-in { display: flex; flex-direction: column; gap: 1.5rem; min-height: 100%; padding: 1.4rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.sheet-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.sheet-top h2 { color: var(--wine); font: 900 1.3rem var(--serif); letter-spacing: .04em; }
.sheet-x { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.sheet-x:hover { border-color: var(--wine); color: var(--wine); }
.sheet-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.opt { margin: 0; padding: 0; border: 0; }
.opt legend { margin-bottom: .6rem; padding: 0; color: var(--ink-2); font: 700 .85rem var(--sans); letter-spacing: .06em; }
.seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 3px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); }
.seg button { padding: .55rem .5rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 .9rem var(--sans); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button:hover { color: var(--wine); }
.seg button[aria-pressed="true"] { background: var(--claret); color: var(--champ); }
.opt .textbtn { margin-top: .75rem; font-size: .85rem; }
.sheet-note { margin-top: auto; color: var(--mute); font-size: .8rem; }
@media (max-width: 560px) {
  .sheet { width: 100vw; height: auto; max-height: 88dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; box-shadow: 0 -20px 50px -20px rgba(42, 20, 22, .4); }
  .sheet[open] { animation-name: sheet-up; }
}
@keyframes sheet-side { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ─── 其他頁面 ─────────────────────────────────────────────────────── */
.page { max-width: calc(46rem + 2 * var(--gut)); margin: 0 auto; padding: clamp(1.6rem, 5vw, 3rem) var(--gut) 0; }
.page-head { padding-bottom: 1.3rem; }
.page-head::after { content: ""; display: block; width: 48px; height: 2px; margin-top: 1.3rem; background: var(--wine); }
.page-h { color: var(--ink); font: 900 clamp(2rem, 5.4vw, 2.9rem)/1.3 var(--serif); letter-spacing: .01em; }
.page-sub { margin-top: .6rem; color: var(--mute); font-size: 1rem; }
.page-sub a, .back a { color: var(--wine); text-decoration: underline; text-underline-offset: .25em; }
.index { margin-top: 1rem; padding: 0; list-style: none; }
.index li { border-bottom: 1px solid var(--rule); }
.index-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1.5rem; align-items: baseline; padding: 1.35rem 0; }
.index-t { color: var(--ink); font: 700 1.35rem/1.45 var(--serif); background: linear-gradient(var(--wine), var(--wine)) 0 100% / 0 1.5px no-repeat; justify-self: start;
  transition: background-size .4s var(--ease), color .25s; }
.index-a:hover .index-t { color: var(--wine); background-size: 100% 1.5px; }
.index-d { grid-column: 1; color: var(--ink-2); font-size: .98rem; line-height: 1.7; }
.index-date { grid-row: 1; grid-column: 2; color: var(--mute); font: 600 .9rem var(--serif); letter-spacing: .04em; white-space: nowrap; }   /* 含中文字，不用斜體 */
.blank { margin-top: 1.6rem; padding: 2.2rem 1.5rem; border: 1px dashed var(--rule); border-radius: 6px; color: var(--mute); text-align: center; line-height: 1.9; }
.blank code { padding: .1em .45em; border-radius: 3px; background: var(--tint); color: var(--wine); font-size: .9em; }
.month { margin-top: 2.2rem; }
.month-h { padding-bottom: .6rem; border-bottom: 1px solid var(--wine); color: var(--wine); font: 700 1.05rem var(--serif); letter-spacing: .08em; }
.arch { padding: 0; list-style: none; }
.arch a { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .15rem 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--rule); }
.arch-day { grid-row: span 2; color: var(--wine); font: italic 500 2rem/1 var(--display); text-align: right; }
.arch-t { color: var(--ink); font: 700 1.1rem/1.5 var(--serif); transition: color .2s; }
.arch a:hover .arch-t { color: var(--wine); }
.arch-ed { color: var(--mute); font-size: .8rem; }
.prose .lead { margin-top: .4rem; color: var(--ink); font: 400 1.28rem/1.95 var(--serif); }
.prose h2 { margin-top: 2.4rem; color: var(--wine); font: 900 1.1rem var(--serif); letter-spacing: .06em; }
.prose p:not(.lead) { max-width: 36em; margin-top: .7rem; color: var(--ink-2); font-size: 1.02rem; line-height: 1.95; text-wrap: pretty; }
.contact { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.contact a { color: var(--wine); font-weight: 500; text-decoration: underline; text-underline-offset: .28em; text-decoration-thickness: 1px; }
.legacy-line { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-bottom: .8rem; color: var(--mute); font: 600 .9rem var(--serif); letter-spacing: .08em; }
.legacy-body { margin-top: 1.4rem; }
.legacy-body h2 { margin: 2.2rem 0 .6rem; color: var(--wine); font: 900 1.15rem var(--serif); }
.legacy-body p { margin: 0 0 .8em; color: var(--ink-2); line-height: 1.9; }
.legacy-body a { color: var(--wine); }
.legacy-body .editors-note { margin: 1rem 0 1.6rem; padding: 1.1rem 1.3rem; border-radius: 4px; background: var(--tint); }
.legacy-body img { max-width: 100%; height: auto; }
.lg-li { position: relative; padding-left: 1rem; }
.lg-li::before { content: ""; position: absolute; left: 0; top: .9em; width: 5px; height: 5px; border-radius: 50%; background: var(--wine); opacity: .6; }
.back { margin-top: 2rem; }

/* ─── 頁尾：與酒標同色，首尾呼應 ──────────────────────────────────── */
.ft { margin-top: clamp(3.5rem, 8vw, 6rem); padding: clamp(2.4rem, 5vw, 3.4rem) var(--gut) calc(2.2rem + env(safe-area-inset-bottom, 0px));
  background: var(--claret) var(--grain); color: var(--champ-2); }
.ft-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.6rem 3rem; align-items: center; max-width: var(--max); margin: 0 auto; }
.ft-brand { display: flex; align-items: center; gap: .9rem; color: var(--champ); }
.ft-brand .mark { width: 34px; height: 34px; }
.ft-brand p { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; }
.ft-name { color: var(--champ); font: 600 1.7rem/1 var(--display); }
.ft-motto { color: var(--champ-2); font: 600 .95rem var(--serif); letter-spacing: .1em; }
.ft-links { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .92rem; }
.ft-links a { color: var(--champ); }
.ft-links a:hover { text-decoration: underline; text-underline-offset: .28em; }
.ft .textbtn { color: var(--champ); font-weight: 400; text-decoration: none; }
.ft .textbtn:hover { text-decoration: underline; }
.ft-fine { grid-column: 1 / -1; padding-top: 1.3rem; border-top: 1px solid rgba(246, 239, 221, .15); color: var(--champ-2); font-size: .78rem; opacity: .85; }
.ft-ver { margin-left: 1.2em; white-space: nowrap; opacity: .75; }
@media (max-width: 720px) { .ft-in { grid-template-columns: 1fr; } }

/* ─── 載入：只編排一次（刊名、酒標揭開、頭幾條新聞） ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  .is-intro .plate { animation: rise .8s var(--ease) both; }
  .is-intro .hero { animation: unveil 1.05s cubic-bezier(.7, 0, .2, 1) .15s both; }
  .is-intro .hero-top { animation: fade .6s ease .75s both; }
  .is-intro .hero-h { animation: rise .8s var(--ease) .82s both; }
  .is-intro .hero-points, .is-intro .hero-thesis { animation: fade .8s ease 1s both; }
  .is-intro .hero-actions { animation: fade .6s ease 1.15s both; }
  .is-intro .it { animation: rise .6s var(--ease) both; animation-delay: calc(1.05s + var(--i, 0) * 55ms); }
  .is-intro .search, .is-intro .cats, .is-intro .meter, .is-intro .feed-meta { animation: fade .7s ease 1s both; }   /* 側欄與分類跟新聞一齊出現，唔會搶先 */
  .is-intro .page-head { animation: rise .7s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes unveil { from { clip-path: inset(0 0 100% 0 round 6px); } to { clip-path: inset(0 0 0 0 round 6px); } }

/* ─── 換頁過場：原生跨頁過場；唔支援嘅瀏覽器用 JS 後備（淡出後跳轉、新頁淡入）─── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .bar { view-transition-name: bar; }
  #main { view-transition-name: page; }
  ::view-transition-group(bar) { animation-duration: 0s; }
  ::view-transition-old(page) { animation: vt-out .14s ease-in both; }
  ::view-transition-new(page) { animation: vt-in .32s var(--ease) both; }
  html[data-vt="filter"]::view-transition-old(page), html[data-vt="filter"]::view-transition-new(page) { animation: none; }
  ::view-transition-old(feed) { animation: vt-out .12s ease-in both; }
  ::view-transition-new(feed) { animation: vt-in .28s var(--ease) both; }
  html.is-leaving #main { opacity: 0; transform: translateY(-4px); transition: opacity .16s ease-in, transform .16s ease-in; }
  html.is-enter #main { animation: vt-in .32s var(--ease) both; }
  /* 轉分類：頭幾條新聞錯開升入（JS 設定 --i；唔支援過場嘅瀏覽器都有呢個效果）*/
  html.is-switching .it:not([hidden]) { animation: vt-in .34s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
  .cat { transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease); }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ─── 專業速覽：五個核心版面各一條頭條 ─── */
.spot { margin: 1.1rem 0 0; padding: .9rem 0 .2rem; border-top: 1px solid var(--rule); }
.spot-k { margin: 0 0 .55rem; color: var(--ink-2); font: 500 .76rem/1 var(--sans); letter-spacing: .14em; }
.spot-l { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.spot-c { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.spot-t { align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .7rem; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink); font: 500 .82rem/1.2 var(--sans); cursor: pointer; }
.spot-t b { color: var(--wine); font-weight: 700; }
.spot-t:hover { border-color: var(--claret); }
.spot-a { color: var(--ink); font: 600 .95rem/1.5 var(--serif); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spot-a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: .25em; }
.spot-none { color: var(--ink-2); font-size: .88rem; }
@media (max-width: 1023px) { .spot-l { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(72vw, 16rem); overflow-x: auto; scrollbar-width: none; padding-bottom: .4rem; } .spot-l::-webkit-scrollbar { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media print {
  .bar, .rail, .ft, .progress, .hero-actions, .sheet { display: none !important; }
  .js .hero:not(.open) .hero-fold { grid-template-rows: 1fr; }
  .js .hero:not(.open) .letter { opacity: 1; transform: none; }
  body { background: #fff; }
}
