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

:root {
    --bg: #ffffff;
    --bg-alt: #f8f6fc;
    --surface: #ffffff;
    --border: #e4ddf2;
    --border-light: #f0ecf7;
    --accent: #8154a3;
    --accent-hover: #7c3aed;
    --accent-light: #ede9fe;
    --accent-muted: #a78bfa;
    --accent-glow: rgba(91, 33, 182, 0.10);
    --text: #1a1033;
    --text-secondary: #4a3d63;
    --text-muted: #62536f;
    --text-dim: #6f617d;
    --code-bg: #f5f1fc;
    --code-border: #e4ddf2;
    --code-text: #3b1483;
    --shadow-sm: 0 1px 3px rgba(26, 16, 51, 0.06);
    --shadow-md: 0 4px 12px rgba(26, 16, 51, 0.08);
    --shadow-lg: 0 8px 30px rgba(91, 33, 182, 0.10);
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', var(--font-body);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3,
.brand,
.nav-links,
.btn,
.profile-title h1,
.profile-display-name,
.cosmetic-preview strong,
.forum-hero h1,
.thread-title h2,
.forum-sidebar h3 {
    font-family: var(--font-display);
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 0 0 0.375rem 0;
    font-size: 0.875rem;
}
.skip-link:focus {
    left: 0;
    text-decoration: none;
    color: #fff;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.93);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(14px);
}
.site-nav .container {
    max-width: 1120px;
}
.nav-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}
.brand img {
    width: 32px;
    height: 32px;
    display: block;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 650;
}
.nav-links a {
    color: var(--text-secondary);
    transition: color 0.12s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-action {
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    background: #fff;
}
.nav-action:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.nav-form,
.footer-form { margin: 0; }
.nav-form button { cursor: pointer; font: inherit; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary {
    list-style: none;
    cursor: pointer;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    background: #fff;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav-links {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 120;
    display: grid;
    gap: 0.35rem;
    min-width: min(86vw, 240px);
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.mobile-nav-links a {
    color: var(--text-secondary);
    border-radius: 0.5rem;
    padding: 0.55rem 0.65rem;
    font-weight: 650;
}
.mobile-nav-links a:hover {
    color: var(--accent);
    background: var(--bg-alt);
    text-decoration: none;
}

/* ── Hero ── */
.hero {
    padding: 5rem 0 3.5rem;
    text-align: center;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 1.25rem;
    color: var(--text);
}
.hero h1 span { color: var(--accent); }
.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}
.hero-cta {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.625rem 1.375rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(91, 33, 182, 0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.30);
    text-decoration: none;
    color: #fff;
}
.btn-outline {
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
    background: var(--accent-light);
}

/* ── Stats bar ── */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    padding: 1.5rem 0 2.5rem;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ── Code blocks ── */
.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 0.625rem;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.825rem;
    line-height: 1.75;
    text-align: left;
    margin: 1.5rem auto;
    max-width: 680px;
    color: var(--code-text);
    white-space: pre-wrap;
    word-wrap: break-word;
    tab-size: 2;
}
.code-block .c { color: var(--text-dim); }
.code-block .s { color: #6d28d9; }
.code-block .k { color: var(--accent); }
.code-block .n { color: #b45309; }

/* ── Code tabs ── */
.code-tabs {
    max-width: 680px;
    margin: 1.5rem auto;
    border: 1px solid var(--code-border);
    border-radius: 0.625rem;
    overflow: hidden;
}
.tab-bar {
    display: flex;
    background: linear-gradient(to bottom, var(--bg), var(--code-bg));
    box-shadow: inset 0 -1px 0 var(--code-border);
    padding: 0 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.tab-bar .tab {
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.tab-bar .tab:hover { color: var(--accent); }
.tab-bar .tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-panel {
    display: none;
    position: relative;
}
.tab-panel.active { display: block; }
.tab-panel .code-block {
    margin: 0;
    border: none;
    border-radius: 0;
    white-space: pre;
}
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.675rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.copy-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Use cases ── */
.use-cases {
    padding: 4rem 0;
    background: var(--bg-alt);
    margin: 0 -9999px;
    padding-left: 9999px;
    padding-right: 9999px;
}
.use-cases .container { max-width: 970px; }
.use-cases h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}
.use-case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}
.use-case-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.use-case-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-muted);
}
.use-case-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.use-case-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.use-case-code {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.78rem;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    margin: 0 0 0.875rem;
    color: var(--code-text);
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

/* ── Features ── */
.features {
    padding: 4rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
}
.features h2,
.use-cases h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 650;
    margin-bottom: 0.4rem;
    color: var(--text);
}
.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── Pricing ── */
.pricing {
    padding: 4.5rem 0;
    border-top: 1px solid var(--border-light);
}
.pricing h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.pricing > p,
.pricing > .container > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}
.price-card {
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.price-card:hover {
    box-shadow: var(--shadow-md);
}
.price-card.featured {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: var(--shadow-lg);
}
.price-card .price-features { flex: 1; margin-bottom: 0; }
.price-card .btn { margin-top: 2rem; width: 100%; }
.price-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.125rem;
    letter-spacing: -0.03em;
}
.price-card.featured .price-amount { color: var(--accent); }
.price-period {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.75rem;
}
.price-features {
    list-style: none;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-bottom: 0.5rem;
}
.price-features li {
    padding: 0.375rem 0;
    padding-left: 1.375rem;
    position: relative;
}
.price-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-muted);
}
.price-card.featured .price-features li::before {
    background: var(--accent);
}
.pricing-note {
    max-width: 960px;
    margin: 2rem auto 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}
.pricing-note a { color: var(--accent); }

/* ── Docs ── */
.docs { padding: 3rem 0; }
.docs h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.docs > p { color: var(--text-muted); margin-bottom: 0.5rem; }
.docs h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2.5rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    letter-spacing: -0.01em;
}
.docs h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.75rem 0 0.5rem;
    color: var(--accent);
}
.docs p, .docs li {
    color: var(--text-secondary);
    font-size: 0.925rem;
    margin-bottom: 0.5rem;
}
.docs ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.docs-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 2rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    background: var(--bg-alt);
}
.docs-toc a {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 650;
}
.docs code {
    background: var(--accent-light);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.825rem;
    color: var(--accent);
    font-weight: 500;
}
.docs .code-block {
    margin: 1rem 0;
    max-width: none;
    position: relative;
    white-space: pre;
}
.docs .code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}
.docs .code-block code {
    background: none;
    padding: 0;
    color: inherit;
    font-weight: normal;
}
.endpoint-method {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

.tier-badge {
    display: inline-block;
    background: #7c5cbf;
    color: #fff;
    font-weight: 700;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    vertical-align: middle;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Param tables */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0 1.5rem;
    font-size: 0.875rem;
}
.param-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.param-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.param-table td:first-child {
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.825rem;
    font-weight: 500;
}
.param-required {
    font-size: 0.65rem;
    color: #b45309;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.375rem;
}

/* ── Legal ── */
.legal { padding: 3rem 0; }
.legal h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.legal h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
    color: var(--text);
}
.legal p, .legal li {
    color: var(--text-secondary);
    font-size: 0.925rem;
    margin-bottom: 0.75rem;
}
.legal ul { padding-left: 1.5rem; margin-bottom: 1rem; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 4rem;
    background: var(--bg-alt);
}
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; min-width: 0; }
.footer-links a {
    color: var(--text-muted);
    font-size: 0.825rem;
    font-weight: 500;
}
.footer-links button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.825rem;
    font-weight: 500;
}
.footer-links a:hover,
.footer-links button:hover { color: var(--accent); }
.footer-copy {
    color: var(--text-dim);
    font-size: 0.825rem;
}

/* ── Auth ── */
.auth-page {
    padding: 4rem 0;
    display: flex;
    justify-content: center;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
}
.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}
.auth-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-align: center;
    line-height: 1.55;
}
.auth-card label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    margin-bottom: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-card input::placeholder { color: var(--text-dim); }
.tos-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0 0.25rem;
}
.tos-check input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.tos-check label {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0;
}
.tos-check a {
    color: var(--accent);
    font-weight: 600;
}
.cf-turnstile { margin: 1rem 0 0.25rem; }
.btn-full { width: 100%; margin-top: 0.5rem; }
.auth-alt {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Flash messages ── */
.flash {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.flash-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.site-blur-nsfw img,
img.site-blur-nsfw {
    filter: blur(16px) saturate(0.9);
    transform: scale(1.04);
    transition: filter 0.18s, transform 0.18s;
}
.site-blur-nsfw:hover img,
img.site-blur-nsfw:hover {
    filter: none;
    transform: none;
}

/* ── Dashboard ── */
.dashboard { padding-top: 3rem; padding-bottom: 3rem; }
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}
.dash-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.dash-account {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}
.dash-email {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.plan-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}
.plan-free {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.plan-usage {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}
.plan-pro {
    background: var(--accent-light);
    border: 1px solid var(--accent-muted);
    color: var(--accent);
}
.plan-enterprise {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.dashboard h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.dash-options h2 { margin-top: 1.25rem; }
.account-options-form {
    display: grid;
    gap: 0.75rem;
    max-width: 760px;
}
.option-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--surface);
    cursor: pointer;
}
.option-row:hover { border-color: var(--border); background: var(--bg-alt); }
.option-row input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: var(--accent);
}
.option-row strong {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}
.option-row span span {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }
.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.key-create-form {
    margin-bottom: 1.5rem;
}
.key-create-form form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.key-name-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    max-width: 360px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.key-name-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.key-name-input::placeholder { color: var(--text-dim); }
.tier-select {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s;
}
.tier-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.key-name-inline {
    background: none;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text);
    width: 100%;
    min-width: 100px;
    transition: border-color 0.15s, background 0.15s;
}
.key-name-inline:hover {
    border-color: var(--border);
    background: var(--bg-alt);
}
.key-name-inline:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.rename-form { display: contents; }
.key-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.key-cell code {
    flex: 1;
    word-break: break-all;
}
.btn-icon {
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.btn-icon:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.row-revoked td { opacity: 0.5; }
.revoked-keys {
    margin-top: 1.5rem;
}
.revoked-keys summary {
    font-size: 0.825rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    padding: 0.5rem 0;
}
.revoked-keys summary:hover { color: var(--accent); }
.key-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.key-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.key-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.key-table code {
    background: var(--accent-light);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent);
}
.status-active { color: #16a34a; font-weight: 600; }
.status-revoked { color: #dc2626; font-weight: 600; }
.dash-balance {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    margin-bottom: 1.5rem;
}
.balance-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.balance-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.dash-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}
.dash-hint code {
    background: var(--accent-light);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}
.usage-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.usage-stat {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    min-width: 130px;
}
.usage-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.usage-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.usage-stat-value.accent { color: var(--accent); }
.usage-chart-wrap {
    margin-bottom: 1.5rem;
}
.usage-chart-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.usage-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100px;
}
.usage-bar {
    flex: 1;
    min-width: 0;
    background: var(--accent-light);
    border-radius: 2px 2px 0 0;
    transition: background 0.15s;
    min-height: 0;
}
.usage-bar:hover {
    background: var(--accent);
}
.usage-bar-today {
    background: var(--accent-muted);
}
.usage-bar-today:hover {
    background: var(--accent);
}
.usage-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.375rem;
    margin-bottom: 1rem;
}
.endpoint-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.endpoint-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.endpoint-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.endpoint-table code {
    background: var(--accent-light);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}
.endpoint-bar-cell {
    width: 35%;
}
.endpoint-bar-wrap {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    overflow: hidden;
}
.endpoint-bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-muted), var(--accent));
}
.usage-pct {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 2.5rem;
}
/* ── Status page ── */
.status-page { padding: 3rem 0; }
.status-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.status-page h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.status-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.5rem;
}
.status-hero-operational { border-color: #bbf7d0; background: #f0fdf4; }
.status-hero-degraded { border-color: #fde68a; background: #fefce8; }
.status-hero-down { border-color: #fecaca; background: #fef2f2; }
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.status-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.status-ping {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.status-dot, .status-dot-sm {
    display: inline-block;
    border-radius: 50%;
}
.status-dot {
    width: 12px;
    height: 12px;
}
.status-dot-sm {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}
.status-dot-operational { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.status-dot-degraded { background: #eab308; box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2); }
.status-dot-down { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
.status-metrics {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.status-metric {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    min-width: 130px;
}
.status-metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.status-metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.uptime-bar {
    display: flex;
    gap: 2px;
    height: 32px;
}
.uptime-segment {
    flex: 1;
    border-radius: 3px;
    cursor: default;
    transition: opacity 0.15s;
}
.uptime-segment:hover { opacity: 0.7; }
.uptime-full { background: #22c55e; }
.uptime-good { background: #86efac; }
.uptime-warn { background: #facc15; }
.uptime-bad { background: #ef4444; }
.uptime-none { background: var(--border-light); }
.uptime-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.375rem;
}
.uptime-pct {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.375rem;
}
.endpoint-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
}
.endpoint-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-light);
}
.endpoint-row:first-child { border-top: none; }
.endpoint-row code {
    background: var(--accent-light);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.825rem;
    color: var(--accent);
    font-weight: 500;
    min-width: 5rem;
}
.endpoint-status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
}
.endpoint-latency {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.775rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.status-updated {
    font-size: 0.775rem;
    color: var(--text-dim);
    margin-top: 2rem;
    text-align: center;
}
@media (max-width: 640px) {
    .status-hero { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .status-metric { min-width: 100px; }
    .uptime-bar { height: 24px; }
    .endpoint-row { flex-wrap: wrap; }
    .endpoint-status-label { width: 100%; order: 3; padding-left: 1.75rem; font-size: 0.8rem; }
    .endpoint-latency { order: 2; }
}
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; }
.key-reveal {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.key-reveal code {
    background: #fff;
    border: 1px solid #bbf7d0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    color: #166534;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ── Table scroll wrapper ── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .container { padding: 0 1rem; }
    .hero { padding: 3rem 0 2rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.95rem; }
    .stats-bar { gap: 1.5rem; }
    .stat-num { font-size: 1.4rem; }
    .site-nav { position: static; }
    .nav-inner { padding: 0.75rem 1rem; }
    .nav-links { display: none; }
    .mobile-nav { display: block; }
    .features {
        margin: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .pricing-grid { grid-template-columns: 1fr; }
    .price-card { padding: 1.5rem 1.25rem; }
    .code-block { font-size: 0.72rem; padding: 0.875rem; }
    .docs .code-block { white-space: pre-wrap; word-break: break-all; }
    .tab-bar { max-width: 100%; }
    .tab-bar .tab { flex: 0 0 auto; padding: 0.5rem 0.625rem; font-size: 0.7rem; }
    .tab-panel .code-block { white-space: pre-wrap; word-break: break-all; }
    footer .container { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; gap: 0.75rem 1rem; max-width: 100%; }
    .dash-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .dash-header h1 { font-size: 1.4rem; }
    .usage-stat { min-width: 100px; padding: 0.5rem 0.75rem; }
    .usage-stat-value { font-size: 1.1rem; }
    .usage-chart { height: 70px; }
    .endpoint-bar-cell { width: 25%; }
    .key-table { font-size: 0.75rem; }
    .key-table th, .key-table td { padding: 0.4rem 0.5rem; }
    .param-table { font-size: 0.75rem; }
    .param-table th, .param-table td { padding: 0.4rem 0.5rem; }
    .docs h1 { font-size: 1.5rem; }
    .docs h2 { font-size: 1.1rem; }
    .legal h1 { font-size: 1.5rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .use-case-grid { grid-template-columns: 1fr; }
    .use-cases { margin: 0; padding-left: 1rem; padding-right: 1rem; }
    .guides-grid { grid-template-columns: 1fr; }
    .amount-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Billing ── */
.dash-billing { margin-bottom: 2rem; }
.dash-billing h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.billing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.billing-row span { color: var(--text-muted); font-size: 0.9rem; }
.billing-table { margin-top: 0.75rem; }
.inline-form { display: inline; }

/* ── Checkout ── */
.checkout { padding: 3rem 0; max-width: 540px; }
.checkout h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.checkout > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; line-height: 1.6; }
.checkout-form { display: flex; flex-direction: column; gap: 1.5rem; }
.checkout-section { display: flex; flex-direction: column; gap: 0.5rem; }
.checkout-label { font-weight: 600; font-size: 0.9rem; }
.checkout-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.checkout-select {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    max-width: 200px;
}
.amount-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.625rem;
}
.amount-option input { display: none; }
.amount-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--surface);
}
.amount-option input:checked + .amount-box {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.amount-box:hover { border-color: var(--accent-muted); }
.amount-dollars { font-size: 1.25rem; font-weight: 700; }
.amount-requests { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
.btn-checkout { margin-top: 0.5rem; }

/* ── Guides ── */
.guides-landing > p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.guides-landing > p:first-of-type {
    margin-bottom: 2rem;
}
.guides-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
.guide-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}
.guide-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-muted);
    text-decoration: none;
    color: inherit;
}
.guide-lang {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    background: var(--accent-light);
    color: var(--accent);
    margin-bottom: 0.625rem;
}
.guide-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.guide-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.guide-breadcrumb {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.guide-breadcrumb a {
    color: var(--accent);
    font-weight: 500;
}

/* ── Demos index ── */
.demos { padding: 3rem 0; }
.demos h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.demos-sub { color: var(--text-muted); margin-bottom: 2rem; }
.demos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    max-width: 960px;
}
.demo-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none; color: inherit;
}
.demo-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-muted);
}
.demo-card-badge {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; padding: 0.15rem 0.6rem;
    border-radius: 1rem; background: var(--accent-light); color: var(--accent);
    align-self: flex-start; margin-bottom: 0.75rem;
}
.demo-card h2 {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem;
    color: var(--text); letter-spacing: -0.01em;
}
.demo-card p {
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.55;
    margin-bottom: 1rem; flex: 1;
}
.demo-card-endpoints {
    display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.demo-card-endpoints code {
    font-size: 0.65rem; padding: 0.15rem 0.45rem;
    background: var(--code-bg); border: 1px solid var(--code-border);
    border-radius: 0.375rem; color: var(--code-text);
}

/* ── Demo ── */
.demo { padding: 3rem 0; }
.demo h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.demo-intro {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.6;
    max-width: 720px;
    margin-bottom: 2rem;
}
.demo [hidden] { display: none !important; }
.demo-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.demo-panel > .tab-bar,
.demo-subtabs {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.demo-panel > .tab-bar .tab,
.demo-subtabs .tab {
    flex: 0 0 auto;
}
.demo-body { padding: 1.25rem 1.5rem 1.375rem; }
.demo-input-row { display: flex; gap: 0.625rem; }
.demo-input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.demo-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.demo-input::placeholder { color: var(--text-dim); }
.demo-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.875rem;
}
.demo-chip-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.example-chip {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.example-chip:hover {
    background: var(--accent-light);
    border-color: var(--accent-muted);
    color: var(--accent);
}
.demo-note {
    margin-top: 1rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.demo-note code {
    background: var(--accent-light);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
}
.demo .code-block { margin: 1.25rem 0 0; max-width: none; position: relative; }
.demo-json { max-height: 480px; overflow: auto; word-break: break-word; }
.demo-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.75rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.775rem;
    color: var(--text-muted);
}
.demo-status > *:not(:first-child)::before {
    content: '\00b7';
    margin-right: 0.625rem;
    color: var(--text-dim);
}
.status-ok { color: #16a34a; font-weight: 700; }
.status-err { color: #dc2626; font-weight: 700; }
.demo-loading { color: var(--accent); font-weight: 600; }
.demo-loading::after { content: ''; animation: demo-dots 1.2s steps(4, end) infinite; }
@keyframes demo-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}
.demo-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.875rem;
}
.demo-filters-chips { display: contents; }
.filter-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    background: var(--accent-light);
    border: 1px solid var(--accent-muted);
    border-radius: 0.375rem;
    padding: 0.2rem 0.625rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.75rem;
    color: var(--accent);
}
.filter-chip .fk { color: var(--text-muted); }
.filter-chip .fv { font-weight: 600; word-break: break-word; }
.demo-subtabs {
    margin-top: 1.5rem;
    background: none;
}
.demo-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
}
.result-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.125rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    min-width: 0;
}
.result-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent-muted); }
.result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}
.result-meta .push { margin-left: auto; }
.platform-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    background: var(--accent-light);
    color: var(--accent);
    white-space: nowrap;
}
.result-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
.badge-deleted {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.sim-score {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
}
.sim-bar {
    display: inline-block;
    width: 52px;
    height: 5px;
    border-radius: 3px;
    background: var(--border-light);
    overflow: hidden;
}
.sim-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-muted), var(--accent));
}
.result-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.2rem;
    overflow-wrap: anywhere;
    color: var(--text);
}
.result-title a { color: inherit; }
.result-title a:hover { color: var(--accent); text-decoration: none; }
.result-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    overflow-wrap: anywhere;
}
.result-desc {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.result-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag-pill {
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}
.tag-pill.t-character {
    background: var(--accent-light);
    border-color: var(--border);
    color: var(--accent);
}
.tag-pill.t-copyright {
    background: var(--code-bg);
    border-color: var(--border);
    color: #6d28d9;
}
.tag-pill.t-species {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--text-secondary);
}
.tag-pill.t-rating {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
}
.tag-more {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.tag-more:hover { background: var(--accent-light); }
.artist-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 0.875rem;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-top: 1.25rem;
}
.artist-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}
.artist-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.2rem 0 1rem;
}
.artist-rows { display: flex; flex-direction: column; }
.artist-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--border-light);
    min-width: 0;
}
.artist-handle {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.825rem;
    color: var(--code-text);
    overflow-wrap: anywhere;
}
.artist-dn { font-size: 0.8rem; color: var(--text-muted); }
.artist-link {
    margin-left: auto;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}
.tagidx {
    margin-top: 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.tagidx-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-top: 1px solid var(--border-light);
}
.tagidx-row:first-child { border-top: none; }
.tag-cat {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    flex-shrink: 0;
    width: 5.75rem;
    text-align: center;
}
.tag-cat.t-character {
    background: var(--accent-light);
    border-color: var(--accent-muted);
    color: var(--accent);
}
.tag-cat.t-copyright {
    background: var(--code-bg);
    border-color: var(--border);
    color: #6d28d9;
}
.tagidx-name {
    font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    color: var(--text);
    overflow-wrap: anywhere;
    min-width: 0;
}
.tagidx-count {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}
.tagidx-bar {
    display: inline-block;
    width: 90px;
    height: 5px;
    border-radius: 3px;
    background: var(--border-light);
    overflow: hidden;
}
.tagidx-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-muted), var(--accent));
}
.tagidx-num {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 5.5rem;
    text-align: right;
}

@media (max-width: 700px) {
    .demo-results { grid-template-columns: 1fr; }
    .demo-body { padding: 1rem; }
    .demo-input-row { flex-direction: column; }
    .tagidx-bar { display: none; }
    .tag-cat { width: auto; }
    .artist-link { margin-left: 0; width: 100%; }
}

/* ── Forum ── */
.forum-page { padding-top: 3rem; padding-bottom: 3rem; }
.profile-page { padding-top: 3rem; padding-bottom: 3rem; }
.forum-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.forum-head h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.forum-head p,
.forum-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.forum-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.forum-form {
    display: grid;
    gap: 0.55rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: var(--surface);
}
.forum-form label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.forum-form input,
.forum-form select,
.forum-form textarea,
.profile-form input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
}
.forum-form textarea {
    min-height: 8rem;
    resize: vertical;
}
.forum-form input:focus,
.forum-form select:focus,
.forum-form textarea:focus,
.profile-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.profile-form {
    display: grid;
    gap: 0.55rem;
    max-width: 480px;
    margin-bottom: 1.5rem;
}
.profile-form label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.profile-section-title {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}
.forum-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.75rem;
    align-items: center;
}
.thread-list {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    overflow: hidden;
}
.thread-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text);
    border-top: 1px solid var(--border-light);
    background: var(--surface);
}
.thread-row:first-child { border-top: 0; }
.thread-row:hover {
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
}
.thread-row strong {
    display: block;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}
.thread-row small {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}
.thread-row em {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: normal;
    white-space: nowrap;
}
.empty-forum,
.forum-login {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    color: var(--text-muted);
    background: var(--surface);
    margin-bottom: 1rem;
}
.thread-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 1rem;
}
.thread-title h2 {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}
.thread-title span {
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}
.post-list {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}
.forum-post {
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    background: var(--surface);
}
.forum-post header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
}
.forum-author-name { font-weight: 750; color: var(--text); }
.forum-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.4;
    vertical-align: middle;
}
.post-body {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.forum-post time {
    display: block;
    color: var(--text-dim);
    font-size: 0.72rem;
    margin-top: 0.75rem;
}
.forum-shop h2 {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}
.forum-owned {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.forum-owned h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.forum-owned form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.forum-owned span {
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.cosmetic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}
.cosmetic-card {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.cosmetic-preview {
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    margin-bottom: 0.8rem;
    font-weight: 800;
}
.cosmetic-card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
}
.cosmetic-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    min-height: 2.6rem;
}
.cosmetic-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.cosmetic-meta strong { color: var(--text); }
.btn:disabled {
    opacity: 0.65;
    cursor: default;
}
.cos-name-reef { color: #047481; }
.cos-name-sunset { color: #b45309; }
.cos-badge-founder {
    color: #713f12;
    background: #fef3c7;
    border: 1px solid #facc15;
}
.cos-post-coral { border-left-color: #f97316; }
.cos-post-kelp { border-left-color: #16a34a; }

/* ── Profile cosmetics ── */
.profile-page {
    max-width: 1180px;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}
.profile-page .forum-head h1 {
    font-size: 2.25rem;
    letter-spacing: 0;
}
.profile-studio {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 0.8fr);
    gap: 1rem;
    align-items: stretch;
    margin: 1rem 0 1.35rem;
}
.profile-showcard {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: 0.85rem;
    padding: 1.35rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(10, 7, 28, 0.92), rgba(21, 12, 53, 0.96)),
        url('/og-image.png') center / cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 70px rgba(26, 16, 51, 0.22);
}
.profile-showcard::before {
    content: '';
    position: absolute;
    inset: -45%;
    background: conic-gradient(from 0deg, rgba(0, 236, 255, 0.32), rgba(255, 107, 214, 0.22), rgba(255, 218, 97, 0.28), rgba(0, 236, 255, 0.32));
    animation: profile-spin 10s linear infinite;
}
.profile-showcard::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 82%);
}
.profile-showcard > * {
    position: relative;
    z-index: 1;
}
.profile-card-topline {
    display: inline-flex;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.82);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.profile-avatar-stage {
    display: grid;
    place-items: center;
    min-height: 160px;
    margin-top: 1.2rem;
}
.profile-avatar-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    border-radius: 28px;
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 18px 42px rgba(0,0,0,0.26);
}
.profile-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 30px;
    background: linear-gradient(135deg, #31e6ff, #ff61c7, #ffd257, #31e6ff);
    z-index: -1;
    animation: profile-glow 3.5s ease-in-out infinite alternate;
}
.profile-avatar-ring img {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.34));
}
.profile-nameplate {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    margin-top: 0.45rem;
    text-align: center;
}
.profile-display-name {
    display: block;
    max-width: 100%;
    font-size: 2rem;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    text-shadow: 0 14px 34px rgba(0,0,0,0.34);
}
.profile-badge {
    transform: scale(1.08);
    transform-origin: center;
}
.profile-preview-tags {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.2rem 0 1rem;
}
.profile-preview-tags span {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.82);
    font-size: 0.72rem;
    font-weight: 750;
}
.profile-art-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-top: 1rem;
}
.profile-art-strip i {
    display: block;
    min-height: 74px;
    border-radius: 0.65rem;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(135deg, #15d9e8, #8154a3 48%, #ff7ab6);
    box-shadow: inset 0 0 24px rgba(255,255,255,0.14);
}
.profile-art-strip i:nth-child(2) { background: linear-gradient(135deg, #ffe27a, #ff7a8f 50%, #7c3aed); }
.profile-art-strip i:nth-child(3) { background: linear-gradient(135deg, #54f0b2, #1992ff 48%, #17152f); }
.profile-art-strip i:nth-child(4) { background: linear-gradient(135deg, #ff9f43, #e94bb2 52%, #3a1b72); }
.profile-panel {
    border: 1px solid var(--border-light);
    border-radius: 0.85rem;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #faf8ff);
    box-shadow: var(--shadow-md);
}
.profile-panel .profile-form {
    max-width: none;
    margin-bottom: 1rem;
}
.profile-panel .profile-form .btn {
    justify-self: start;
}
.profile-loadout {
    display: grid;
    gap: 0.65rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.profile-loadout h2 {
    font-size: 1rem;
    letter-spacing: 0;
}
.profile-loadout-row {
    display: grid;
    grid-template-columns: 7.5rem 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--border-light);
    border-radius: 0.65rem;
    background: #fff;
}
.profile-loadout-row span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 750;
}
.profile-loadout-row strong {
    color: var(--text);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}
.profile-loadout-row form {
    margin: 0;
}
.profile-shop {
    margin-top: 1.75rem;
}
.profile-shop-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}
.profile-shop-head h2 {
    font-size: 1.45rem;
    letter-spacing: 0;
}
.profile-shop-head p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.profile-shop-section {
    margin-top: 1.15rem;
}
.profile-shop-section h3 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0;
}
.profile-shop-section h3::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--border), transparent);
}
.cosmetic-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.cosmetic-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(129, 84, 163, 0.18);
    background: linear-gradient(180deg, #fff, #fbf9ff);
    box-shadow: 0 16px 38px rgba(26, 16, 51, 0.09);
}
.cosmetic-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #10d7e8, #ff6ac5, #ffd15c);
}
.cosmetic-card-bundle {
    border-color: rgba(255, 177, 66, 0.55);
    box-shadow: 0 18px 46px rgba(142, 83, 20, 0.14);
}
.cosmetic-preview {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: grid;
    align-content: end;
    justify-items: start;
    gap: 0.18rem;
    border-radius: 0.7rem;
    padding: 0.9rem;
    margin-bottom: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, #17152f, #4c237c);
    border: 1px solid rgba(255,255,255,0.16);
}
.cosmetic-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.42;
}
.cosmetic-preview::after {
    content: '';
    position: absolute;
    inset: auto -20% 0;
    height: 48%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent);
    transform: skewY(-8deg);
    animation: cosmetic-sheen 4.5s ease-in-out infinite;
}
.cosmetic-preview span,
.cosmetic-preview strong,
.cosmetic-preview small {
    position: relative;
    z-index: 1;
}
.cosmetic-preview span {
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.74);
}
.cosmetic-preview strong {
    font-size: 1.28rem;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.cosmetic-preview small {
    display: inline-flex;
    width: max-content;
    border-radius: 999px;
    padding: 0.16rem 0.48rem;
    margin-top: 0.25rem;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    font-size: 0.68rem;
    font-weight: 800;
}
.cosmetic-card h3 {
    font-size: 1.02rem;
    letter-spacing: 0;
}
.cosmetic-card p {
    min-height: 3.2rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
}
.cosmetic-meta {
    margin: 0.85rem 0;
}
.cosmetic-meta span {
    font-weight: 750;
}
.cosmetic-meta strong {
    font-size: 1.08rem;
}
.cos-name-reef,
.forum-author-name.cos-name-reef { color: #008ea0; }
.cos-name-neon,
.forum-author-name.cos-name-neon { color: #6d28d9; }
.cos-name-sunset,
.forum-author-name.cos-name-sunset { color: #c2416b; }
.profile-display-name.cos-name-reef,
.cosmetic-preview.cos-name-reef strong {
    background: linear-gradient(90deg, #9ff8ff, #36d8e8, #fff3b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.profile-display-name.cos-name-neon,
.cosmetic-preview.cos-name-neon strong {
    background: linear-gradient(90deg, #baffec, #8d5cff, #ff61d8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.profile-display-name.cos-name-sunset,
.cosmetic-preview.cos-name-sunset strong {
    background: linear-gradient(90deg, #ffd36e, #ff7aa5, #f24988);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cosmetic-preview.cos-name-reef,
.cosmetic-preview.cos-post-coral,
.cosmetic-preview.cos-kit-glass,
.profile-showcard.cos-post-coral {
    background: linear-gradient(135deg, #062b3b, #0b8ea0 52%, #ff8f6c);
}
.cosmetic-preview.cos-name-neon,
.cosmetic-preview.cos-post-kelp,
.cosmetic-preview.cos-kit-neon,
.profile-showcard.cos-post-kelp {
    background: linear-gradient(135deg, #10123d, #6d28d9 48%, #33ffd2);
}
.cosmetic-preview.cos-name-sunset,
.cosmetic-preview.cos-post-bloom,
.cosmetic-preview.cos-kit-bloom,
.profile-showcard.cos-post-bloom {
    background: linear-gradient(135deg, #421736, #f24988 50%, #ffd36e);
}
.cosmetic-preview.cos-badge-founder {
    background: linear-gradient(135deg, #271403, #9f5b0f 45%, #ffd36e);
}
.cosmetic-preview.cos-badge-pearl { background: linear-gradient(135deg, #062b3b, #42dbe7, #f7fff8); }
.cosmetic-preview.cos-badge-signal { background: linear-gradient(135deg, #151033, #7c3aed, #4dffd6); }
.cosmetic-preview.cos-badge-bloom { background: linear-gradient(135deg, #411a3b, #ff6aa2, #ffe17a); }
.forum-badge.cos-badge-founder,
.cos-badge-founder {
    color: #432503;
    background: linear-gradient(135deg, #fff5bf, #f2a733);
    border: 1px solid #d97706;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
}
.forum-badge.cos-badge-pearl,
.cos-badge-pearl {
    color: #05343c;
    background: linear-gradient(135deg, #e8ffff, #6ee7f1);
    border: 1px solid #22b8c7;
}
.forum-badge.cos-badge-signal,
.cos-badge-signal {
    color: #170c3b;
    background: linear-gradient(135deg, #d6fff5, #9b7cff);
    border: 1px solid #7c3aed;
}
.forum-badge.cos-badge-bloom,
.cos-badge-bloom {
    color: #4a122d;
    background: linear-gradient(135deg, #fff0b8, #ff86b7);
    border: 1px solid #f24988;
}
.forum-post.cos-post-coral {
    border-left-color: #ff7a59;
    background: linear-gradient(90deg, rgba(255,122,89,0.11), #fff 24%);
    box-shadow: inset 0 0 0 1px rgba(255,122,89,0.08);
}
.forum-post.cos-post-kelp {
    border-left-color: #33ffd2;
    background: linear-gradient(90deg, rgba(51,255,210,0.1), #fff 24%);
    box-shadow: inset 0 0 0 1px rgba(109,40,217,0.08);
}
.forum-post.cos-post-bloom {
    border-left-color: #f24988;
    background: linear-gradient(90deg, rgba(242,73,136,0.1), #fff 24%);
    box-shadow: inset 0 0 0 1px rgba(242,73,136,0.08);
}
.profile-showcard.cos-post-coral::before { background: conic-gradient(from 0deg, rgba(45,232,255,0.4), rgba(255,122,89,0.38), rgba(255,241,179,0.32), rgba(45,232,255,0.4)); }
.profile-showcard.cos-post-kelp::before { background: conic-gradient(from 0deg, rgba(51,255,210,0.4), rgba(141,92,255,0.42), rgba(255,97,216,0.26), rgba(51,255,210,0.4)); }
.profile-showcard.cos-post-bloom::before { background: conic-gradient(from 0deg, rgba(255,211,110,0.38), rgba(242,73,136,0.46), rgba(255,135,169,0.36), rgba(255,211,110,0.38)); }

@keyframes profile-spin {
    to { transform: rotate(1turn); }
}
@keyframes profile-glow {
    from { filter: saturate(1) brightness(0.95); }
    to { filter: saturate(1.35) brightness(1.15); }
}
@keyframes cosmetic-sheen {
    0%, 48% { transform: translateX(-90%) skewY(-8deg); opacity: 0; }
    62% { opacity: 0.55; }
    100% { transform: translateX(90%) skewY(-8deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .profile-showcard::before,
    .profile-avatar-ring::before,
    .cosmetic-preview::after {
        animation: none;
    }
}

/* ── Profile studio refresh ── */
body:has(.profile-shell) {
    background: #06101d;
}
body:has(.profile-shell) .site-nav {
    background: rgba(6, 13, 24, 0.93);
    border-bottom-color: rgba(154, 196, 255, 0.12);
}
body:has(.profile-shell) .brand,
body:has(.profile-shell) .nav-links a {
    color: #dbeafe;
}
body:has(.profile-shell) .nav-action {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.16);
}
body:has(.profile-shell) footer {
    background: #071323;
    border-top-color: rgba(154, 196, 255, 0.12);
}
body:has(.profile-shell) .footer-links a,
body:has(.profile-shell) .footer-copy {
    color: #8fa4be;
}
.profile-page {
    max-width: 1280px;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    color: #dbeafe;
}
.profile-shell {
    margin: 0.5rem 0 1.5rem;
    padding: 1.15rem;
    border: 1px solid rgba(155, 190, 255, 0.14);
    border-radius: 8px;
    background:
        radial-gradient(circle at 12% 8%, rgba(183, 95, 255, 0.18), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(37, 184, 255, 0.15), transparent 32%),
        linear-gradient(135deg, #071323, #071a2d 62%, #0a2132);
    box-shadow: 0 28px 90px rgba(0,0,0,0.36);
}
.profile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.profile-title {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.8rem;
    align-items: center;
}
.profile-title h1 {
    color: #fff;
    font-size: 2.1rem;
    line-height: 1.05;
    letter-spacing: 0;
}
.profile-title p {
    grid-column: 2;
    color: #9fb3ca;
    font-size: 0.9rem;
}
.profile-spark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #f2d2ff;
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(171, 92, 255, 0.34), rgba(69, 216, 255, 0.18));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 0 24px rgba(255,255,255,0.08);
}
.profile-top-actions {
    display: flex;
    gap: 0.6rem;
}
.profile-top-actions span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0 0.9rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #c9d7ea;
    font-size: 0.82rem;
    font-weight: 750;
}
.profile-top-actions strong { color: #fff; }
.profile-studio {
    grid-template-columns: minmax(420px, 1fr) 420px;
    gap: 1rem;
    margin: 0;
    align-items: start;
}
.profile-showcard {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-template-rows: 126px auto auto auto auto;
    gap: 0.45rem 1.05rem;
    min-height: 0;
    padding: 1rem;
    border-radius: 8px;
    background:
        linear-gradient(to bottom, rgba(10,18,35,0.08), rgba(4,10,22,0.76)),
        radial-gradient(circle at 21% 38%, rgba(255, 169, 105, 0.34), transparent 23%),
        radial-gradient(circle at 52% 30%, rgba(255, 99, 179, 0.24), transparent 27%),
        radial-gradient(circle at 88% 16%, rgba(89, 213, 255, 0.2), transparent 25%),
        linear-gradient(135deg, #211833 0%, #12304a 48%, #071323 100%);
    border: 1px solid rgba(210, 153, 255, 0.45);
    box-shadow: 0 22px 70px rgba(0,0,0,0.36), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.profile-showcard::before {
    inset: 8px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(195, 96, 255, 0.78), transparent 22%, transparent 78%, rgba(255, 166, 66, 0.8)),
        linear-gradient(180deg, rgba(195, 96, 255, 0.82), transparent 20%, transparent 82%, rgba(255, 166, 66, 0.78));
    opacity: 0.55;
    animation: none;
    pointer-events: none;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    padding: 1px;
}
.profile-showcard::after {
    background:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.32;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent 72%);
}
.profile-shell .profile-showcard.cos-post-coral {
    background:
        linear-gradient(to bottom, rgba(10,18,35,0.08), rgba(4,10,22,0.76)),
        radial-gradient(circle at 21% 38%, rgba(255, 169, 105, 0.38), transparent 23%),
        radial-gradient(circle at 55% 30%, rgba(255, 99, 179, 0.2), transparent 27%),
        linear-gradient(135deg, #211833 0%, #12304a 48%, #071323 100%);
}
.profile-shell .profile-showcard.cos-post-kelp {
    background:
        linear-gradient(to bottom, rgba(10,18,35,0.08), rgba(4,10,22,0.76)),
        radial-gradient(circle at 22% 35%, rgba(51, 255, 210, 0.24), transparent 26%),
        radial-gradient(circle at 76% 20%, rgba(141, 92, 255, 0.34), transparent 25%),
        linear-gradient(135deg, #10123d 0%, #172f4d 54%, #061323 100%);
}
.profile-shell .profile-showcard.cos-post-bloom {
    background:
        linear-gradient(to bottom, rgba(10,18,35,0.08), rgba(4,10,22,0.76)),
        radial-gradient(circle at 24% 35%, rgba(255, 211, 110, 0.28), transparent 24%),
        radial-gradient(circle at 62% 26%, rgba(242, 73, 136, 0.34), transparent 26%),
        linear-gradient(135deg, #421736 0%, #24304c 54%, #071323 100%);
}
.profile-shell .profile-showcard::before {
    inset: 8px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(195, 96, 255, 0.78), transparent 22%, transparent 78%, rgba(255, 166, 66, 0.8)),
        linear-gradient(180deg, rgba(195, 96, 255, 0.82), transparent 20%, transparent 82%, rgba(255, 166, 66, 0.78));
    opacity: 0.55;
    animation: none;
}
.profile-shell .profile-showcard::after {
    background:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.32;
}
.profile-live-chip {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    width: auto;
    height: auto;
    gap: 0.4rem;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    background: rgba(3, 10, 23, 0.52);
    border: 1px solid rgba(255,255,255,0.14);
    color: #d9f7ff;
    font-size: 0.72rem;
    font-weight: 800;
}
.profile-live-chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2bf3a3;
    box-shadow: 0 0 14px #2bf3a3;
}
.profile-showcard .profile-avatar-ring {
    grid-column: 1;
    grid-row: 2 / 5;
    align-self: start;
    justify-self: center;
    width: 138px;
    height: 138px;
    margin-top: -44px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 28%),
        linear-gradient(135deg, rgba(255,134,183,0.42), rgba(255,179,74,0.36));
}
.profile-showcard .profile-avatar-ring::before {
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(from 35deg, #ffd36e, #ff73b7, #b86bff, #43e5ff, #ffd36e);
    animation: profile-spin 12s linear infinite;
}
.profile-identity {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-self: start;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}
.profile-identity span {
    display: block;
    color: #bfd0e6;
    font-size: 0.88rem;
    margin-top: 0.2rem;
}
.profile-display-name {
    color: #fff;
    font-size: 2.15rem;
    text-align: left;
}
.profile-bio {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 3;
    max-width: 540px;
    color: #d8e1ee;
    font-size: 0.94rem;
    line-height: 1.5;
}
.profile-stats {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 4;
    display: flex;
    gap: 1.35rem;
    flex-wrap: wrap;
    color: #b6c6da;
    font-size: 0.8rem;
}
.profile-stats strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
}
.profile-equipped-tray {
    position: relative;
    z-index: 1;
    grid-column: 1 / 3;
    grid-row: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.7rem;
}
.profile-equipped-tray div,
.profile-loadout-row {
    border-radius: 8px;
    background: rgba(5, 15, 31, 0.68);
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.profile-equipped-tray div {
    min-height: 58px;
    padding: 0.65rem 0.75rem;
}
.profile-equipped-tray span {
    display: block;
    color: #93a8c0;
    font-size: 0.72rem;
    font-weight: 800;
}
.profile-equipped-tray strong {
    display: block;
    color: #fff;
    font-size: 0.86rem;
    margin-top: 0.12rem;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.profile-equipped-tray .is-empty strong,
.profile-loadout-row.is-empty strong {
    color: #8296ad;
    font-weight: 750;
}
.profile-panel {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    background: rgba(13, 30, 49, 0.82);
    border: 1px solid rgba(168, 198, 238, 0.16);
    box-shadow: 0 22px 60px rgba(0,0,0,0.26);
}
.profile-panel .profile-form,
.profile-loadout {
    padding: 0.9rem 1rem;
}
.profile-panel .profile-form {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}
.profile-form label,
.profile-loadout h2 {
    color: #9fb3ca;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
    font-weight: 850;
}
.profile-form input {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.14);
}
.profile-panel .profile-form .btn {
    width: 100%;
    justify-self: stretch;
}
.profile-loadout {
    border-top: 1px solid rgba(255,255,255,0.08);
}
.profile-loadout-row {
    grid-template-columns: 6.8rem 1fr auto;
    padding: 0.62rem 0.7rem;
    border-color: rgba(255,255,255,0.12);
}
.profile-loadout-row span { color: #93a8c0; }
.profile-loadout-row strong { color: #fff; }
.profile-shop {
    margin-top: 1.25rem;
}
.profile-shop-head {
    align-items: center;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.profile-shop-head h2 {
    color: #fff;
}
.profile-shop-head p {
    color: #9fb3ca;
}
.profile-shop-nav {
    display: grid;
    justify-items: end;
    gap: 0.5rem;
}
.profile-view-tabs {
    display: flex;
    gap: 0.45rem;
}
.profile-view-tabs a {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    color: #c9d7ea;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.84rem;
    font-weight: 850;
}
.profile-view-tabs a:hover {
    color: #fff;
    text-decoration: none;
    border-color: rgba(190, 115, 255, 0.8);
}
.profile-view-tabs a.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(182, 92, 255, 0.8), rgba(70, 180, 255, 0.42));
    border-color: rgba(230, 196, 255, 0.45);
}
.profile-shop-filters {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.profile-shop-filters a {
    border-radius: 8px;
    padding: 0.42rem 0.7rem;
    color: #c9d7ea;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.8rem;
    font-weight: 750;
}
.profile-shop-filters a:hover {
    color: #fff;
    border-color: rgba(190, 115, 255, 0.8);
    text-decoration: none;
}
.profile-shop-section {
    scroll-margin-top: 88px;
}
.profile-shop-section h3 {
    color: #fff;
    margin-top: 1rem;
}
.profile-shop-section h3::after {
    background: linear-gradient(90deg, rgba(166, 103, 255, 0.55), transparent);
}
.profile-shop .cosmetic-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
}
.profile-shop .cosmetic-card {
    border-radius: 8px;
    padding: 0.7rem;
    background: rgba(11, 25, 43, 0.86);
    border-color: rgba(161, 194, 235, 0.16);
    box-shadow: 0 18px 44px rgba(0,0,0,0.24);
}
.profile-shop .cosmetic-card::before {
    height: 0;
}
.profile-shop .cosmetic-card-bundle {
    border-color: rgba(255, 185, 86, 0.34);
}
.profile-shop .cosmetic-preview {
    min-height: 145px;
    border-radius: 8px;
    padding: 0.75rem;
    border-color: rgba(255,255,255,0.14);
}
.cosmetic-preview em {
    position: absolute;
    z-index: 2;
    top: 0.5rem;
    left: 0.5rem;
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    background: linear-gradient(135deg, #ff4f99, #7c5cff);
    color: #fff;
    font-size: 0.64rem;
    line-height: 1;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}
.profile-shop .cosmetic-card h3 {
    color: #fff;
    margin-top: 0.1rem;
}
.profile-shop .cosmetic-card p {
    color: #aebfd5;
}
.profile-shop .cosmetic-meta {
    color: #94a8bf;
}
.profile-shop .cosmetic-meta strong {
    color: #fff;
}
.profile-shop .cosmetic-status {
    border-radius: 999px;
    padding: 0.18rem 0.52rem;
    color: #81f2c2;
    background: rgba(129, 242, 194, 0.1);
    border: 1px solid rgba(129, 242, 194, 0.22);
    font-size: 0.72rem;
    font-weight: 900;
}
.profile-shop .btn-primary {
    background: linear-gradient(135deg, #b65cff, #6f66ff);
    box-shadow: 0 10px 28px rgba(122, 93, 255, 0.26);
}
.profile-shop .btn-outline {
    color: #dbeafe;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.13);
}
.profile-shop .btn-outline:disabled {
    color: #81f2c2;
    opacity: 1;
}

/* ── Forum refresh ── */
body:has(.forum-shell) {
    background: #06101d;
}
body:has(.forum-shell) .site-nav {
    background: rgba(6, 13, 24, 0.93);
    border-bottom-color: rgba(154, 196, 255, 0.12);
}
body:has(.forum-shell) .brand,
body:has(.forum-shell) .nav-links a {
    color: #dbeafe;
}
body:has(.forum-shell) .nav-links a[href="/forum"] {
    color: #d47aff;
}
body:has(.forum-shell) .nav-action {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.16);
}
body:has(.forum-shell) footer {
    background: #071323;
    border-top-color: rgba(154, 196, 255, 0.12);
}
body:has(.forum-shell) .footer-links a,
body:has(.forum-shell) .footer-copy {
    color: #8fa4be;
}
.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;
}
.forum-page {
    max-width: 1280px;
    padding-top: 0.9rem;
    padding-bottom: 1.6rem;
}
.forum-shell {
    overflow: hidden;
    border: 1px solid rgba(155, 190, 255, 0.14);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 0%, rgba(183, 95, 255, 0.14), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(37, 184, 255, 0.12), transparent 28%),
        linear-gradient(135deg, #071323, #071a2d 58%, #0a2132);
    color: #dbeafe;
    box-shadow: 0 28px 90px rgba(0,0,0,0.36);
}
.forum-hero {
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem 2.2rem;
    background:
        linear-gradient(90deg, rgba(7, 19, 35, 0.96), rgba(7, 19, 35, 0.48) 52%, rgba(7, 19, 35, 0.86)),
        radial-gradient(circle at 72% 35%, rgba(255, 99, 179, 0.24), transparent 24%),
        radial-gradient(circle at 88% 28%, rgba(118, 95, 255, 0.3), transparent 24%),
        linear-gradient(135deg, #0a1025 0%, #132b4a 52%, #221634 100%);
    border-bottom: 1px solid rgba(154, 196, 255, 0.12);
}
.forum-hero-copy {
    min-width: 260px;
    max-width: 540px;
}
.forum-hero h1 {
    color: #fff;
    font-family: var(--font-display);
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: 0;
}
.forum-hero p {
    color: #c5d4e7;
    font-size: 1rem;
    margin-top: 0.55rem;
}
.forum-hero-search {
    display: flex;
    gap: 0.55rem;
    flex: 1;
    max-width: 520px;
    min-width: 280px;
}
.forum-hero-search input {
    flex: 1;
    min-width: 0;
    color: #fff;
    background: rgba(3, 12, 25, 0.56);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    padding: 0.68rem 0.82rem;
}
.forum-hero-search input::placeholder {
    color: #8fa4be;
}
.forum-hero-search .btn,
.forum-new-thread {
    margin: 0;
    white-space: nowrap;
}
.forum-breadcrumb {
    padding: 1rem 1.8rem 0;
    color: #8fa4be;
    font-size: 0.86rem;
}
.forum-breadcrumb a {
    color: #c9d7ea;
}
.forum-breadcrumb span {
    color: #6d7f98;
    margin: 0 0.45rem;
}
.forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    padding: 1rem 1.8rem 1.6rem;
}
.forum-main,
.forum-sidebar {
    min-width: 0;
}
.forum-form,
.forum-login,
.empty-forum,
.thread-list,
.thread-title,
.forum-post,
.forum-sidebar section {
    border-radius: 8px;
    background: rgba(8, 21, 38, 0.78);
    border: 1px solid rgba(161, 194, 235, 0.15);
    box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}
.forum-form {
    gap: 0.65rem;
    padding: 0.9rem;
    margin-bottom: 1rem;
}
.forum-form label,
.forum-sidebar h3 {
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0;
}
.forum-form input,
.forum-form textarea {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.13);
}
.forum-form input::placeholder,
.forum-form textarea::placeholder {
    color: #74869e;
}
.forum-form input:focus,
.forum-form textarea:focus {
    border-color: #b65cff;
    box-shadow: 0 0 0 3px rgba(182, 92, 255, 0.18);
}
.forum-composer textarea {
    min-height: 7rem;
}
.forum-composer .btn-primary,
.forum-cosmetic-callout .btn-primary {
    justify-self: end;
    background: linear-gradient(135deg, #b65cff, #6f66ff);
    box-shadow: 0 10px 28px rgba(122, 93, 255, 0.26);
}
.thread-list {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.thread-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.9rem;
    color: #91a8c3;
    font-size: 0.84rem;
}
.thread-sort-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.thread-sort-tabs a {
    border-radius: 8px;
    padding: 0.44rem 0.72rem;
    color: #c9d7ea;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 800;
}
.thread-sort-tabs a:hover {
    color: #fff;
    text-decoration: none;
    border-color: rgba(210, 122, 255, 0.55);
}
.thread-sort-tabs a.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(182, 92, 255, 0.78), rgba(69, 216, 255, 0.28));
    border-color: rgba(210, 122, 255, 0.72);
}
.thread-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(161, 194, 235, 0.15);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(182, 92, 255, 0.08), transparent 38%),
        rgba(8, 21, 38, 0.78);
    color: #dbeafe;
    box-shadow: 0 18px 44px rgba(0,0,0,0.2);
}
.thread-row.is-fresh {
    border-color: rgba(43, 243, 163, 0.36);
}
.thread-row.is-busy {
    border-color: rgba(210, 122, 255, 0.32);
}
.thread-row:hover {
    color: #fff;
    text-decoration: none;
    border-color: rgba(210, 122, 255, 0.5);
    background:
        linear-gradient(135deg, rgba(182, 92, 255, 0.16), transparent 42%),
        rgba(10, 28, 50, 0.9);
}
.thread-activity-dot {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: inset 0 0 24px rgba(255,255,255,0.06);
}
.thread-activity-dot::before {
    content: '';
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #8fa4be;
    box-shadow: 0 0 16px rgba(143, 164, 190, 0.35);
}
.thread-row.is-fresh .thread-activity-dot::before {
    background: #2bf3a3;
    box-shadow: 0 0 18px rgba(43, 243, 163, 0.72);
}
.thread-row.is-busy .thread-activity-dot::before {
    background: #d47aff;
    box-shadow: 0 0 18px rgba(212, 122, 255, 0.62);
}
.forum-thread-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: #f2d2ff;
    font-size: 1.1rem;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(171, 92, 255, 0.5), rgba(69, 216, 255, 0.16));
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: inset 0 0 24px rgba(255,255,255,0.08);
}
.forum-thread-icon span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #d47aff;
    box-shadow: 0 0 20px rgba(212, 122, 255, 0.7);
}
.thread-row-main {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}
.thread-title-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.thread-title-line strong {
    min-width: 0;
    overflow-wrap: anywhere;
}
.thread-title-line b {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.18rem 0.48rem;
    color: #081526;
    background: #81f2c2;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}
.thread-row.is-busy .thread-title-line b {
    color: #fff;
    background: #8d5cff;
}
.thread-row strong {
    color: #fff;
    font-size: 1.02rem;
}
.thread-row small {
    color: #92a7bf;
}
.thread-row-main > span {
    color: #c2d0e2;
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.thread-row em {
    color: #c9d7ea;
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
}
.forum-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-top: 1rem;
}
.forum-pagination span {
    color: #91a8c3;
    font-size: 0.86rem;
    font-weight: 750;
}
.thread-title {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.05rem;
    background:
        linear-gradient(135deg, rgba(182, 92, 255, 0.16), transparent 42%),
        rgba(8, 21, 38, 0.82);
    border-color: rgba(210, 122, 255, 0.38);
}
.thread-title h2 {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: 0;
}
.thread-title p {
    color: #9fb3ca;
    font-size: 0.86rem;
    margin-top: 0.2rem;
}
.post-list {
    gap: 0.75rem;
}
.forum-post {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1rem;
    border-left-width: 1px;
}
.forum-shell .forum-post.cos-post-coral,
.forum-shell .forum-post.cos-post-kelp,
.forum-shell .forum-post.cos-post-bloom {
    background:
        linear-gradient(135deg, rgba(182, 92, 255, 0.09), transparent 38%),
        rgba(8, 21, 38, 0.82);
}
.forum-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: conic-gradient(from 35deg, #ffd36e, #ff73b7, #b86bff, #43e5ff, #ffd36e);
    box-shadow: 0 0 24px rgba(182, 92, 255, 0.22);
}
.forum-avatar img {
    width: 34px;
    height: 34px;
    padding: 4px;
    border-radius: 50%;
    background: #071323;
}
.forum-post-content {
    min-width: 0;
}
.forum-post header {
    margin-bottom: 0.55rem;
}
.forum-shell .forum-author-name:not(.cos-name-reef):not(.cos-name-neon):not(.cos-name-sunset) {
    color: #fff;
}
.forum-post header a {
    color: #d47aff;
}
.forum-shell .post-body {
    color: #d8e1ee;
}
.forum-shell .post-body a {
    color: #d47aff;
}
.forum-post time {
    color: #879bb5;
}
.forum-login,
.empty-forum {
    color: #c9d7ea;
}
.forum-sidebar {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}
.forum-sidebar section {
    padding: 1rem;
}
.forum-sidebar h3 {
    margin-bottom: 0.8rem;
    font-family: var(--font-display);
}
.forum-sidebar dl {
    display: grid;
    gap: 0.7rem;
}
.forum-sidebar dl div,
.forum-link-list a {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
}
.forum-sidebar dt {
    color: #8fa4be;
    font-size: 0.82rem;
}
.forum-sidebar dd {
    color: #fff;
    font-size: 0.86rem;
    text-align: right;
}
.forum-link-list {
    display: grid;
    gap: 0.55rem;
}
.forum-link-list a {
    color: #c9d7ea;
    font-size: 0.84rem;
}
.forum-link-list a:hover {
    color: #fff;
    text-decoration: none;
}
.forum-link-list span {
    overflow-wrap: anywhere;
}
.forum-link-list em {
    color: #d47aff;
    font-style: normal;
}
.forum-cosmetic-callout {
    background:
        radial-gradient(circle at 85% 78%, rgba(182, 92, 255, 0.25), transparent 34%),
        rgba(8, 21, 38, 0.78);
}
.forum-cosmetic-callout p {
    color: #aebfd5;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

@media (max-width: 900px) {
    .profile-studio { grid-template-columns: 1fr; }
    .profile-panel { order: 2; }
    .forum-layout { grid-template-columns: 1fr; }
    .forum-sidebar { grid-row: auto; }
}

@media (max-width: 700px) {
    .forum-head { flex-direction: column; }
    .forum-actions { justify-content: flex-start; }
    .forum-row { grid-template-columns: 1fr; gap: 0.35rem; }
    .thread-row { flex-direction: column; gap: 0.35rem; }
    .thread-title { flex-direction: column; gap: 0.25rem; }
    .profile-shell { padding: 0.8rem; }
    .profile-topbar { display: grid; }
    .profile-title { grid-template-columns: 1fr; gap: 0.45rem; }
    .profile-title p { grid-column: 1; }
    .profile-showcard {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 1rem;
    }
    .profile-live-chip,
    .profile-showcard .profile-avatar-ring,
    .profile-identity,
    .profile-bio,
    .profile-stats,
    .profile-equipped-tray {
        grid-column: 1;
        grid-row: auto;
    }
    .profile-showcard .profile-avatar-ring {
        justify-self: center;
        width: 124px;
        height: 124px;
    }
    .profile-identity {
        display: grid;
        justify-items: center;
        text-align: center;
    }
    .profile-display-name { font-size: 1.55rem; }
    .profile-stats,
    .profile-shop-filters { justify-content: flex-start; }
    .profile-shop-nav { justify-items: start; margin-top: 0.75rem; }
    .profile-view-tabs { flex-wrap: wrap; }
    .profile-equipped-tray { grid-template-columns: 1fr; }
    .profile-loadout-row { grid-template-columns: 1fr; }
    .profile-shop-head { display: block; }
    .profile-art-strip { grid-template-columns: repeat(2, 1fr); }
    .forum-page { padding-left: 0.75rem; padding-right: 0.75rem; }
    .forum-hero { padding: 1.35rem; min-height: 140px; }
    .forum-hero h1 { font-size: 2.25rem; }
    .forum-hero-search { min-width: 100%; }
    .forum-hero-search .btn,
    .forum-new-thread { flex: 0 0 auto; }
    .forum-layout { padding: 0.85rem; }
    .forum-breadcrumb { padding: 0.85rem 0.85rem 0; }
    .thread-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .thread-row,
    .forum-post,
    .thread-title {
        grid-template-columns: 1fr;
    }
    .thread-row {
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: start;
    }
    .thread-activity-dot {
        width: 36px;
        height: 36px;
    }
    .thread-row em {
        grid-column: 2;
        justify-self: start;
    }
    .forum-pagination {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .forum-composer .btn-primary { justify-self: stretch; }
}
