/* 玩吧小遊戲 — Apple 風格(原創實作)
 * 系統字體、緊字距展示級排版、半透明材料 chrome、軟邊緣、單一克制強調色
 * 原則參考:emilkowalski/apple-design skill(彈性動效、材料、無障礙)
 */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(0, 0, 0, .08);
  --fill: rgba(120, 120, 128, .12);        /* iOS 系統填充色 */
  --fill-2: rgba(120, 120, 128, .2);
  --accent: #0071e3;                        /* 克制藍,僅用於互動 */
  --accent-ink: #ffffff;
  --brand: #e85d3d;                         /* 品牌珊瑚,僅小面積標記 */
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .1);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --focus: 0 0 0 4px rgba(0, 113, 227, .35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.5 var(--font-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -.022em; line-height: 1.08;
  margin: 0 0 .35em; text-wrap: balance;
}
p { text-wrap: pretty; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
button, a, [role="tab"], summary { cursor: pointer; font-family: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }

/* ── 材料 chrome:半透明 + 高飽和模糊 ── */
.top {
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky; top: 0; z-index: 30;
  /* 軟邊緣取代硬分隔線 */
  box-shadow: 0 .5px 0 rgba(0, 0, 0, .08);
}
.top-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; padding: 12px 22px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--brand); }
.brand-copy { display: grid; line-height: 1.12; }
.brand-copy span:first-child { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-note { font-size: 11.5px; color: var(--muted); }
.search { display: flex; flex: 1; min-width: 170px; max-width: 380px; }
.search input {
  flex: 1; border: 0; border-radius: 12px 0 0 12px;
  padding: 8px 14px; font: 15px inherit; background: var(--fill); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search button { border: 0; border-radius: 0 12px 12px 0; background: var(--fill-2); color: var(--ink); padding: 8px 14px; font: 15px inherit; font-weight: 600; }
.search button:hover { background: rgba(120, 120, 128, .28); }
.sub-top { font-size: 15px; color: var(--accent); font-weight: 500; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-nav > a { color: var(--ink); font-size: 14.5px; opacity: .8; }
.site-nav > a:hover { opacity: 1; color: var(--accent); }
.linkish { border: 0; background: none; color: var(--muted); font: inherit; padding: 0; }
.linkish:hover { color: var(--accent); }

/* ── 語言選單 ── */
.lang { position: relative; }
.lang summary {
  list-style: none; display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--ink); opacity: .8;
  padding: 6px 12px; border-radius: 980px; background: var(--fill);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 15px; height: 15px; fill: currentColor; }
.lang summary:hover { opacity: 1; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 16px; padding: 6px; margin: 0; list-style: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .06);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 300px;
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; border-radius: 10px; font-size: 14px;
}
.lang-menu a code { font-size: 11px; color: var(--muted); }
.lang-menu a:hover { background: var(--fill); }
.lang-menu a.on { font-weight: 600; color: var(--accent); }
.lang-menu a.on::after { content: '✓'; }

/* ── 分類膠囊 ── */
.cats-bar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 1200px; margin: 0 auto; padding: 0 22px 12px; }
.cats-bar::-webkit-scrollbar { display: none; }
.cats-bar .cat, .side-cats .cat {
  flex: none; font-size: 13.5px; padding: 5px 14px; border-radius: 980px; white-space: nowrap;
  color: var(--ink); background: var(--fill); opacity: .85;
}
.cats-bar .cat:hover, .side-cats .cat:hover { opacity: 1; background: var(--fill-2); }
.player-lists-nav { background: var(--ink); color: #fff; opacity: 1; }

/* ── 主版型 ── */
.layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 28px; padding-top: 24px; max-width: 1200px; margin: 0 auto; }
.side-cats { display: none; }
@media (min-width: 1024px) {
  .side-cats { display: flex; flex-direction: column; gap: 4px; align-items: stretch; position: sticky; top: 112px; align-self: start; }
  .side-cats .cat { font-size: 14px; padding: 7px 15px; text-align: left; }
}

/* ── 首頁雙欄 ── */
.home { display: grid; grid-template-columns: minmax(0, 1fr); }
.home > * { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .home { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 24px; align-items: start; }
  .home > .home-main { grid-column: 1; }
  .home > .ranks { grid-column: 2; grid-row: 1; position: sticky; top: 112px; }
}

/* ── Bento Grid ── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 10px; }
.b-cell {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 18px; min-height: 112px;
  transition: transform .45s cubic-bezier(.25, .1, .25, 1), box-shadow .45s cubic-bezier(.25, .1, .25, 1);
}
.b-cell:hover { transform: scale(1.012); box-shadow: var(--shadow-lift); }
.b-hero { grid-column: span 2; grid-row: span 2; padding: 0; }
.b-hero .hero-carousel { border-radius: 0; min-height: 320px; height: 100%; }
.b-hot, .b-top {
  background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .82) 62%), var(--bgimg);
  background-size: cover; background-position: center; color: var(--ink);
}
.b-hot { grid-column: 3; } .b-top { grid-column: 4; }
.b-hot .b-label, .b-top .b-label { color: var(--muted); }
.b-stats { justify-content: center; align-items: center; text-align: center; grid-column: 3 / span 2; background: var(--ink); color: #fff; }
.b-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.b-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 17px; line-height: 1.15; margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-stat { font-size: 12.5px; opacity: .7; }
.b-big { font-family: var(--font-display); font-weight: 700; letter-spacing: -.022em; font-size: 40px; line-height: 1; }
.b-stats .b-label { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .7); }
@media (max-width: 1023px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-hero { grid-column: span 2; grid-row: auto; }
  .b-hot, .b-top, .b-stats { grid-column: auto; }
  .b-hero .hero-carousel { min-height: 250px; }
}
@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; gap: 10px; }
  .b-hero { grid-column: span 1; }
}

/* ── hero 輪播 ── */
.hero-carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); min-height: 240px; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hero-carousel .slide {
  display: none; padding: 36px 40px; flex: 1; justify-content: center; flex-direction: column;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .97) 34%, rgba(255, 255, 255, .8) 62%, rgba(255, 255, 255, .2)),
    var(--bgimg);
  background-size: cover; background-position: center;
}
.hero-carousel .slide:not([style]) { background: var(--surface-2); }
.hero-carousel .slide.on { display: flex; animation: fadein .4s ease; }
.hero-carousel .eyebrow { color: var(--muted); font-weight: 600; font-size: 13px; margin: 0 0 8px; }
.hero-carousel h2 { font-size: 34px; margin: 0 0 10px; }
.hero-desc { color: var(--muted); max-width: 520px; margin: 0 0 18px; font-size: 15.5px; }
.hero-carousel .fav { z-index: 5; top: 14px; right: 14px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.dots { position: absolute; bottom: 16px; left: 40px; display: flex; gap: 7px; z-index: 5; }
.dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .18); padding: 0; transition: transform .3s, background .3s; }
.dots button.on { background: var(--ink); transform: scale(1.2); }

/* ── 分頁 ── */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex: none; border: 0; font: inherit; font-size: 14.5px; font-weight: 500;
  color: var(--ink); opacity: .7; padding: 7px 16px; border-radius: 980px; background: transparent;
  transition: background .3s, opacity .3s;
}
.tabs [role="tab"]:hover { opacity: 1; background: var(--fill); }
.tabs [role="tab"].on { opacity: 1; background: var(--ink); color: #fff; }

/* ── 卡片 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 22px 18px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; } }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .45s cubic-bezier(.25, .1, .25, 1), box-shadow .45s cubic-bezier(.25, .1, .25, 1); }
.card:hover { transform: translateY(-2px) scale(1.01); box-shadow: var(--shadow-lift); }
.card:hover .thumb img { transform: scale(1.04); }
.thumb { position: relative; aspect-ratio: 63 / 50; background: var(--fill); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.25, .1, .25, 1); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 700; font-family: var(--font-display); letter-spacing: -.02em; color: rgba(255, 255, 255, .92); background: hsl(var(--h) 28% 62%); }
.badge { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 980px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); color: var(--ink); font-size: 12px; font-weight: 600; }
.fav {
  position: absolute; top: 10px; right: 10px; border: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px);
  color: #86868b;
}
.fav.on { color: var(--brand); }
.fav svg { width: 15px; height: 15px; fill: currentColor; }
.fav.big { position: static; width: 46px; height: 46px; background: var(--fill); backdrop-filter: none; }
.fav.big svg { width: 20px; height: 20px; }
.card-meta { padding: 12px 14px 14px; }
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { font-size: 13px; color: var(--muted); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { font-size: 12px; background: var(--fill); border-radius: 980px; padding: 2px 10px; color: var(--muted); }
.stat { font-size: 12px; color: var(--muted); }

/* ── sections ── */
.sec { margin: 34px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sec-head h2 { font-size: 24px; }
.more { color: var(--accent); font-size: 14px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 10px; }
.cats .cat { background: var(--surface); border-radius: 14px; padding: 13px 10px; text-align: center; color: var(--ink); font-size: 14px; box-shadow: var(--shadow); }
.cats .cat:hover { background: var(--ink); color: #fff; }

.page-title { font-size: 32px; margin: 8px 0 16px; }
.lead { color: var(--muted); font-size: 15.5px; }
.empty { color: var(--muted); padding: 20px; background: var(--surface); border-radius: var(--radius-s); text-align: center; }

/* ── 清單入口 ── */
.lists-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.list-entry { display: grid; gap: 3px; background: var(--surface); border-radius: var(--radius-s); padding: 15px 17px; box-shadow: var(--shadow); }
.list-entry strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.list-entry span { font-size: 13px; color: var(--muted); }
.list-entry:hover { background: var(--surface-2); box-shadow: var(--shadow-lift); }
.list-del { color: var(--muted); font-size: 13px; padding: 2px 6px; }

/* ── feature ── */
.feature { background: var(--surface); border-radius: var(--radius); padding: 24px 26px; margin: 14px 0; box-shadow: var(--shadow); }
.feature h2 { font-size: 21px; }
.feature p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }

/* ── 右欄排行榜 ── */
.ranks { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 0 0 18px; }
.ranks h2 { font-size: 19px; margin: 0 0 10px; }
.ranks h3 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rank-cols { display: grid; grid-template-columns: 1fr; gap: 0 20px; }
@media (min-width: 640px) and (max-width: 1023px) { .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; }
.rank a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rank a:hover { color: var(--accent); }
.rank .no { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--muted); }
.rank .no.top3 { background: var(--ink); color: #fff; }
.rail-sub { margin-top: 16px; padding-top: 16px; box-shadow: 0 -.5px 0 rgba(0, 0, 0, .08); }
.rail-sub h3 { margin: 0 0 4px; font-size: 15px; }
.rail-sub p { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

/* ── 關於 ── */
.home-about { background: var(--surface); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.home-about h2 { font-size: 22px; }
.home-about p { color: var(--muted); max-width: 620px; font-size: 15px; }

/* ── 遊戲頁 ── */
.crumbs { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--accent); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1024px) { .game-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.game-main { min-width: 0; }
.game-hero { display: grid; grid-template-columns: minmax(230px, 400px) 1fr; gap: 22px; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.game-cover { aspect-ratio: 63 / 50; border-radius: 14px; overflow: hidden; background: var(--fill); }
.game-cover img, .game-cover .noimg { width: 100%; height: 100%; object-fit: cover; }
.game-info h1 { font-size: 30px; }
.tagline { color: var(--muted); font-size: 16px; }
.byline { color: var(--muted); font-size: 13.5px; }
.game-actions { display: flex; gap: 12px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 980px;
  padding: 11px 22px; font: inherit; font-size: 15px; font-weight: 500;
  transition: filter .3s, transform .3s cubic-bezier(.25, .1, .25, 1);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.add-list-btn { background: var(--fill); color: var(--accent); }
.add-list-btn:hover { background: var(--fill-2); filter: none; }
.rate-box { display: flex; gap: 8px; align-items: center; color: var(--muted); flex-wrap: wrap; font-size: 14.5px; }
.rate { border: 0; background: var(--fill); border-radius: 10px; padding: 7px 11px; color: var(--muted); transition: background .3s, color .3s; }
.rate svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.rate:hover { color: var(--ink); background: var(--fill-2); }
.rate.on { background: var(--accent); color: #fff; }
.report-btn { color: var(--accent); font-size: 14px; }
.stat-row { display: flex; gap: 16px; color: var(--muted); font-size: 14px; }
.game-desc { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin-top: 16px; box-shadow: var(--shadow); }
.game-desc h2 { font-size: 20px; }
.game-desc p { color: var(--ink); opacity: .78; }

/* comments */
.comment-form { display: grid; gap: 10px; margin-bottom: 16px; max-width: 560px; }
.comment-form input, .comment-form textarea { border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; background: var(--fill); color: var(--ink); }
.comment-form input::placeholder, .comment-form textarea::placeholder { color: var(--muted); }
.comments { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.comment { background: var(--surface); border-radius: var(--radius-s); padding: 12px 16px; box-shadow: var(--shadow); }
.comment time { color: var(--muted); font-size: 12px; margin-left: 8px; }
.comment p { margin: 4px 0 0; }

/* ── 媒體庫 ── */
.media { margin: 16px 0; }
.media-main { display: block; width: 100%; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--fill); aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.media-main img { width: 100%; height: 100%; object-fit: cover; }
.media-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 140px); gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 6px; }
.mthumb { border: 0; border-radius: 10px; overflow: hidden; padding: 0; background: var(--fill); aspect-ratio: 16 / 9; opacity: .6; transition: opacity .3s, transform .3s cubic-bezier(.25, .1, .25, 1); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; }
.mthumb.on { opacity: 1; outline: 3px solid var(--accent); outline-offset: -3px; }
.mthumb:hover { opacity: 1; }
.lightbox { border: 0; background: rgba(20, 20, 22, .96); max-width: min(1100px, 94vw); width: auto; padding: 10px; }
.lightbox::backdrop { background: rgba(0, 0, 0, .82); }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 10px; display: block; }
.lightbox menu { display: flex; gap: 8px; justify-content: center; margin: 10px 0 0; }
.lightbox menu button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 50%; width: 42px; height: 42px; font-size: 19px; }
.lightbox menu button:hover { background: rgba(255, 255, 255, .26); }

/* ── forms ── */
.stack-form { display: grid; gap: 14px; max-width: 560px; background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.stack-form label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.stack-form input, .stack-form textarea { border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; background: var(--fill); color: var(--ink); }
.hp { position: absolute; left: -9999px; }
.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.guide > div { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.prose { max-width: 640px; color: var(--muted); }

/* ── promo ── */
.promo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 18px; }

/* ── footer ── */
.foot { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 28px 22px 44px; color: var(--muted); max-width: 1200px; margin: 32px auto 0; font-size: 13.5px; box-shadow: 0 -.5px 0 rgba(0, 0, 0, .08); }
.foot a:hover { color: var(--accent); }
.foot .copy { margin-left: auto; font-size: 12.5px; opacity: .8; }

/* ── dialogs ── */
dialog { border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); padding: 24px; max-width: 360px; width: calc(100vw - 40px); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog h2 { font-size: 21px; }
dialog menu { display: flex; gap: 10px; justify-content: flex-end; padding: 0; margin: 12px 0 0; }
dialog menu button { border: 0; background: var(--fill); color: var(--ink); border-radius: 12px; padding: 9px 18px; font: inherit; font-size: 14.5px; }
dialog menu button.primary { background: var(--accent); color: #fff; }
dialog .hint { font-size: 13px; color: var(--muted); }
#gsi-btn { display: flex; justify-content: center; min-height: 44px; margin: 8px 0; }
.ts-slot { min-height: 0; }

/* admin */
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-s); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 9px 12px; text-align: left; font-size: 14px; box-shadow: 0 -.5px 0 rgba(0, 0, 0, .06); }
.approve-form { display: flex; gap: 6px; flex-wrap: wrap; }
.approve-form input { border: 0; border-radius: 9px; padding: 5px 9px; width: 110px; background: var(--fill); color: var(--ink); }

/* toast */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: rgba(29, 29, 31, .9); backdrop-filter: blur(10px); color: #fff; border-radius: 980px; padding: 10px 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 60; }
#toast.show { opacity: 1; }

/* ── responsive ── */
@media (max-width: 1023px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .ranks { margin-top: 22px; }
}
@media (max-width: 860px) {
  .game-hero { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; }
  .hero-carousel h2 { font-size: 27px; }
  .sub-top { display: none; }
  .top-in { padding: 10px 16px; }
  .cats-bar { padding: 0 16px 10px; }
}
@media (max-width: 380px) {
  .hero-carousel .slide { padding: 26px 22px; }
  .dots { left: 22px; }
  .page-title { font-size: 26px; }
}

/* ── 無障礙:透明度/對比偏好 ── */
@media (prefers-reduced-transparency: reduce) {
  .top, .lang-menu, .badge, .fav, #toast { backdrop-filter: none; -webkit-backdrop-filter: none; background: #ffffff; }
  dialog menu button, .lightbox menu button { background: #3a3a3c; }
}
@media (prefers-contrast: more) {
  body { background: #ffffff; }
  .top { background: #ffffff; box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
  .cats-bar .cat, .side-cats .cat { background: #e8e8ed; color: #000; }
  .tabs [role="tab"].on { background: #000; }
  :focus-visible { box-shadow: 0 0 0 3px #0071e3; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
