:root {
  color-scheme: dark;
  --bg: #09090c; --card: #14141a; --ink: #f2f2f5; --ink-soft: #c0c0cc; --muted: #a9a9b8; --handle: #a3a3c2;
  --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.26); --accent: #ff2d6b;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f6; --card: #fff; --ink: #1a1a1e; --ink-soft: #4b4b57; --muted: #5f5f6b; --handle: #5a5a78;
  --line: rgba(0,0,0,.08); --line-strong: rgba(0,0,0,.22); --accent: #e11d48;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 底色放在 html，body 透明，背景光暈（body::before）才不會被內容區的底色蓋掉 */
html { background: var(--bg); }
body {
  background: transparent; color: var(--ink);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; justify-content: flex-start;
  margin: 0 auto; max-width: 760px; min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 頂欄吸頂：捲到哪都能搜尋、切主題。搜尋框放在頂欄裡，展開時整條一起吸住。
   z-index 要比卡片上的愛心／標籤（最高 5）大，比浮層（60）小 */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px 6px; position: sticky; top: 0; z-index: 20; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.brand { font-weight: 650; font-size: 16px; letter-spacing: -.2px; }
.spacer { flex: 1; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.icon-btn svg { width: 16px; height: 16px; }

/* 背景淡淡的粉紫光暈，固定在畫面上不跟著捲 */
:root { --glow1: rgba(255, 45, 107, .13); --glow2: rgba(140, 80, 255, .11); }
:root[data-theme="light"] { --glow1: rgba(255, 45, 107, .07); --glow2: rgba(140, 80, 255, .06); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% 0%, var(--glow1), transparent 70%),
    radial-gradient(50% 40% at 92% 8%, var(--glow2), transparent 70%);
}

/* 首頁首屏標題與統計（帳號頁的主卡片叫 .hero，這裡用 .intro 避免撞名）
   手機：標題＋一行數字，盡量不擋卡片；桌機：標題在左、三格統計在右 */
.intro { padding: 4px 14px 12px; }
.intro h1 {
  font-size: 17px; font-weight: 750; letter-spacing: -.3px; line-height: 1.25;
  background: linear-gradient(90deg, var(--ink) 30%, #ff7aa2); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-sub { display: none; font-size: 12px; color: var(--muted); margin-top: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.stats[hidden] { display: none; }
.stats div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 4px; }
.stats dt { font-size: 11px; color: var(--muted); }
.stats dd { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.search { display: none; flex: 1 0 100%; padding: 2px 0 6px; }
.search.open { display: block; }
.search { position: relative; }
.kbd { display: none; }
.search input { width: 100%; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; }

.rail { display: flex; gap: 7px; padding: 4px 14px 10px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.cat { flex: none; font-size: 12px; padding: 7px 12px; border-radius: 99px; background: var(--card); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.cat .n { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.cat.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.cat.on .n { opacity: .9; }

.bar { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; }
.bar select { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 12px; }
.views { display: flex; gap: 4px; flex: none; }
.views button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); display: grid; place-items: center; }
.views button svg { width: 15px; height: 15px; }
.views button.on { color: var(--ink); border-color: var(--accent); background: var(--card); }

.cnt { padding: 0 14px 8px; font-size: 11px; color: var(--muted); }
main { flex: 1; padding: 0 12px 12px; }

/* 用 grid 一排一排由左往右排，排序才會跟閱讀順序一致（CSS columns 會先填滿一整欄） */
.wall { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.wall.list { grid-template-columns: 1fr; }
.wall.compact { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

.cell { position: relative; min-width: 0; }
.card { display: block; position: relative; border-radius: 13px; overflow: hidden; background: var(--card); transition: transform .2s ease, box-shadow .2s ease; }
.art { height: clamp(140px, 40vw, 230px); display: grid; place-items: center; position: relative; background-size: cover; background-position: center; }
.wall.compact .art { height: 92px; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
/* 圖片還沒到：蓋一層會掃光的灰色佔位，載好（或確定失敗）就拿掉 */
.art.ld::before, .spot-art.ld::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, var(--card) 30%, var(--line-strong) 50%, var(--card) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.spot-body img.av { background: var(--line-strong); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.art b { position: relative; font-size: 2rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); pointer-events: none; }
.tags { position: absolute; top: 7px; left: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; font-weight: 600; background: rgba(0,0,0,.6); color: #fff; border-radius: 5px; padding: 2px 6px; }
.tag.lost { background: #444; }
.tag.flag { background: rgba(255, 122, 61, .92); }
.tag.new { background: var(--accent); letter-spacing: .4px; }
/* 收藏鈕至少 32px，手指才點得準 */
.heart { position: absolute; z-index: 3; top: 5px; right: 5px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 15px; }
.heart.on { color: var(--accent); }
.info { padding: 8px 9px 9px; min-width: 0; }
.info h5 { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info .sub { font-size: 11px; color: var(--handle); margin-top: 2px; }
.info .desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wall.compact .info .desc { display: none; }

/* 預設版面的卡片：橫幅條（3:1）＋壓在邊上的圓頭像 */
.card.rich { border: 1px solid var(--line); }
.card.rich .ban { position: relative; aspect-ratio: 3 / 1; overflow: hidden; }
.card.rich .ban img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card.rich .ban img.blur { filter: blur(14px) saturate(1.3) brightness(.75); transform: scale(1.35); }
.card.rich .ban.ld::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, var(--card) 30%, var(--line-strong) 50%, var(--card) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.card.rich .av {
  position: relative; z-index: 2; width: 52px; height: 52px; margin: -26px 0 0 10px;
  border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--accent);
}
.card.rich .av img { width: 100%; height: 100%; object-fit: cover; }
.card.rich .av b { font-size: 1.2rem; color: #fff; }
.card.rich .info { padding-top: 6px; }
.info .nm { display: flex; align-items: center; gap: 4px; }
.info .nm span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf { flex: none; width: 14px; height: 14px; fill: #1d9bf0; stroke: #fff; stroke-width: 2.4; }
.badge-top { flex: none; font-style: normal; font-size: 11px; font-weight: 700; color: #ffb547; background: rgba(255, 181, 71, .12); border: 1px solid rgba(255, 181, 71, .45); border-radius: 99px; padding: 0 6px; }
:root[data-theme="light"] .badge-top { color: #a35a00; background: rgba(255, 160, 40, .14); border-color: rgba(200, 120, 0, .4); }
.meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.meta .sub { margin-top: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fans { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-soft); background: var(--line); border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.fans svg { width: 11px; height: 11px; }

.wall.list .card { display: flex; align-items: center; }
.wall.list .art { width: 64px; height: 64px; flex: none; }
.wall.list .info { padding-right: 36px; }
.wall.list .art b { font-size: 1.3rem; }

.empty { display: none; text-align: center; color: var(--muted); padding: 28px 12px; }

/* 今日精選（Hero Spotlight） */
.spot { margin: 2px 12px 16px; }
.spot-frame { position: relative; }
.spot-card {
  position: relative; display: block; border-radius: 18px; overflow: hidden;
  background: #140d18;
  border: 1px solid rgba(255, 77, 125, .48);
  box-shadow: 0 12px 32px -10px rgba(255, 45, 107, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.spot-art { position: relative; height: 205px; background-size: cover; background-position: center; }
.spot-art { overflow: hidden; }
.spot-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) contrast(1.04) brightness(.92); }
/* 沒有橫幅：拿頭像放大模糊當背景，比一整片漸層有內容 */
.spot-art img.blur { filter: blur(22px) saturate(1.35) brightness(.72); transform: scale(1.25); }
.spot-art::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(95% 85% at 88% 12%, rgba(255, 180, 70, .42), transparent 55%),
    radial-gradient(90% 85% at 12% 92%, rgba(255, 45, 107, .68), transparent 62%);
  mix-blend-mode: screen; pointer-events: none;
}
.spot-art::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  /* 只壓暗下半部放文字的地方，上半部讓橫幅露出來 */
  background: linear-gradient(to top, #0b0810 6%, rgba(11, 8, 16, .62) 42%, rgba(11, 8, 16, 0) 78%);
  pointer-events: none;
}
.spot-top {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
}
.spot-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  padding: 5px 10px; border-radius: 99px;
  background: linear-gradient(135deg, #ff2d6b, #ff7a3d);
  color: #fff; box-shadow: 0 4px 14px rgba(255, 45, 107, .55);
}
.spot-shuf {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  font-size: 11.5px; font-weight: 600; color: #fff;
  padding: 5px 12px; border-radius: 99px;
  background: rgba(15, 15, 22, .68);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .24);
}
.spot-shuf:hover { border-color: #ff8fab; color: #ff8fab; }
.spot-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 14px; display: flex; align-items: flex-end; gap: 12px; color: #fff;
}
.spot-body img.av {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid #ff4d7d;
  box-shadow: 0 0 0 3px rgba(255, 45, 107, .28), 0 6px 16px rgba(0, 0, 0, .5);
}
.spot-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.spot-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spot-title b { font-size: 17px; font-weight: 750; letter-spacing: -.2px; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.spot-fan {
  font-style: normal; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(255, 45, 107, .24); border: 1px solid rgba(255, 110, 150, .5); color: #ffb3c6;
}
.spot-handle { font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.spot-sum {
  font-size: 12px; color: rgba(255, 255, 255, .92); margin-top: 3px; line-height: 1.38;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spot-cta {
  flex: none; font-size: 12px; font-weight: 700; padding: 9px 14px; border-radius: 99px;
  background: linear-gradient(135deg, #ff2d6b, #ff5c8a);
  color: #fff; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 45, 107, .5);
}
.more { display: block; width: 100%; margin: 4px 0 14px; padding: 12px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.foot { padding: 0 14px 14px; color: var(--muted); font-size: 11px; margin-top: auto; }
.single .foot { margin-top: 24px; }
.profile { flex: 1; }

.tabbar { display: flex; justify-content: space-around; padding: 10px 8px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 20; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); width: 64px; }
.tab svg { width: 19px; height: 19px; }
.tab.on { color: var(--accent); }

.fallback { padding: 0 14px; list-style: none; font-size: 12px; }
.fallback li { padding: 4px 0; }

/* 點卡片時的面板：網址照樣換成 /u/<handle>/，但畫面不跳走 */
.ovl { position: fixed; inset: 0; z-index: 60; display: none; overflow-y: auto; padding: 24px 12px 40px; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ovl.show { display: block; }
.ovl-box { position: relative; max-width: 640px; margin: 0 auto; }
.ovl-x { position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 20px; line-height: 1; }
.ovl .profile { padding: 0; }
.ovl .hero { margin-top: 0; }
body.locked { overflow: hidden; }

/* 個人頁 */
.profile { padding: 0 14px 20px; }
.back { color: var(--muted); font-size: 12px; display: inline-block; padding: 10px 0; }
.hero { background: var(--card); border-radius: 16px; padding: 0 15px 16px; overflow: hidden; }
.hero .bn { display: block; width: calc(100% + 30px); margin: 0 -15px 0; height: 120px; object-fit: cover; background: linear-gradient(120deg, #2a2a34, #14141a); }
.pfwrap { margin-top: -30px; }
.hero .pf { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: block; margin: 0 0 10px; background: var(--bg); box-shadow: 0 0 0 4px var(--card); }
.hero h1 { font-size: 20px; letter-spacing: -.2px; }
.handle { color: var(--handle); font-size: 12.5px; margin: 3px 0 12px; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; color: var(--muted); vertical-align: 1px; }
.site { margin: 0 0 14px; font-size: 13px; }
.site a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.site a:hover { border-bottom-color: var(--accent); }
.site a::before { content: "🔗 "; font-size: 11px; }
.bio { font-size: 13.5px; margin: 0 0 8px; word-break: break-word; overflow-wrap: anywhere; color: var(--ink); }
.facts { display: flex; gap: 18px; flex-wrap: wrap; }
.facts dt { font-size: 11px; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; font-weight: 700; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary { margin: 14px 2px; font-size: 14px; }
/* 帳號卡裡：本站自寫介紹放最前面、字最大；X 原文簡介降一級，前面標明出處 */
.hero .summary { margin: 0 0 12px; font-size: 15px; line-height: 1.55; font-weight: 500; color: var(--ink); }
.bio-label { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.hero .bio { font-size: 13px; color: var(--ink-soft); }
.quotebox { background: var(--card); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 13px; }
.quotebox h2 { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.source { color: var(--muted); font-size: 11px; margin: 8px 2px; }
/* 帳號頁底部：簡介互相提到、也在名單上的帳號 */
.related { margin: 22px 2px 4px; }
.related h2 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.related ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.related a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.related img, .related .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line-strong); display: grid; place-items: center; color: #fff; font-weight: 700; }
.related a > span { display: flex; flex-direction: column; min-width: 0; }
.related b, .related em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related b { font-size: 13px; }
.related em { font-style: normal; font-size: 11.5px; color: var(--handle); }
.related i { font-style: normal; font-size: 11px; color: var(--muted); }
.go { display: flex; gap: 8px; margin-top: 14px; }
.go a { flex: 1; display: block; text-align: center; padding: 13px; background: var(--accent); color: #fff; border-radius: 12px; font-weight: 650; }
.go a.alt { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; }
.source a, .foot a, .note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* 聯絡頁 */
.box { background: var(--card); border-radius: 16px; padding: 20px 16px 18px; }
.box h1 { font-size: 22px; letter-spacing: -.2px; }
.box h2 { font-size: 15px; margin: 22px 0 6px; }
.box ul { padding-left: 18px; font-size: 13px; line-height: 1.65; color: var(--ink-soft); }
.box p { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.box .go { margin-top: 12px; }
.box .note { color: var(--muted); margin-top: 10px; }
.go .share { flex: 0 0 auto; padding: 13px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; }

@media (max-width: 420px) {
  body { max-width: 100%; }
}

/* 窄螢幕（桌機斷點 780px 以下都是 390px 單欄）：今日精選改成
   頭像 + 文字兩欄、「進入檔案」自己一列靠右，名字與簡介才吃得到完整寬度 */
@media (max-width: 779px) {
  /* 手機：橫幅縮成一條，文字放在橫幅下面（不壓在照片上），整張卡本來就能點，不另放按鈕 */
  .spot { margin: 2px 12px 14px; }
  .spot-art { height: 96px; }
  .spot-art::after { background: linear-gradient(to top, rgba(11, 8, 16, .6), rgba(11, 8, 16, 0) 70%); }
  .spot-body { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0 11px; padding: 0 13px 13px; margin-top: -24px; }
  .spot-body img.av { grid-area: 1 / 1; width: 48px; height: 48px; }
  .spot-txt { grid-area: 1 / 2; padding-top: 27px; }
  .spot-title { gap: 6px; }
  .spot-title b { font-size: 15.5px; text-shadow: none; }
  .spot-sum { -webkit-line-clamp: 2; }
  .spot-cta { display: none; }
  /* 手機底欄已經有「收藏」，分類列就不再放一顆 */
  .cat[data-cat="fav"] { display: none; }
}

/* 平板、或桌機瀏覽器放大到不足 780px 時：不要縮成一條手機窄欄，改排 3 欄 */
@media (min-width: 600px) and (max-width: 779px) {
  .wall { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .wall.compact { grid-template-columns: repeat(4, 1fr); }
}

/* 桌機：放寬成多欄索引 */
@media (min-width: 780px) {
  body { max-width: 1080px; padding: 0 28px 48px; }
  .top { padding: 20px 0 10px; }
  /* 桌機搜尋框常駐在站名右邊，放大鏡按鈕就不用了；右側提示可以按 / 跳過來 */
  .top .search { display: block; order: 1; flex: 0 1 380px; margin-left: 22px; padding: 0; }
  .top .spacer { order: 2; }
  .top .icon-btn { order: 3; }
  #btn-search { display: none; }
  .search input { padding: 8px 34px 8px 12px; }
  .kbd { display: grid; place-items: center; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); font: 600 11px/1 ui-monospace, monospace; pointer-events: none; }
  /* 桌機畫面夠高：分類、排序釘在頂欄正下方，換條件不用捲回頂端（--top-h 由 app.js 依頂欄實際高度設定） */
  .filters { position: sticky; top: var(--top-h, 64px); z-index: 19; background: var(--bg); box-shadow: 0 1px 0 var(--line); padding-top: 4px; }
  .intro { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 28px; padding: 24px 0; }
  .intro h1 { grid-column: 1; font-size: 30px; }
  .intro-sub { display: block; grid-column: 1; font-size: 14px; margin-top: 6px; }
  .stats { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(3, 150px); gap: 12px; margin: 0; }
  .stats div { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
  .stats dt { font-size: 12px; }
  .stats dd { font-size: 24px; margin-top: 2px; }
  .brand { font-size: 20px; }
  .rail { flex-wrap: wrap; overflow: visible; padding: 6px 0 14px; }
  .bar { padding: 0 0 10px; }
  /* 選單裡只有幾個字，不用拉滿整排；版面切換鈕推到最右 */
  .bar select { flex: 0 1 220px; }
  .views { margin-left: auto; }
  .cnt { padding: 0 0 12px; font-size: 12px; }
  main { padding: 0 0 20px; }
  .wall { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
  .wall.list { grid-template-columns: 1fr; }
  /* 精簡格要比一般卡片多欄才有意義：依寬度自動排 5～6 欄 */
  .wall.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card { border-radius: 16px; }
  .card.rich .av { width: 64px; height: 64px; margin: -32px 0 0 13px; }
  .info .nm { gap: 5px; }
  .vf { width: 16px; height: 16px; }
  .badge-top { font-size: 10.5px; padding: 1px 7px; }
  .fans { font-size: 11.5px; padding: 2px 7px; }
  .card.rich .info .desc { -webkit-line-clamp: 3; }
  .info { padding: 12px 13px 13px; }
  .info h5 { font-size: 15px; }
  .info .sub { font-size: 12px; }
  .info .desc { font-size: 12.5px; }
  .tag { font-size: 11px; padding: 3px 7px; }
  .heart { width: 32px; height: 32px; font-size: 15px; }
  .tabbar { display: none; }
  .foot { padding: 8px 0 0; font-size: 12px; }
  .spot { margin: 2px 0 20px; }
  .spot-art { height: 250px; }
  .spot-top { top: 16px; left: 18px; right: 18px; }
  .spot-pill { font-size: 11.5px; padding: 6px 13px; }
  .spot-shuf { top: 16px; right: 18px; font-size: 12.5px; padding: 6px 14px; }
  .spot-body { padding: 20px 22px; gap: 16px; }
  .spot-body img.av { width: 74px; height: 74px; }
  .spot-title b { font-size: 22px; }
  .spot-fan { font-size: 12px; padding: 3px 9px; }
  .spot-handle { font-size: 13px; }
  .spot-sum { font-size: 13.5px; max-width: 620px; }
  .spot-cta { font-size: 13.5px; padding: 11px 20px; }
  .profile { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }
  body.single { max-width: 700px; }
  body.single .foot { margin-top: 28px; text-align: center; }
  body.single .profile { flex: none; }
  body.single .back { padding-top: 4px; }
  .hero { padding: 26px 24px; }
  .hero .pf { width: 88px; height: 88px; }
  .hero h1 { font-size: 26px; }
  .summary { font-size: 15px; }
  .back { font-size: 13px; }
}



/* ── 鍵盤與滑鼠回饋 ───────────────────────────────────── */
:where(a, button, select, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card:focus-visible { outline-offset: -2px; }
.cat, .views button, .icon-btn, .more, .spot-cta {
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .2s ease;
}
.ovl-load { padding: 46px 16px; text-align: center; color: var(--muted); font-size: 13px; }

#btn-theme .i-moon { display: none; }
:root[data-theme="light"] #btn-theme .i-sun { display: none; }
:root[data-theme="light"] #btn-theme .i-moon { display: block; }

/* 只有在真的有滑鼠的裝置才做位移／放大，觸控不會卡住 hover 狀態 */
@media (hover: hover) and (pointer: fine) {
  /* 滑過卡片：微微浮起，邊緣亮粉色光 */
  .cell:hover .card { transform: translateY(-4px); border-color: rgba(255, 45, 107, .55); box-shadow: 0 0 0 1px rgba(255, 45, 107, .35), 0 18px 36px -16px rgba(255, 45, 107, .45); }
  .cell:hover .art img, .cell:hover .ban img:not(.blur) { transform: scale(1.05); }
  .cat:hover, .views button:hover, .icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
  .cat.on:hover { color: #fff; }
  .more:hover { color: var(--ink); border-color: var(--line-strong); }
  .spot-card:hover { box-shadow: 0 18px 44px -12px rgba(255, 45, 107, .55), inset 0 1px 0 rgba(255, 255, 255, .22); }
  .spot-card:hover .spot-cta { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .cell:hover .card, .cell:hover .art img, .spot-card:hover .spot-cta { transform: none; }
}
