/* SFG FNF Cards — SillyFangirl v11.12 brand kit: shell, layout, header, modals, binder, dex, ranking, eBook, live dock */
:root {
  --ground-deep: #14131c; --ground-mid: #1b1936; --indigo-b: #221f4d; --indigo-glow: #2e2873;
  --blue: #392cff; --blue-hi: #554aff; --blue-txt: #8c84ff; --blue-bright: #6b61ff;
  --muted: #a7a3d6; --soft: #d8d6f4; --gold: #ffc83d; --ok: #3ee07a; --bad: #ff6b72;
  --left: #c24b99; --down: #12c8f0; --up: #22d43c; --right: #f9393f;
  --card: rgba(28, 26, 56, 0.78); --card-hi: rgba(42, 38, 96, 0.85);
  --line: rgba(167, 163, 214, 0.18); --line-2: rgba(167, 163, 214, 0.34);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px; --top-h: 72px; --dock-w: 410px;
  --shadow: 0 18px 50px rgba(5, 4, 20, 0.55);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--soft); background: var(--ground-deep);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.modal-open, body.cutscene-open { overflow: hidden; }
a { color: var(--blue-txt); }
img { max-width: 100%; }
button { font-family: inherit; }
::selection { background: var(--blue); color: #fff; }

.bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(65vmax 42vmax at 50% -10%, var(--indigo-glow), transparent 70%),
    radial-gradient(42vmax 32vmax at 105% 35%, rgba(57, 44, 255, 0.16), transparent 70%),
    radial-gradient(40vmax 30vmax at -5% 85%, rgba(194, 75, 153, 0.12), transparent 70%),
    linear-gradient(180deg, var(--indigo-b) 0%, var(--ground-mid) 40%, var(--ground-deep) 100%);
}
#rhythm-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- brand atoms ---------- */
.dashes { display: inline-flex; gap: 4px; align-items: flex-end; height: 16px; vertical-align: middle; }
.dashes i { display: block; width: 5px; height: 100%; border-radius: 2px; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.dashes i:nth-child(1) { background: var(--left); box-shadow: 0 0 8px var(--left); animation-delay: -0.2s; }
.dashes i:nth-child(2) { background: var(--down); box-shadow: 0 0 8px var(--down); animation-delay: -0.55s; }
.dashes i:nth-child(3) { background: var(--up); box-shadow: 0 0 8px var(--up); animation-delay: -0.35s; }
.dashes i:nth-child(4) { background: var(--right); box-shadow: 0 0 8px var(--right); animation-delay: -0.8s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.sfg-frame { position: relative; }
.sfg-frame::after {
  --c: var(--blue-bright); --l: 22px; --w: 2px;
  content: ""; position: absolute; inset: -7px; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 6px rgba(85, 74, 255, 0.85));
}

h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; letter-spacing: 0.02em; color: #fff; text-transform: uppercase; }
h2::before { content: ""; flex: none; width: 13px; height: 13px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 14px rgba(57, 44, 255, 0.9); }
h3 { margin: 0; font-weight: 900; color: #fff; }
h4 { margin: 0 0 8px; font-weight: 800; color: #fff; letter-spacing: 0.03em; }
.kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; color: var(--blue-txt); text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 6px 0 16px; }
.section-sub { flex-basis: 100%; margin: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.sh-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rec { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff2d3d; box-shadow: 0 0 0 0 rgba(255, 45, 61, 0.7); animation: rec 1.4s infinite; flex: none; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 61, 0.7); } 70% { box-shadow: 0 0 0 9px rgba(255, 45, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 61, 0); } }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rc, #9aa0b8); box-shadow: 0 0 8px var(--rc, #9aa0b8); margin-right: 6px; vertical-align: middle; flex: none; }
.rdot.r-common { --rc: #9aa0b8; } .rdot.r-uncommon { --rc: #22d43c; } .rdot.r-rare { --rc: #12c8f0; } .rdot.r-epic { --rc: #c24b99; }
.rdot.r-legendary { --rc: #ffc83d; } .rdot.r-mythic { --rc: #ff4d6d; }
.rdot.r-secret { background: conic-gradient(#00f5d4, #392cff, #c24b99, #ffc83d, #00f5d4); box-shadow: 0 0 8px #00f5d4; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); color: var(--soft); }
.pill.ok { color: var(--ok); border-color: rgba(62, 224, 122, 0.4); }
.pill.gold { color: var(--gold); border-color: rgba(255, 200, 61, 0.45); }
.tag { display: inline-block; padding: 2px 9px; margin: 2px 4px 2px 0; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(57, 44, 255, 0.18); color: var(--blue-txt); }
.empty-state { padding: 48px 16px; text-align: center; color: var(--muted); font-weight: 700; grid-column: 1 / -1; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--card-hi); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s; white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--blue-bright); box-shadow: 0 6px 22px rgba(57, 44, 255, 0.35); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn small { font-weight: 700; opacity: 0.85; }
.btn.primary { background: linear-gradient(180deg, var(--blue-hi), var(--blue)); border-color: rgba(140, 132, 255, 0.6); box-shadow: 0 6px 24px rgba(57, 44, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 8px 32px rgba(85, 74, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn.gold { background: linear-gradient(180deg, #ffd766, #f0a91c); color: #2a1a00; border-color: rgba(255, 220, 120, 0.8); box-shadow: 0 6px 22px rgba(255, 200, 61, 0.35); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(255, 107, 114, 0.4); }
.btn.big { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn.tiny { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.cost-chip { padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-size: 13px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); color: #fff; font-size: 17px; cursor: pointer; display: inline-grid; place-items: center; transition: border-color 0.2s; }
.icon-btn:hover { border-color: var(--blue-bright); }
input, select {
  font-family: inherit; font-size: 14px; font-weight: 600; color: #fff;
  background: rgba(20, 19, 28, 0.7); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 13px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(57, 44, 255, 0.3); }
select option { background: var(--ground-mid); }
.sel-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.sel-wrap select { padding: 7px 10px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(20, 19, 28, 0.6); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; padding: 7px 13px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--blue); color: #fff; box-shadow: 0 0 14px rgba(57, 44, 255, 0.6); }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.row-btns.end { justify-content: flex-end; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(20, 19, 28, 0.94), rgba(27, 25, 54, 0.86));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--left) 0 25%, var(--down) 25% 50%, var(--up) 50% 75%, var(--right) 75%); opacity: 0.75; }
.topbar-row { max-width: 1680px; margin: 0 auto; min-height: var(--top-h); padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(85, 74, 255, 0.6)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-weight: 900; font-size: 18px; letter-spacing: 0.05em; }
.live-sync { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em; color: var(--muted); }
.live-sync i { width: 6px; height: 6px; border-radius: 50%; background: #6b6890; transition: background 0.3s, box-shadow 0.3s; }
.live-sync.on { color: var(--ok); }
.live-sync.on i { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.tabs { display: flex; gap: 3px; padding: 4px; border-radius: 14px; background: rgba(20, 19, 28, 0.55); border: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; padding: 8px 11px; border-radius: 10px; cursor: pointer; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.tab:hover { color: #fff; background: rgba(57, 44, 255, 0.15); }
.tab.on { color: #fff; background: linear-gradient(180deg, var(--blue-hi), var(--blue)); box-shadow: 0 0 18px rgba(57, 44, 255, 0.6); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.wallet { display: flex; gap: 5px; flex: none; }
.wbadge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
@media (max-width: 1520px) { .brand .dashes { display: none; } .wbadge small { display: none; } }
.wbadge b { font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.wbadge small { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.w-notes { border-color: rgba(18, 200, 240, 0.35); }
.w-charges { border-color: rgba(255, 200, 61, 0.45); }
.w-dust { border-color: rgba(194, 75, 153, 0.4); }
.wbadge.bump { animation: bump 0.5s; }
@keyframes bump { 30% { transform: scale(1.15); box-shadow: 0 0 22px rgba(255, 200, 61, 0.6); } }
.live-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 45, 61, 0.55); background: linear-gradient(180deg, rgba(255, 45, 61, 0.22), rgba(255, 45, 61, 0.08));
  color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 0.06em; cursor: pointer; white-space: nowrap; transition: box-shadow 0.2s, background 0.2s;
}
.live-btn:hover, .live-btn.on { box-shadow: 0 0 22px rgba(255, 45, 61, 0.5); background: linear-gradient(180deg, rgba(255, 45, 61, 0.4), rgba(255, 45, 61, 0.15)); }
.live-btn.has-spawn { animation: spawnGlow 1.2s ease-in-out infinite; }
@keyframes spawnGlow { 50% { box-shadow: 0 0 30px rgba(255, 200, 61, 0.75); border-color: var(--gold); } }
.spawn-ind { font-style: normal; font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--gold); color: #2a1a00; letter-spacing: 0.08em; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.lang-switch button { border: 0; background: var(--card); color: var(--muted); font-weight: 800; font-size: 12px; padding: 0 10px; height: 36px; cursor: pointer; }
.lang-switch button.on { background: var(--blue); color: #fff; }
.account-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: #fff; cursor: pointer; font-weight: 800; font-size: 13px; max-width: 320px; transition: border-color 0.2s; }
.account-pill:hover { border-color: var(--blue-bright); }
.account-pill .ap-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; padding-left: 4px; }
.account-pill .ap-name em { font-style: normal; font-size: 10px; color: var(--gold); text-transform: uppercase; }
.ap-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; background: conic-gradient(from 45deg, var(--left), var(--down), var(--up), var(--right), var(--left)); box-shadow: inset 0 0 0 3px rgba(20, 19, 28, 0.85); }
.ap-avatar.big { width: 54px; height: 54px; font-size: 19px; }
.ap-yt { font-size: 11px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ap-yt.ok { background: rgba(62, 224, 122, 0.14); color: var(--ok); }
.ap-yt.link { background: rgba(255, 45, 61, 0.16); color: #ff8c94; }

/* ---------- layout ---------- */
.layout { max-width: 1680px; margin: 0 auto; padding: 22px 18px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.layout.live-open { grid-template-columns: minmax(0, 1fr) var(--dock-w); }
.main { min-width: 0; }
.tab-panel { animation: fadeUp 0.35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- live dock ---------- */
.live-dock {
  position: sticky; top: calc(var(--top-h) + 14px); max-height: calc(100vh - var(--top-h) - 28px);
  display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow-y: auto;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); scrollbar-width: thin;
}
.dock-head { display: flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: 0.06em; }
.dock-head b { color: #fff; font-weight: 900; }
.dock-sub { color: var(--muted); font-size: 12px; font-weight: 700; }
.dock-head .icon-btn { margin-left: auto; width: 30px; height: 30px; font-size: 13px; }
.dock-player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); flex: none; }
.dock-player iframe, .dock-chat iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dock-player .offline { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 14px; color: var(--muted); font-weight: 700; font-size: 13px; }
.dock-player .offline img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.22; }
.dock-player .offline p, .dock-player .offline a { position: relative; margin: 0; }
.dock-chat-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 13px; color: var(--soft); }
.dock-chat { position: relative; height: 420px; min-height: 300px; border-radius: 12px; overflow: hidden; background: #0f0f0f; border: 1px solid var(--line); flex: none; }
.cheat { padding: 10px 12px; border-radius: 12px; background: rgba(20, 19, 28, 0.55); border: 1px solid var(--line); }
.cheat h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue-txt); }
.cheat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cheat li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cmd { border: 1px solid var(--line-2); background: rgba(57, 44, 255, 0.15); border-radius: 7px; padding: 3px 7px; cursor: pointer; flex: none; }
.cmd code { color: #fff; font-weight: 800; font-size: 12px; }
.cmd:hover { border-color: var(--blue-bright); }
.dock-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.dock-foot .dev { opacity: 0.7; border-style: dashed; }
.dock-foot .dev:hover { opacity: 1; }
.linked-ok { color: var(--ok); font-weight: 800; font-size: 13px; }
.watch-sync { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 10px; padding: 9px 11px; border-radius: 12px; background: rgba(20, 19, 28, 0.68); border: 1px solid var(--line); font-size: 12px; }
.watch-sync.on { border-color: rgba(62, 224, 122, 0.55); box-shadow: 0 0 18px rgba(62, 224, 122, 0.16); }
.watch-sync.idle { border-color: rgba(255, 200, 61, 0.45); }
.watch-sync .ws-dot { width: 9px; height: 9px; border-radius: 50%; background: #6b6890; }
.watch-sync.on .ws-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: rec 1.4s infinite; }
.watch-sync.idle .ws-dot { background: var(--gold); }
.watch-sync .ws-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.watch-sync .ws-state { color: #fff; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-sync .ws-rate { color: var(--muted); font-size: 11px; font-weight: 700; }
.watch-sync .ws-rate b.on { color: var(--ok); }
.watch-sync .ws-next { font-size: 11px; font-weight: 800; color: var(--ok); }
.watch-sync .ws-bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.watch-sync .ws-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--down), var(--ok)); transition: width 0.6s linear; }
.watch-sync .ws-meta { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--muted); }
.ebook-slot { margin-top: 22px; }

.spawn-banner { border-radius: 14px; padding: 12px; border: 1px solid var(--line); background: rgba(20, 19, 28, 0.55); flex: none; }
.spawn-banner.idle { color: var(--muted); font-size: 13px; font-weight: 700; }
.sp-idle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-idle b { color: #fff; }
.radar { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(107, 97, 255, 0.5); position: relative; overflow: hidden; }
.radar::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(107, 97, 255, 0.8), transparent 30%); animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spawn-banner.active { border-color: var(--rc); background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--rc) 28%, transparent), rgba(20, 19, 28, 0.7)); box-shadow: 0 0 26px color-mix(in srgb, var(--rc) 40%, transparent); display: grid; gap: 10px; animation: spawnIn 0.5s ease; }
@keyframes spawnIn { from { transform: scale(0.94); opacity: 0; } }
.sp-main { display: flex; align-items: center; gap: 12px; }
.sp-art { flex: none; width: 74px; height: 74px; border-radius: 12px; border: 2px solid var(--rc); background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 40%, transparent), #14131c 75%); padding: 4px; cursor: pointer; box-shadow: 0 0 16px var(--rc); }
.sp-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
.sp-info { min-width: 0; display: flex; flex-direction: column; }
.sp-kicker { font-size: 10px; font-weight: 900; letter-spacing: 0.16em; color: var(--gold); animation: blink 1s infinite; }
.sp-name { font-size: 17px; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-r { font-size: 12px; font-weight: 700; color: var(--soft); }
.sp-timer { margin-left: auto; text-align: center; min-width: 56px; padding: 6px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); }
.sp-timer b { display: block; font-size: 24px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-timer small { font-size: 10px; color: var(--muted); font-weight: 800; }
.sp-timer.low b { color: var(--bad); animation: blink 0.5s infinite; }
.sp-catchers small { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.sp-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; max-height: 92px; overflow-y: auto; }
.catcher { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); animation: spawnIn 0.35s ease; }
.catcher.first { background: rgba(255, 200, 61, 0.18); color: var(--gold); }
.catcher em { font-style: normal; font-size: 10px; font-weight: 900; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(8, 7, 18, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.2s; overflow-y: auto; }
.modal-back.in { opacity: 1; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 24px; border-radius: 20px; background: linear-gradient(180deg, rgba(42, 38, 96, 0.96), rgba(27, 25, 54, 0.98)); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 0 60px rgba(57, 44, 255, 0.25); transform: translateY(14px) scale(0.98); transition: transform 0.25s; }
.modal-back.in .modal { transform: none; }
.modal.small { width: min(420px, 100%); }
.modal.inspector { width: min(860px, 100%); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(20, 19, 28, 0.5); color: #fff; cursor: pointer; font-size: 14px; z-index: 3; }
.modal-x:hover { border-color: var(--blue-bright); }
.confirm p { margin: 4px 0 6px; font-weight: 600; font-size: 15px; text-align: center; }

.acct { display: grid; gap: 14px; }
.acct-hero { display: flex; align-items: center; gap: 14px; }
.acct-hero img { width: 84px; flex: none; filter: drop-shadow(0 0 16px rgba(85, 74, 255, 0.6)); }
.acct-hero p { margin: 6px 0 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.acct-head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.acct-sec { padding: 14px; border-radius: 14px; background: rgba(20, 19, 28, 0.5); border: 1px solid var(--line); }
.acct-sec.yt { margin: 4px 6px; }
.acct-sec.switch summary { cursor: pointer; font-weight: 800; color: var(--muted); }
.acct-sec.switch[open] summary { margin-bottom: 10px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.code-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.code-row code { flex: 1; padding: 10px 12px; border-radius: 10px; background: #0d0c16; border: 1px dashed var(--blue-bright); color: #fff; font-size: 16px; font-weight: 800; letter-spacing: 0.04em; }
.live-mini { margin-top: 10px; border-color: rgba(255, 45, 61, 0.55); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 10px; margin-top: 10px; }
.auth-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-err { margin: 0; color: var(--bad); font-weight: 700; font-size: 13px; }

/* ---------- toasts & flash ---------- */
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { pointer-events: auto; padding: 11px 18px; border-radius: 12px; background: rgba(27, 25, 54, 0.96); border: 1px solid var(--line-2); color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: toastIn 0.3s ease; text-align: center; }
.toast.ok { border-color: rgba(62, 224, 122, 0.55); }
.toast.bad { border-color: rgba(255, 107, 114, 0.6); }
.toast.warn { border-color: rgba(255, 200, 61, 0.6); }
.toast.live { border-color: var(--gold); box-shadow: 0 0 24px rgba(255, 200, 61, 0.45); }
.toast.out { opacity: 0; transform: translateY(8px); transition: 0.35s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- binder ---------- */
.completion { margin-bottom: 18px; }
.cp-lab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; }
.cp-lab b { color: #fff; }
.cp-bar { height: 10px; border-radius: 999px; background: rgba(20, 19, 28, 0.7); border: 1px solid var(--line); overflow: hidden; }
.cp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--left), var(--down), var(--up), var(--right)); box-shadow: 0 0 14px rgba(57, 44, 255, 0.6); transition: width 0.6s; }
.binder { position: relative; display: flex; max-width: 760px; margin: 0 auto; border-radius: 22px; padding: 18px 18px 18px 0; background: linear-gradient(135deg, #2a2560, #1b1936 55%, #17152c); border: 1px solid var(--line-2); box-shadow: var(--shadow), inset 0 0 0 6px rgba(20, 19, 28, 0.45), inset 0 0 40px rgba(57, 44, 255, 0.15); }
.binder::before { content: ""; position: absolute; inset: 9px; border-radius: 16px; border: 1px dashed rgba(167, 163, 214, 0.22); pointer-events: none; }
.binder-spine { flex: none; width: 46px; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; }
.binder-spine i { width: 26px; height: 14px; border-radius: 999px; background: linear-gradient(180deg, #e6e4ff, #8c84ff 50%, #4b44a8); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(140, 132, 255, 0.4); }
.binder-page { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 14px; background: rgba(12, 11, 22, 0.55); border: 1px solid var(--line); }
.binder-page.turn-next { animation: turnNext 0.4s ease; }
.binder-page.turn-prev { animation: turnPrev 0.4s ease; }
@keyframes turnNext { from { opacity: 0; transform: perspective(1200px) rotateY(-14deg) translateX(30px); } }
@keyframes turnPrev { from { opacity: 0; transform: perspective(1200px) rotateY(14deg) translateX(-30px); } }
.sleeve { position: relative; aspect-ratio: 5 / 7; border-radius: 12px; display: grid; place-items: center; }
.sleeve.filled { background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.sleeve.filled .fcard { width: 100%; }
.sleeve.empty { border: 2px dashed color-mix(in srgb, var(--rc) 45%, transparent); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 10px, transparent 10px 20px); cursor: pointer; overflow: hidden; align-content: end; padding: 10px; text-align: center; transition: border-color 0.2s, background 0.2s; }
.sleeve.empty:hover { border-color: var(--rc); background-color: rgba(57, 44, 255, 0.08); }
.sleeve.void { border: 2px dashed rgba(167, 163, 214, 0.08); }
.sl-sil { position: absolute; inset: 14% 14% 34%; display: grid; place-items: center; }
.sl-art { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) drop-shadow(0 0 1px color-mix(in srgb, var(--rc) 70%, transparent)); opacity: 0.35; }
.sl-no { position: absolute; top: 8px; left: 10px; font-size: 11px; font-weight: 900; color: var(--muted); }
.sl-name { position: relative; font-size: 12px; font-weight: 800; color: var(--muted); line-height: 1.2; }
.sl-r { position: relative; font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.binder-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.page-count { font-weight: 900; color: #fff; min-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- dex ---------- */
.dex-count { margin-left: auto; font-weight: 800; color: var(--muted); font-size: 13px; }
.dex-controls { display: grid; gap: 10px; margin-bottom: 18px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.dc-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dc-row input[type=search] { flex: 1 1 240px; }
.chips { gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(20, 19, 28, 0.5); color: var(--muted); font-weight: 800; font-size: 12px; cursor: pointer; transition: 0.2s; }
.chip:hover { color: #fff; }
.chip.on { color: #fff; border-color: var(--rc); background: color-mix(in srgb, var(--rc) 22%, transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--rc) 45%, transparent); }
.dismantle-box { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; justify-items: center; }

/* ---------- ranking ---------- */
.rank-wrap { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow-x: auto; margin: 8px; }
table.rank { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank th { text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rank td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rank .n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank tr:hover td { background: rgba(57, 44, 255, 0.07); }
.rank tr.me td { background: rgba(57, 44, 255, 0.16); }
.rank .rk { font-weight: 900; font-size: 16px; width: 54px; }
.rank tr.top1 .rk { font-size: 22px; } .rank tr.top2 .rk, .rank tr.top3 .rk { font-size: 20px; }
.pl { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.pl-txt { display: flex; flex-direction: column; line-height: 1.25; }
.pl-txt b { color: #fff; }
.pl-txt .yt { color: var(--ok); font-weight: 700; font-size: 12px; }
.you { font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 5px; background: var(--blue); color: #fff; }
.pw { color: var(--gold); }
.ms .rdot { margin: 0 3px 0 6px; }
.mini-card { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 3px; border-radius: 9px; border: 1px solid var(--rc); background: color-mix(in srgb, var(--rc) 12%, rgba(20, 19, 28, 0.7)); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; max-width: 170px; }
.mini-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-art { width: 30px; height: 38px; object-fit: contain; border-radius: 6px; background: #14131c; flex: none; }

/* ---------- eBook ---------- */
.ebook-hero { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 34px; align-items: center; padding: 34px; margin: 8px; border-radius: 22px; background: linear-gradient(135deg, rgba(42, 38, 96, 0.9), rgba(20, 19, 28, 0.85)); border: 1px solid var(--line-2); overflow: hidden; }
.eb-cover img { display: block; width: 100%; border-radius: 10px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(57, 44, 255, 0.35); transform: perspective(900px) rotateY(10deg); transition: transform 0.4s; }
.eb-cover:hover img { transform: perspective(900px) rotateY(0deg) translateY(-4px); }
.eb-txt { position: relative; z-index: 1; display: grid; gap: 10px; justify-items: start; }
.eb-txt h2 { font-size: clamp(30px, 4vw, 46px); }
.eb-sub { margin: 0; font-size: 18px; font-weight: 800; color: var(--blue-txt); }
.eb-txt p { margin: 0; color: var(--soft); font-weight: 500; max-width: 60ch; }
.eb-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.eb-points li { padding-left: 24px; position: relative; font-weight: 700; }
.eb-points li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 10px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 10px rgba(57, 44, 255, 0.9); }
.eb-gameplay { position: absolute; right: -60px; bottom: -40px; width: 380px; opacity: 0.08; pointer-events: none; transform: rotate(-8deg); }

/* ---------- footer ---------- */
.site-foot { max-width: 1680px; margin: 0 auto; padding: 20px 18px 34px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.foot-note { flex-basis: 100%; opacity: 0.7; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .wbadge small { display: none; }
  .account-pill .ap-yt { display: none; }
}
@media (max-width: 1100px) {
  .topbar-row { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; flex-basis: 100%; }
  .layout.live-open { grid-template-columns: minmax(0, 1fr); }
  .live-dock { position: relative; top: 0; max-height: none; order: -1; }
  .dock-chat { height: 360px; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar-row { padding: 8px 12px; }
  .brand .dashes, .brand-text .live-sync span { display: none; }
  .brand-text b { font-size: 16px; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .live-btn { padding: 8px 10px; }
  .account-pill .ap-name { max-width: 80px; }
  .layout { padding: 16px 10px 30px; }
  .binder { padding: 10px 10px 10px 0; }
  .binder-spine { width: 26px; }
  .binder-spine i { width: 14px; height: 10px; }
  .binder-page { gap: 7px; padding: 8px; }
  .sl-name { font-size: 10px; }
  .ebook-hero { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
  .eb-cover { max-width: 220px; margin: 0 auto; }
  .hide-sm { display: none; }
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .dismantle-box { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
