@font-face {
    font-family: "Bungee";
    src: url("Bungee-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("DMSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("DMSans-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #09080d;
    --panel: #111016;
    --panel-strong: #17151d;
    --panel-soft: #0e0d12;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.15);
    --text: #f8f6fb;
    --muted: #a39eab;
    --quiet: #716c79;
    --success: #67dca1;
    --warning: #f4b860;
    --danger: #ff6b78;
    --accent-1: #7034cf;
    --accent-2: #332cd1;
    --accent-3: #ab39cc;
    --accent-1-rgb: 112, 52, 207;
    --accent-2-rgb: 51, 44, 209;
    --accent-3-rgb: 171, 57, 204;
    --radius: 18px;
    --roster-width: 390px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: "DM Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
select {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
select {
    color: inherit;
}

a {
    color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-3);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 77% -8%, rgba(var(--accent-1-rgb), 0.2), transparent 32rem),
        radial-gradient(circle at 48% 98%, rgba(var(--accent-3-rgb), 0.07), transparent 34rem);
    transition: background 350ms ease;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--roster-width) minmax(0, 1fr);
    height: 100dvh;
}

.roster-panel {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 22px 16px 16px;
    border-right: 1px solid var(--line);
    background: rgba(15, 14, 19, 0.88);
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(24px);
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 7px 20px;
    border-bottom: 1px solid var(--line);
}

.sidebar-close,
.sidebar-backdrop,
.mobile-roster-button {
    display: none;
}

.brand,
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

.brand {
    min-width: 0;
}

.brand-mark {
    display: block;
    width: 42px;
    height: 36px;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    -webkit-mask: url("hat.svg") center / contain no-repeat;
    mask: url("hat.svg") center / contain no-repeat;
    transition: background 260ms ease;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-name {
    font-family: "Bungee", sans-serif;
    font-size: 1.16rem;
    letter-spacing: 0.02em;
    line-height: 1;
}

.brand-section {
    color: var(--quiet);
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.18em;
}

.character-list {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 7px;
    padding: 20px 3px 30px;
    overflow: auto;
    overscroll-behavior: contain;
    scroll-padding-bottom: 30px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.character-row {
    position: relative;
    display: grid;
    min-width: 0;
    height: max-content;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-self: start;
    gap: 0;
    width: 100%;
    padding: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.018);
    cursor: pointer;
    text-align: left;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.character-row::before {
    position: absolute;
    z-index: 2;
    inset: 0 18px auto;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--row-c1), var(--row-c2), var(--row-c3));
    content: "";
    opacity: 0;
    transition: opacity 150ms ease;
}

.character-row:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.character-row[aria-current="page"] {
    border-color: var(--row-c2);
    color: var(--text);
    background:
        linear-gradient(145deg, rgba(var(--accent-2-rgb), 0.16), rgba(var(--accent-3-rgb), 0.035)),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.character-row[aria-current="page"]::before {
    opacity: 1;
}

.row-avatar {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 0.74 / 1;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background:
        radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.14), transparent 34%),
        linear-gradient(145deg, var(--row-c1), var(--row-c2) 52%, var(--row-c3));
    color: #fff;
    font-family: "Bungee", sans-serif;
    font-size: clamp(2.35rem, 4vw, 3.7rem);
    font-weight: 600;
}

.row-avatar::after {
    z-index: 2;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 42%, rgba(7, 6, 10, 0.5)),
        linear-gradient(145deg, transparent 45%, rgba(0, 0, 0, 0.18));
    content: "";
    pointer-events: none;
}

.row-avatar video {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

.row-avatar video.ready {
    opacity: 1;
}

.row-avatar-fallback {
    position: relative;
    z-index: 0;
    color: rgba(255, 255, 255, 0.48);
    text-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.row-theme {
    position: absolute;
    z-index: 3;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 3px;
}

.row-theme i {
    width: 9px;
    height: 3px;
    border-radius: 4px;
    background: var(--row-c1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.34);
}

.row-theme i:nth-child(2) {
    background: var(--row-c2);
}

.row-theme i:nth-child(3) {
    background: var(--row-c3);
}

.row-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 8px 3px 8px;
}

.row-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: clip;
    white-space: nowrap;
}

.row-copy small {
    display: -webkit-box;
    min-height: 2.5em;
    overflow: hidden;
    color: var(--quiet);
    font-size: 0.52rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.row-arrow {
    position: absolute;
    z-index: 4;
    top: 13px;
    right: 13px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    color: transparent;
    background: rgba(8, 7, 11, 0.54);
    font-size: 0.66rem;
    opacity: 0;
    transform: scale(0.8);
    transition: color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.character-row[aria-current="page"] .row-arrow {
    color: #fff;
    opacity: 1;
    transform: scale(1);
}

.live-state {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--quiet);
    font-size: 0.65rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 10px rgba(244, 184, 96, 0.45);
}

[data-state="online"] .status-dot {
    background: var(--success);
    box-shadow: 0 0 10px rgba(103, 220, 161, 0.5);
}

[data-state="error"] .status-dot,
[data-state="offline"] .status-dot {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 107, 120, 0.5);
}

[data-state="fallback"] .status-dot,
[data-state="setup"] .status-dot {
    background: var(--warning);
}

.dashboard {
    position: relative;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.topbar {
    position: sticky;
    z-index: 8;
    top: 0;
    display: none;
    height: 64px;
    align-items: center;
    justify-content: flex-end;
    padding: 0 clamp(22px, 4vw, 64px);
    border-bottom: 1px solid var(--line);
    background: rgba(9, 8, 13, 0.76);
    backdrop-filter: blur(22px);
}

.mobile-brand,
.mobile-roster-button {
    display: none;
}

.live-state {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.character-hero {
    position: relative;
    min-height: 450px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}

.hero-backdrop {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-position: center 22%;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    filter: saturate(0.84) contrast(1.05);
    transition: opacity 300ms ease, background-image 300ms ease;
}

.hero-backdrop.has-image {
    opacity: 0.48;
}

.character-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(9, 8, 13, 0.98) 0%, rgba(9, 8, 13, 0.84) 38%, rgba(9, 8, 13, 0.44) 74%, rgba(9, 8, 13, 0.78) 100%),
        linear-gradient(0deg, var(--bg), transparent 46%),
        radial-gradient(circle at 76% 20%, rgba(var(--accent-1-rgb), 0.35), transparent 34rem),
        linear-gradient(135deg, rgba(var(--accent-2-rgb), 0.13), rgba(var(--accent-3-rgb), 0.04));
    content: "";
}

.character-hero::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 48px 48px;
    content: "";
    mask-image: linear-gradient(90deg, black, transparent 78%);
}

.hero-grid {
    display: grid;
    width: min(1180px, 100%);
    min-height: 450px;
    grid-template-columns: minmax(260px, 0.72fr) minmax(440px, 1.28fr);
    align-items: center;
    gap: clamp(34px, 6vw, 88px);
    margin: 0 auto;
    padding: 40px clamp(28px, 6vw, 84px) 42px;
}

.avatar-frame {
    position: relative;
    display: grid;
    width: min(310px, 100%);
    aspect-ratio: 0.88;
    justify-self: end;
    overflow: visible;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 46% 46% 30% 30% / 32% 32% 24% 24%;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 45%),
        linear-gradient(135deg, rgba(var(--accent-1-rgb), 0.52), rgba(var(--accent-2-rgb), 0.24) 52%, rgba(var(--accent-3-rgb), 0.48));
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px rgba(255, 255, 255, 0.11),
        0 0 80px rgba(var(--accent-2-rgb), 0.16);
}

.avatar-frame::before {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: inherit;
    content: "";
}

.avatar-frame video {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    opacity: 0;
    transition: opacity 220ms ease;
}

.avatar-frame video.ready {
    opacity: 1;
}

.avatar-fallback {
    position: relative;
    z-index: 1;
    font-family: "Bungee", sans-serif;
    font-size: clamp(5rem, 11vw, 8rem);
    opacity: 0.28;
    text-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.avatar-orbit {
    position: absolute;
    z-index: -1;
    inset: -22px;
    border: 1px solid rgba(var(--accent-3-rgb), 0.3);
    border-radius: 50%;
    transform: rotate(-9deg);
}

.avatar-orbit::before,
.avatar-orbit::after {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 18px var(--accent-3);
    content: "";
}

.avatar-orbit::before {
    top: 18%;
    right: 3%;
}

.avatar-orbit::after {
    bottom: 15%;
    left: 5%;
}

.hero-copy {
    max-width: 680px;
}

.identity-route {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--quiet);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.identity-route span:first-child {
    color: #d6cfdf;
}

.eyebrow,
.card-kicker {
    margin: 0;
    color: #cfc5f8;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.character-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(14px, 2.4vw, 28px);
}

.character-name-slot {
    min-width: 0;
}

.character-title-row .live-state {
    justify-self: end;
    white-space: nowrap;
}

.hero-copy h1 {
    margin: 0;
    font-family: "Bungee", sans-serif;
    font-size: clamp(3.6rem, 8vw, 7.5rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 0.88;
    text-transform: uppercase;
    text-shadow: 0 12px 50px rgba(0, 0, 0, 0.28);
    background:
        radial-gradient(ellipse at 18% 22%, var(--accent-1) 0%, transparent 55%),
        radial-gradient(ellipse at 82% 76%, var(--accent-3) 0%, transparent 60%),
        linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 45%, var(--accent-3) 72%, var(--accent-1) 100%);
    background-size: 145% 130%, 150% 145%, 260% 260%;
    background-position: -20% -10%, 115% 110%, 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidGlassFlow 10s steps(75, end) infinite;
    will-change: background-position;
}

.hero-copy h1.name-switching {
    animation:
        liquidGlassFlow 10s steps(75, end) infinite,
        characterNameIn 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes liquidGlassFlow {
    0% {
        background-position: -20% -10%, 115% 110%, 0% 50%;
    }

    25% {
        background-position: 60% -16%, 88% 34%, 42% 0%;
    }

    50% {
        background-position: 114% 58%, 24% -12%, 100% 48%;
    }

    75% {
        background-position: 36% 112%, -18% 68%, 54% 100%;
    }

    100% {
        background-position: -20% -10%, 115% 110%, 0% 50%;
    }
}

@keyframes characterNameIn {
    0% {
        opacity: 0.18;
        filter: blur(10px);
        transform: translate3d(0, 14px, 0) scale(0.96);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.character-archetype {
    min-height: 1.5em;
    margin: 18px 0 25px;
}

.identity-facts {
    display: grid;
    max-width: 640px;
    grid-template-columns: 0.7fr 1.25fr 1.25fr 0.8fr;
    margin: 0 0 28px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.identity-facts div {
    min-width: 0;
    padding: 14px 14px 13px;
    border-right: 1px solid var(--line);
}

.identity-facts div:first-child {
    padding-left: 0;
}

.identity-facts div:last-child {
    border-right: 0;
}

.identity-facts dt {
    margin-bottom: 4px;
    color: var(--quiet);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.identity-facts dd {
    overflow: hidden;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.primary-action,
.secondary-action {
    min-height: 50px;
    border-radius: 12px;
    cursor: pointer;
}

.primary-action {
    position: relative;
    display: grid;
    min-width: 230px;
    grid-template-columns: minmax(0, 1fr) 24px;
    padding: 9px 13px 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2) 48%, var(--accent-3));
    box-shadow: 0 14px 35px rgba(var(--accent-2-rgb), 0.25);
    text-align: left;
    transition: filter 150ms ease, transform 150ms ease;
}

.primary-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.button-kicker {
    align-self: end;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.53rem;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.primary-action strong {
    grid-column: 1;
    font-size: 0.78rem;
}

.copy-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 17px;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.secondary-action:hover {
    border-color: rgba(255, 255, 255, 0.24);
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
}

.headline-stats {
    display: grid;
    width: min(1180px, calc(100% - 56px));
    grid-template-columns: repeat(4, 1fr);
    margin: -1px auto 0;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.stat-tile {
    position: relative;
    display: grid;
    min-height: 128px;
    align-content: center;
    padding: 24px 28px;
    border-right: 1px solid var(--line);
    background: rgba(14, 13, 18, 0.7);
}

.stat-tile:last-child {
    border-right: 0;
}

.stat-tile::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: linear-gradient(var(--accent-1), var(--accent-3));
    content: "";
    opacity: 0;
    transition: opacity 160ms ease;
}

.stat-tile:hover::before {
    opacity: 1;
}

.tile-label {
    color: var(--quiet);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.stat-tile strong {
    margin: 5px 0 1px;
    font-family: "Bungee", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 400;
    line-height: 1;
}

.stat-tile small {
    color: var(--quiet);
    font-size: 0.65rem;
}

.dashboard-grid {
    display: grid;
    width: min(1180px, calc(100% - 56px));
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
    margin: 28px auto 48px;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 40%),
        rgba(17, 16, 22, 0.82);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12);
}

.dashboard-card::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 100% 0, rgba(var(--accent-2-rgb), 0.1), transparent 18rem);
    content: "";
    pointer-events: none;
}

.story-card {
    grid-column: span 7;
    min-height: 310px;
    padding: 30px;
}

.statistics-card {
    grid-column: span 5;
    min-height: 310px;
    padding: 30px;
}

.collection-card {
    grid-column: 1 / -1;
    min-height: 320px;
    padding: 30px;
}

.equipment-card {
    grid-column: 1 / -1;
    padding: 30px;
}

.card-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.card-kicker {
    color: #a79cc1;
    font-size: 0.58rem;
}

.card-heading h2 {
    margin: 5px 0 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.backstory {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0;
    color: #c3bec9;
    font-size: clamp(1rem, 1.7vw, 1.25rem);
    line-height: 1.68;
}

.statistics-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
}

.statistics-list div {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.statistics-list div:nth-child(odd) {
    padding-right: 17px;
}

.statistics-list div:nth-child(even) {
    padding-left: 17px;
    border-left: 1px solid var(--line);
}

.statistics-list dt {
    color: var(--quiet);
    font-size: 0.68rem;
}

.statistics-list dd {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
}

.collection-heading {
    align-items: center;
}

.collection-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.14);
}

.collection-tabs button {
    padding: 7px 13px;
    border: 0;
    border-radius: 7px;
    color: var(--quiet);
    background: transparent;
    cursor: pointer;
    font-size: 0.67rem;
    font-weight: 600;
}

.collection-tabs button[aria-selected="true"] {
    color: var(--text);
    background: linear-gradient(135deg, rgba(var(--accent-1-rgb), 0.28), rgba(var(--accent-3-rgb), 0.2));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.collection-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}

.collection-item {
    display: grid;
    min-width: 0;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
}

.collection-art {
    position: relative;
    display: grid;
    width: 54px;
    height: 54px;
    overflow: hidden;
    place-items: center;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, rgba(var(--accent-1-rgb), 0.46), rgba(var(--accent-3-rgb), 0.28));
}

.collection-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-item > div:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.collection-item strong {
    overflow: hidden;
    font-size: 0.73rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-item small {
    color: var(--quiet);
    font-size: 0.6rem;
}

.collection-empty,
.equipment-empty {
    position: relative;
    z-index: 1;
    margin: 52px 0;
    color: var(--quiet);
    font-size: 0.78rem;
    text-align: center;
}

.equipment-list {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 28px;
}

.equipment-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.equipment-row > span {
    color: var(--quiet);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.equipment-row strong {
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-row small {
    color: var(--muted);
    font-size: 0.62rem;
}

.site-footer {
    display: flex;
    width: min(1180px, calc(100% - 56px));
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 auto;
    padding: 24px 0 32px;
    border-top: 1px solid var(--line);
    color: var(--quiet);
    font-size: 0.63rem;
}

.site-footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 17px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
}

.toast {
    position: fixed;
    z-index: 50;
    right: 28px;
    bottom: 28px;
    padding: 11px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    color: var(--text);
    background: rgba(23, 21, 29, 0.94);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.app-shell[data-dashboard-state="loading"] .dashboard {
    opacity: 0.82;
}

noscript {
    position: fixed;
    z-index: 100;
    inset: auto 20px 20px;
    padding: 14px;
    border: 1px solid var(--danger);
    border-radius: 12px;
    background: var(--panel-strong);
}

@media (max-width: 1120px) {
    :root {
        --roster-width: 354px;
    }

    .hero-grid {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 32px;
        padding-top: 34px;
        padding-bottom: 36px;
        padding-right: 34px;
        padding-left: 34px;
    }

    .avatar-frame {
        width: 210px;
    }

    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    body.roster-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
        height: auto;
        min-height: 100dvh;
    }

    .roster-panel {
        position: fixed;
        z-index: 40;
        inset: 0 auto 0 0;
        display: flex;
        width: min(420px, 92vw);
        padding: 20px 16px 16px;
        border-right-color: var(--line-strong);
        background: rgba(13, 12, 17, 0.97);
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.5);
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-104%);
        transition:
            transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0s linear 320ms;
    }

    body.roster-open .roster-panel {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
        transition-delay: 0s;
    }

    .sidebar-close {
        display: grid;
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
        padding: 0 0 2px;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 10px;
        color: var(--muted);
        background: rgba(255, 255, 255, 0.025);
        cursor: pointer;
        font-size: 1.35rem;
        line-height: 1;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(3, 2, 5, 0.68);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        cursor: default;
        backdrop-filter: blur(6px);
        transition:
            opacity 220ms ease,
            visibility 0s linear 220ms;
    }

    body.roster-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .dashboard {
        min-height: 100dvh;
        overflow: visible;
    }

    .topbar {
        display: grid;
        height: 66px;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        padding: 0 16px;
    }

    .mobile-brand {
        display: grid;
        width: 62px;
        height: 66px;
        grid-column: 2;
        grid-row: 1;
        place-items: center;
        justify-self: center;
    }

    .mobile-brand .brand-mark {
        width: 51px;
        height: 45px;
    }

    .mobile-roster-button {
        display: flex;
        width: auto;
        min-width: 0;
        height: 40px;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-self: start;
        gap: 8px;
        margin: 0;
        padding: 0 12px 0 10px;
        border: 1px solid var(--line);
        border-radius: 10px;
        color: var(--text);
        background: rgba(255, 255, 255, 0.028);
        cursor: pointer;
        text-align: left;
        transition: border-color 150ms ease, background 150ms ease;
    }

    .mobile-roster-button:hover,
    .mobile-roster-button[aria-expanded="true"] {
        border-color: var(--line-strong);
        background: rgba(255, 255, 255, 0.055);
    }

    .mobile-menu-icon {
        display: grid;
        width: 17px;
        gap: 3px;
    }

    .mobile-menu-icon i {
        width: 17px;
        height: 1px;
        border-radius: 2px;
        background: var(--muted);
    }

    .mobile-roster-label {
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .character-hero,
    .hero-grid {
        min-height: 460px;
    }

    .hero-grid {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 34px;
        padding: 36px 34px 38px;
    }

    .avatar-frame {
        width: 190px;
    }

    .identity-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .identity-facts div:nth-child(2) {
        border-right: 0;
    }

    .identity-facts div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .headline-stats,
    .dashboard-grid,
    .site-footer {
        width: calc(100% - 40px);
    }

    .headline-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-tile:nth-child(2) {
        border-right: 0;
    }

    .stat-tile:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .story-card,
    .statistics-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .topbar {
        height: 66px;
        padding: 0 12px;
    }

    .mobile-roster-button {
        margin: 0;
    }

    .mobile-menu-icon {
        display: grid;
    }

    .mobile-brand .brand-mark {
        width: 54px;
        height: 48px;
    }

    .roster-panel {
        width: min(390px, 94vw);
        padding: 16px 12px 14px;
    }

    .sidebar-brand-row {
        padding-bottom: 16px;
    }

    .character-list {
        gap: 8px;
    }

    .character-row {
        padding: 6px;
    }

    .live-state {
        padding: 8px;
    }

    .character-hero,
    .hero-grid {
        min-height: auto;
    }

    .hero-grid {
        display: block;
        padding: 28px 20px 34px;
    }

    .avatar-frame {
        width: min(218px, 70vw);
        margin: 0 auto 28px;
    }

    .identity-route {
        justify-content: center;
        margin-bottom: 10px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy h1 {
        font-size: clamp(3.2rem, 17vw, 5.2rem);
    }

    .character-title-row {
        gap: 10px;
    }

    .character-title-row .live-state {
        padding: 8px;
    }

    .character-title-row .live-state span:last-child {
        display: none;
    }

    .character-archetype {
        margin: 16px auto 24px;
    }

    .identity-facts {
        text-align: left;
    }

    .hero-actions {
        justify-content: center;
    }

    .primary-action {
        min-width: 0;
        flex: 1;
    }

    .secondary-action {
        padding: 0 13px;
    }

    .headline-stats,
    .dashboard-grid,
    .site-footer {
        width: calc(100% - 28px);
    }

    .stat-tile {
        min-height: 108px;
        padding: 18px;
    }

    .dashboard-grid {
        margin-top: 18px;
    }

    .story-card,
    .statistics-card,
    .collection-card,
    .equipment-card {
        padding: 22px;
    }

    .card-heading {
        margin-bottom: 24px;
    }

    .collection-heading {
        display: grid;
    }

    .collection-tabs {
        width: 100%;
    }

    .collection-tabs button {
        flex: 1;
    }

    .collection-grid,
    .equipment-list {
        grid-template-columns: 1fr;
    }

    .statistics-list {
        grid-template-columns: 1fr;
    }

    .statistics-list div:nth-child(n) {
        padding-right: 0;
        padding-left: 0;
        border-left: 0;
    }

    .site-footer {
        display: grid;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .toast {
        right: 14px;
        bottom: 14px;
        left: 14px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
