/* 4388 小遊戲：基本樣式＋多套風格（正式用 .theme-mag 雜誌精選）；分類一直見到 */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f1f3f6;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-weak: #eaf1ff;
  --star: #f59e0b;
  --up: #15803d;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Hiragino Sans", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 頂部 */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1320px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; white-space: nowrap; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--soft); }
.search input:focus { background: var(--surface); border-color: var(--accent); outline: none; }
.search button { height: 40px; padding: 0 16px; border: 0; border-radius: 0 10px 10px 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.search button:hover { background: var(--accent-ink); }
.lang { font-size: 14px; color: var(--muted); white-space: nowrap; padding: 8px 4px; }
@media (max-width: 639px) {
  .top-in { flex-wrap: wrap; gap: 8px 12px; padding-bottom: 8px; }
  .lang { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
}

/* 分類：手機用頂部橫掃列，桌面用左欄 */
.cats-bar { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.cats-bar::-webkit-scrollbar { display: none; }
.cats-bar .cat { flex: none; display: flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; white-space: nowrap; }
.cats-bar .cat .n { font-size: 12px; color: var(--muted); }
.cats-bar .cat.on { background: var(--accent); color: #fff; }
.cats-bar .cat.on .n { color: #dbe6ff; }

.layout { max-width: 1320px; margin: 0 auto; padding: 16px; }
.side { display: none; }

@media (min-width: 1024px) {
  .cats-bar { display: none; }
  .layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 24px; padding-top: 20px; }
  .side { display: block; position: sticky; top: 82px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
  .side-cats { display: flex; flex-direction: column; gap: 2px; }
  .side-cats .cat { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
  .side-cats .cat:hover { background: var(--surface); }
  .side-cats .cat.on { background: var(--accent-weak); color: var(--accent-ink); font-weight: 600; }
  .side-cats .cat .n { color: var(--muted); font-size: 13px; }
}
.up { color: var(--up); font-weight: 700; }

/* 區塊 */
.block { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head h1, .block-head h2 { margin: 0; font-size: 20px; }
.block-head a { color: var(--muted); font-size: 14px; white-space: nowrap; }
.more { margin: 12px 0 0; text-align: right; font-size: 14px; }
.more a { color: var(--accent-ink); }
.empty { padding: 24px 0; text-align: center; }

/* 首頁頂一行說明：新訪客一眼知道呢度做乜 */
.intro { margin: 0 0 12px; grid-column: 1 / -1; }
.intro h1 { margin: 0; font-size: 22px; line-height: 1.3; }
.intro p { margin: 4px 0 0; font-size: 14px; }
@media (max-width: 639px) { .intro h1 { font-size: 19px; } }

/* 首頁：推薦分頁＋右邊排行榜 */
.home { display: grid; grid-template-columns: minmax(0, 1fr); }
.home > * { grid-column: 1 / -1; }
@media (min-width: 1280px) {
  .home { grid-template-columns: minmax(0, 1fr) 280px; column-gap: 16px; align-items: start; }
  .home > .tabs-block { grid-column: 1; }
  .home > .ranks { grid-column: 2; }
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px 10px; font-size: 16px; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }

.ranks h2 { margin: 0 0 8px; font-size: 18px; }
.ranks h3 { margin: 12px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.rank-cols { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 640px) and (max-width: 1279px) { .rank-cols { grid-template-columns: 1fr 1fr; } }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--soft); }
.rank li:last-child { border-bottom: 0; }
.rank a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .no { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--soft); color: var(--muted); }
.rank .no.top3 { background: var(--accent); color: #fff; }

/* 遊戲卡：成張卡（圖＋名＋簡介）撳落即開遊戲 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 20px 16px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; } }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-play { display: block; }
.thumb { position: relative; aspect-ratio: 63 / 50; border-radius: 10px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; font-weight: 700; color: hsl(var(--h) 35% 40%); background: hsl(var(--h) 40% 93%); }
.badge { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.play-hint { position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .92); color: var(--accent); font-size: 14px; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease; }
.card-play:hover .play-hint, .card-play:focus-visible .play-hint { opacity: 1; transform: none; }
.card-play:hover img { transform: scale(1.03); }
@media (hover: none) { .play-hint { opacity: 1; transform: none; width: 30px; height: 30px; font-size: 12px; } }
.card-title { margin: 8px 0 2px; font-size: 15px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--soft); font-size: 13px; white-space: nowrap; }
.chip:hover { background: var(--accent-weak); }
.rate-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star { color: var(--star); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 列表 */
.sorts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sorts a { padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; }
.sorts a.on { background: var(--text); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 15px; }
.pager a { padding: 8px 14px; border-radius: 8px; background: var(--soft); }

/* 遊戲頁 */
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.game-top { display: grid; gap: 20px; background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
@media (min-width: 768px) { .game-top { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); padding: 20px; } }
.game-cover .play-hint { opacity: 1; transform: none; width: 52px; height: 52px; font-size: 20px; right: 12px; bottom: 12px; }
.game-info h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.25; overflow-wrap: anywhere; }
.game-desc { margin: 0 0 12px; overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.btn-play { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 200px; height: 48px; padding: 0 24px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; }
.btn-play:hover { background: var(--accent-ink); color: #fff; }
@media (max-width: 767px) { .btn-play { width: 100%; } }
.game-info > .small { margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 18px 0 0; }
.facts div { background: var(--soft); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rate-box h2, .game h2 { margin: 0 0 10px; font-size: 18px; }
/* 評分：好玩／不好玩兩粒掣（2026-10-21 由五星改） */
.votes { display: flex; gap: 8px; }
.vote { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 96px; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface); color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; }
.vote svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.vote:hover { border-color: var(--text); color: var(--text); }
.vote[data-vote="up"][aria-pressed="true"] { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.vote[data-vote="down"][aria-pressed="true"] { border-color: var(--text); background: var(--soft); color: var(--text); }
.vote:disabled { cursor: default; }
.like { color: var(--star); }
.like svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; }
.comment-form { display: grid; gap: 8px; margin-bottom: 16px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); outline: none; }
.form-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-row button { height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.form-row button:disabled { opacity: .6; cursor: default; }
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { padding: 12px 0; border-top: 1px solid var(--soft); }
.c-head, .c-body { margin: 0; overflow-wrap: anywhere; }
.c-body { white-space: pre-line; }
.report { text-align: center; margin: 8px 0 24px; }
.linkish { background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.prose { max-width: 760px; }
.prose h1 { margin-top: 0; }
.prose h2 { font-size: 18px; margin: 20px 0 6px; }

.foot { max-width: 1320px; margin: 8px auto 0; padding: 16px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }
.foot p { margin: 4px 0; }
.foot a { text-decoration: underline; }

/* 玩完返嚟：底部一行即評 */
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; width: min(440px, calc(100vw - 32px)); background: var(--surface); border-radius: 14px; box-shadow: 0 12px 32px rgb(17 24 39 / .18); padding: 14px 44px 14px 16px; }
.toast p { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.toast .vote { height: 40px; }
.toast .close { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }

/* ── 今日精選、圖示、風格切換（各風格共用骨架） ── */
.ico { display: none; }
.hero { display: grid; gap: 16px; background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
@media (min-width: 768px) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 20px; align-items: center; } }
.hero-cover { display: block; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: var(--soft); }
.hero-cover img, .hero-cover .noimg { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent-ink); text-transform: uppercase; }
.hero h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.25; overflow-wrap: anywhere; }
.hero-desc { margin: 0 0 18px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-more { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.theme-switch { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 50; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(17 24 39 / .88); box-shadow: 0 8px 24px rgb(0 0 0 / .25); max-width: calc(100vw - 24px); overflow-x: auto; }
.theme-switch a { color: #e5e7eb; font-size: 13px; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.theme-switch a[aria-current] { background: #fff; color: #111827; font-weight: 700; }
body:has(.theme-switch) .toast { bottom: 72px; }

/* ── 風格一：暖色遊戲櫃 ── */
.theme-warm {
  --bg: #faf5ec; --surface: #fffdf8; --text: #2a2118; --muted: #85725f; --line: #eee2cf; --soft: #f4ead9;
  --accent: #ec5b2a; --accent-ink: #c2421a; --accent-weak: #ffe8dc; --radius: 20px;
  --font: ui-rounded, "SF Pro Rounded", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
.theme-warm .ico { display: inline-block; margin-right: 6px; }
.theme-warm .top { background: rgb(255 253 248 / .92); backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.theme-warm .search input { background: var(--soft); border-color: transparent; border-radius: 999px 0 0 999px; }
.theme-warm .search button { border-radius: 0 999px 999px 0; }
.theme-warm .cats-bar .cat { background: hsl(var(--h) 70% 94%); color: hsl(var(--h) 45% 28%); }
.theme-warm .cats-bar .cat .n { color: hsl(var(--h) 25% 45%); }
.theme-warm .cats-bar .cat.on, .theme-warm .side-cats .cat.on { background: hsl(var(--h) 62% 46%); color: #fff; }
.theme-warm .cats-bar .cat.on .n, .theme-warm .side-cats .cat.on .n { color: rgb(255 255 255 / .8); }
.theme-warm .side-cats .cat { border-radius: 12px; }
.theme-warm .side-cats .cat:hover { background: hsl(var(--h) 70% 94%); }
.theme-warm .block, .theme-warm .hero, .theme-warm .game-top { box-shadow: 0 1px 2px rgb(90 60 20 / .06), 0 6px 20px rgb(90 60 20 / .05); }
.theme-warm .hero { background: #fff1e4; }
.theme-warm .thumb, .theme-warm .hero-cover { border-radius: 16px; }
.theme-warm .card { transition: transform .15s ease; }
.theme-warm .card:hover { transform: translateY(-3px); }
.theme-warm .chip { background: var(--soft); border-radius: 999px; padding: 2px 10px; }
.theme-warm .tabs button[aria-selected="true"] { border-bottom-width: 3px; }
.theme-warm .rank .no.top3 { background: var(--accent); border-radius: 50%; }
.theme-warm .btn-play { border-radius: 999px; box-shadow: 0 4px 0 var(--accent-ink); }
.theme-warm .btn-play:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-ink); }
.theme-warm .block-head h2 { display: flex; align-items: center; }

/* ── 風格二：深色遊戲廳 ── */
.theme-dark {
  --bg: #0d1117; --surface: #151b23; --text: #e6edf3; --muted: #8b949e; --line: #262f3a; --soft: #1e2631;
  --accent: #4f8dff; --accent-ink: #8ab4ff; --accent-weak: #1a2740; --star: #fbbf24; --up: #4ade80; --radius: 14px;
  color-scheme: dark;
}
.theme-dark .top { background: rgb(13 17 23 / .9); backdrop-filter: blur(8px); }
.theme-dark .search input { background: #0f141b; border-color: var(--line); }
.theme-dark .search input:focus { background: #0f141b; }
.theme-dark .cats-bar .cat { background: transparent; border: 1px solid var(--line); }
.theme-dark .cats-bar .cat.on { background: var(--accent); border-color: var(--accent); }
.theme-dark .side-cats .cat:hover { background: var(--surface); }
.theme-dark .side-cats .cat.on { background: var(--accent-weak); color: var(--accent-ink); }
.theme-dark .thumb { box-shadow: 0 0 0 1px rgb(255 255 255 / .06); transition: box-shadow .15s ease; }
.theme-dark .card-play:hover .thumb, .theme-dark .card-play:focus-visible .thumb { box-shadow: 0 0 0 2px var(--accent), 0 10px 28px rgb(79 141 255 / .28); }
.theme-dark .noimg { color: hsl(var(--h) 55% 72%); background: hsl(var(--h) 30% 18%); }
.theme-dark .hero { position: relative; overflow: hidden; background: #0a0e14; padding: 0; min-height: 320px; display: block; }
.theme-dark .hero-cover { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.theme-dark .hero-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 14 20 / .95) 0%, rgb(10 14 20 / .75) 45%, rgb(10 14 20 / .15) 100%); }
.theme-dark .hero-info { position: relative; max-width: 520px; padding: 40px 32px; pointer-events: none; }
.theme-dark .hero-info a { pointer-events: auto; }
.theme-dark .hero h2 { font-size: 34px; }
.theme-dark .hero-desc { color: #c9d1d9; }
@media (max-width: 767px) { .theme-dark .hero-info { padding: 28px 20px; } .theme-dark .hero h2 { font-size: 26px; } }
.theme-dark .play-hint { background: var(--accent); color: #fff; }
.theme-dark .sorts a.on { background: var(--accent); }
.theme-dark .rank .no { background: var(--soft); }
.theme-dark .toast { background: var(--surface); }
.theme-dark .vote { background: var(--soft); }
.theme-dark .comment-form input, .theme-dark .comment-form textarea { background: #0f141b; border-color: var(--line); }

/* ── 風格三：雜誌精選 ── */
.theme-mag {
  --bg: #f7f4ee; --surface: #fffefa; --text: #1c1917; --muted: #78716c; --line: #e2dbcf; --soft: #efe8dc;
  --accent: #b4371f; --accent-ink: #8f2a16; --accent-weak: #f5e2da; --radius: 4px;
  --serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", "PMingLiU", Georgia, serif;
}
.theme-mag h1, .theme-mag h2, .theme-mag h3, .theme-mag .brand, .theme-mag .card-title, .theme-mag .tabs button, .theme-mag .rank .no { font-family: var(--serif); }
.theme-mag .top { background: var(--bg); border-bottom: 2px solid var(--text); }
.theme-mag .brand { font-size: 22px; letter-spacing: .02em; }
.theme-mag .search input { background: transparent; border-color: var(--text); border-radius: 0; }
.theme-mag .search button { background: var(--text); border-radius: 0; }
.theme-mag .cats-bar .cat { background: transparent; border-radius: 0; border-bottom: 2px solid transparent; padding: 6px 4px; }
.theme-mag .cats-bar .cat.on { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
.theme-mag .cats-bar .cat.on .n { color: var(--accent); }
.theme-mag .side-cats .cat { border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; }
.theme-mag .side-cats .cat.on { background: transparent; color: var(--accent); }
.theme-mag .block, .theme-mag .hero { background: transparent; border-radius: 0; border-top: 2px solid var(--text); padding: 18px 0 8px; }
.theme-mag .game-top { background: transparent; border-top: 2px solid var(--text); border-radius: 0; padding-left: 0; padding-right: 0; }
.theme-mag .intro h1 { font-size: 30px; }
.theme-mag .hero { padding-top: 22px; }
.theme-mag .hero h2 { font-size: 40px; line-height: 1.15; }
.theme-mag .eyebrow { color: var(--accent); letter-spacing: .2em; }
.theme-mag .hero-cover, .theme-mag .thumb { border-radius: 2px; }
.theme-mag .block-head h2 { font-size: 24px; }
.theme-mag .tabs { border-bottom-color: var(--line); }
.theme-mag .tabs button[aria-selected="true"] { border-bottom-color: var(--accent); }
.theme-mag .card-title { font-size: 17px; font-weight: 700; }
.theme-mag .chip { background: transparent; padding: 0; color: var(--accent); font-size: 13px; }
.theme-mag .rank .no { background: transparent; color: var(--muted); font-size: 20px; width: 28px; }
.theme-mag .rank .no.top3 { background: transparent; color: var(--accent); }
.theme-mag .btn-play, .theme-mag .sorts a.on { border-radius: 2px; background: var(--text); }
.theme-mag .sorts a { border-radius: 2px; }
/* 專題區塊：第一款放大做主角 */
@media (min-width: 640px) {
  .theme-mag .feature .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .theme-mag .feature .grid > .card:first-child { grid-column: span 2; grid-row: span 2; }
  .theme-mag .feature .grid > .card:first-child .card-title { font-size: 26px; white-space: normal; }
  .theme-mag .feature .grid > .card:first-child .card-desc { -webkit-line-clamp: 4; font-size: 15px; }
}

/* ── 登入及收藏 ── */
.card { position: relative; }
.fav { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: #44403c; cursor: pointer; place-items: center; box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.has-acct .fav { display: grid; }
.fav:hover { color: var(--accent); }
.fav svg, .fav-btn svg, .acct svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav[aria-pressed="true"], .fav-btn[aria-pressed="true"], .acct.in { color: var(--accent); }
.fav[aria-pressed="true"] svg, .fav-btn[aria-pressed="true"] svg, .acct.in svg { fill: currentColor; }
.fav-btn { display: none; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 20px; border: 1px solid var(--text); border-radius: 2px; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.has-acct .fav-btn { display: inline-flex; }
.fav-btn[aria-pressed="true"] { border-color: var(--accent); }
.play-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 767px) { .play-row .fav-btn { width: 100%; } }
.acct { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; white-space: nowrap; padding: 8px 4px; }
@media (max-width: 639px) { .acct { margin-left: auto; } .acct ~ .lang { margin-left: 0; } }
/* 頂部「上架遊戲」入口（Michael 2026-10-21：一入嚟就要見到）；手機縮短做「＋ 上架」、收藏只留心心，免頂部爆行 */
.sub-top { font-size: 14px; font-weight: 600; white-space: nowrap; padding: 8px 4px; }
.sub-top:hover { color: var(--accent); }
/* 打賞＝網站唯一收入，要放當眼位（Michael 2026-10-21）：每頁頂部實心按鈕「打賞支持網站升級」＋遊戲頁評分後框線按鈕；手機縮做「☕ 打賞」，語言掣移去頁尾，免頂部爆行 */
.tip-top { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tip-top:hover { background: var(--accent-ink); color: #fff; }
.tip-s { display: none; }
.tip-row { margin: 4px 0 14px; }
.tip-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 15px; font-weight: 700; }
.tip-btn:hover { background: var(--accent); color: #fff; }
/* 列表打賞卡（L2）：同遊戲卡一樣大，放喺列表第 24 張卡之後 */
.tip-card .card-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
.tip-card .thumb { display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); transition: background .15s ease, color .15s ease; }
.tip-art { display: grid; justify-items: center; gap: 4px; }
.tip-cup { font-size: 40px; line-height: 1; }
.tip-word { font-size: 14px; font-weight: 700; letter-spacing: .2em; }
.tip-card .card-title { color: var(--accent); }
.tip-card .card-meta { margin-top: auto; padding-top: 6px; }
.tip-go { font-size: 13px; font-weight: 700; color: var(--accent); }
.tip-card .card-link:hover .thumb, .tip-card .card-link:focus-visible .thumb { background: var(--accent); color: #fff; }
@media (max-width: 639px) {
  .top-in { gap: 8px 10px; }
  .tip-l, .top .lang { display: none; }
  .tip-s { display: inline; }
  .tip-top { height: 32px; padding: 0 12px; }
  .tip-btn { width: 100%; }
}
@media (max-width: 380px) {
  .top-in { gap: 8px; }
  .brand { font-size: 16px; gap: 6px; }
  .tip-top { padding: 0 10px; }
}
@media (max-width: 639px) {
  .sub-top { margin-left: auto; }
  .sub-top ~ .acct, .sub-top ~ .lang { margin-left: 0; }
  .sub-x, .acct span { display: none; }
}
.login-dlg { border: 0; border-top: 3px solid var(--text); border-radius: 4px; padding: 24px 22px 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / .25); }
.login-dlg::backdrop { background: rgb(28 25 23 / .45); }
.login-dlg h2 { margin: 0 0 8px; padding-right: 32px; font-size: 22px; line-height: 1.3; }
.login-dlg p { margin: 0 0 8px; }
.dlg-close { position: absolute; right: 6px; top: 6px; margin: 0; }
.dlg-close button { width: 40px; height: 40px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }
.gsi { min-height: 44px; margin: 14px 0 8px; }
/* 上架你的遊戲 */
.submit-page .submit-form { max-width: 560px; }
.sub-field { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.sub-field input { font-weight: 400; }
.sub-role { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; border: 0; font-size: 14px; }
.sub-role legend { width: 100%; margin-bottom: 2px; padding: 0; font-weight: 600; }
.sub-role label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.sub-role input { width: auto; margin: 0; padding: 0; accent-color: var(--accent); }
.sub-note, .sub-login { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.sub-note p, .sub-login p { margin: 4px 0; }
.sub-note.ok { border-color: var(--accent); }
.sub-note.err { border-color: #b91c1c; }
.sub-share-row { display: flex; gap: 8px; margin: 2px 0 4px; }
.sub-share-row .sub-share { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
.sub-copy { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; }
.more .sub-link { margin-right: 16px; color: var(--muted); }
.btn-login { height: 44px; padding: 0 20px; border: 0; border-radius: 2px; background: var(--text); color: var(--bg); font: inherit; font-weight: 600; cursor: pointer; }
.fav-page .acct-line { margin: -4px 0 14px; }
.theme-mag .login-dlg h2, .theme-mag .fav-btn { font-family: var(--serif); }

/* ── 手機優化（2026-10-21）：卡片去遊戲頁、遊戲頁一屏見到評分、頂部捲動時收起 ── */
.card-link { display: block; }
.card-link:hover img { transform: scale(1.03); }
.thumb { aspect-ratio: 16 / 10; }
.thumb img.fit, .game-cover .thumb img { object-fit: contain; }
.game-cover:hover img { transform: none; }
.game-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.game-meta strong { color: var(--text); }
.game-info .rate-box { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 14px; margin: 16px 0 10px; }
.game-info .rate-box h2 { margin: 0; font-size: 15px; }
.game-info .rate-box #rate-msg { grid-column: 1 / -1; margin: 0; }
.game-src { overflow-wrap: anywhere; }
.game-info .chips { margin: 8px 0 0; }
.play-row { flex-wrap: nowrap; }
.play-row .btn-play { flex: 1 1 auto; min-width: 0; }
.play-row .fav-btn { flex: none; }
@media (max-width: 767px) {
  .play-row .fav-btn { width: auto; padding: 0 16px; }
  .game-top { gap: 14px; }
  .game-cover .thumb { aspect-ratio: 16 / 9; }
  .game-cover .play-hint { width: 44px; height: 44px; font-size: 16px; right: 10px; bottom: 10px; }
  .game-info h1 { font-size: 22px; margin-bottom: 6px; }
  .game-desc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .top { transition: transform .2s ease; }
  .top.hide { transform: translateY(-100%); }
  .theme-mag .intro h1 { font-size: 21px; }
  .theme-mag .hero { padding-top: 14px; gap: 12px; }
  .theme-mag .hero h2 { font-size: 26px; }
  .hero-desc { -webkit-line-clamp: 2; margin-bottom: 14px; font-size: 14px; }
  .theme-mag .intro h1 { font-size: 19px; }
  .theme-mag .hero h2 { font-size: 22px; }
  .hero-actions { flex-wrap: nowrap; gap: 10px; }
  .hero-actions .btn-play { flex: 1 1 auto; width: auto; min-width: 0; }
  .hero-actions .fav-btn { flex: none; padding: 0 16px; }
  .hero-more { display: none; }
}
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }
.nw { white-space: nowrap; }
/* 加到主畫面橫額：只喺手機、未加主畫面時顯示（<head> inline script 加 html.a2hs-on）；淺色一行，唔搶打賞掣 */
.a2hs { display: none; align-items: center; gap: 6px; height: 38px; padding: 0 4px 0 16px; background: var(--soft, #efe8dc); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text); }
.a2hs-on .a2hs { display: flex; }
.a2hs span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a2hs a { flex: none; padding: 6px 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
.a2hs button { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; }

/* 版主推薦獨立色塊：電腦左欄，手機內容上方。 */
.picks-feature { display:block; padding:15px 14px; margin:0 0 16px; border:1px solid var(--accent-ink); border-radius:4px; background:var(--accent-ink); color:#fff; }
.picks-feature:hover { background:var(--accent); border-color:var(--accent); color:#fff; }
.picks-feature-title { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:18px; font-weight:700; line-height:1.35; }
.picks-feature-note { display:block; margin-top:7px; font-size:12px; line-height:1.55; }
.picks-feature:focus-visible, .picks-button:focus-visible, .picks-text-link:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.picks-feature-mobile { margin-bottom:20px; padding:12px 14px; }
.picks-feature-mobile .picks-feature-note { margin-top:3px; }
@media (min-width:1024px) { .picks-feature-mobile { display:none; } }
@media (max-width: 380px) {
  .top-in .brand { font-size: 16px; gap: 5px; }
}

/* 版主好推介：沿用雜誌字體、分隔線及站內配色。 */
.picks-page { max-width: 900px; }
.picks-back { display: inline-block; margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.picks-heading { border-top: 2px solid var(--text); padding: 22px 0 24px; }
.picks-heading .eyebrow { margin: 0 0 10px; }
.picks-heading h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.picks-lead { margin: 0; color: var(--muted); font-size: 17px; }
.picks-intro { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 26px; padding: 0 0 28px; }
.picks-portrait { display: block; width: 128px; height: 156px; object-fit: cover; object-position: center 25%; border-radius: 3px; background: var(--soft); }
.picks-intro h2 { margin: 0 0 10px; font-size: 24px; }
.picks-intro p { margin: 0 0 12px; }
.picks-course { border-top: 2px solid var(--text); padding: 24px 0 30px; }
.picks-course .eyebrow, .picks-resource .eyebrow { margin: 0 0 12px; }
.picks-course h2 { margin: 0 0 5px; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.picks-subtitle { margin: 0 0 16px; font-size: 19px; }
.picks-course-hook { font-size: 20px; font-weight: 700; line-height: 1.5; }
.picks-availability { color: var(--accent-ink); font-size: 15px; font-weight: 600; }
.picks-aid { padding: 13px 16px; border-left: 3px solid var(--accent); background: var(--soft); }
.picks-resource-tagline { color: var(--accent-ink); font-weight: 600; }
.picks-course > p:not(.eyebrow):not(.picks-subtitle) { max-width: 700px; }
.picks-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.picks-facts li { border-left: 2px solid var(--accent); padding-left: 9px; }
.picks-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.picks-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 20px; background: var(--text); color: var(--bg); border-radius: 3px; font-size: 16px; font-weight: 700; }
.picks-button:hover { background: var(--accent); color: #fff; }
.picks-text-link { display: inline-block; padding: 5px 0; color: var(--accent-ink); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.picks-resources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.picks-resource { border-top: 1px solid var(--text); padding: 22px 0 24px; }
.picks-resource h2 { margin: 0 0 12px; font-size: 26px; }
.picks-resource p { margin-top: 0; }
.picks-end { margin: 10px 0 0; padding: 22px 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.picks-end a { color: var(--accent-ink); }
@media (max-width: 639px) {
  .picks-back { margin-bottom: 14px; }
  .picks-heading { padding-top: 18px; }
  .picks-lead { font-size: 16px; }
  .picks-intro { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  .picks-portrait { width: 84px; height: 106px; }
  .picks-intro h2 { font-size: 21px; }
  .picks-resources { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* 課程資訊於台港時間 2026-10-22 21:30 開放；倒數與內容分開，保持清晰可讀。 */
.picks-countdown { display:flex; flex-wrap:wrap; align-items:baseline; gap:5px 12px; margin:0 0 20px; padding:10px 14px; border-left:2px solid var(--line); background:var(--soft); }
.picks-countdown-title { margin:0; font-size:13px; font-weight:600; }
.picks-countdown-digits { margin:0; font-size:18px; font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:.02em; line-height:1.3; }
.picks-countdown-units { margin:0; font-size:11px; color:var(--muted); }
.picks-countdown-date { flex-basis:100%; margin:0; font-size:12px; color:var(--muted); }
.picks-course.is-locked .picks-course-content { filter:grayscale(1); color:var(--muted); }
.picks-course.is-locked .picks-course-content h2,
.picks-course.is-locked .picks-course-hook,
.picks-course.is-locked .picks-availability { color:var(--muted); }
.picks-course.is-locked .picks-aid { background:var(--soft); border-color:var(--line); }
.picks-button:disabled { background:var(--soft); color:var(--muted); border:1px solid var(--line); cursor:not-allowed; font:inherit; font-weight:600; }
@media(max-width:639px) { .picks-countdown { gap:4px 10px; padding:9px 12px; } }

/* 搜尋：分類連結、零結果入口（2026-10-21 搜尋修正）；上架掣用框線，實心磚紅只留俾打賞 */
.search-cats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; margin: -4px 0 12px; }
.nores { padding: 8px 0 4px; text-align: center; }
.nores p { margin: 0 0 14px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--text); border-radius: var(--radius, 10px); color: var(--text); font-weight: 700; }
.btn-line:hover { background: var(--soft); color: var(--text); }
