/* ════════════════════════════════════════════════════════════════════
   X-GALLERY · style.css — dark/light themes · RTL/LTR logical layout
   ════════════════════════════════════════════════════════════════════ */

:root {
  --radius: 16px;
  --radius-sm: 10px;
  --topbar-h: 58px;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --gold: #f5b942;
  --danger: #ef5f6b;
  --ok: #34d399;
  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --font-fa: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-en: 'Plus Jakarta Sans', 'Vazirmatn', system-ui, sans-serif;
}

html[data-theme='dark'] {
  --bg: #05070d;
  --bg-2: #090c15;
  --surface: rgba(150, 165, 255, 0.055);
  --surface-hover: rgba(150, 165, 255, 0.10);
  --surface-solid: #0d1120;
  --border: rgba(150, 165, 255, 0.14);
  --border-strong: rgba(150, 165, 255, 0.28);
  --text: #eef1fa;
  --dim: #97a0bd;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --glass: rgba(7, 10, 18, 0.72);
}

html[data-theme='light'] {
  --bg: #f2f4fb;
  --bg-2: #eaeefb;
  --surface: #ffffff;
  --surface-hover: #f4f6ff;
  --surface-solid: #ffffff;
  --border: rgba(28, 39, 90, 0.12);
  --border-strong: rgba(28, 39, 90, 0.24);
  --text: #161b2e;
  --dim: #5b6480;
  --shadow: 0 16px 44px rgba(38, 51, 120, 0.14);
  --glass: rgba(255, 255, 255, 0.78);
}

html[data-lang='fa'] body { font-family: var(--font-fa); }
html[data-lang='en'] body { font-family: var(--font-en); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.ltr-num { direction: ltr; unicode-bidi: embed; display: inline-block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ── Aurora background ─────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora-blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
html[data-theme='dark'] .aurora-blob { opacity: 0.34; }
.b1 { width: 44vw; height: 44vw; background: #7c5cff66; top: -18vw; inset-inline-start: -10vw; animation: drift 26s ease-in-out infinite alternate; }
.b2 { width: 36vw; height: 36vw; background: #22d3ee55; top: 4vh; inset-inline-end: -12vw; animation: drift 32s ease-in-out infinite alternate-reverse; }
.b3 { width: 30vw; height: 30vw; background: #f5b94233; bottom: -14vw; inset-inline-start: 30vw; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(4vw, 6vh, 0) scale(1.15); } }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; width: min(1240px, 94vw); margin-inline: auto; }

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-block-end: 1px solid var(--border);
}
.topbar-inner {
  width: min(1240px, 94vw); margin-inline: auto;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; font-weight: 800; }
.brand-text small { font-size: 10.5px; color: var(--dim); font-weight: 500; }

.search-wrap { flex: 1 1 220px; min-width: 0; max-width: 460px; }
.search-box {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 7px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-box .ic { color: var(--dim); flex-shrink: 0; }
.search-box input { flex: 1; background: none; border: 0; outline: 0; font-size: 13px; min-width: 60px; }
.search-box input::placeholder { color: var(--dim); }
.search-clear { color: var(--dim); display: grid; place-items: center; padding: 2px; border-radius: 6px; }
.search-clear:hover { color: var(--text); }
.kbd {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 7px; color: var(--dim);
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.admin-link { display: inline-flex; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 11px; padding: 9px 15px;
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-accent:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 58%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-xs { padding: 5px 10px; font-size: 11.5px; border-radius: 9px; }
.btn-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 24%, transparent); }

.icon-btn {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--dim); transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
html[data-theme='dark'] .ic-sun.hidden ~ .ic-moon { display: block; }
.lang-chip { font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { padding-block: 34px 10px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 26px; align-items: stretch; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase;
}
.eyebrow svg { color: var(--gold); }
.hero-title {
  font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; line-height: 1.2;
  margin-block: 12px 10px;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 65%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: var(--dim); font-size: 14.5px; line-height: 1.9; max-width: 52ch; }

.stat-capsule {
  margin-top: 22px; display: inline-flex; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 10px 16px; gap: 16px;
  box-shadow: var(--shadow);
}
.stat-item { display: flex; align-items: center; gap: 10px; }
.stat-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.si-blue { background: color-mix(in srgb, #7c8cff 16%, transparent); color: #8ea2ff; }
.si-cyan { background: color-mix(in srgb, #22d3ee 16%, transparent); color: #22d3ee; }
.si-gold { background: color-mix(in srgb, #f5b942 16%, transparent); color: var(--gold); }
.si-violet { background: color-mix(in srgb, #7c5cff 16%, transparent); color: #a78bfa; }
.stat-data { display: flex; flex-direction: column; line-height: 1.2; }
.stat-data b { font-size: 17px; font-weight: 800; font-family: 'JetBrains Mono', var(--font-fa); }
.stat-data small { font-size: 10.5px; color: var(--dim); }
.stat-sep { width: 1px; height: 30px; background: var(--border); }
@media (max-width: 560px) { .stat-sep { display: none; } }

/* Spotlight */
.hero-spot {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-spot::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 85% 10%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.spot-badge {
  position: relative; display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  color: var(--gold); font-size: 11.5px; font-weight: 800;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  padding: 5px 12px; border-radius: 99px;
}
.spot-body { position: relative; flex: 1; }
.spot-loading { color: var(--dim); font-size: 13px; padding-block: 26px; text-align: center; }
.spot-inner { display: flex; gap: 14px; align-items: flex-start; }
.spot-avatar { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; border: 2px solid var(--border-strong); flex-shrink: 0; }
.spot-name { display: flex; align-items: center; gap: 7px; font-size: 15.5px; font-weight: 800; flex-wrap: wrap; }
.spot-handle { color: var(--dim); font-size: 12.5px; margin-block: 3px 7px; }
.spot-bio { color: var(--dim); font-size: 12.5px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spot-stats { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.spot-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.spot-stat b { color: var(--text); font-weight: 800; }
.spot-shuffle { align-self: flex-end; position: relative; }

/* verified badge */
.v-badge {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent-2); color: #04202a;
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 0 0 2.5px var(--bg);
}

/* ── Toolbar ───────────────────────────────────────────────────── */
.toolbar { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.toolbar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--dim); border-radius: 99px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 700;
  transition: all 0.2s;
}
.pill:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.pill.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent);
}
.pill.active .pill-badge { background: rgba(255,255,255,0.25); color: #fff; }
.pill-badge {
  font-size: 10.5px; font-weight: 800; font-family: 'JetBrains Mono', monospace;
  background: var(--surface-hover); color: var(--dim);
  border-radius: 99px; padding: 1.5px 7px;
}
.badge-lost { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.pill-lost.active { background: linear-gradient(135deg, #ef5f6b, #f5b942); }

.view-tabs {
  display: flex; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px;
}
.view-tab {
  width: 34px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: var(--dim);
  transition: all 0.2s;
}
.view-tab:hover { color: var(--text); }
.view-tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }

.toolbar-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.results-count { color: var(--dim); font-size: 12.5px; flex: 1; }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12px; color: var(--dim); font-weight: 600; }
.select-box { position: relative; }
.select-trigger {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 8px 13px; font-size: 12.5px; font-weight: 700;
  transition: border-color 0.2s;
}
.select-trigger:hover { border-color: var(--border-strong); }
.select-trigger svg { color: var(--dim); }
.select-menu {
  position: absolute; top: calc(100% + 7px); inset-inline-end: 0; z-index: 50;
  min-width: 210px; background: var(--surface-solid);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px;
  animation: pop 0.18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: start;
  padding: 9px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  color: var(--dim);
}
.menu-item:hover { background: var(--surface-hover); color: var(--text); }
.menu-item.active { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.menu-item .check { color: var(--accent); }

/* ── Gallery wall & cards ──────────────────────────────────────── */
.gallery { padding-block: 22px 60px; }
.wall { display: grid; gap: 16px; align-items: start; }
.wall.grid-view {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.wall.compact-view { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 12px; }
.wall.list-view { grid-template-columns: 1fr; gap: 10px; }

.bcard {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1.2), box-shadow 0.22s, border-color 0.22s;
  animation: cardIn 0.4s ease backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bcard:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.bcard-banner { height: 58px; position: relative; }
.bcard-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--surface) 100%);
}
.bcard-ava-box { position: relative; margin: -30px 0 0 0; padding-inline: 16px; z-index: 2; }
.bcard-ava {
  width: 58px; height: 58px; border-radius: 17px; object-fit: cover;
  background: var(--surface-solid);
  border: 2.5px solid var(--surface);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.bcard-rank {
  position: absolute; top: 10px; inset-inline-end: 12px; z-index: 3;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700;
  background: color-mix(in srgb, var(--gold) 20%, rgba(0,0,0,0.35));
  color: var(--gold); backdrop-filter: blur(6px);
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
html[data-theme='light'] .bcard-rank { background: color-mix(in srgb, var(--gold) 22%, #fff); }
.bcard-block {
  position: absolute; top: 10px; inset-inline-start: 12px; z-index: 3;
  font-size: 10px; font-weight: 800;
  background: color-mix(in srgb, var(--danger) 85%, transparent);
  color: #fff; padding: 3px 9px; border-radius: 99px;
}
.bcard-body { padding: 10px 16px 14px; }
.bcard-name-row { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.bcard-name { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-handle { color: var(--dim); font-size: 12px; margin-block: 2px 8px; }
.bcard-bio {
  color: var(--dim); font-size: 12px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.bcard-followers { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--dim); }
.bcard-followers svg { color: var(--accent); }
.bcard-followers b { color: var(--text); font-family: 'JetBrains Mono', var(--font-fa); font-size: 12px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700;
  padding: 3.5px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--chip-c, #7c5cff) 13%, transparent);
  color: var(--chip-c, #7c5cff);
  max-width: 120px;
}
.cat-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.cat-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-visit {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  color: var(--dim); border: 1px solid var(--border);
  opacity: 0; transform: translateY(-4px);
  transition: all 0.2s;
}
.bcard:hover .bcard-visit { opacity: 1; transform: none; }
.bcard-visit:hover { color: #fff; background: var(--accent); border-color: transparent; }
.bcard.is-blocked .bcard-ava, .bcard.is-blocked .bcard-banner { filter: grayscale(1) brightness(0.8); }
.bcard.is-blocked { border-style: dashed; }

/* compact cards */
.compact-view .bcard-banner { height: 40px; }
.compact-view .bcard-ava { width: 44px; height: 44px; border-radius: 13px; margin-top: -22px; }
.compact-view .bcard-ava-box { padding-inline: 12px; }
.compact-view .bcard-body { padding: 8px 12px 12px; }
.compact-view .bcard-name { font-size: 13px; }
.compact-view .bcard-bio { display: none; }
.compact-view .bcard-foot { margin-top: 8px; }
.compact-view .cat-chip { max-width: 96px; font-size: 9.5px; }

/* list rows */
.list-view .bcard { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 14px; }
.list-view .bcard-banner { display: none; }
.list-view .bcard-ava-box { margin: 0; padding: 0; flex-shrink: 0; }
.list-view .bcard-ava { width: 46px; height: 46px; border-radius: 13px; border-width: 2px; }
.list-view .bcard-body { padding: 0; flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.list-view .bcard-name-row { margin: 0; flex: 1; min-width: 120px; }
.list-view .bcard-handle { margin: 0; flex-shrink: 0; }
.list-view .bcard-bio { display: none; }
.list-view .bcard-foot { margin: 0; flex-shrink: 0; }
.list-view .bcard-rank { position: static; order: -1; }
.list-view .bcard-visit { position: static; opacity: 1; transform: none; }

/* skeleton */
.skeleton-card {
  height: 190px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-hover) 50%, var(--surface) 60%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border: 1px solid var(--border);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.sentinel { display: flex; justify-content: center; padding-block: 26px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* empty states */
.empty { text-align: center; padding-block: 70px 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-ic {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
}
.empty h3 { font-size: 17px; font-weight: 800; }
.empty p { color: var(--dim); font-size: 13px; max-width: 46ch; line-height: 1.9; }
.empty .btn { margin-top: 6px; }

/* ── Roulette modal ────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.roulette-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 340px; width: 100%; }
.roulette-card {
  width: 100%;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardIn 0.35s ease;
}
.roulette-card.spinning { animation: rspin 0.16s linear infinite; }
@keyframes rspin { 0% { transform: rotate(-1.4deg) scale(0.985); } 50% { transform: rotate(1.4deg) scale(1.01); } 100% { transform: rotate(-1.4deg) scale(0.985); } }
.roulette-banner { height: 84px; background-size: cover; background-position: center; }
.roulette-avatar-zone { position: relative; padding-inline: 20px; margin-top: -34px; display: flex; align-items: flex-end; justify-content: space-between; }
.roulette-avatar-box { position: relative; }
.roulette-avatar-box img {
  width: 72px; height: 72px; border-radius: 20px; object-fit: cover;
  border: 3px solid var(--surface-solid); background: var(--surface);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.roulette-avatar-box .v-badge { position: absolute; bottom: 2px; inset-inline-end: 2px; }
.influence-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent);
  padding: 4px 10px; border-radius: 99px; margin-bottom: 6px;
}
.roulette-info { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 5px; }
.roulette-info b { font-size: 17px; font-weight: 800; }
.roulette-info .ltr-num { color: var(--dim); font-size: 13px; }
.roulette-info p { color: var(--dim); font-size: 12.5px; line-height: 1.8; max-height: 4.5em; overflow: hidden; }
.roulette-actions { display: flex; gap: 10px; }
.roulette-hint { color: var(--dim); font-size: 11.5px; }

/* ── Drawer ────────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 95;
  width: min(430px, 94vw);
  background: var(--surface-solid); border-inline-start: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: slideIn 0.28s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideIn { from { transform: translateX(var(--slide-from, 40px)); opacity: 0.4; } to { transform: none; opacity: 1; } }
html[dir='rtl'] .drawer { --slide-from: 40px; }
html[dir='ltr'] .drawer { --slide-from: 40px; }
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-block-end: 1px solid var(--border);
}
.drawer-tag {
  font-size: 11px; font-weight: 800; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 4px 11px; border-radius: 99px;
}
.drawer-esc { color: var(--dim); font-size: 11px; margin-inline-start: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.d-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-block: 8px 18px; }
.d-hero img { width: 92px; height: 92px; border-radius: 26px; object-fit: cover; border: 3px solid var(--border-strong); background: var(--surface); }
.d-hero b { font-size: 19px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.d-hero .ltr-num { color: var(--dim); font-size: 13.5px; }
.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-block: 14px; }
.d-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; }
.d-stat b { display: block; font-size: 15.5px; font-weight: 800; font-family: 'JetBrains Mono', var(--font-fa); }
.d-stat small { color: var(--dim); font-size: 10.5px; }
.d-section { margin-top: 14px; }
.d-section h4 { font-size: 11.5px; color: var(--dim); font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; }
.d-bio { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px; font-size: 12.5px; line-height: 1.9; color: var(--dim); }
.d-meta { display: flex; flex-direction: column; gap: 8px; }
.d-meta-row { display: flex; justify-content: space-between; font-size: 12.5px; padding-block: 4px; }
.d-meta-row span:first-child { color: var(--dim); }
.d-actions { margin-top: 18px; display: flex; gap: 10px; }
.d-actions .btn { flex: 1; justify-content: center; }

/* ── Toasts / back-top / footer ────────────────────────────────── */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; }
html[dir='rtl'] .toasts { transform: translateX(50%); }
.toast {
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 12px; padding: 10px 18px;
  font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}
.back-top {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 80;
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.2s;
}
.back-top:hover { transform: translateY(-3px); }

.footer { border-block-start: 1px solid var(--border); background: var(--surface); }
.footer-inner { width: min(1240px, 94vw); margin-inline: auto; padding-block: 20px; display: flex; flex-direction: column; gap: 10px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.footer-brand b { font-weight: 800; }
.footer-links { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.footer-links a { color: var(--dim); font-weight: 700; }
.footer-links a:hover { color: var(--accent); }
.kbd-hints { display: inline-flex; align-items: center; gap: 5px; }
.dot { color: var(--dim); opacity: 0.6; }
.footer-disclaimer { color: var(--dim); font-size: 11px; line-height: 1.9; opacity: 0.85; }

/* responsive */
@media (max-width: 760px) {
  .brand-text small, .admin-link span { display: none; }
  .btn-lucky span, #btn-lucky span { display: none; }
  .search-wrap { max-width: none; }
  .hero { padding-block: 22px 6px; }
  .list-view .bcard-body { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 520px) {
  .topbar-inner { gap: 8px; }
  .kbd { display: none; }
  .topbar-actions { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .btn-sm { padding: 7px 10px; }
  .admin-link { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
}
