/* 視訊撲克攻略｜v06 應援團正式框架對應層。
   tokens.css 是 primitive/semantic 單一事實來源；本檔只映射本站既有元件與三欄版面。 */
:root {
  --paper: var(--fc-bg);
  --card: var(--fc-paper);
  --ink: var(--fc-ink);
  --ink-soft: var(--fc-mute);
  --line: var(--fc-line);
  --primary: var(--fc-brown);
  --primary-soft: var(--fc-paper-2);
  --primary-dark: var(--fc-brown-dk);
  --accent: var(--fc-seal);
  --star: var(--fc-gold);
  --radius: var(--fc-r);
  --radius-s: var(--fc-r-sm);
  --font-body: var(--fc-font-body);
  --font-head: var(--fc-font-head);
}
* { box-sizing: border-box; }
body { color: var(--ink); font: 16px/1.75 var(--font-body); }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; }
img { max-width: 100%; height: auto; }
small { color: var(--ink-soft); }

/* ── 品牌看板頂欄＋雙欄基底 ─────────────────── */
.gate .row { height: 72px; }
.plaque { color: var(--ink); min-width: max-content; }
.plaque:hover { color: var(--ink); text-decoration: none; }
.plaque > span:nth-child(2) { display: grid; line-height: 1.12; }
.plaque small { font-family: var(--font-body); color: var(--ink-soft); font-size: 11px; font-weight: 500; letter-spacing: .06em; margin-top: 4px; }
.roadmark { width: 36px; height: 36px; padding: 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--fc-line-strong); background: var(--fc-paper-2); border-radius: var(--fc-r-sm); }
.roadmark i { display: block; border: 2px solid var(--fc-seal); border-radius: 50%; }
.roadmark i:nth-child(2), .roadmark i:nth-child(3) { border-color: var(--fc-brown); }
.side-nav { display: flex; align-items: stretch; gap: 2px; }
.side-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 11px; color: var(--ink); font-weight: 700; font-size: 14px; border-radius: var(--fc-r-sm); }
.side-nav a:hover { background: var(--fc-paper-2); color: var(--ink); text-decoration: none; }
.side-nav a.sitting { color: var(--fc-seal); border-bottom: 2px solid var(--fc-seal); border-radius: 0; }
.side-nav .icn { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--fc-line); color: var(--fc-mute); font-family: var(--font-head); font-size: 11px; }
.side-nav a.sitting .icn { border-color: var(--fc-seal); color: var(--fc-seal); }
.page-house { min-height: 70vh; }
.page-house > .notice { margin-bottom: 18px; }
.hall { grid-template-columns: minmax(0, 1fr) 296px; }
.main { min-width: 0; }
.main-seat { gap: 0; }

/* ── 首頁中欄 ───────────────────────────────── */
.home-center { min-width: 0; max-width: 720px; }
.panel { background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: var(--radius); box-shadow: var(--fc-shadow-sm); padding: 20px 22px; }
.panel-title { font-size: 22px; margin-bottom: 4px; }
.panel-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }

/* story 圓圈工具列 */
.story-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.story { flex: none; width: 92px; text-align: center; font-size: 12px; color: var(--ink); }
.story-ic { width: 58px; height: 58px; margin: 0 auto 5px; border-radius: var(--fc-r-sm); background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 25px; box-shadow: inset 0 0 0 4px var(--fc-paper-2); }
.story:hover .story-ic { border-color: var(--accent); }
.story.on .story-ic { border-color: var(--accent); position: relative; }
.story span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 主打工具表單 */
.main-tool { margin-bottom: 22px; border-top: 3px solid var(--accent); position: relative; overflow: hidden; box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 16%, transparent); }
.main-tool::after { content: "球"; position: absolute; right: 24px; top: -8px; font: 900 92px/1 var(--font-head); color: color-mix(in srgb, var(--accent) 8%, transparent); transform: rotate(-8deg); pointer-events: none; }
.main-tool > * { position: relative; z-index: 1; }
.tool-form { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 700; font-size: 13px; }
.field input, .field select, .field textarea { font: inherit; padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); width: 100%; }
.field small { font-size: 12px; }
.radio { margin-right: 12px; font-size: 14px; }
.btn-main, .btn-ghost { display: inline-block; font-family: var(--font-head); font-weight: 800; border-radius: var(--fc-pill); padding: 11px 24px; cursor: pointer; border: none; letter-spacing: .04em; }
.btn-main { background: var(--accent); color: var(--fc-btn-text); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 26%, transparent); }
.btn-main:hover { background: var(--fc-seal-dk); color: var(--fc-btn-text); }
.btn-ghost { background: transparent; color: var(--primary-dark); border: 1px solid var(--primary); }

/* ── 結果貼文卡（feed） ─────────────────────── */
.feed { display: grid; gap: 18px; }
.feed-wide { max-width: 780px; }
.post { background: linear-gradient(135deg, color-mix(in srgb, var(--star) 4%, var(--card)), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--fc-shadow-sm); padding: 18px 20px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pavatar { width: 42px; height: 42px; border-radius: var(--radius-s); background: var(--primary-soft); border: 1px solid var(--line); color: var(--primary-dark); font: 700 17px var(--font-head); display: flex; align-items: center; justify-content: center; flex: none; }
.post-head b { font-size: 15px; }
.post-head .ptag { font-size: 12px; background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1px 9px; }
.post-head small { display: block; font-size: 12px; }
.post-say { font-size: 15px; margin: 6px 0 12px; }
.post-fig { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.post-fig img { display: block; width: 100%; }
.post-fig .fig-tag { position: absolute; left: 10px; bottom: 10px; background: color-mix(in srgb, var(--fc-n-l12) 88%, transparent); color: var(--fc-n-l2); font-size: 12px; border-radius: var(--radius-s); padding: 2px 10px; }
.post-sum { display: block; border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 10px 14px; background: var(--card); margin-bottom: 10px; position: relative; }
.post-sum::after { content: "已驗"; position: absolute; right: 12px; top: 10px; color: var(--accent); border: 1px solid var(--accent); border-radius: 2px; padding: 1px 5px; font: 700 10px var(--font-head); letter-spacing: .14em; transform: rotate(-6deg); }
.post-sum b, .post-sum p { padding-right: 52px; }
.post-sum b { font-size: 15px; }
.post-sum p { font-size: 13px; color: var(--ink-soft); }
.post-rate { background: var(--primary-soft); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.stars { color: var(--star); letter-spacing: 2px; font-size: 14px; }
.post-rate q { display: block; color: var(--ink); quotes: "「" "」"; margin-top: 2px; }
.post-act { display: flex; flex-wrap: wrap; gap: 18px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13px; color: var(--ink-soft); }
.post-act > :first-child { color: var(--accent); }
.post-act a, .post-act span { color: var(--ink-soft); }
.post-act a:hover { color: var(--accent); }
.feed-more { display: block; text-align: center; padding: 12px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); font-weight: 700; }

/* 探索動態 */
.explore-head { margin: 4px 0 18px; }
.explore-head h1 { font-size: 24px; }
.explore-head p { color: var(--ink-soft); font-size: 14px; }

/* ── 右欄 rail ─────────────────────────────── */
.rail { display: grid; gap: 16px; position: sticky; top: 92px; }
.rail-panel { padding: 16px 18px; }
.rail-title { font-size: 15px; margin-bottom: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--paper); border-radius: var(--radius-s); text-align: center; padding: 10px 4px; }
.stat + .stat { border-left: 1px solid var(--line); border-radius: 0; }
.stat b { display: block; font-size: 20px; color: var(--primary-dark); }
.stat span { font-size: 12px; color: var(--ink-soft); }
.hot-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line); color: var(--ink); }
.hot-item:last-of-type { border-bottom: none; }
.hot-rank { width: 20px; text-align: center; flex: none; }
.hot-item b { font-weight: 700; }
.hot-item .hn { margin-left: auto; color: var(--ink-soft); font-size: 12px; }
.pick { display: block; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--ink); }
.pick:last-of-type { border-bottom: none; }
.pick b { display: block; }
.pick small { font-size: 12px; }
.rail-link { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; }

/* ── 內容頁（工具/文章/列表沿用中欄卡片語言） ── */
.crumbs { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.crumbs span { color: var(--ink); }
.tool-page, .article-page, .list-page, .bucket-page, .prose-page { max-width: 780px; }
.tool-head { margin: 4px 0 14px; }
.tool-head h1 { font-size: 25px; margin: 6px 0 4px; }
.tool-tagline { color: var(--ink-soft); }
.wall-type, .post-cat, .rel-cat { display: inline-block; font-size: 12px; color: var(--accent); border: 1px solid currentColor; border-radius: var(--radius-s); padding: 0 8px; }
#tool-form.tool-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tool-result { background: var(--card); border: 2px solid var(--primary); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.metric { background: var(--paper); border-radius: var(--radius-s); padding: 10px; text-align: center; }
.metric b { display: block; font-size: 20px; color: var(--primary-dark); }
.metric span { font-size: 12px; color: var(--ink-soft); }
.share-bar { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-size: 14px; }
.share-bar a, .share-bar button { display: inline-block; margin: 4px 6px 0 0; padding: 6px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.share-bar a:hover, .share-bar button:hover { border-color: var(--accent); color: var(--accent); }
.result-bucket { font-family: var(--font-head); font-size: 22px; color: var(--accent); margin-bottom: 6px; }
.howto { margin: 20px 0; }

/* 桶頁 */
.thread-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.thread-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-s); background: repeating-linear-gradient(45deg, var(--primary) 0 6px, var(--accent) 6px 12px); flex: none; }
.bucket-name { font-size: 28px; color: var(--accent); margin: 6px 0; }
.replay-empty { margin-top: 10px; color: var(--ink-soft); font-size: 14px; }
.btn-cta { display: block; text-align: center; margin: 16px 0; font-size: 17px; }
.bucket-read { margin: 18px 0; }

/* 文章 */
.article-head h1 { font-size: 26px; margin: 8px 0 6px; }
.byline { font-size: 13px; color: var(--ink-soft); }
.hero { border-radius: var(--radius); border: 1px solid var(--line); margin: 14px 0; box-shadow: var(--fc-shadow); }
.tldr { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: var(--radius-s); padding: 12px 18px; margin: 14px 0; font-size: 14px; }
.tldr ul { margin: 6px 0 0 20px; }
.tldr li { padding: 2px 0; }
.toc { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 12px 18px; margin: 14px 0; font-size: 14px; }
.toc ol { margin: 6px 0 0 20px; }
.prose h2 { margin: 26px 0 10px; font-size: 21px; border-left: 4px solid var(--accent); border-bottom: 1px double var(--line); padding: 0 0 6px 12px; }
.prose h3 { margin: 18px 0 8px; font-size: 17px; }
.prose p, .prose ul, .prose ol { margin: 10px 0; }
.prose ul, .prose ol { padding-left: 24px; }
.prose blockquote { border-left: 4px double var(--primary); background: var(--card); padding: 10px 14px; margin: 12px 0; font-family: var(--font-head); }
.table-scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
th { background: var(--paper); font-weight: 700; }
.faq { margin: 22px 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; margin: 8px 0; }
.faq summary { font-family: var(--font-head); font-weight: 700; cursor: pointer; }
.faq summary::before { content: "問："; color: var(--accent); }
.faq details p::before { content: "答："; color: var(--fc-green); font-weight: 700; }
.tool-cta { display: block; background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.tool-cta span { font-size: 12px; color: var(--accent); }
.tool-cta strong { display: block; font-size: 17px; font-family: var(--font-head); }
.tool-cta em { font-style: normal; font-size: 13px; color: var(--accent); }
.sources { font-size: 14px; margin: 18px 0; }
.sources ul { padding-left: 22px; }
.related { margin: 22px 0; }
.related h2 { font-size: 18px; margin-bottom: 10px; }
.wall-grid, .post-grid, .rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.wall-card, .post-card, .rel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: block; color: var(--ink); }
.wall-card:hover, .post-card:hover, .rel-card:hover { border-color: var(--primary); color: var(--ink); }
.wall-card strong, .rel-card strong { display: block; margin: 4px 0 2px; font-size: 15px; }
.wall-card small { display: block; font-size: 12px; }
.post-card h3 { font-size: 15px; margin: 6px 0 4px; }
.post-card p { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.list-head { margin: 4px 0 16px; }
.list-head h1 { font-size: 24px; }
.list-head p { color: var(--ink-soft); }
.pillar-banner { display: block; background: linear-gradient(105deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius); padding: 16px 20px; margin: 0 0 18px; }
.pillar-banner span { font-size: 12px; opacity: .85; display: block; }
.pillar-banner strong { font-size: 18px; font-family: var(--font-head); display: block; margin: 2px 0; }
.pillar-banner em { font-style: normal; font-size: 13px; opacity: .9; }
.pillar-banner:hover { color: #fff; filter: brightness(1.08); }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 0 0; font-size: 13px; color: var(--ink-soft); }
.foot-note { margin: 8px 0 4px; }

/* ── 雜誌式專欄 ─────────────────────────────── */
.mag-big { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); margin: 14px 0; max-width: 780px; }
.mag-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mag-big-txt { padding: 16px 18px; }
.mag-big-txt h3 { font-size: 19px; margin: 6px 0; }
.mag-big-txt p { font-size: 13px; color: var(--ink-soft); }
.mag-big-txt small { display: block; margin-top: 8px; font-size: 12px; }
.mag-big:hover { border-color: var(--primary); color: var(--ink); }
.mag-hero .mag-big-txt h3 { font-size: 23px; }
.mag-path { max-width: 780px; margin: 18px 0; }
.path-list { margin: 6px 0 0 22px; font-size: 14px; }
.path-list li { padding: 4px 0; }
.path-list b { color: var(--accent); margin-right: 6px; font-family: var(--font-head); }
.mag-hot { max-width: 780px; margin: 22px 0; }
.hot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hot-grid .mag-big { grid-template-columns: 1fr; margin: 0; }
.hot-grid .mag-big img { aspect-ratio: 1200/630; }
.mag-sec { max-width: 780px; margin: 26px 0; }
.mag-sec-head { display: flex; align-items: baseline; justify-content: space-between; border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 10px; }
.mag-sec-head h2 { font-size: 20px; }
.mag-sec-head a { font-size: 13px; font-weight: 700; }
.mag-sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.mag-sec-grid .mag-big { grid-template-columns: 1fr; margin: 0; }
.mag-list { display: grid; gap: 8px; }
.mag-row { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; color: var(--ink); }
.mag-row:hover { border-color: var(--primary); color: var(--ink); }
.mag-row b { display: block; font-size: 14px; }
.mag-row small { font-size: 12px; }
.mag-cat-rest { max-width: 780px; margin-top: 12px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; max-width: 780px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-s); padding: 4px 14px; font-size: 13px; color: var(--ink); }
.chip.on, .chip:hover { border-color: var(--accent); color: var(--accent); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; max-width: 780px; }
.pn { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; color: var(--ink); }
.pn b { display: block; font-size: 14px; }
.pn-r { text-align: right; }
.pn:hover { border-color: var(--primary); color: var(--ink); }
@media (max-width: 700px) { .mag-big, .mag-sec-grid, .hot-grid, .prev-next { grid-template-columns: 1fr; } }

/* 貼文獨立頁與留言 */
.post-single { max-width: 720px; }
.comments { max-width: 720px; margin: 18px 0; }
.cmt { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cmt:last-child { border-bottom: none; }
.cmt .pavatar { width: 34px; height: 34px; font-size: 14px; }
.cmt b { font-size: 14px; }
.cmt p { font-size: 14px; color: var(--ink); }
.cmt-empty { color: var(--ink-soft); font-size: 14px; }

/* profile 頁 */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; max-width: 780px; }
.profile-head h1 { font-size: 24px; }
.pavatar-lg { width: 64px; height: 64px; font-size: 26px; border-radius: var(--radius); }

/* ── 響應式：右欄收合、頂欄保留可橫捲館區 ── */
@media (max-width: 1080px) {
  .gate .join { display: none; }
  .gate .row { gap: 10px; }
  .side-nav a { padding-inline: 8px; }
  .side-nav .icn { display: none; }
}
@media (max-width: 900px) {
  .hall { grid-template-columns: 1fr; }
  .side-seat { display: none; }
  .gate .row { height: auto; min-height: 64px; flex-wrap: wrap; padding-block: 9px; }
  .plaque { flex: 1; }
  .gate .side-nav { display: flex; order: 3; width: 100%; overflow-x: auto; padding-top: 7px; border-top: 1px solid var(--line); scrollbar-width: thin; }
  .side-nav a { flex: none; }
  .page-house { padding-inline: 14px; }
}
@media (max-width: 560px) {
  .plaque small, .plaque .stamp { display: none; }
  .roadmark { width: 32px; height: 32px; }
  .main-tool, .panel, .post { padding: 16px; }
  .notice { align-items: flex-start; }
  .post-sum::after { display: none; }
  .post-sum b, .post-sum p { padding-right: 0; }
}

/* 鍵盤操作與動態偏好 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  a, button, .post, .panel, .wall-card, .mag-big, .mag-row { transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
  .wall-card:hover, .mag-row:hover { transform: translateY(-2px); box-shadow: var(--fc-shadow); }
}

/* ── IPB 三欄契約：v06 只換視覺，不換欄位角色 ── */
body { min-width: 0; overflow-x: clip; }
.site-shell { display: grid; grid-template-columns: 236px minmax(0, 760px) 296px; gap: 22px; max-width: 1360px; min-height: 100vh; margin: 0 auto; padding: 22px; align-items: start; }
.site-shell__left { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; scrollbar-width: thin; background: color-mix(in srgb, var(--fc-paper) 94%, transparent); border: 1px solid var(--fc-line); border-top: 3px solid var(--fc-brown); box-shadow: var(--fc-shadow-sm); padding: 14px; }
.site-shell__main { min-width: 0; padding: 0; }
.site-shell__right { position: sticky; top: 18px; display: grid; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); padding: 2px 2px 14px; border-bottom: 1px double var(--line); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-txt { display: grid; font: 900 19px/1.15 var(--font-head); }
.brand-txt small { font: 500 10px/1.4 var(--font-body); letter-spacing: .04em; margin-top: 3px; }
.brand .stamp { margin-left: auto; padding: 4px 9px; color: var(--fc-btn-text); background: var(--accent); border-radius: var(--fc-pill); font: 800 10px var(--font-head); letter-spacing: 2px; }
.mode-switch { width: 100%; height: auto; min-height: 40px; margin: 12px 0 4px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.mode-switch::before { content: none !important; }
.mode-icon { font-size: 16px; }
.side-nav { display: grid; gap: 3px; padding: 10px 0 4px; border-bottom: 1px solid var(--line); }
.side-nav a, .category-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 9px; color: var(--ink); font-weight: 650; font-size: 13px; border-radius: var(--fc-r-sm); }
.side-nav a:hover, .category-nav a:hover { background: var(--fc-paper-2); color: var(--ink); text-decoration: none; }
.side-nav a.active { background: var(--fc-paper-2); color: var(--fc-seal); box-shadow: inset 3px 0 var(--fc-seal); }
.side-nav .icn, .category-nav .icn { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--fc-line); color: var(--fc-brown); font: 700 11px var(--font-head); }
.side-sec { margin: 0; padding: 13px 6px 5px; color: var(--ink-soft); font: 700 11px var(--font-head); letter-spacing: .12em; }
.category-nav { display: grid; }
.category-nav a:nth-child(n+7) { display: none; }
.person-entry > a { display: flex; gap: 9px; align-items: center; padding: 8px; color: var(--ink); background: var(--fc-paper-2); border: 1px solid var(--fc-line); }
.person-entry > a:hover { text-decoration: none; border-color: var(--fc-brown); }
.person-entry small { display: block; font-size: 10px; }
.member-state { padding-bottom: 4px; }
.member-counts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--card); }
.member-counts > * { display: grid; text-align: center; padding: 7px 2px; color: var(--ink); }
.member-counts > * + * { border-left: 1px solid var(--line); }
.member-counts b { font: 700 12px var(--font-head); color: var(--primary-dark); }
.member-counts span { font-size: 10px; color: var(--ink-soft); }
.member-cta { display: block; margin-top: 7px; padding: 9px; color: var(--fc-btn-text); background: var(--accent); text-align: center; border-radius: var(--fc-pill); font: 800 12px var(--font-head); }
.member-cta:hover { color: var(--fc-btn-text); text-decoration: none; filter: brightness(.94); }

.home-center { max-width: none; display: grid; gap: 22px; }
.editorial-hero { display: grid; grid-template-columns: 1fr; padding: 0; overflow: hidden; border-top: 3px solid var(--fc-seal); }
.hero-media { min-height: 0; aspect-ratio: 16/9; background: var(--fc-paper-2); overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { padding: 26px 24px; align-self: center; position: relative; }
.hero-copy::after { content: "報"; position: absolute; right: 14px; top: 6px; color: color-mix(in srgb, var(--fc-seal) 10%, transparent); font: 900 82px/1 var(--font-head); transform: rotate(-8deg); pointer-events: none; }
.hero-copy > * { position: relative; z-index: 1; }
.hero-copy h1 { font-size: clamp(25px, 3vw, 36px); margin: 12px 0; }
.hero-copy h1 a { color: var(--ink); }
.hero-copy p { color: var(--ink-soft); font-size: 14px; }
.hero-meta { display: flex; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px double var(--line); font-size: 12px; }
.main-tool { margin: 0; }
.story-row { margin: 0 -4px 4px; }
.story { width: 72px; }
.story-ic { width: 48px; height: 48px; font-size: 21px; }
.tool-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 8px 10px; background: var(--fc-paper-2); border-left: 3px solid var(--fc-green); color: var(--ink-soft); font-size: 12px; }
.tool-status span { color: var(--fc-green); font-weight: 800; }
.section-heading { display: flex; align-items: center; gap: 9px; border-bottom: 1px double var(--line); padding-bottom: 9px; }
.section-heading .seal-dot, .rail-title .seal-dot { display: inline-block; width: 9px; height: 9px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading a { margin-left: auto; font-size: 12px; font-weight: 700; }
.latest-editorials { display: grid; gap: 12px; }
.latest-editorials .papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.latest-editorials .paper { display: block; padding: 0; color: var(--ink); overflow: hidden; }
.latest-editorials .scroll { width: 100%; height: 118px; object-fit: cover; }
.latest-editorials .sheet { display: grid; gap: 5px; padding: 13px; }
.latest-editorials .sheet strong { font: 700 15px/1.45 var(--font-head); }
.latest-editorials .sheet small { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 11px; }
.paper-author { margin-top: 3px; color: var(--fc-brown); font-size: 10px; }
.rail-panel { padding: 15px; }
.rail-title { display: flex; align-items: center; gap: 8px; border-bottom: 1px double var(--line); padding-bottom: 8px; }
.hot-rank { border: 1px solid var(--fc-line); color: var(--fc-seal); font: 700 11px var(--font-head); }
.hot-item { align-items: flex-start; }
.hot-item b { flex: 1; }
.hot-item small { display: none; }
.hot-item .hn { white-space: nowrap; }
.person-pick { border-top: 1px dashed var(--line); }
.community-card { border-top: 3px solid var(--fc-seal); }
.community-card h2 { margin: 10px 0 6px; font-size: 19px; }
.community-card p { margin-bottom: 12px; color: var(--ink-soft); font-size: 12px; }
.community-card .btn-main { display: block; text-align: center; }
.mobile-shell-tools, .mobile-tabs, .shell-backdrop { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .editorial-hero, .main-tool, .post, .latest-editorials .paper { animation: paper-settle .42s ease both; }
  .main-tool { animation-delay: .06s; }
  .post:nth-child(2) { animation-delay: .1s; }
  @keyframes paper-settle { from { opacity: 0; transform: translateY(7px) rotate(.15deg); } to { opacity: 1; transform: none; } }
}

@media (max-width: 1179px) {
  .site-shell { grid-template-columns: minmax(0, 1fr) 286px; max-width: 1080px; }
  .site-shell__main { grid-column: 1; }
  .site-shell__right { grid-column: 2; }
  .site-shell__left { position: fixed; z-index: 120; left: 0; top: 0; bottom: 0; width: min(290px, 88vw); max-height: none; transform: translateX(-105%); transition: transform .22s ease; }
  body[data-shell-panel="left"] .site-shell__left { transform: none; }
  .mobile-shell-tools { display: flex; justify-content: space-between; margin-bottom: 12px; }
  .mobile-shell-tools button { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 8px 12px; font: 700 12px var(--font-head); }
  .shell-backdrop { position: fixed; z-index: 110; inset: 0; border: 0; background: rgba(20, 14, 9, .5); }
  body[data-shell-panel] .shell-backdrop { display: block; }
}

@media (max-width: 899px) {
  body { padding-bottom: 68px; }
  .site-shell { display: block; padding: 14px; }
  .site-shell__right { position: fixed; z-index: 120; right: 0; top: 0; bottom: 0; width: min(310px, 91vw); overflow-y: auto; padding: 14px; background: var(--fc-bg); transform: translateX(105%); transition: transform .22s ease; }
  body[data-shell-panel="right"] .site-shell__right { transform: none; }
  .mobile-tabs { position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--fc-paper) 96%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(35, 25, 16, .12); backdrop-filter: blur(14px); }
  .mobile-tabs a { display: grid; place-items: center; color: var(--ink-soft); font-size: 10px; }
  .mobile-tabs span { font: 700 15px var(--font-head); color: var(--fc-seal); }
  .editorial-hero { grid-template-columns: 1fr; }
  .latest-editorials .papers { grid-template-columns: 1fr; }
  .latest-editorials .paper { display: grid; grid-template-columns: 116px 1fr; }
  .latest-editorials .scroll { height: 100%; min-height: 118px; }
}

@media (max-width: 460px) {
  .site-shell { padding: 10px; }
  .editorial-hero .hero-copy { padding: 20px 17px; }
  .hero-copy h1 { font-size: 25px; }
  .main-tool, .panel, .post { padding: 15px; }
  .post-act { gap: 10px; }
  .latest-editorials .paper { grid-template-columns: 96px 1fr; }
  .mobile-shell-tools { position: sticky; top: 0; z-index: 50; padding: 5px 0; background: var(--fc-bg); }
}

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

/* 聯播網版位：無素材 hidden 完全塌陷；有素材才沿本站卡片皮膚展開。 */
.sponsorSpot[hidden] { display: none !important; }
.sponsorSpot { box-sizing: border-box; position: relative; margin: 14px 0; padding: 14px; border: 1px solid var(--line, rgba(128,128,128,.28)); border-radius: var(--radius, 10px); background: var(--card, var(--paper, #fff)); color: var(--ink, inherit); overflow: hidden; }
.sponsorSpot-tag { display: inline-block; margin-bottom: 8px; padding: 2px 7px; border-radius: 999px; background: var(--accent, #4338ca); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.sponsorSpot .adn-title { margin: 2px 0 6px; font-size: 18px; font-weight: 800; }
.sponsorSpot .adn-hook, .sponsorSpot .adn-body { margin: 6px 0; color: var(--muted, var(--mut, #626b78)); }
.sponsorSpot .adn-bullets { margin: 8px 0; padding-left: 20px; }
.sponsorSpot .adn-cta { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; margin-top: 10px; padding: 10px 16px; border-radius: 9px; background: var(--accent, #4338ca); color: #fff; font-weight: 800; text-decoration: none; }
.sponsorSpot .adn-imglink img { width: 100%; height: auto; border-radius: 8px; }
.sponsorSpot--top { max-width: 1280px; margin: 10px auto; }
.sponsorSpot--top .adn-imglink img { width: 100%; max-height: 140px; aspect-ratio: 970 / 90; object-fit: cover; object-position: center; }
.sponsorSpot--side-a, .sponsorSpot--side-b { font-size: 14px; }
.sponsorSpot--sticky { position: fixed; left: 10px; right: 10px; bottom: 76px; z-index: 900; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.24); }
.sponsorSpot--sticky [data-ad-body] { display: flex; align-items: center; gap: 10px; flex: 1; }
.sponsorSpot--sticky [data-ad-close] { border: 0; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
@media (max-width: 768px) { .sponsorSpot .adn-cta { width: 100%; } .sponsorSpot--sticky { bottom: 72px; } }

/* 視訊撲克攻略站內變體 */
:root{--brand:#8a2f12;--brand-2:#142018;--gold:#f3c566}body{background-image:radial-gradient(circle at 82% -8%,rgba(199,220,50,.16),transparent 29%),linear-gradient(180deg,rgba(213,31,121,.035),transparent 38%)}.hero-media img{object-position:center 42%}.tool-card:focus-within,.feed-card:hover{border-color:rgba(213,31,121,.48)}
