/* ============================================================
   X 博主精选画廊 · 静态复刻版样式
   主题：OLED 纯黑（默认） / 亮色
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --bg-app: #000000;
  --bg-surface: hsla(0, 0%, 5%, 0.85);
  --bg-surface-hover: hsla(0, 0%, 10%, 0.95);
  --bg-surface-solid: #09090b;
  --bg-elevated: hsla(0, 0%, 7%, 0.96);
  --bg-glass-nav: hsla(0, 0%, 0%, 0.82);
  --bg-card-footer: #050505;
  --bg-chip: hsla(0, 0%, 100%, 0.08);
  --bg-skeleton: hsla(0, 0%, 100%, 0.05);

  --accent-primary: hsl(199, 89%, 60%);
  --accent-primary-hover: hsl(199, 89%, 50%);
  --accent-primary-subtle: hsla(199, 89%, 60%, 0.14);
  --accent-primary-glow: hsla(199, 89%, 60%, 0.35);

  --accent-gold: hsl(38, 92%, 50%);
  --accent-gold-subtle: hsla(38, 92%, 50%, 0.16);
  --accent-spark: hsl(330, 81%, 60%);
  --accent-spark-subtle: hsla(330, 81%, 60%, 0.16);
  --accent-verified: #1d9bf0;
  --accent-success: hsl(152, 69%, 45%);
  --accent-danger: hsl(350, 89%, 60%);
  --accent-danger-subtle: hsla(350, 89%, 60%, 0.14);

  --border-subtle: hsla(0, 0%, 100%, 0.1);
  --border-medium: hsla(0, 0%, 100%, 0.18);
  --border-strong: hsla(0, 0%, 100%, 0.32);
  --border-focus: hsla(199, 89%, 60%, 0.55);

  --text-main: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 70%);
  --text-muted: hsl(215, 16%, 50%);
  --text-inverse: #000000;

  --shadow-sm: 0 2px 8px -2px hsla(0, 0%, 0%, 0.7);
  --shadow-md: 0 12px 32px -8px hsla(0, 0%, 0%, 0.85);
  --shadow-lg: 0 24px 50px -12px hsla(0, 0%, 0%, 0.95);
  --shadow-glow: 0 0 25px -4px hsla(199, 89%, 60%, 0.3);
  --shadow-gold-glow: 0 0 35px -4px hsla(38, 92%, 50%, 0.4);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --header-h: 84px;
  --page-max: 1320px;
  --gutter: 32px;
  --star-opacity: 0.5;
}

html[data-theme="light"] {
  --bg-app: #faf8f6;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fbf9f7;
  --bg-surface-solid: #ffffff;
  --bg-elevated: #ffffff;
  --bg-glass-nav: rgba(250, 248, 246, 0.9);
  --bg-card-footer: #fbf9f6;
  --bg-chip: rgba(180, 83, 9, 0.05);
  --bg-skeleton: rgba(120, 113, 108, 0.08);

  --accent-primary: #e11d48;
  --accent-primary-hover: #be123c;
  --accent-primary-subtle: rgba(225, 29, 72, 0.08);
  --accent-primary-glow: rgba(225, 29, 72, 0.15);
  --accent-gold: #b45309;
  --accent-gold-subtle: rgba(245, 158, 11, 0.12);
  --accent-spark: #db2777;
  --accent-spark-subtle: rgba(219, 39, 119, 0.1);

  --border-subtle: rgba(180, 83, 9, 0.09);
  --border-medium: rgba(180, 83, 9, 0.18);
  --border-strong: rgba(180, 83, 9, 0.28);
  --border-focus: rgba(225, 29, 72, 0.45);

  --text-main: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(120, 113, 108, 0.05);
  --shadow-md: 0 10px 28px -4px rgba(120, 113, 108, 0.08), 0 2px 8px -2px rgba(120, 113, 108, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(120, 113, 108, 0.12);
  --shadow-glow: 0 0 24px -4px rgba(225, 29, 72, 0.15);
  --star-opacity: 0;
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }

#bg-stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--star-opacity);
  transition: opacity .35s ease;
}

.app { position: relative; z-index: 1; }

::selection { background: var(--accent-primary-glow); color: var(--text-main); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: content-box; }

/* ---------- 3. 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--bg-glass-nav);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, hsla(199, 89%, 60%, .18), hsla(330, 81%, 60%, .14));
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 20px -6px var(--accent-primary-glow);
}

.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .5px; }

.header-search { flex: 1; display: flex; justify-content: center; }

.search-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px 0 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.search-box:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-glow); }
.search-icon { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1; min-width: 0;
  height: 100%;
  border: none; outline: none; background: none;
  color: var(--text-main);
  font-size: 13.5px;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-clear {
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-chip); color: var(--text-secondary);
}
.search-clear:hover { color: var(--text-main); background: var(--border-medium); }
.key-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-chip);
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.btn-lucky {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, hsl(330, 81%, 58%), hsl(275, 76%, 58%));
  box-shadow: 0 6px 20px -8px hsla(330, 81%, 60%, .8);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-lucky:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 10px 26px -8px hsla(330, 81%, 60%, .9); }
.btn-lucky:active { transform: scale(.97); }

.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: color .2s, background-color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { color: var(--text-main); background: var(--bg-surface-hover); border-color: var(--border-medium); }
.icon-btn:active { transform: scale(.94); }

/* ---------- 4. Hero ---------- */
main { padding: 0 0 60px; }

.hero-wrap { max-width: var(--page-max); margin: 0 auto; padding: 40px 24px 0; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 44px;
  padding: 40px 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(120% 140% at 88% 0%, hsla(199, 89%, 60%, .1), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, hsla(330, 81%, 60%, .07), transparent 60%),
    var(--bg-surface-solid);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, hsla(0, 0%, 100%, .04), transparent 40%);
  pointer-events: none;
}

.hero-left { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: 2.2px;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.6px;
}

.shiny {
  background: linear-gradient(100deg, var(--text-main) 20%, var(--accent-primary) 45%, hsl(275, 76%, 70%) 60%, var(--text-main) 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
}
@keyframes shine {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.hero-desc { margin: 0 0 18px; font-size: 14.5px; color: var(--text-secondary); }

.curator-wrap { margin-bottom: 22px; }
.curator {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color .2s, border-color .2s, background-color .2s;
}
.curator:hover { color: var(--text-main); border-color: var(--border-medium); background: var(--bg-surface-hover); }
.curator-label { color: var(--text-muted); }
.curator-name { font-weight: 600; color: var(--text-main); }

.capsule {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 16px 6px;
  border-radius: 18px;
  background: hsla(0, 0%, 100%, 0.03);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.capsule-item { display: flex; align-items: center; gap: 12px; padding: 0 22px; }
.capsule-div { width: 1px; background: var(--border-subtle); margin: 4px 0; }

.capsule-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  flex-shrink: 0;
}
.c-blue { color: var(--accent-primary); background: var(--accent-primary-subtle); }
.c-verified { color: var(--accent-verified); background: hsla(203, 88%, 53%, .14); }
.c-gold { color: var(--accent-gold); background: var(--accent-gold-subtle); }

.capsule-data { display: flex; flex-direction: column; line-height: 1.25; }
.capsule-num { font-size: 23px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.capsule-label { font-size: 11.5px; font-style: normal; color: var(--text-muted); }

/* Spotlight */
.hero-right { position: relative; z-index: 1; display: flex; }

.spotlight {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s;
}

.spotlight-badge {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  height: 26px; padding: 0 11px;
  margin-bottom: 14px;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 800;
  color: var(--accent-gold);
  background: var(--accent-gold-subtle);
  border: 1px solid hsla(38, 92%, 50%, .3);
}

.shiny-gold {
  background: linear-gradient(100deg, var(--accent-gold), hsl(48, 96%, 68%), var(--accent-gold));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
}

.spotlight-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.spotlight-loading { color: var(--text-muted); font-size: 13px; padding: 8px 0; }

.spotlight-user { display: flex; gap: 14px; align-items: flex-start; }

.spotlight-avatar-wrap { position: relative; flex-shrink: 0; cursor: pointer; }
.spotlight-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-medium);
  background: var(--bg-chip);
}

.spotlight-meta { min-width: 0; }
.spotlight-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spotlight-name { font-size: 17px; font-weight: 800; }
.spotlight-handle { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-muted); }
.spotlight-handle:hover { color: var(--accent-primary); }
.spotlight-bio {
  margin: 8px 0 0;
  font-size: 12.8px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-shuffle-spotlight {
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 13px;
  margin-top: 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  transition: color .2s, border-color .2s, transform .2s;
}
.btn-shuffle-spotlight:hover { color: var(--text-main); border-color: var(--border-medium); }
.btn-shuffle-spotlight:active { transform: scale(.96); }
.btn-shuffle-spotlight.spin svg { animation: spin .6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 徽标 / 认证 / 等级 */
.verified { color: var(--accent-verified); flex-shrink: 0; }

.tier-pill {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
}
.tier-top { color: var(--accent-gold); background: var(--accent-gold-subtle); border: 1px solid hsla(38, 92%, 50%, .32); }
.tier-known { color: var(--accent-primary); background: var(--accent-primary-subtle); border: 1px solid hsla(199, 89%, 60%, .3); }
.tier-new { color: var(--text-secondary); background: var(--bg-chip); border: 1px solid var(--border-subtle); }

/* ---------- 5. 工具栏 ---------- */
.toolbar { padding: 26px var(--gutter) 0; }

.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-row.meta { margin-top: 16px; }

.pills { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px;
  border-radius: var(--radius-full);
  font-size: 12.8px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: color .18s, background-color .18s, border-color .18s, transform .18s;
  white-space: nowrap;
}
.pill svg { color: var(--text-muted); transition: color .18s; }
.pill:hover { color: var(--text-main); border-color: var(--border-medium); background: var(--bg-surface-hover); }
.pill:active { transform: scale(.97); }
.pill.active {
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border-color: hsla(199, 89%, 60%, .45);
  box-shadow: 0 0 18px -8px var(--accent-primary-glow);
}
.pill.active svg { color: var(--accent-primary); }

.pill-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-chip);
  color: var(--text-secondary);
}
.pill.active .pill-badge { background: hsla(199, 89%, 60%, .18); color: var(--accent-primary); }
.pill-badge.tomb { color: var(--accent-danger); background: var(--accent-danger-subtle); }

.view-tabs {
  display: inline-flex; gap: 2px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.view-tab {
  display: grid; place-items: center;
  width: 34px; height: 30px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: color .18s, background-color .18s;
}
.view-tab:hover { color: var(--text-main); }
.view-tab.active { color: var(--accent-primary); background: var(--accent-primary-subtle); }

.results-text { font-size: 12.5px; color: var(--text-muted); }
.results-text b { color: var(--text-main); font-weight: 700; }

.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12.5px; color: var(--text-muted); }

.select-box { position: relative; }
.select-trigger {
  display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 13px;
  border-radius: var(--radius-md);
  font-size: 12.8px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: color .18s, border-color .18s;
}
.select-trigger:hover { color: var(--text-main); border-color: var(--border-medium); }
.select-trigger .arrow { transition: transform .22s; }
.select-trigger.open .arrow { transform: rotate(180deg); }

.select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 190px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  animation: pop .16s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 34px; padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12.8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.menu-item:hover { background: var(--bg-chip); color: var(--text-main); }
.menu-item.active { color: var(--accent-primary); }
.menu-item .check { color: var(--accent-primary); }

/* ---------- 6. 画廊 ---------- */
.gallery { padding: 22px var(--gutter) 0; }

.wall { display: flex; gap: 22px; align-items: flex-start; }
.wall > * { min-width: 0; }
.masonry-column { flex: 1 1 0; display: flex; flex-direction: column; gap: 22px; }
.wall.list-view { flex-direction: column; gap: 14px; align-items: stretch; }
.wall.list-view .masonry-column { width: 100%; }

/* 卡片 */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), border-color .28s, box-shadow .28s;
  animation: cardIn .45s cubic-bezier(.2, .8, .3, 1) backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg), 0 0 0 1px hsla(199, 89%, 60%, .08);
}

.card-banner {
  position: relative;
  height: 168px;
  background: linear-gradient(120deg, hsl(215, 25%, 12%), hsl(275, 25%, 16%));
  cursor: pointer;
  overflow: hidden;
}
.card-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .8, .3, 1), opacity .4s;
  opacity: 0;
}
.card-banner img.loaded { opacity: 1; }
.card:hover .card-banner img { transform: scale(1.05); }
.card-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, hsla(0, 0%, 0%, .55));
  pointer-events: none;
}

.card-flag {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  color: #fff;
  background: hsla(350, 89%, 50%, .85);
  backdrop-filter: blur(6px);
}

.card-body { padding: 0 16px 14px; }

.card-avatar-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px;
  margin-top: -30px;
  margin-bottom: 10px;
}

.card-avatar {
  position: relative;
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--bg-surface-solid);
  background: var(--bg-chip);
  flex-shrink: 0;
  cursor: pointer;
}
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-avatar .verified {
  position: absolute; right: -1px; bottom: -1px;
  width: 17px; height: 17px;
  background: var(--bg-surface-solid);
  border-radius: 50%;
  padding: 1px;
}

.card-name {
  font-size: 15.5px;
  font-weight: 800;
  margin: 0 0 2px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}

.card-handle-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.3px;
  color: var(--text-muted);
  margin-bottom: 9px;
}
.card-handle:hover { color: var(--accent-primary); }
.card-followers { display: inline-flex; align-items: center; gap: 5px; }

.card-bio {
  font-size: 12.6px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.card-bio a { color: var(--accent-primary); }
.card-bio a:hover { text-decoration: underline; }
.card-bio .at { color: var(--accent-spark); }

.card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 -16px -14px;
  padding: 10px 16px;
  background: var(--bg-card-footer);
  border-top: 1px solid var(--border-subtle);
}

.btn-time {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  transition: color .18s, border-color .18s;
}
.btn-time:hover { color: var(--text-main); border-color: var(--border-medium); }

.btn-visit {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 13px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, hsl(199, 89%, 52%), hsl(210, 90%, 46%));
  box-shadow: 0 4px 14px -6px hsla(199, 89%, 60%, .9);
  transition: filter .18s, transform .18s;
}
.btn-visit:hover { filter: brightness(1.1); }
.btn-visit:active { transform: scale(.96); }

/* 紧凑视图 */
.wall.compact-view .card-banner { height: 118px; }
.wall.compact-view .card-avatar { width: 46px; height: 46px; border-width: 2px; }
.wall.compact-view .card-avatar-row { margin-top: -23px; }
.wall.compact-view .card-name { font-size: 14px; }
.wall.compact-view .card-bio { -webkit-line-clamp: 2; font-size: 12px; }
.wall.compact-view .card-body { padding: 0 13px 12px; }
.wall.compact-view .card-footer { margin: 0 -13px -12px; padding: 9px 13px; }

/* 列表视图 */
.wall.list-view .card { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.wall.list-view .card-banner { height: 100%; min-height: 132px; }
.wall.list-view .card-body { padding: 14px 18px 0; }
.wall.list-view .card-avatar-row { margin-top: 0; justify-content: flex-start; }
.wall.list-view .card-avatar { width: 44px; height: 44px; border-width: 2px; }
.wall.list-view .card-bio { -webkit-line-clamp: 2; }
.wall.list-view .card-footer { margin: 12px -18px 0; padding: 10px 18px; }

/* 骨架屏 */
.card-skeleton {
  flex: 1 1 0;
  height: 340px;
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, var(--bg-skeleton) 30%, hsla(0, 0%, 100%, .09) 50%, var(--bg-skeleton) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -120% 0; } }

/* 无限滚动 */
.scroll-sentinel {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 30px 0 10px;
  font-size: 12.5px; color: var(--text-muted);
}
.spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent-primary);
  animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 70px 20px;
  text-align: center;
}
.empty-icon {
  display: grid; place-items: center;
  width: 62px; height: 62px;
  margin-bottom: 6px;
  border-radius: 18px;
  color: var(--text-muted);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}
.empty-icon.gold { color: var(--accent-gold); background: var(--accent-gold-subtle); }
.empty h3 { margin: 0; font-size: 16px; font-weight: 700; }
.empty p { margin: 0; font-size: 13px; color: var(--text-muted); }
.btn-ghost {
  margin-top: 10px;
  height: 34px; padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { color: var(--text-main); border-color: var(--border-medium); }

/* ---------- 7. 抽卡弹窗 ---------- */
.roulette-backdrop, .drawer-backdrop {
  position: fixed; inset: 0;
  z-index: 90;
  display: grid; place-items: center;
  padding: 24px;
  background: hsla(0, 0%, 0%, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }

.roulette-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 420px; }

.roulette-card {
  width: 100%;
  border-radius: var(--radius-xl);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }

.roulette-banner {
  height: 132px;
  background: linear-gradient(120deg, hsl(215, 25%, 14%), hsl(275, 25%, 18%));
  background-size: cover;
  background-position: center;
}
.roulette-avatar-zone {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 20px;
  margin-top: -34px;
}
.roulette-avatar-ring {
  width: 68px; height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: var(--bg-surface-solid);
  display: block;
}
.roulette-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-chip);
}
.roulette-info { padding: 12px 20px 20px; }
.roulette-name-row { display: flex; align-items: center; gap: 7px; }
.roulette-name { font-size: 19px; font-weight: 800; }
.roulette-handle { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-muted); }
.roulette-bio {
  margin: 10px 0 0;
  font-size: 12.8px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.roulette-card.shuffling .roulette-banner,
.roulette-card.shuffling .roulette-info { opacity: .75; }
.roulette-card.shuffling { animation: jitter .12s linear infinite; }
@keyframes jitter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.roulette-actions { display: flex; gap: 10px; animation: popIn .3s ease; }
.btn-again {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  color: var(--text-main);
  background: var(--bg-chip);
  border: 1px solid var(--border-medium);
}
.btn-again:hover { background: var(--bg-surface-hover); }
.roulette-actions .btn-visit { height: 40px; padding: 0 18px; font-size: 13px; }
.roulette-hint { font-size: 12px; color: var(--text-muted); }

/* 抽中撒花 */
.confetti {
  position: fixed;
  width: 8px; height: 8px;
  z-index: 95;
  pointer-events: none;
  border-radius: 2px;
  animation: confettiFly .9s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes confettiFly {
  from { opacity: 1; transform: translate(0, 0) rotate(0); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* ---------- 8. 详情抽屉 ---------- */
.drawer-backdrop { justify-items: end; padding: 0; }

.drawer {
  width: 100%; max-width: 460px;
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg-surface-solid);
  border-left: 1px solid var(--border-medium);
  animation: slideIn .3s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } }

.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.drawer-tag {
  height: 24px; padding: 0 10px;
  display: inline-flex; align-items: center;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 800;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  border: 1px solid hsla(199, 89%, 60%, .3);
}
.drawer-tip { font-size: 11.5px; color: var(--text-muted); margin-right: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 20px 30px; }

.polaroid {
  position: relative;
  width: 148px;
  margin: 0 auto 18px;
  padding: 10px 10px 30px;
  background: #f7f5f2;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  transform: rotate(-2.4deg);
  animation: stamp .4s cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes stamp { from { opacity: 0; transform: scale(.8) rotate(-10deg); } }
.polaroid img { width: 128px; height: 128px; object-fit: cover; border-radius: 3px; background: #ddd; }
.polaroid-cap {
  position: absolute; bottom: 7px; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6b6560;
}

.drawer-name {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 21px; font-weight: 800;
  text-align: center;
  margin: 0 0 4px;
}
.drawer-handle {
  display: block; text-align: center;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 14px;
}
.drawer-handle:hover { color: var(--accent-primary); }

.drawer-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.drawer-cell {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}
.drawer-cell b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.drawer-cell i { font-style: normal; font-size: 11.5px; color: var(--text-muted); }

.drawer-section-title {
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0 0 8px;
}
.drawer-bio {
  font-size: 13.2px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}
.drawer-bio a { color: var(--accent-primary); }
.drawer-bio a:hover { text-decoration: underline; }

.drawer-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, hsl(199, 89%, 52%), hsl(210, 90%, 46%));
  box-shadow: 0 8px 22px -10px hsla(199, 89%, 60%, .9);
}
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- 9. Toast / 回到顶部 ---------- */
.toast-wrap {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
  color: var(--text-main);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 80;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--text-main);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity .25s, transform .25s cubic-bezier(.2, .9, .3, 1.3), visibility .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--border-strong); color: var(--accent-primary); }

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  padding: 26px var(--gutter) 40px;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner { max-width: 1440px; margin: 0 auto; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-left { display: flex; align-items: center; gap: 8px; }
.footer-left b { color: var(--text-main); }
.dot { opacity: .5; }
.shortcuts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--text-secondary);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
}
.footer-note {
  margin: 0;
  max-width: 900px;
  font-size: 11.6px;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 28px; }
  .hero-title { font-size: 36px; }
}

@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .header-inner { padding: 0 24px; }
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero-title { font-size: 32px; }
  .capsule { width: 100%; justify-content: space-between; }
  .capsule-item { padding: 0 14px; }
  .capsule-num { font-size: 20px; }
  .wall { gap: 18px; }
  .masonry-column { gap: 18px; }
}

@media (max-width: 768px) {
  :root { --header-h: 68px; --gutter: 16px; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .brand-name { display: none; }
  .header-search { order: 3; flex-basis: 100%; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .site-header { height: auto; }
  .hero-wrap { padding: 20px 16px 0; }
  .hero-title { font-size: 26px; }
  .hero { padding: 20px 16px; border-radius: 18px; }
  .hero-desc { font-size: 13.2px; }
  .capsule { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
  .capsule-div { width: auto; height: 1px; margin: 0 16px; }
  .capsule-item { padding: 10px 16px; }
  .toolbar-row { flex-wrap: wrap; }
  .pills { gap: 8px; }
  .pill { height: 36px; padding: 0 12px; font-size: 12px; }
  .wall.list-view .card { grid-template-columns: 1fr; }
  .wall.list-view .card-banner { height: 140px; }
  .drawer { max-width: 100%; }
  .roulette-wrap { max-width: 100%; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 640px) {
  .toolbar, .gallery { padding-left: 14px; padding-right: 14px; }
  .view-tabs { margin-left: auto; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (hover: none) {
  .card:hover { transform: none; }
  .card:hover .card-banner img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .shiny, .shiny-gold { background-position: 24% 0; }
  html { scroll-behavior: auto; }
}

/* 静帧模式（index.html?still=1）：冻结全部动画，用于截图/对比/低性能设备。
   渐变文字不做关闭，只定格在中间态，保留视觉特征。 */
html.still *, html.still *::before, html.still *::after {
  animation: none !important;
  transition: none !important;
}
html.still .shiny, html.still .shiny-gold { background-position: 24% 0; }
html.still { scroll-behavior: auto; }

/* Reference-sized profile gallery: 3 x 460px cards on wide screens. */
.toolbar, .gallery {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: 28px;
}
.toolbar { padding-top: 30px; }
.gallery { padding-top: 22px; }
.wall, .masonry-column { gap: 20px; }
.pill { height: 34px; padding-inline: 14px; }
.pill.active {
  color: var(--bg-surface-solid);
  background: var(--text-main);
  border-color: var(--text-main);
  box-shadow: none;
}
.pill.active svg { color: inherit; }
.pill.active .pill-badge { color: inherit; background: #8884; }
.card { --profile-accent: #a64dff; border-color: color-mix(in srgb, var(--profile-accent) 24%, var(--border-subtle)); }
.card[data-tone="1"] { --profile-accent: #ff416c; }
.card[data-tone="2"] { --profile-accent: #009ee8; }
.card[data-tone="3"] { --profile-accent: #df9200; }
.card-banner { height: 100px; }
.card-body { padding: 0 18px 16px; }
.card-avatar-row { margin-top: -34px; margin-bottom: 14px; }
.card-avatar {
  width: 64px; height: 64px;
  border: 2px solid var(--bg-surface-solid);
  outline: 2px solid var(--profile-accent);
  overflow: visible;
}
.card-avatar img { border-radius: 50%; }
.card-avatar .verified { width: 21px; height: 21px; color: var(--accent-verified); }
.card-name { font-size: 16px; gap: 8px; margin-bottom: 6px; overflow-wrap: anywhere; }
.card-name .tier-pill { flex-shrink: 0; font-size: 11px; font-weight: 600; }
.card-handle-row { gap: 6px; margin-bottom: 22px; font-size: 12.5px; }
.card-handle { color: var(--profile-accent); font-family: var(--font-mono); overflow-wrap: anywhere; }
.card-followers { padding: 2px 8px; border-radius: 6px; background: var(--bg-chip); color: var(--text-secondary); }
.card-bio { font-size: 13px; line-height: 1.65; min-height: 32px; margin-bottom: 24px; -webkit-line-clamp: 5; }
.card-bio a { text-decoration: underline; text-underline-offset: 3px; }
.card-footer { margin: 0 -18px -16px; padding: 12px 18px; }
.btn-time { padding-inline: 0; border-color: transparent; background: transparent; color: var(--text-main); }
.btn-visit {
  color: var(--profile-accent);
  border: 1px solid color-mix(in srgb, var(--profile-accent) 35%, transparent);
  background: color-mix(in srgb, var(--profile-accent) 7%, var(--bg-surface-solid));
  box-shadow: none;
}
.wall.compact-view .card-banner { height: 88px; }
.wall.compact-view .card-avatar-row { margin-bottom: 10px; }
.wall.compact-view .card-handle-row { margin-bottom: 12px; }
.wall.compact-view .card-bio { min-height: 0; margin-bottom: 14px; }
.wall.list-view .card-banner { height: 100%; }
.wall.list-view .card-handle-row { margin-bottom: 12px; }
.wall.list-view .card-bio { min-height: 0; margin-bottom: 14px; }
@media (max-width: 1024px) {
  .toolbar, .gallery { padding-inline: 24px; }
}
@media (max-width: 640px) {
  .toolbar, .gallery { padding-inline: 16px; }
  .card-banner { height: 100px; }
  .card-body { padding-inline: 16px; }
  .card-footer { margin-inline: -16px; padding-inline: 16px; }
  .wall.list-view .card-banner { height: 100px; }
  .btn-time, .btn-visit { min-height: 36px; }
}

/* Optional partner button, managed from /admin/. */
.btn-sponsor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 180px;
  padding: 6px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: center;
  transition: background-color .18s, border-color .18s;
}
.btn-sponsor[hidden] { display: none; }
.btn-sponsor:hover { background: var(--bg-surface-hover); border-color: var(--accent-primary); }
.btn-sponsor:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }
@media (max-width: 768px) {
  .header-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; flex: 1; min-width: 0; }
  .btn-sponsor { max-width: 150px; padding-inline: 12px; }
}
