
:root {
    --bg: #140c1c;
    --bg-2: #2c1838;
    --pane: rgba(36,21,46,.64);
    --pane-hi: rgba(52,30,64,.64);
    --pane-solid: rgba(24,14,32,.97);
    --blur: blur(18px) saturate(125%);
    --seam: rgba(255,210,235,.09);
    --line: rgba(255,210,235,.2);
    --field: rgba(10,6,14,.35);
    --field-line: rgba(255,210,235,.16);
    --text: #fbeff6;
    --muted: #cdb1c5;
    --faint: #9a8196;
    --primary: #f2a6c1;
    --on-primary: #2a0f1d;
    --primary-tint: rgba(242,166,193,.08);
    --lavender: #9d7bea;
    --gold: #e6c27a;
    --ok: #6ee7b7;
    --bad: #fb7185;
    --discord: #5865f2;
    --radius: 2px;
    --side-w: 176px;
    --top-h: 52px;
    --font-body: Inter, 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Noto Serif SC', 'Songti SC', Georgia, serif;
    --ease: ease;
    --ease-out: cubic-bezier(.2,.8,.2,1);
    --ease-in: cubic-bezier(.4,0,1,1);
    --t-press: 60ms;
    --t-fast: 150ms;
    --t-mid: 240ms;
    --t-toast: 280ms;
    --t-leave: 120ms;
    --t-enter: 420ms;
    --stagger: 40ms;
    --t-breathe: 6s;
    --t-drift: 14s;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--bg) radial-gradient(90% 70% at 80% 0%, var(--bg-2) 0%, var(--bg) 65%) fixed;
    color: var(--text);
    scrollbar-color: rgba(242,166,193,.28) transparent;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    background: transparent;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(242,166,193,.32); color: var(--text); }
:focus-visible { outline: 2px solid var(--primary) !important; outline-offset: 2px !important; }
a { color: var(--muted); }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); font-weight: 700; font-size: 1rem; letter-spacing: 0; }
h1 { font-size: 1.15rem; }
h2 { font-size: 1.05rem; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

.bg-image {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(90% 70% at 80% 0%, var(--bg-2) 0%, var(--bg) 65%);
}
.bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(38% 30% at 72% 16%, rgba(157,123,234,.13), transparent 70%),
        radial-gradient(34% 28% at 24% 90%, rgba(242,166,193,.07), transparent 70%);
}
#sakura-container { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sakura {
    position: absolute;
    top: -10%;
    background: var(--primary);
    border-radius: 60% 0 60% 0;
    opacity: 0;
    animation: fall-sway linear infinite;
    will-change: transform, opacity;
}
@keyframes fall-sway {
    0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
    10% { opacity: .7; }
    25% { transform: translate3d(15px, 25vh, 0) rotate(45deg); }
    50% { transform: translate3d(-15px, 50vh, 0) rotate(90deg); }
    75% { transform: translate3d(15px, 75vh, 0) rotate(135deg); }
    100% { opacity: 0; transform: translate3d(0, 110vh, 0) rotate(360deg); }
}

.sx-pane { background: var(--pane); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.sx-grid { display: grid; gap: 1px; background: var(--seam); }

.sx-skip {
    position: fixed; left: 8px; top: -60px; z-index: 100;
    padding: 8px 12px; font: 600 12px var(--font-body); color: var(--on-primary);
    background: var(--primary); border-radius: var(--radius); text-decoration: none;
}
.sx-skip:focus { top: 8px; color: var(--on-primary); }

body:has(> .sx-side) { padding-left: calc(var(--side-w) + 1px) !important; font-family: var(--font-body); font-size: 14px; }
/* Pages sized their container in vw when they had the whole window; the sidebar now takes part of it. */
body:has(> .sx-side) .container { width: 100%; }

.sx-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
    width: var(--side-w);
    display: flex; flex-direction: column;
    overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
    box-shadow: 1px 0 0 var(--seam);
    view-transition-name: sx-side;
}
.sx-side::-webkit-scrollbar { display: none; }
.sx-side-head { display: flex; align-items: center; border-bottom: 1px solid var(--seam); }
.sx-brand {
    display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
    padding: 14px 14px 12px;
    font: 700 13.5px/1.2 var(--font-head); color: var(--text);
    text-decoration: none; white-space: nowrap;
}
.sx-brand:hover { color: var(--text); }
.sx-brand img { width: 24px; height: 24px; flex: none; object-fit: cover; border-radius: var(--radius); }
.sx-brand span { overflow: hidden; text-overflow: ellipsis; }

.sx-iconbtn {
    display: none; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; margin: 0; padding: 0;
    color: var(--muted); background: transparent; border: 0; border-radius: var(--radius);
    cursor: pointer; box-shadow: none; transform: none;
}
.sx-iconbtn:hover { color: var(--text); background: rgba(255,255,255,.05); transform: none; box-shadow: none; }
.sx-iconbtn svg { width: 20px; height: 20px; }

.sx-switch { position: relative; margin: 12px; }
.sx-switch-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    width: 100%; min-height: 30px; margin: 0; padding: 7px 9px;
    font: 500 11px/1.25 var(--font-body); color: var(--muted); text-align: left;
    background: rgba(0,0,0,.14); border: 1px solid var(--seam); border-radius: var(--radius);
    cursor: pointer; box-shadow: none; transform: none;
    transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.sx-switch-btn:hover, .sx-switch-btn[aria-expanded="true"] { color: var(--text); background: rgba(0,0,0,.2); border-color: var(--line); transform: none; box-shadow: none; }
.sx-switch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-switch-btn svg { width: 12px; height: 12px; flex: none; }

.sx-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 80;
    display: flex; flex-direction: column;
    padding: 4px 0; max-height: min(60vh, 360px); overflow-y: auto;
    background: var(--pane-solid); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
    animation: sx-pop var(--t-mid) var(--ease-out);
}
.sx-menu[hidden] { display: none; }
.sx-menu-up { top: auto; bottom: calc(100% + 4px); }
.sx-menu a {
    display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 7px 10px;
    font-size: 12px; color: var(--muted); text-decoration: none;
    border-left: 2px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-menu a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.sx-menu a[aria-current] { color: var(--text); background: var(--primary-tint); border-left-color: var(--primary); }
.sx-menu a svg { width: 14px; height: 14px; flex: none; }
.sx-menu-sep { display: block; height: 1px; margin: 4px 0; background: var(--seam); }
.sx-menu-label { margin: 0; padding: 6px 10px 3px; font-size: 10.5px; color: var(--faint); }

.sx-nav { display: flex; flex-direction: column; padding: 0 0 8px; }
.sx-item {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 14px; font-size: 12px; color: var(--muted); text-decoration: none;
    border-left: 2px solid transparent;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-mid) var(--ease-out);
}
.sx-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.sx-item.on { color: var(--text); background: var(--primary-tint); border-left-color: var(--primary); }
.sx-item.open { color: var(--text); }
.sx-item svg { width: 14px; height: 14px; flex: none; opacity: .9; }
.sx-sub {
    display: flex; align-items: center;
    padding: 5px 14px 5px 37px; font-size: 11px; color: var(--faint); text-decoration: none;
    border-left: 2px solid transparent;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-mid) var(--ease-out);
}
.sx-sub:hover { color: var(--text); }
.sx-sub.on { color: var(--text); background: var(--primary-tint); border-left-color: var(--primary); }

.sx-comp { position: relative; flex: none; margin-top: auto; height: 170px; overflow: hidden; border-top: 1px solid var(--seam); }
.sx-scene { z-index: 0; }
.sx-say {
    position: absolute; left: 10px; right: 10px; top: 8px; z-index: 2; margin: 0;
    padding: 7px 9px; font-size: 10.5px; line-height: 1.4; color: var(--text);
    background: rgba(20,12,28,.9); border: 1px solid rgba(242,166,193,.35); border-radius: var(--radius);
    transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out);
}
.sx-say.swap { opacity: 0; transform: translateY(-4px); }
.sx-say.bad { border-color: rgba(251,113,133,.5); }
.sx-say b, .sx-say a { color: var(--primary); font-weight: 600; text-decoration: none; }
.sx-say a:hover { text-decoration: underline; }
.sx-body { position: absolute; inset: 0; animation: sx-breathe var(--t-breathe) ease-in-out infinite; }
.sx-face {
    position: absolute; left: 50%; top: 22px; z-index: 1; width: auto; height: 270px; max-width: none;
    transform: translateX(-50%); pointer-events: none; user-select: none;
    transition: opacity var(--t-mid) var(--ease-out);
}
/* The face going away stays opaque under the one fading in and drops out once covered;
   fading both at once left her half see-through for a moment on every swap. */
.sx-face.alt { z-index: 0; opacity: 0; transition: opacity 0s linear var(--t-mid); }

.sx-ai {
    display: flex; align-items: center; gap: 6px; flex: none;
    padding: 10px 14px; font-size: 11.5px; color: var(--gold); text-decoration: none;
    border-top: 1px solid var(--seam); border-left: 2px solid transparent;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.sx-comp + .sx-ai { border-top: 0; }
.sx-ai:hover { color: var(--gold); background: rgba(230,194,122,.06); }
.sx-ai.on { background: rgba(230,194,122,.08); border-left-color: var(--primary); }

.sx-account { position: relative; flex: none; border-top: 1px solid var(--seam); }
.sx-acct-btn {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; margin: 0;
    padding: 8px 14px; font: 500 11.5px/1.2 var(--font-body); color: var(--muted); text-align: left;
    background: transparent; border: 0; border-radius: 0; cursor: pointer; box-shadow: none; transform: none;
}
.sx-acct-btn:hover, .sx-acct-btn[aria-expanded="true"] { color: var(--text); background: rgba(255,255,255,.035); transform: none; box-shadow: none; }
.sx-acct-btn > svg { width: 12px; height: 12px; flex: none; margin-left: auto; }
.sx-acct-av {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 22px; height: 22px; overflow: hidden;
    font: 600 11px var(--font-body); color: var(--text); background: var(--pane-hi); border-radius: var(--radius);
}
.sx-acct-av img { width: 100%; height: 100%; object-fit: cover; }
.sx-acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-account .sx-menu { left: 8px; right: 8px; }

.sx-top, .sx-scrim { display: none; }

.sx-head {
    position: relative; align-self: stretch; width: auto;
    margin: 0 0 10px; padding: 12px 22px 0;
    box-shadow: 0 1px 0 var(--seam);
}
.sx-head:focus { outline: none; }
.sx-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-bottom: 12px; }
.sx-head-text { min-width: 0; }
.sx-title { margin: 0; font: 700 21px/1.25 var(--font-head); color: var(--text); letter-spacing: 0; overflow-wrap: anywhere; }
.sx-subline { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.sx-subline:empty { display: none; }
.sx-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sx-actions:empty { display: none; }
.sx-tabs {
    position: relative; display: flex; gap: 18px;
    margin: -4px -22px 0; padding: 0 22px;
    overflow-x: auto; scrollbar-width: none;
}
.sx-tabs::-webkit-scrollbar { display: none; }
.sx-tabs[hidden] { display: none; }
.sx-tab {
    display: inline-flex; align-items: center; flex: none;
    padding: 2px 0 10px; font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap;
    transition: color var(--t-fast) var(--ease);
}
.sx-tab:hover, .sx-tab[aria-current] { color: var(--text); }
.sx-tabs:not(.sx-inked) .sx-tab[aria-current] { box-shadow: inset 0 -2px var(--primary); }
.sx-ink {
    position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
    background: var(--primary); pointer-events: none;
    transition: left var(--t-mid) var(--ease-out), width var(--t-mid) var(--ease-out);
}

.sx-guestbar {
    position: relative; z-index: 20; align-self: stretch;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: var(--top-h); padding: 0 16px 0 2px;
    box-shadow: 0 1px 0 var(--seam);
}
.sx-guestbar .sx-brand { flex: 0 1 auto; padding: 0 12px; }
.sx-guestnav { display: flex; align-items: center; gap: 16px; }
.sx-guestnav > a:not(.sx-btn) { display: inline-flex; align-items: center; min-height: 40px; font-size: 12px; color: var(--muted); text-decoration: none; }
.sx-guestnav > a:not(.sx-btn):hover, .sx-guestnav > a[aria-current] { color: var(--text); }
.sx-guestnav > a[aria-current] { box-shadow: inset 0 -2px var(--primary); }
.sx-head-guest { margin-top: 0; }

.sx-toasts {
    position: fixed; top: 14px; right: 14px; z-index: 90;
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    max-width: min(360px, calc(100vw - 28px)); pointer-events: none;
}
.sx-toast {
    pointer-events: auto; padding: 9px 12px; font-size: 12px; line-height: 1.4; color: var(--text);
    background: rgba(20,12,28,.94); border: 1px solid rgba(110,231,183,.45); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    transform: translateX(calc(100% + 24px));
    transition: transform var(--t-toast) var(--ease-out);
}
.sx-toast.show { transform: none; }
.sx-toast.bad { border-color: rgba(251,113,133,.55); }

.sx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 32px; padding: 8px 14px;
    font: 600 11.5px/1.2 var(--font-body); color: var(--on-primary); text-decoration: none; white-space: nowrap;
    background: var(--primary); border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
    transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-out), box-shadow var(--t-mid) var(--ease), background var(--t-fast) var(--ease);
}
.sx-btn:hover { color: var(--on-primary); background: var(--primary); filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(242,166,193,.25); }
.sx-btn:active { transform: translateY(0) scale(.98); transition-duration: var(--t-press); }
.sx-btn svg { width: 14px; height: 14px; }
.sx-btn-line, .sx-btn-line:hover { color: var(--text); background: transparent; border-color: var(--line); box-shadow: none; filter: none; }
.sx-btn-line:hover { background: rgba(255,255,255,.04); }
.sx-btn-danger, .sx-btn-danger:hover { color: var(--bad); background: transparent; border-color: rgba(251,113,133,.55); box-shadow: none; filter: none; }
.sx-btn-danger:hover { background: rgba(251,113,133,.08); }
.sx-btn-danger.confirm, .sx-btn-danger.confirm:hover { color: #2a0b12; background: var(--bad); border-color: var(--bad); }
.sx-btn-discord, .sx-btn-discord:hover { color: #fff; background: var(--discord); }
.sx-btn-discord:hover { box-shadow: 0 6px 18px rgba(88,101,242,.3); }
.sx-btn:disabled, .sx-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

.sx-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--seam); }
.sx-stat { padding: 12px 18px; background: var(--pane); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.sx-stat-label { display: block; margin-bottom: 3px; font-size: 10.5px; color: var(--muted); }
.sx-stat-num { font: 700 22px/1.2 var(--font-head); color: var(--text); }
.sx-stat-delta { margin-left: 6px; font-size: 10.5px; color: var(--faint); }
.sx-live { position: relative; display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: middle; border-radius: 50%; background: var(--ok); }
.sx-live::after { content: ''; position: absolute; inset: -4px; border: 1px solid var(--ok); border-radius: 50%; animation: sx-pulse 2s ease-out infinite; }

.sx-section-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-size: 11px; font-weight: 500; color: var(--faint); }
.sx-section-head a { color: var(--muted); text-decoration: none; }
.sx-section-head a:hover { color: var(--text); }
.sx-list { display: flex; flex-direction: column; }
.sx-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 10px; gap: 10px; align-items: center;
    padding: 10px 0; font-size: 12px; color: var(--text); text-decoration: none;
    border-bottom: 1px solid var(--seam);
    transition: background var(--t-fast) var(--ease);
}
.sx-row:last-child { border-bottom: 0; }
.sx-row:hover { color: var(--text); background: linear-gradient(90deg, rgba(242,166,193,.06), transparent 70%); }
.sx-row small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--faint); }
.sx-row em { font-style: normal; font-size: 11px; color: var(--muted); }
.sx-chev { font-style: normal; color: var(--faint); transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease); }
.sx-row:hover .sx-chev { transform: translateX(3px); color: var(--primary); }

.sx-rise > *, .sx-list > .sx-row { animation: sx-rise var(--t-enter) var(--ease-out) both; }
.sx-rise > :nth-child(2), .sx-list > .sx-row:nth-child(2) { animation-delay: var(--stagger); }
.sx-rise > :nth-child(3), .sx-list > .sx-row:nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.sx-rise > :nth-child(4), .sx-list > .sx-row:nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.sx-rise > :nth-child(n+5), .sx-list > .sx-row:nth-child(n+5) { animation-delay: calc(var(--stagger) * 4); }
.sx-leave { opacity: 0; transform: translateY(-4px); transition: opacity var(--t-leave) var(--ease-in), transform var(--t-leave) var(--ease-in); }

.sx-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sx-table th { padding: 8px 10px; font-size: 11px; font-weight: 500; text-align: left; color: var(--faint); border-bottom: 1px solid var(--seam); }
.sx-table td { padding: 9px 10px; color: var(--text); border-bottom: 1px solid var(--seam); }
.sx-table tbody tr { transition: background var(--t-fast) var(--ease); }
.sx-table tbody tr:hover { background: linear-gradient(90deg, rgba(242,166,193,.06), transparent 70%); }

.sx-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.sx-label { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.sx-toggle {
    -webkit-appearance: none; appearance: none; position: relative; flex: none;
    width: 34px; height: 18px; margin: 0; padding: 0;
    background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.sx-toggle::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
    background: var(--muted); border-radius: 1px;
    transition: transform var(--t-mid) var(--ease-out), background var(--t-fast) var(--ease);
}
.sx-toggle:checked { background: var(--primary); border-color: var(--primary); }
.sx-toggle:checked::after { transform: translateX(16px); background: var(--on-primary); }

dialog.sx-modal {
    width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0;
    color: var(--text); background: var(--pane-solid); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
dialog.sx-modal[open] { animation: sx-rise var(--t-mid) var(--ease-out); }
dialog.sx-modal::backdrop { background: rgba(10,6,14,.62); }
.sx-modal-head { margin: 0; padding: 14px 18px; font: 700 16px/1.3 var(--font-head); border-bottom: 1px solid var(--seam); }
.sx-modal-body { padding: 14px 18px; font-size: 13px; }
.sx-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--seam); }

.sx-skel {
    display: block; min-height: 12px; color: transparent; border-radius: var(--radius);
    background: linear-gradient(90deg, rgba(255,210,235,.05) 25%, rgba(255,210,235,.11) 50%, rgba(255,210,235,.05) 75%) 0 0 / 200% 100%;
    animation: sx-shimmer 1.2s linear infinite;
}
.sx-empty { padding: 28px 14px; font-size: 12.5px; text-align: center; color: var(--muted); }
.sx-empty .sx-btn { margin-top: 10px; }

.container { margin: 0 auto 18px auto; width: 100%; max-width: 1400px; padding: 0 18px; }

.glass-card {
    background: var(--pane);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--seam);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 1rem;
    color: var(--text);
}

button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: none;
    transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease), filter var(--t-fast) var(--ease);
}
button:hover { transform: translateY(-1px); background: rgba(255,255,255,.05); border-color: rgba(255,210,235,.32); box-shadow: none; }
button:active { transform: translateY(0) scale(.98); transition-duration: var(--t-press); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button.danger { color: var(--bad); border-color: rgba(251,113,133,.5); background: transparent; }
button.danger:hover { background: rgba(251,113,133,.1); border-color: var(--bad); }
button.primary, .btn-primary { color: var(--on-primary); background: var(--primary); border-color: transparent; }
button.primary:hover, .btn-primary:hover { color: var(--on-primary); background: var(--primary); filter: brightness(1.06); box-shadow: 0 6px 18px rgba(242,166,193,.25); }

input, select, textarea { font-family: inherit; color: var(--text); }
input, select {
    width: 100%;
    padding: 8px 14px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--field-line);
    background: var(--field);
    border-radius: var(--radius);
    box-sizing: border-box;
    outline: none;
    font-size: 0.85rem;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
textarea { background: var(--field); border: 1px solid var(--field-line); border-radius: var(--radius); }
input:hover, select:hover, textarea:hover { border-color: rgba(255,210,235,.28); }
input:focus, select:focus, textarea:focus { border-color: rgba(242,166,193,.6); background: rgba(10,6,14,.45); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--primary); }
select option { background: #1d1226; color: var(--text); }
select option:checked { background: #5a3450; color: var(--text); }

.stat-box {
    background: var(--pane);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--seam);
    transition: transform var(--t-fast) var(--ease-out);
}
.stat-box:hover { transform: translateY(-1px); }

.tab-bar {
    display: flex; gap: 18px;
    border-bottom: 1px solid var(--seam);
    margin-bottom: 12px;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 8px 0 9px; margin-bottom: -1px;
    background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0;
    color: var(--muted); font-weight: 500; font-size: 0.8rem; white-space: nowrap; cursor: pointer;
    text-shadow: none; box-shadow: none; transform: none;
    transition: color var(--t-fast) var(--ease), border-color var(--t-mid) var(--ease-out);
}
.tab-btn:hover { color: var(--text); background: transparent; transform: none; box-shadow: none; }
.tab-btn.active { color: var(--text); border-bottom-color: var(--primary); background: transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.neon-title-container { text-align: center; width: 100%; max-width: 1400px; margin: 6px auto 2px; padding: 0 12px; pointer-events: none; }
.neon-title { margin: 0; font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; line-height: 1.25; letter-spacing: 0; text-align: center; color: var(--text); text-shadow: none; }

.strive-dropdown-container { position: relative; width: 100%; margin-bottom: 0.5rem; user-select: none; }
.strive-dropdown-container.open { z-index: 2000; }
.strive-dropdown-trigger {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 12px 15px;
    font-family: inherit; font-weight: 600; font-size: 0.85rem; color: var(--text);
    background: var(--field); border: 1px solid var(--field-line); border-radius: var(--radius);
    outline: none; cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.strive-dropdown-trigger:hover { border-color: rgba(255,210,235,.3); background: rgba(10,6,14,.45); }
.strive-dropdown-trigger::after { content: '▾'; margin-left: 8px; font-size: 0.8rem; color: var(--muted); transition: transform var(--t-mid) var(--ease-out); }
.strive-dropdown-container.open .strive-dropdown-trigger { border-color: rgba(242,166,193,.6); }
.strive-dropdown-container.open .strive-dropdown-trigger::after { transform: rotate(180deg); }
.strive-dropdown-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1000;
    display: none; max-height: 250px; overflow-y: auto;
    background: var(--pane-solid); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
    animation: sx-pop var(--t-mid) var(--ease-out);
}
.strive-dropdown-container.open .strive-dropdown-list { display: block; }
.strive-dropdown-item {
    padding: 10px 15px; font-size: 0.85rem; color: var(--muted); cursor: pointer;
    border-bottom: 1px solid var(--seam);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.strive-dropdown-item:last-child { border-bottom: none; }
.strive-dropdown-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.strive-dropdown-item.selected { color: var(--text); font-weight: 600; background: var(--primary-tint); box-shadow: inset 2px 0 var(--primary); }

.multi-select-container { position: relative; width: 100%; user-select: none; }
.multi-select-trigger {
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    min-height: 42px; padding: 10px 14px; cursor: pointer;
    background: var(--field); border: 1px solid var(--field-line); border-radius: var(--radius);
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.multi-select-trigger:hover { border-color: rgba(255,210,235,.3); }
.multi-select-container.open .multi-select-trigger { border-color: rgba(242,166,193,.6); background: rgba(10,6,14,.45); }
.multi-select-tag {
    display: flex; align-items: center; gap: 4px; padding: 2px 8px;
    font-size: 0.8rem; font-weight: 500; color: var(--text);
    background: var(--primary-tint); border: 1px solid rgba(242,166,193,.25); border-radius: var(--radius);
}
.multi-select-tag .tag-x { cursor: pointer; opacity: 0.6; font-weight: bold; }
.multi-select-tag .tag-x:hover { opacity: 1; color: var(--primary); }
.multi-select-placeholder { color: var(--faint); font-size: 0.9rem; }
.multi-select-list {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 2000;
    display: none; margin-top: 4px; max-height: 220px; overflow-y: auto;
    background: var(--pane-solid); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(0,0,0,.5);
}
.multi-select-container.open .multi-select-list { display: block; }
.multi-select-search {
    width: 100%; margin: 0; padding: 8px 12px; font-size: 0.85rem; color: var(--text);
    background: rgba(10,6,14,.4); border: none; border-bottom: 1px solid var(--seam); border-radius: 0; outline: none;
}
.multi-select-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    font-size: 0.85rem; color: var(--muted); cursor: pointer;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.multi-select-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.multi-select-item.checked { color: var(--text); font-weight: 500; background: var(--primary-tint); }
.multi-select-item .ms-check {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 16px; height: 16px; font-size: 10px; color: var(--on-primary);
    border: 1px solid var(--line); border-radius: var(--radius);
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.multi-select-item.checked .ms-check { background: var(--primary); border-color: var(--primary); }
.ms-channel-hash { color: var(--faint); font-size: 0.8rem; }

.hairpin-icon { height: 1.2em; vertical-align: middle; margin-bottom: 2px; filter: drop-shadow(0 2px 2px rgba(242,166,193,.35)); }
.top-heart { display: none; }
.floating-heart {
    position: absolute; width: 32px; height: 32px; opacity: 0.8;
    animation: float-heart 3s ease-in-out infinite;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f2a6c1'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center;
}
@keyframes float-heart {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 0.8; }
}

.discord-preview-box {
    display: none; max-width: 500px; margin-top: 15px; padding: 10px 15px;
    font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #dcddde;
    background: #36393f; border-radius: 4px; border-left: 4px solid #6441a5;
}
.discord-preview-header { display: flex; align-items: center; margin-bottom: 8px; }
.discord-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; }
.discord-username { font-weight: 600; color: #fff; margin-right: 5px; }
.discord-bot-tag { background: #5865f2; color: #fff; font-size: 0.625rem; padding: 1px 2px; border-radius: 3px; font-weight: 500; }
.discord-embed-title { color: #00b0f4; font-weight: 600; margin-bottom: 4px; display: block; text-decoration: none; }
.discord-embed-fields { display: flex; gap: 15px; margin: 8px 0; }
.discord-field { flex: 1; }
.discord-field-name { color: #8e9297; font-size: 0.75rem; font-weight: 700; margin-bottom: 2px; }
.discord-field-value { color: #dcddde; font-size: 0.875rem; }
.discord-embed-image { width: 100%; border-radius: 4px; margin-top: 10px; }

.user-row { position: relative; }
.btn-delete-convo {
    opacity: 0; cursor: pointer; padding: 5px 12px;
    background: var(--pane-solid); border: 1px solid var(--line); border-radius: var(--radius);
    transition: opacity var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.user-row:hover .btn-delete-convo { opacity: 1; }
.btn-delete-convo:hover { border-color: rgba(251,113,133,.5); }

.edit-trigger { position: absolute; top: 10px; right: 10px; z-index: 1001; padding: 15px; cursor: pointer; }
.btn-edit-hidden { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; transition-delay: 0s; }
.edit-trigger:hover .btn-edit-hidden { opacity: 1; visibility: visible; transition-delay: 0.5s; }

.md-btn:hover { background: rgba(255,255,255,.08) !important; }

/* Page bodies written before the overhaul keep their own rounded corners, often inline, until each
   page is redone; on shell pages they are squared here. Circles (avatars, dots) are left alone. */
body:has(> .sx-head) :is(button, input, select, textarea, [style*="border-radius"],
    [class*="card"], [class*="panel"], [class*="section"], [class*="box"], [class*="btn"], [class*="badge"],
    [class*="tag"], [class*="pill"], [class*="chip"], [class*="item"], [class*="row"], [class*="tile"], [class*="modal"],
    [class*="popup"], [class*="dropdown"], [class*="menu"], [class*="toast"], [class*="field"], [class*="wrap"],
    [class*="slot"], [class*="notice"], [class*="banner"], [class*="alert"], [class*="info"], [class*="msg"],
    [class*="stat"], [class*="col"], [class*="bar"], [class*="grid"], [class*="list"], [class*="entry"],
    [class*="option"], [class*="layout"], [class*="container"], [class*="content"], [class*="side"], [class*="board"],
    [class*="block"], [class*="group"], [class*="feature"], [class*="preview"], [class*="search"], [class*="toggle"],
    [class*="switch"], [class*="slider"], [class*="strip"], [class*="bubble"], [class*="tab"], [class*="head"],
    [class*="foot"]):not(img,
    [class*="avatar"], [class*="dot"], [class*="circle"], [class*="round"], [class*="spinner"], [class*="knob"], [class*="progress"], [style*="50%"]) {
    border-radius: var(--radius) !important;
}
body:has(> .sx-head) :is([class*="toggle"], [class*="switch"], [class*="slider"])::before,
body:has(> .sx-head) :is([class*="toggle"], [class*="switch"], [class*="slider"])::after { border-radius: 1px !important; }
.message-bubble code { background: rgba(0,0,0,0.2); padding: 2px 4px; border-radius: var(--radius); font-size: 0.9em; }
.message-bubble pre { background: rgba(0,0,0,0.2); padding: 10px; border-radius: var(--radius); overflow-x: auto; margin: 8px 0; }
.message-bubble p { margin: 4px 0; }

@keyframes sx-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sx-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes sx-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sx-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes sx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes sx-vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes sx-vt-out { to { opacity: 0; } }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: sx-vt-out 120ms cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: sx-vt-in 420ms cubic-bezier(.2,.8,.2,1) both; }
::view-transition-group(sx-side), ::view-transition-group(sx-top) { animation: none; }
::view-transition-old(sx-side), ::view-transition-old(sx-top) { display: none; }
::view-transition-new(sx-side), ::view-transition-new(sx-top) { animation: none; }

.sx-paused *, .sx-paused *::before, .sx-paused *::after { animation-play-state: paused !important; }

@media (max-width: 899.98px) {
    body:has(> .sx-side) { padding-left: 0 !important; padding-top: var(--top-h) !important; }
    .sx-top {
        position: fixed; top: 0; left: 0; right: 0; z-index: 50;
        display: flex; align-items: center; gap: 4px;
        height: var(--top-h); padding: 0 8px 0 4px;
        box-shadow: 0 1px 0 var(--seam);
        view-transition-name: sx-top;
    }
    .sx-top .sx-brand { flex: 0 1 auto; padding: 0 6px; font-size: 13px; }
    .sx-top .sx-switch { flex: 0 1 auto; min-width: 0; max-width: 48vw; margin: 0 0 0 auto; }
    .sx-top .sx-switch-btn { min-height: 40px; }
    .sx-top .sx-menu { left: auto; right: 0; width: max-content; min-width: 220px; max-width: calc(100vw - 16px); }
    .sx-iconbtn { display: inline-flex; }
    .sx-side {
        width: min(288px, 86vw);
        background: rgba(28,16,36,.95);
        box-shadow: 1px 0 0 var(--seam), 18px 0 40px rgba(0,0,0,.45);
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform var(--t-mid) var(--ease-out), visibility 0s linear var(--t-mid);
    }
    .sx-drawer-open .sx-side { transform: none; visibility: visible; transition: transform var(--t-mid) var(--ease-out), visibility 0s; }
    .sx-side .sx-switch { display: none; }
    .sx-scrim {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(10,6,14,.6); opacity: 0; pointer-events: none;
        transition: opacity var(--t-mid) var(--ease-out);
    }
    .sx-drawer-open .sx-scrim { opacity: 1; pointer-events: auto; }
    .sx-drawer-open body { overflow: hidden; }
    .sx-item, .sx-sub, .sx-ai, .sx-menu a { min-height: 40px; }
    .sx-item { font-size: 13px; }
    .sx-sub { font-size: 12px; }
    .sx-head { padding: 12px 16px 0; }
    .sx-title { font-size: 19px; }
    .sx-tabs { margin: -6px -16px 0; padding: 0 16px; }
    .sx-tab { min-height: 40px; padding: 0; }
    .sx-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sx-toasts { top: calc(var(--top-h) + 10px); right: 10px; left: 10px; max-width: none; }
    .sx-guestbar { padding-right: 10px; }
    .sx-guestnav { gap: 12px; }
}
@media (pointer: coarse) {
    .sx-item, .sx-sub, .sx-ai, .sx-tab, .sx-menu a, .sx-switch-btn { min-height: 40px; }
}
@media (max-height: 640px) and (min-width: 900px) {
    .sx-comp { display: none; }
    .sx-ai { margin-top: auto; }
}


.shu-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shu-scene-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 2.4s ease; }
.shu-scene-layer.on { opacity: 1; }
.shu-pano {
    position: absolute; left: 0; top: 50%; height: 118%; display: flex;
    transform: translate3d(0, -50%, 0); animation: shu-pan 300s linear infinite;
}
.shu-pano img { display: block; flex: none; height: 100%; width: auto; max-width: none; }
@keyframes shu-pan { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(-50%, -50%, 0); } }
.shu-p { position: absolute; left: var(--x); top: var(--y, -24px); width: var(--s); height: var(--s); pointer-events: none;
    animation-duration: var(--d); animation-delay: var(--delay); animation-timing-function: linear; animation-iteration-count: infinite; }
.shu-p-snow { border-radius: 50%; background: #fff; opacity: var(--o, .85); filter: blur(var(--b, 0px)); animation-name: shu-fall; }
.shu-p-petal { height: calc(var(--s) * 1.25); border-radius: 60% 0 60% 0; background: var(--c); opacity: .85; animation-name: shu-fall-spin; }
.shu-p-leaf { background: var(--c); opacity: .92; animation-name: shu-fall-spin;
    clip-path: polygon(50% 0, 61% 30%, 92% 18%, 76% 48%, 100% 58%, 66% 66%, 58% 100%, 50% 74%, 42% 100%, 34% 66%, 0 58%, 24% 48%, 8% 18%, 39% 30%); }
.shu-p-rain { width: 1.5px; background: linear-gradient(rgba(190,220,255,0), rgba(200,225,255,.7)); animation-name: shu-rain; }
.shu-p-firefly { border-radius: 50%; background: var(--c); box-shadow: 0 0 calc(var(--s) * 2.4) calc(var(--s) * .7) var(--c);
    animation-name: shu-wander; animation-timing-function: ease-in-out; animation-direction: alternate; }
@keyframes shu-fall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--sway, 30px), var(--fall, 110vh), 0); } }
@keyframes shu-fall-spin { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(var(--sway, -60px), var(--fall, 110vh), 0) rotate(var(--spin, 360deg)); } }
@keyframes shu-rain { from { transform: translate3d(0, 0, 0) rotate(12deg); } to { transform: translate3d(calc(var(--fall, 110vh) * -.21), var(--fall, 110vh), 0) rotate(12deg); } }
@keyframes shu-wander { 0% { transform: translate3d(0, 0, 0); opacity: .15; } 50% { opacity: 1; } 100% { transform: translate3d(var(--dx, 40px), var(--dy, -30px), 0); opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
    .shu-scene *, .shu-scene *::before, .shu-scene *::after { animation: none !important; transition: none !important; }
    .shu-p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 1ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
    .sx-body, .sx-live::after, .sx-skel, .sakura, .floating-heart { animation: none !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
