:root {
    color-scheme: dark;
    --bg: #202020;
    --panel: #252525;
    --line: #353535;
    --text: #e4e4e7;
    --muted: #a3a3aa;
    --accent: #b39af5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Segoe UI, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
a,
select {
    touch-action: manipulation;
}

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

.shell {
    max-width: 1280px;
    padding: 0 48px;
    margin: auto;
}

header {
    min-height: 100px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
}

.mark {
    background: var(--accent);
    color: var(--bg);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    text-align: center;
    margin-right: 12px;
    font-size: 27px;
    line-height: 32px;
}

.muted {
    color: var(--muted);
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
}

nav a[aria-current] {
    color: var(--accent);
}

nav form {
    margin: 0;
}

.text-button {
    background: none;
    color: var(--muted);
    border: none;
    padding: 0;
    cursor: pointer;
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    align-items: center;
    gap: 48px;
    padding: 70px 0 80px;
}

.eyebrow {
    font-family: Consolas, monospace;
    font-size: 13px;
    letter-spacing: 1.8px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 100%;
    display: inline-block;
    background: var(--accent);
}

h1 {
    font-size: clamp(36px, 4.6vw, 60px);
    font-weight: 550;
    line-height: 1.12;
    letter-spacing: -2px;
    margin: 22px 0;
}

h2 {
    font-size: 23px;
    letter-spacing: -.5px;
    font-weight: 550;
    margin: 0;
}

h3 {
    font-weight: 550;
    font-size: 25px;
    letter-spacing: -.5px;
    margin: 14px 0 10px;
}

p {
    margin: 0 0 18px;
}

.intro {
    max-width: 480px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
    margin: 24px 0 30px;
}

.button {
    background: var(--accent);
    color: #171320;
    border: 1px solid var(--accent);
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    background: #c8b5ff;
}

.hero-art {
    height: 325px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 45%, #303e23 0%, #182018 55%, #141814 100%);
}

.hero-art:before,
.hero-art:after {
    content: '';
    position: absolute;
    background: #566a383b;
}

.hero-art:before {
    width: 1px;
    height: 100%;
    left: 50%;
}

.hero-art:after {
    height: 1px;
    width: 100%;
    top: 46%;
}

.orbit {
    position: absolute;
    border: 1px solid #8fac5e73;
    width: 270px;
    height: 120px;
    left: 50%;
    top: 46%;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
}

.orbit.two {
    transform: translate(-50%, -50%) rotate(40deg);
    width: 225px;
    height: 155px;
}

.art-core {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background: var(--accent);
    color: #19250e;
    font-size: 88px;
    font-weight: 600;
    width: 100px;
    height: 100px;
    border-radius: 23px;
    line-height: 100px;
    text-align: center;
    box-shadow: 0 0 65px #c6f32623;
}

.art-label,
.art-coordinate {
    position: absolute;
    font: 11px Consolas, monospace;
    letter-spacing: 1px;
    color: #b7c99d;
}

.art-label {
    bottom: 25px;
    left: 25px;
}

.art-coordinate {
    top: 25px;
    left: 25px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.project {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.featured {
    background: linear-gradient(140deg, #26331e, #191e17 65%);
    border-color: #647c42;
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.number {
    font: 11px Consolas, monospace;
    color: var(--muted);
    letter-spacing: .5px;
}

.tag {
    font-size: 12px;
    border: 1px solid #665684;
    border-radius: 5px;
    padding: 3px 8px;
    color: var(--accent);
    white-space: nowrap;
}

.tag.quiet {
    border-color: #45434b;
    color: #b0aeb7;
}

.token-art,
.project-symbol {
    height: 80px;
    margin: 30px 0 5px;
    font-size: 44px;
    color: var(--accent);
    display: flex;
    align-items: center;
}

.token-art {
    font: 600 38px Georgia, serif;
}

.token-art span {
    margin-left: 15px;
    font: 30px Segoe UI;
    color: #839a66;
}

.project p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.75;
}

.card-link,
.card-note {
    margin-top: auto;
    padding-top: 24px;
    font-size: 14px;
}

.card-link {
    color: var(--accent);
    display: flex;
    justify-content: space-between;
}

.card-link:hover {
    text-decoration: underline;
}

.card-note {
    color: var(--muted);
}

footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    padding: 26px 0 32px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}

.login-wrap {
    max-width: 480px;
    margin: 70px auto 100px;
}

.login-wrap h1 {
    font-size: 46px;
}

.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 28px;
    border-radius: 12px;
}

.login-panel form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-panel .small {
    margin: 20px 0 0;
}

.login-panel code {
    display: block;
    overflow-wrap: anywhere;
    background: #202020;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

label {
    font-size: 14px;
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

input,
select {
    background: #242424;
    border: 1px solid #444444;
    color: var(--text);
    padding: 11px 14px;
    border-radius: 6px;
    min-width: 0;
}

input {
    width: 100%;
}

.back {
    display: inline-block;
    color: var(--muted);
    margin-top: 24px;
    font-size: 14px;
}

.small {
    font-size: 13px;
}

.error {
    color: #ffd1c2;
    background: #442a22;
    border: 1px solid #88503b;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 44px 0 24px;
}

.dashboard-heading h1 {
    font-size: 42px;
    margin: 15px 0;
}

.accent {
    color: var(--accent);
}

.filters {
    display: flex;
    align-items: end;
    gap: 16px;
    margin-bottom: 30px;
}

.filters select {
    min-width: 165px;
}

.stats {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.stat {
    padding: 23px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.stat > span {
    font-size: 14px;
    color: var(--muted);
}

.stat strong {
    display: block;
    font-size: 30px;
    line-height: 1.3;
    letter-spacing: -1px;
    font-weight: 550;
    margin: 16px 0;
}

.stat small {
    font-size: 17px;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0;
}

.stat p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.stat.primary strong {
    color: var(--accent);
}

.stat .change {
    font-size: 21px;
    letter-spacing: -.4px;
}

.chart-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px;
    background: var(--panel);
    margin-bottom: 30px;
}

.chart-panel .section-head p {
    margin: 5px 0 0;
}

.chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.gridline {
    stroke: #3a3a3a;
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 5 6;
}

.price-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.price-dot {
    fill: var(--accent);
}

.chart text {
    fill: var(--muted);
    font: 14px Segoe UI, sans-serif;
}

.chart-dates {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 18px;
}

.chart-panel > p:last-child {
    margin-bottom: 0;
}

.empty {
    padding: 40px 20px 55px;
    text-align: center;
    max-width: 540px;
    margin: auto;
}

.empty-icon {
    font-size: 65px;
    color: var(--accent);
    line-height: 1;
}

.empty p {
    color: var(--muted);
    font-size: 15px;
}

.empty .small {
    font-size: 13px;
}

.observations {
    margin: 32px 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

th {
    text-align: left;
    color: var(--muted);
    font-weight: 400;
}

td,
th {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

td:last-child,
th:last-child {
    text-align: right;
}

td:last-child {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

@media (max-width: 1000px) {
    .shell {
        padding: 0 28px;
    }

    .hero {
        gap: 25px;
    }

    .hero-art {
        height: 285px;
    }

    .project-grid {
        gap: 12px;
    }

    .project {
        padding: 20px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat.primary {
        grid-column: 1/-1;
    }

}

@media (max-width: 720px) {
    .shell {
        padding: 0 20px;
    }

    header {
        min-height: 85px;
        flex-wrap: wrap;
        padding: 18px 0;
        gap: 14px;
    }

    nav {
        gap: 20px;
    }

    .brand {
        font-size: 22px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 42px 0;
        gap: 32px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-art {
        height: 240px;
    }

    .hero .intro {
        font-size: 16px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project {
        padding: 24px;
    }

    .token-art,
    .project-symbol {
        height: 55px;
        margin: 20px 0 0;
    }

    .card-link,
    .card-note {
        padding-top: 12px;
    }

    footer {
        flex-direction: column;
        gap: 8px;
        margin-top: 40px;
    }

    .dashboard-heading {
        align-items: start;
        padding-top: 32px;
    }

    .dashboard-heading h1 {
        font-size: 34px;
    }

    .dashboard-heading > .tag {
        display: none;
    }

    .filters {
        flex-wrap: wrap;
        gap: 12px;
    }

    .filters > div {
        flex: 1;
        min-width: 120px;
    }

    .filters select {
        width: 100%;
        min-width: 0;
    }

    .filters .button {
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stat.primary {
        grid-column: auto;
    }

    .stat strong {
        margin: 10px 0;
    }

    .chart-panel {
        padding: 18px;
    }

    .chart {
        min-height: 160px;
    }

    .chart-dates {
        font-size: 11px;
    }

    .login-wrap {
        margin: 45px auto;
    }

    .login-wrap h1 {
        font-size: 39px;
    }

    .login-panel {
        padding: 22px;
    }

    .eyebrow {
        font-size: 12px;
    }

    .section-head {
        flex-wrap: wrap;
    }

}

@media (prefers-reduced-motion: no-preference) {
    a,
    button {
        transition: background .15s, color .15s;
    }

}


/* Stream Watch */

.watch-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 0 24px;
}

.watch-summary strong {
    color: var(--accent);
    font-size: 24px;
}

.watch-list {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.watch-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 1.5fr) minmax(120px, .8fr) auto;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.watch-row:last-child {
    border-bottom: 0;
}

.watch-row.is-live {
    border-left: 3px solid var(--accent);
    padding-left: 21px;
}

.watch-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.watch-identity > div {
    min-width: 0;
}

.watch-identity h2 {
    font-size: 19px;
    overflow-wrap: anywhere;
}

.watch-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #2b3327;
    color: var(--accent);
    font-size: 23px;
}

.watch-status {
    font-size: 13px;
    color: var(--muted);
}

.watch-status.live {
    color: var(--accent);
}

.watch-status.unknown {
    color: #ffcf96;
}

.watch-label {
    font-size: 12px;
    color: var(--muted);
}

.watch-row p {
    font-size: 15px;
    line-height: 1.6;
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.watch-link {
    color: var(--accent);
    font-size: 14px;
    white-space: nowrap;
}

.watch-link:hover,
.watch-identity a:hover {
    text-decoration: underline;
}

.watch-note {
    margin-top: 22px;
}

.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;
}

@media (max-width: 950px) {
    .watch-row {
        grid-template-columns: 1fr 1fr;
    }

    .watch-link {
        justify-self: end;
    }

}

@media (max-width: 720px) {
    nav {
        flex-wrap: wrap;
        gap: 14px;
    }

    .watch-summary {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }

    .watch-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .watch-link {
        justify-self: start;
    }

    .dashboard-heading > .button {
        padding: 10px 12px;
        font-size: 14px;
    }

    .watch-identity h2 {
        font-size: 21px;
    }

}

/* Character roster */
.character-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    margin-bottom: 24px;
}

.character-filters select {
    width: 100%;
}

.character-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 24px;
}

.character-filter-actions .back {
    margin: 0;
}

.roster-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.roster-summary p {
    margin: 4px 0 0;
}

.roster-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.roster-table {
    min-width: 1000px;
}

.roster-table th,
.roster-table td {
    padding: 16px;
    text-align: left;
    vertical-align: top;
}

.roster-table thead a {
    white-space: nowrap;
}

.roster-table thead a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.roster-table th[scope="row"] {
    color: var(--text);
    font-weight: 600;
}

.roster-table td:last-child {
    color: var(--text);
}

.profession-cell {
    min-width: 230px;
}

.profession-cell details + details {
    margin-top: 8px;
}

.profession-cell summary {
    color: var(--accent);
    cursor: pointer;
}

.profession-tiers {
    padding-left: 20px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1000px) {
    header {
        flex-wrap: wrap;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .character-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .character-filters {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
    }

    .roster-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Live and offline Stream Watch sections */
.watch-section {
    margin-bottom: 28px;
}

.watch-section > h2,
.watch-offline > summary {
    margin-bottom: 16px;
}

.watch-offline > summary {
    cursor: pointer;
    font-size: 23px;
    font-weight: 550;
    letter-spacing: -.5px;
    padding: 12px 0;
}

.watch-offline > summary:hover {
    color: var(--accent);
}

.watch-offline > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

/* Sidebar shell and quiet, document-style content */
.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    padding: 30px 20px;
    background: #1b1b1b;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    font-size: 20px;
    letter-spacing: -.5px;
    gap: 5px;
    margin-bottom: 36px;
}

.sidebar .mark {
    width: 25px;
    height: 28px;
    line-height: 28px;
    font-size: 22px;
    margin-right: 4px;
    background: transparent;
    color: var(--accent);
}

.shell {
    max-width: 1320px;
    margin: 0 auto 0 250px;
    padding: 48px 56px 0;
}

.side-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    font-size: 14px;
}

.nav-label {
    color: #85838c;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.6px;
    margin: 0 10px 12px;
}

.side-nav a,
.side-nav .text-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #bab9c0;
    text-align: left;
    width: 100%;
}

.side-nav a:hover,
.side-nav .text-button:hover,
.nav-group > summary:hover {
    color: var(--text);
    background: #27262a;
}

.side-nav a[aria-current] {
    color: var(--accent);
    background: #302a3d;
}

.nav-group > summary {
    padding: 8px 10px;
    cursor: pointer;
    color: #d1d0d5;
    border-radius: 4px;
}

.nav-group > summary::marker {
    color: #85838c;
    font-size: 10px;
}

.nav-children {
    margin: 2px 0 8px 16px;
    padding-left: 9px;
    border-left: 1px solid #3a373f;
}

.nav-hint,
.nav-construction {
    display: inline-block;
    flex-shrink: 0;
    margin-left: auto;
    padding: 1px 3px;
    border: 1px solid currentColor;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
}

.nav-hint {
    color: var(--muted);
}

.nav-hint + .nav-construction {
    margin-left: 0;
}

.nav-account {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.sidebar-note {
    margin: auto 10px 0;
    padding-top: 48px;
    color: #77757e;
    font-size: 12px;
    line-height: 1.9;
}

.mobile-menu-toggle {
    display: none;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    padding: 10px 16px;
    background: var(--accent);
    color: #171320;
    z-index: 10;
}

.skip-link:focus {
    top: 12px;
}

summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

h1,
.dashboard-heading h1,
.login-wrap h1 {
    font-size: clamp(30px, 3.5vw, 42px);
    letter-spacing: -1.2px;
    font-weight: 650;
}

h2 {
    font-size: 22px;
    font-weight: 600;
}

.eyebrow {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1.5px;
}

.dashboard-heading {
    padding: 0 0 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.dashboard-heading h1 {
    margin: 12px 0 16px;
}

.home-intro {
    padding-bottom: 26px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.home-intro h1 {
    margin: 12px 0 20px;
}

.home-intro .intro {
    max-width: 640px;
    font-size: 16px;
    margin: 0;
}

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

.project,
.featured {
    background: transparent;
    border-color: var(--line);
    border-radius: 6px;
}

.project h3 {
    font-size: 22px;
}

.token-art,
.project-symbol {
    height: 48px;
    margin: 18px 0 4px;
    font-size: 30px;
}

.token-art span {
    color: var(--muted);
}

.button {
    border-radius: 5px;
    font-size: 14px;
    padding: 10px 16px;
}

.tag {
    font-size: 11px;
}

.chart-panel,
.stat,
.login-panel,
.character-filters,
.watch-list,
.roster-table-wrap {
    border-radius: 6px;
}

.login-wrap {
    margin: 30px auto 100px;
}

footer {
    font-size: 12px;
    margin-top: 56px;
}

@media (min-width: 801px) {
    /* The desktop sidebar remains visible even if the mobile menu was closed. */
    .sidebar-menu > .side-nav {
        display: flex;
    }
}

@media (max-width: 1100px) {
    .sidebar {
        width: 220px;
        padding: 26px 16px;
    }

    .shell {
        margin-left: 220px;
        padding: 36px 28px 0;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 18px 22px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar .brand {
        margin-bottom: 16px;
    }

    .mobile-menu-toggle {
        display: list-item;
        color: var(--muted);
        cursor: pointer;
        font-size: 14px;
    }

    .sidebar-menu[open] > .mobile-menu-toggle {
        margin-bottom: 22px;
    }

    .sidebar-note {
        display: none;
    }

    .shell {
        margin: 0;
        padding: 28px 22px 0;
    }

    .side-nav {
        align-items: stretch;
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Owner editing controls and public social profiles */
.provider-login + p {
    margin-bottom: 24px;
}

.stream-notice {
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    background: var(--panel);
}

.stream-socials,
.social-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.stream-socials {
    margin-top: 8px;
    font-size: 12px;
}

.stream-socials a {
    color: var(--accent);
}

.social-item form {
    display: inline-flex;
}

.social-remove {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 3px 6px;
}

.stream-management {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.stream-editor {
    min-width: 0;
    max-width: 100%;
}

.stream-editor > summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--accent);
}

.stream-editor[open] {
    flex: 1 1 100%;
}

.remove-streamer > summary {
    color: var(--muted);
}

.add-streamer {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
}

.stream-edit-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 16px;
}

.stream-edit-form > div {
    min-width: 0;
}

.stream-edit-form .social-url-field {
    flex: 1 1 250px;
}

.stream-edit-form p {
    width: 100%;
    margin: 0;
}

@media (max-width: 600px) {
    .stream-edit-form > div,
    .stream-edit-form > button,
    .stream-edit-form select {
        width: 100%;
    }
}

/* Astronomy Picture of the Day */
.apod-date {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 18px;
}

.apod-date time {
    font-size: 15px;
    color: var(--accent);
}

.apod-figure {
    margin: 0 0 32px;
}

.apod-figure > a {
    display: block;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #161616;
}

.apod-image {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
}

.apod-credit {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 14px 0;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-line;
}

.apod-credit a,
.apod-source a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.apod-story {
    max-width: 800px;
}

.apod-story h2 {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.3;
    margin-bottom: 22px;
}

.apod-description {
    white-space: pre-line;
    line-height: 1.9;
    color: #c7c5cd;
}

.apod-source {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-top: 28px;
    font-size: 13px;
    color: var(--muted);
}

.apod-media-note {
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
}

/* Keep each sign-in button paired with its purpose. */
.login-wrap-providers {
    max-width: 680px;
}

.login-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 24px;
}

.login-option {
    min-width: 0;
}

.login-option .button {
    width: 100%;
    justify-content: space-between;
}

.login-option .small {
    margin: 12px 0 0;
    line-height: 1.6;
}

.channel-messages { display: grid; gap: 16px; margin: 24px 0; }
.chat-message {
    padding: 14px 16px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    min-width: 0;
}
.chat-message-bot { border-left: 3px solid var(--accent); }
.chat-message-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    gap: 8px 14px;
    padding: 0 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.chat-message > :last-child {
    margin-bottom: 0;
}

.chat-message-header time {
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .chat-message-header time {
        flex-basis: 100%;
    }
}
.chat-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.chat-embed { margin: 16px 0; padding-left: 16px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.chat-message a { overflow-wrap: anywhere; }

.side-nav a.nav-building {
    flex-wrap: nowrap;
}

.nav-construction {
    color: var(--accent);
}


.nav-title {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
}

/* Status tags keep their size and paint above unusually long titles. */
.side-nav .nav-hint,
.side-nav .nav-construction {
    position: relative;
    z-index: 1;
    background: #1b1b1b;
}

.side-nav a:hover .nav-hint,
.side-nav a:hover .nav-construction {
    background: #27262a;
}

.side-nav a[aria-current] .nav-hint,
.side-nav a[aria-current] .nav-construction {
    background: #302a3d;
}

.goal-editor { margin-top: 16px; }
.goal-editor > summary { cursor: pointer; color: var(--accent); }
.goal-editor form { margin-top: 12px; }

.goal-region { margin-top: 36px; }
.completed-goals { margin-top: 24px; }
.completed-goals > summary { cursor: pointer; color: var(--muted); padding: 12px 0; }
.completed-goals > .project-grid { margin-top: 12px; }

/* Character detail cards and compact equipment/history tables. */
.character-profile .stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.character-profile .stat.primary { grid-column: auto; }
.character-profile .stat { min-width: 0; overflow-wrap: anywhere; }
.character-profile .stat p { margin-top: 16px; font-size: 18px; color: var(--text); }
.character-profile .roster-table { min-width: 0; width: 100%; }
.character-profile .roster-table td { overflow-wrap: anywhere; }
.character-profile .chart-panel { margin-top: 22px; }

.activity-day { margin: 32px 0; }
.activity-day h2 { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { display: grid; grid-template-columns: 90px 26px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.activity-list time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.activity-list a { overflow-wrap: anywhere; }
.activity-list a:hover { color: var(--accent); text-decoration: underline; }
.activity-pagination { display: flex; gap: 14px; margin: 24px 0; }
@media (max-width: 480px) {
    .activity-list li { grid-template-columns: 72px 22px minmax(0, 1fr); gap: 8px; }
}

/* Blizzard media keeps the existing profile cards and table layout. */
.character-render { width: min(42%, 300px); height: 320px; object-fit: contain; flex-shrink: 0; }
.character-avatar { width: 112px; height: 112px; border-radius: 12px; }
.guild-crest { display: block; width: 96px; height: 96px; margin-top: 16px; }
.equipped-item { display: inline-flex; max-width: 100%; align-items: center; gap: 10px; }
.item-icon { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: 5px; object-fit: contain; }
@media (max-width: 600px) {
    .character-profile .dashboard-heading { flex-wrap: wrap; }
    .character-render { width: 100%; height: 240px; }
    .character-avatar { width: 96px; height: 96px; }
}

.roster-identity { display: inline-flex; align-items: center; gap: 8px; }
.roster-icon { width: 24px; height: 24px; flex: 0 0 24px; object-fit: cover; border-radius: 4px; }

/* Character identity and progression, within the existing dark profile theme. */
.profile-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 24px 0; border-bottom: 1px solid var(--line); }
.profile-identity { flex: 1; min-width: 0; padding: 24px 0; }
.profile-identity h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.1; margin: 14px 0; overflow-wrap: anywhere; }
.profile-specialization { font-size: 18px; }
.profile-guild { display: flex; align-items: center; gap: 14px; margin-top: 24px; overflow-wrap: anywhere; }
.profile-guild .guild-crest { width: 64px; height: 64px; flex: 0 0 64px; margin: 0; }
.profile-hero .character-render { width: min(48%, 480px); height: 460px; max-width: 100%; object-fit: contain; }
.profile-hero .character-avatar { width: 144px; height: 144px; }
.character-profile .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-stats .stat { padding: 22px; }
.profile-stats .level-progress p { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.profile-stats .level-progress strong { font-size: 28px; }
.level-progress progress { display: block; width: 100%; height: 12px; margin-top: 16px; accent-color: var(--accent); border: 0; border-radius: 6px; overflow: hidden; }
.level-progress progress::-webkit-progress-bar { background: var(--line); }
.level-progress progress::-webkit-progress-value { background: var(--accent); }
.level-progress progress::-moz-progress-bar { background: var(--accent); }
.profile-sync { margin: 16px 0 24px; }
@media (max-width: 640px) {
    .profile-hero { flex-direction: column; align-items: stretch; gap: 0; }
    .profile-hero .character-render { width: 100%; height: 360px; }
    .profile-hero .character-avatar { width: 112px; height: 112px; align-self: center; margin-bottom: 20px; }
    .character-profile .profile-stats { grid-template-columns: 1fr; }
}

.character-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; margin: 0; }
.character-stat-grid dt { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.character-stat-grid dd { margin: 5px 0 0; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.character-statistics h3 { margin: 22px 0 14px; font-size: 14px; color: var(--accent); }
@media (max-width: 720px) { .character-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 360px) { .character-stat-grid { grid-template-columns: 1fr; } }

/* Quality comes only from Blizzard's quality.type. */
.equipped-item.item-quality-poor { color: #9d9d9d; }
.equipped-item.item-quality-common { color: #fff; }
.equipped-item.item-quality-uncommon { color: #1eff00; }
.equipped-item.item-quality-rare { color: #0070dd; }
.equipped-item.item-quality-epic { color: #a335ee; }
.equipped-item.item-quality-legendary { color: #ff8000; }
.equipped-item.item-quality-artifact, .equipped-item.item-quality-heirloom { color: #e6cc80; }
a.equipped-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }


.about-parent {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 40px;
    width: 100%;
    align-items: start;
}

.about-left {
    min-width: 0;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.about-left h2 {
    margin: 0 0 14px;
}

.about-left > h2 {
    font-size: 28px;
    letter-spacing: -0.6px;
}

.about-left p {
    max-width: 68ch;
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.8;
}

.about-left .about-lead {
    color: var(--text);
    font-size: 18px;
}

.about-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-right {
    padding: 24px 0;
    text-align: center;
}

.about-image {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 20px;
    object-fit: cover;
    border: 1px solid var(--line);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-position: 10% center;
}

.about-name {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.about-caption {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.about-interests {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .about-parent { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .about-right { grid-row: 1; padding: 0; }
    .about-image { width: 160px; }
}

@media (max-width: 480px) {
    .about-left { padding: 24px 20px; }
}
/* Keep each source label together, wrapping only when the row runs out of room. */
.activity-filters { border: 0; padding: 0; margin: 24px 0; min-width: 0; }
.activity-filters legend { margin-bottom: 12px; font-weight: 600; }
.activity-source-options { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
.activity-source-options label { display: inline-flex; align-items: center; gap: 8px; margin: 0; max-width: 100%; cursor: pointer; }
.activity-source-options input { width: auto; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
[data-activity-feed] [hidden] { display: none !important; }
