/* 版面與元件樣式。顏色一律引用 tokens.css 的變數，這裡不寫色碼。版面依設計稿：
 * 頁首橫幅 → 導覽列 → 頁面路徑 → 主欄＋右側欄（手機改為單欄，側欄移到主欄下方）→ 頁尾廣告位 → 頁尾。 */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 16px/1.6 var(--font-body); }
a { color: var(--color-link); text-underline-offset: 2px; }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--color-text-muted); }
.small { font-size: 14px; }
.hint { color: var(--color-text-muted); margin: 0; }
.error { color: var(--color-fail); margin: 0; }

/* ── 頁首：橫幅＋導覽列 ── */
.banner { --banner-image: url(../img/banner.svg); background: var(--color-banner) var(--banner-image, none) center / cover no-repeat; }
.banner-inner { position: relative; min-height: 168px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--color-on-dark); text-decoration: none; min-height: var(--target-min); }
.brand:hover { color: var(--color-on-dark); }
.logo { width: 48px; height: 48px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: 0.02em; }
.main-nav { background: var(--color-nav); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; flex-wrap: wrap; padding: 0 12px; }
.main-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; color: var(--color-nav-text); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover { color: var(--color-on-dark); }
.main-nav a[aria-current="page"] { color: var(--color-on-dark); font-weight: 700; box-shadow: inset 0 -3px 0 var(--color-on-dark); }

/* 預留位：預設隱藏，本機預覽（body.show-slots）才顯示虛線框；正式廣告載入時加上 .filled */
.slot-label { display: none; }
.show-slots .banner-label { display: inline-block; position: absolute; right: 24px; top: 14px; font-size: 12px; color: var(--color-on-dark); border: 1px dashed var(--color-placeholder-bg); border-radius: var(--radius-small); padding: 2px 8px; }
.ad-slot { display: none; }
.show-slots .ad-slot, .ad-slot.filled { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--color-control-border); border-radius: var(--radius-control); color: var(--color-text-muted); font-size: 14px; text-align: center; padding: 12px; }
.ad-slot.filled { border: 0; padding: 0; }
.show-slots .ad-slot .slot-label { display: block; }
.ad-rect { min-height: 250px; }
.ad-rect-wide { min-height: 250px; }
.ad-tall { min-height: 600px; }
.ad-leaderboard { min-height: 90px; }
.ad-slot.sticky { position: sticky; top: 64px; }
.show-slots .ad-slot.mobile-only { display: none; }

/* ── 頁面路徑 ── */
.crumbs { background: var(--color-surface); border-bottom: 1px solid var(--color-border); font-size: 14px; color: var(--color-text-muted); }
.crumbs .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.crumbs a, .crumbs span[aria-current] { display: inline-flex; align-items: center; min-height: var(--target-min); }
.crumbs span[aria-current] { color: var(--color-text); }

/* ── 主欄＋側欄 ── */
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 24px; padding-bottom: 56px; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.aside { flex: 1 1 300px; max-width: 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.footer-ad { padding-bottom: 24px; }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 20px; font-weight: 700; }
.card-intro { margin: 0; font-size: 15px; color: var(--color-text-2); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.card-foot p { margin: 0; }
.page-title { font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.text-link { display: inline-flex; align-items: center; min-height: var(--target-min); font-size: 15px; font-weight: 500; }
.link-row { display: flex; flex-wrap: wrap; gap: 0 20px; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; color: var(--color-text-muted); }
.result-heading { display: flex; flex-direction: column; }
.result-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius-control); font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-light { background: var(--color-surface); color: var(--color-text); border: 0; }
.btn-light:hover { color: var(--color-text); background: var(--color-border-soft); }
.btn-outline { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-text); font-size: 15px; }
.btn-outline:hover { color: var(--color-text); background: var(--color-bg); }

/* ── 配備檢查頁：主視覺卡 ── */
.hero-wrap { padding-top: 24px; }
.hero { padding: 32px; gap: 18px; }
.hero h1 { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.25; max-width: 720px; }
.hero-intro { margin: 8px 0 0; color: var(--color-text-muted); max-width: 720px; }
.hero-field { max-width: 720px; }
.hero-field .combo-input { min-height: 54px; font-size: 17px; }

/* ── 表單 ── */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { min-width: 0; margin: 0; }
fieldset.field { border: 0; padding: 0; }
.field-ram { grid-column: 1 / -1; }
.field-label { display: block; font-size: 15px; font-weight: 500; color: var(--color-text-2); margin-bottom: 6px; padding: 0; }
.hero .field-label { font-weight: 700; color: var(--color-text); }
.field-hint { margin: 6px 0 0; font-size: 14px; color: var(--color-text-muted); order: 3; }
.combo { display: flex; flex-direction: column; }
.field-msg { margin: 0; font-size: 15px; }
.field-msg:empty { display: none; }
.msg-warn { color: var(--color-warn); background: var(--color-warn-bg); padding: 10px 14px; border-radius: var(--radius-control); }

.combo-wrap { position: relative; }
.combo-input, .search-box { width: 100%; font: inherit; color: var(--color-text); background: var(--color-surface); border: 1.5px solid var(--color-input-border); border-radius: var(--radius-control); min-height: 48px; }
.combo-input { padding: 0 44px 0 14px; }
.combo-input::placeholder, .search-box input::placeholder { color: var(--color-text-muted); }
.combo-clear { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--color-text-muted); font-size: 1.4rem; width: var(--target-min); height: var(--target-min); cursor: pointer; border-radius: var(--radius-control); }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--color-surface); border: 1px solid var(--color-input-border); border-radius: var(--radius-control); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16); }
.combo-group { padding: 6px 10px 4px; font-size: 13px; color: var(--color-text-muted); }
.combo-option { min-height: var(--target-min); padding: 8px 10px; border-radius: var(--radius-small); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.combo-option:hover, .combo-option.active { background: var(--color-bg); }
.combo-option[aria-selected="true"] { font-weight: 700; }
.combo-option mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.combo-empty { padding: 10px; color: var(--color-text-muted); }
.tag { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target-min); min-width: 72px; padding: 0 14px; border: 1.5px solid var(--color-control-border); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); font-weight: 500; cursor: pointer; }
.segmented input:checked + label { background: var(--color-text); border-color: var(--color-text); color: var(--color-on-dark); font-weight: 700; }
.segmented input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.help { font-size: 15px; }
/* 展開與收合由卡片右上角的「如何查詢電腦配備」連結控制（設計稿只有一個入口） */
.help > summary { display: none; }
.help[open] { padding: 14px 16px; background: var(--color-bg); border-radius: var(--radius-control); }
.help summary { cursor: pointer; color: var(--color-link); min-height: var(--target-min); display: flex; align-items: center; }
.help p { margin: 8px 0 0; }
kbd { border: 1px solid var(--color-control-border); border-radius: 4px; padding: 0 4px; font-size: 0.85em; background: var(--color-bg); }

/* ── 檢查結果 ── */
.result { gap: 22px; }
.tier-card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tier-card { border-radius: 12px; overflow: hidden; border: 1.5px solid var(--tier-color); }
.tier-min { --tier-color: var(--color-tier-min); }
.tier-rec { --tier-color: var(--color-tier-rec); }
.tier-card-head { background: var(--tier-color); color: var(--color-on-dark); padding: 8px 16px; font-size: 15px; font-weight: 700; }
.tier-card-body { padding: 16px; display: flex; align-items: center; gap: 14px; }
.tier-card-text { display: flex; flex-direction: column; }
.tier-status { font-size: 26px; font-weight: 700; line-height: 1.3; }
.tier-detail { font-size: 14px; color: var(--color-text-2); }
.tone-text-pass { color: var(--color-pass); }
.tone-text-warn { color: var(--color-warn); }
.tone-text-fail { color: var(--color-fail); }
.tone-text-muted { color: var(--color-text-muted); }

.status-icon { flex-shrink: 0; }
.status-icon .icon-mark { fill: none; stroke: var(--color-on-dark); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.status-icon .icon-dot { fill: var(--color-on-dark); }
.status-icon.tone-pass .icon-fill { fill: var(--color-pass); }
.status-icon.tone-warn .icon-fill { fill: var(--color-warn); }
.status-icon.tone-fail .icon-fill { fill: var(--color-fail); }
.status-icon.tone-muted .icon-fill { fill: var(--color-neutral); }

.compare-intro { display: flex; flex-direction: column; gap: 4px; }
.compare-intro p { margin: 0; }
.compare-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.compare-title-row h3 { font-size: 18px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--color-text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
.bar-user { background: var(--color-bar-user); }
.bar-min { background: var(--color-tier-min); }
.bar-rec { background: var(--color-tier-rec); }
.compare-card { border: 1px solid var(--color-border-soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.compare-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.compare-head h4 { font-size: 16px; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.badge .icon-mark { stroke-width: 4; }
.badge.tone-pass { background: var(--color-pass-bg); color: var(--color-pass); }
.badge.tone-warn { background: var(--color-warn-bg); color: var(--color-warn); }
.badge.tone-fail { background: var(--color-fail-bg); color: var(--color-fail); }
.badge.tone-muted { background: var(--color-neutral-bg); color: var(--color-text-muted); }
.bar-grid { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: 14px; }
.bar-row-label { color: var(--color-text-2); }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { height: 22px; border-radius: 5px; flex-shrink: 0; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-grid .bar-cell:nth-child(2) .bar-label { font-weight: 700; }
.note-box { margin: 0; padding: 14px 16px; background: var(--color-bg); border-radius: var(--radius-control); font-size: 14px; color: var(--color-text-2); }
.empty-state { display: flex; align-items: center; gap: 14px; }
.empty-title { margin: 0; font-size: 18px; font-weight: 700; }

/* ── 參考價格 ── */
.offer-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.offer-card { border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.offer-model { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.offer-price { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.offers p { margin: 0; }

/* ── 側欄 ── */
.side-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; }
.side-title { padding: 12px 16px; background: var(--color-nav); color: var(--color-on-dark); font-size: 16px; font-weight: 700; }
.thumb-list { list-style: none; margin: 0; padding: 0; }
.thumb-list li + li { border-top: 1px solid var(--color-border-soft); }
.thumb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--color-text); text-decoration: none; min-height: var(--target-min); }
.thumb-row:hover { background: var(--color-bg); color: var(--color-text); }
.rank-no { flex-shrink: 0; width: 22px; font-family: var(--font-display); font-weight: 700; color: var(--color-text-muted); }
.thumb-sm { flex-shrink: 0; width: 104px; height: 49px; border-radius: var(--radius-small); object-fit: cover; background: var(--color-placeholder-bg); }
.thumb-name { font-size: 15px; font-weight: 500; line-height: 1.35; }

/* ── 遊戲頁 ── */
.game-top { padding-top: 24px; }
.game-hero { border-radius: 16px 16px 0 0; background: var(--color-hero-dark); color: var(--color-on-dark); padding: 24px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.game-cover { flex-shrink: 0; width: 230px; height: 108px; border-radius: var(--radius-control); object-fit: cover; }
.game-hero-text { flex: 1 1 320px; min-width: 0; }
.game-hero h1 { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.25; }
.game-en { margin: 4px 0 0; font-family: var(--font-display); font-size: 18px; color: var(--color-nav-text); }
.section-tabs { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 0; border-radius: 0 0 16px 16px; padding: 0 16px; display: flex; flex-wrap: wrap; }
.section-tabs a { display: flex; align-items: center; min-height: 52px; padding: 0 16px; color: var(--color-text-2); text-decoration: none; font-weight: 500; }
.section-tabs a[aria-current] { color: var(--color-text); font-weight: 700; box-shadow: inset 0 -3px 0 var(--color-text); }
.info-grid { margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.info-grid dt { font-size: 13px; color: var(--color-text-muted); }
.info-grid dd { margin: 0; font-size: 16px; font-weight: 500; }
.table-scroll { overflow-x: auto; }
.req-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; }
.req-table thead th { text-align: left; padding: 12px 14px; color: var(--color-on-dark); font-weight: 700; }
.req-table .col-item { background: var(--color-nav); width: 18%; }
.req-table .col-min { background: var(--color-tier-min); width: 41%; }
.req-table .col-rec { background: var(--color-tier-rec); width: 41%; }
.req-table tbody th { text-align: left; padding: 14px; font-weight: 500; color: var(--color-text-2); vertical-align: top; }
.req-table td { padding: 14px; vertical-align: top; overflow-wrap: anywhere; }
.req-table tbody tr + tr > * { border-top: 1px solid var(--color-border-soft); }
.cell-note { margin-top: 6px; font-size: 13px; color: var(--color-text-muted); }
.tier-box-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tier-box { border-radius: 12px; overflow: hidden; border: 1.5px solid var(--tier-color); }
.tier-box-head { background: var(--tier-color); color: var(--color-on-dark); padding: 8px 16px; font-size: 15px; font-weight: 700; }
.tier-box-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tier-box-body h3 { font-size: 15px; font-weight: 700; }
.tier-box-body h3 + * { margin-bottom: 8px; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 8px; font-size: 14px; background: var(--color-surface); }
.cta { background: var(--color-nav); color: var(--color-on-dark); border-radius: var(--radius-card); padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta > div { flex: 1 1 320px; }
.cta h2 { font-size: 20px; font-weight: 700; }
.cta p { margin: 4px 0 0; color: var(--color-nav-text); }

/* ── 遊戲列表頁 ── */
.search-box { display: flex; align-items: center; gap: 12px; padding: 0 14px; color: var(--color-text-muted); min-height: 50px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; color: var(--color-text); background: transparent; min-height: var(--target-min); }
.search-box:focus-within { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.card .muted.small { margin: 0; }
.game-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.game-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; color: var(--color-text); text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.game-card:hover { color: var(--color-text); border-color: var(--color-input-border); }
.thumb-lg { width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; display: block; background: var(--color-placeholder-bg); }
.thumb-empty { display: block; }
.game-card-name { padding: 12px 14px; font-size: 15px; font-weight: 700; line-height: 1.4; }
#list-more { align-self: center; }

/* ── 排行頁 ── */
.rank-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rank-table th, .rank-table td { text-align: left; padding: 10px 12px; vertical-align: middle; }
.rank-table thead th { background: var(--color-nav); color: var(--color-on-dark); font-weight: 700; }
.rank-table tbody th { font-weight: 500; }
.rank-table tbody tr + tr > * { border-top: 1px solid var(--color-border-soft); }
.rank-table .num { color: var(--color-text-muted); width: 3.5em; }
.rank-table td:last-child { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.score-bar { flex: 1; height: 12px; background: var(--color-bg); border-radius: 6px; overflow: hidden; }
.score-bar span { display: block; height: 100%; background: var(--color-tier-min); }
.score-num { width: 3.5em; text-align: right; font-weight: 700; }

/* ── 說明頁 ── */
.prose h2 { font-size: 20px; margin-top: 8px; }
.prose p, .prose ul { margin: 0; }
.prose li + li { margin-top: 6px; }

/* ── 頁尾 ── */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); }
.footer-inner { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--color-text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--target-min); }

/* ── 手機（設計稿 390px）── */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .banner-inner { min-height: 104px; }
  .show-slots .banner-label { right: 10px; top: 8px; font-size: 11px; }
  .logo { width: 34px; height: 34px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 24px; }
  .nav-inner { padding: 0 4px; }
  .main-nav a { padding: 0 12px; }
  .crumbs { font-size: 13px; }
  .layout { padding-top: 16px; padding-bottom: 32px; gap: 16px; }
  .main { gap: 16px; }
  .aside { max-width: none; flex-basis: 100%; }
  .show-slots .ad-slot.side-only { display: none; }
  .show-slots .ad-slot.mobile-only { display: flex; }
  .ad-slot.sticky { position: static; }
  .ad-leaderboard { min-height: 100px; }
  .card { padding: 16px; gap: 12px; }
  .hero-wrap, .game-top { padding-top: 16px; }
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 26px; }
  .hero-intro { display: none; }
  .page-title { font-size: 25px; }
  .result-title { font-size: 21px; }
  .tier-status { font-size: 22px; }
  .bar-grid { grid-template-columns: 64px minmax(0, 1fr); }
  .game-hero { padding: 20px 16px; gap: 16px; }
  .game-cover { width: 100%; height: auto; aspect-ratio: 460 / 215; }
  .game-hero h1 { font-size: 26px; }
  .game-hero .btn { width: 100%; }
  .section-tabs { padding: 0 4px; }
  .section-tabs a { padding: 0 10px; min-height: 48px; }
  .req-table { min-width: 0; }
  .req-table thead { display: none; }
  .req-table, .req-table tbody, .req-table tr, .req-table th, .req-table td { display: block; width: auto; }
  .req-table tbody tr + tr > * { border-top: 0; }
  .req-table tr { padding: 12px 0; border-top: 1px solid var(--color-border-soft); }
  .req-table tr:first-child { border-top: 0; padding-top: 0; }
  .req-table tbody th { padding: 0 0 6px; font-weight: 700; color: var(--color-text); }
  .req-table td { padding: 4px 0 4px 12px; border-left: 4px solid var(--tier-color, var(--color-border)); margin-top: 6px; }
  .req-table td:nth-of-type(1) { --tier-color: var(--color-tier-min); }
  .req-table td:nth-of-type(2) { --tier-color: var(--color-tier-rec); }
  .req-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--color-text-muted); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-card-name { padding: 8px 10px 10px; font-size: 14px; }
  .cta .btn { width: 100%; }
  .rank-table td:last-child { min-width: 140px; }
  .footer-inner { flex-direction: column; gap: 6px; font-size: 13px; }
}

/* ── 彈出視窗（原生 <dialog>）── */
.modal { width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; border: 0; border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-text); box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28); }
.modal::backdrop { background: rgba(15, 23, 42, 0.55); }
.modal-box { display: flex; flex-direction: column; max-height: inherit; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 24px; border-bottom: 1px solid var(--color-border-soft); }
.modal-head h2 { font-size: 20px; font-weight: 700; }
.modal-close { width: var(--target-min); height: var(--target-min); border: 0; border-radius: var(--radius-control); background: none; color: var(--color-text-muted); font-size: 1.6rem; cursor: pointer; flex-shrink: 0; }
.modal-close:hover { background: var(--color-bg); color: var(--color-text); }
.modal-body { padding: 16px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 760px) {
  .modal { max-height: 85vh; }
  .modal-head { padding: 12px 8px 10px 16px; }
  .modal-body { padding: 12px 16px 20px; }
}

/* 缺圖時的佔位色塊：與圖片同尺寸，不出現破圖 */
.thumb-empty { background: var(--color-placeholder-bg); }
.thumb-sm.thumb-empty { display: block; }
.thumb-lg.thumb-empty { aspect-ratio: 460 / 215; }
.game-cover.thumb-empty { display: block; background: var(--color-text-2); }

/* ── 檢查結果：百分比句與 0%–300% 橫條（設計稿 v20）── */
.tier-note { font-size: 13px; color: var(--color-text-muted); }
.perf-models, .memory-sentence { margin: 0; font-size: 14px; color: var(--color-text-2); }
.perf-models strong { color: var(--color-text); }
.perf-block { display: flex; flex-direction: column; gap: 4px; }
.perf-sentence { margin: 0; font-size: 15px; line-height: 1.5; }
.perf-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--tier-color); margin-right: 6px; }
.perf-track { position: relative; height: 14px; border-radius: 7px; background: var(--color-border-soft); }
.perf-fill { height: 100%; border-radius: 7px; background: var(--color-bar-user); }
.perf-marker { position: absolute; left: 33.33%; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--tier-color); }
.perf-scale { position: relative; height: 16px; font-size: 12px; line-height: 16px; color: var(--color-text-muted); }
.perf-scale span { position: absolute; top: 0; }
.perf-scale-zero { left: 0; }
.perf-scale-base { left: 33.33%; transform: translateX(-50%); }
.perf-scale-cap { right: 0; }
.result-list-link { align-self: flex-start; }

/* ── 遊戲列表：依配備分區 ── */
.list-selection { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--color-bg); border-radius: var(--radius-control); font-size: 14px; color: var(--color-text-2); }
.list-selection[hidden], .list-groups[hidden], .list-group[hidden] { display: none; }
.list-selection strong { color: var(--color-text); }
.list-selection a { display: inline-flex; align-items: center; min-height: var(--target-min); font-weight: 700; }
.list-groups { display: flex; flex-direction: column; gap: 20px; }
.list-group { display: flex; flex-direction: column; gap: 12px; }
.list-group > p { margin: 0; }
.list-group-head { display: flex; align-items: baseline; gap: 10px; }
.list-group-head h2 { font-size: 20px; font-weight: 700; }
@media (max-width: 760px) {
  .list-groups { gap: 16px; }
  .list-group-head h2 { font-size: 17px; }
  .result-list-link { align-self: stretch; }
}
