:root {
    --bg: #070b12;
    --bg-deep: #05080e;
    --surface: rgba(12, 20, 32, 0.88);
    --surface-solid: #0e1724;
    --text: #e8f4ff;
    --muted: #9fb4c9;
    --aurora: #3dffa8;
    --aurora-2: #5b8cff;
    --aurora-3: #b794f6;
    --ice: #7dd3fc;
    --gold: #d4b56a;
    --border: rgba(93, 220, 180, 0.28);
    --danger: #f0a0a8;
    --font-display: "Cinzel", "Cormorant Garamond", serif;
    --font-script: "Cormorant Garamond", Georgia, serif;
    --font: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(ellipse 80% 50% at 15% 0%, rgba(61, 255, 168, 0.12), transparent 50%),
        radial-gradient(ellipse 70% 45% at 85% 10%, rgba(91, 140, 255, 0.16), transparent 45%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(183, 148, 246, 0.1), transparent 50%),
        var(--bg-deep);
}

a { color: var(--ice); }

.shell {
    min-height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.1rem 2.5rem;
}

.shell-home {
    max-width: none;
    padding: 0;
}

.shell-builder {
    max-width: none;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.published-body {
    min-height: 50vh;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(5, 8, 14, 0.92);
    border-bottom: 1px solid rgba(61, 255, 168, 0.2);
    backdrop-filter: blur(8px);
}

.landing-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.landing-nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-nav-links a:hover {
    color: var(--aurora);
}

.xn-kicker {
    margin: 0 0 0.5rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--ice);
}

.xn-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.public-free {
    padding: 1rem 1.25rem 2rem;
    max-width: 980px;
    margin: 0 auto;
}

.public-free-placeholder .media-locked {
    min-height: 160px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--aurora-2);
}

.landing-auth {
    padding: 0 1.25rem 2rem;
    max-width: 420px;
    margin: 0 auto;
}

.landing-auth-card .card {
    backdrop-filter: blur(8px);
    background: rgba(8, 14, 22, 0.78);
}

.landing-error {
    text-align: center;
    padding: 0.75rem 1rem;
}

.landing-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 1rem 2.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.landing-foot a {
    color: var(--ice);
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(61, 255, 168, 0.15);
}

.brand,
.brand-mark,
.adventure-title {
    font-family: var(--font-display);
    color: var(--text);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
}

.adventure-title {
    margin: 0;
    font-size: 1.15rem;
}

.connect-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-top: 0.5rem;
}

@media (min-width: 900px) {
    .connect-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 1.5rem;
    }

    .connect-split.is-chat-only {
        grid-template-columns: 1fr;
    }
}

.game-idea-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.game-idea-admin-head .adventure-title {
    margin: 0;
}

.game-idea-admin-preview {
    margin-bottom: 0.85rem;
}

.creator-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.studio-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 0.35rem;
    margin: 1rem 0;
    border-bottom: 1px solid rgba(61, 255, 168, 0.2);
    padding-bottom: 0.35rem;
    align-items: center;
}

.studio-tabs-plus {
    justify-self: end;
}

.compose-sheet-copy {
    max-height: min(90dvh, 40rem);
    overflow-y: auto;
}

.game-idea-panel,
.adventure-panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface-solid);
    padding: 1rem 1.1rem 1.15rem;
}

.adventure-panel {
    max-width: none;
    margin: 0;
}

.game-idea-heading {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.game-idea-intro {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.game-idea-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.game-idea-textarea {
    width: 100%;
    min-height: 12rem;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: #070d14;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    padding: 0.7rem 0.8rem;
}

.game-idea-inbox {
    max-height: min(28rem, 55dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.15rem;
}

.game-idea-card {
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.7rem 0.8rem;
    background: rgba(0, 0, 0, 0.22);
}

.game-idea-meta {
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
}

.game-idea-body {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.game-idea-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.game-idea-actions form {
    margin: 0;
}

.game-idea-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.game-idea-wordcount {
    font-size: 0.72rem;
}

.game-idea-wordcount.is-over {
    color: var(--danger);
}

.game-idea-blocked-msg {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.adventure-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.credits-buy-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0.15rem;
    flex-shrink: 0;
}

.credits-buy-inline:hover {
    color: var(--aurora);
}

.credits-buy-label {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.credits-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(61, 255, 168, 0.25), rgba(91, 140, 255, 0.35));
    color: var(--aurora);
    flex-shrink: 0;
}

.credits-buy-inline:hover .credits-icon-btn {
    color: #fff;
    border-color: var(--aurora);
}

.adventure-chat .chat-log {
    min-height: 220px;
}

.adventure-welcome {
    opacity: 0.98;
}

.chat-composer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
    border: 1px solid rgba(180, 190, 205, 0.2);
    border-radius: 0.35rem;
    background: rgba(8, 11, 16, 0.45);
    padding: 0.35rem 0.45rem 0.35rem 0.65rem;
}

button.chat-composer {
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.chat-composer-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.55rem 0.25rem;
    outline: none;
}

.chat-composer-input.is-fake {
    color: var(--muted);
    font-size: 0.85rem;
}

.chat-composer-send {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
}

.chat-composer.is-locked:hover {
    border-color: var(--aurora);
}

.chat-composer.is-locked:hover .chat-composer-input.is-fake {
    color: var(--aurora);
}

.chat-credits-balance {
    margin: 0.35rem 0 0;
    padding: 0 0.15rem;
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--muted);
    opacity: 0.85;
    text-align: right;
}

.credits-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 0;
}

.credits-modal[hidden] {
    display: none !important;
}

.credits-sheet {
    width: 100%;
    max-width: 32rem;
    max-height: 90dvh;
    overflow: auto;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.1rem 1.4rem;
}

@media (min-width: 640px) {
    .credits-modal {
        align-items: center;
        padding: 1rem;
    }
    .credits-sheet {
        border-radius: 1rem;
    }
}

.pack-msgs {
    font-size: 0.95rem;
    color: var(--ice);
    font-weight: 600;
}

.adventure-cta {
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.brand-mark span {
    color: var(--aurora);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--aurora);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inline { display: inline; }

select, input, textarea {
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text);
    border-radius: 0.45rem;
    padding: 0.55rem 0.7rem;
    font-family: var(--font);
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--aurora);
    background: linear-gradient(135deg, #2dd4a0 0%, #3dffa8 45%, #5b8cff 100%);
    color: #061018;
    text-decoration: none;
    border-radius: 0.35rem;
    padding: 0.7rem 1.25rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.ghost {
    background: transparent;
    color: var(--aurora);
    box-shadow: none;
}

.btn-small {
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
}

.btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-block { width: 100%; }

.balance, .nav {
    color: var(--ice);
    text-decoration: none;
    font-size: 0.88rem;
}

.main { padding-top: 0.5rem; }

.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.2rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stack label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--muted);
}

.check-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
}

.check-row input { width: auto; accent-color: var(--aurora); }

.age-note {
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
}

.error { color: var(--danger); }
.muted, .lead { color: var(--muted); }
.switch { margin-top: 1rem; color: var(--muted); }
.switch a { color: var(--aurora); }

.password-row { display: flex; gap: 0.45rem; }
.password-row input { flex: 1; min-width: 0; }
.password-toggle { min-width: 2.8rem; padding-left: 0.5rem; padding-right: 0.5rem; }

/* —— Landing / hero —— */
.landing {
    min-height: 100vh;
}

.hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(61, 255, 168, 0.18), transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(91, 140, 255, 0.22), transparent 42%),
        radial-gradient(ellipse at 50% 90%, rgba(183, 148, 246, 0.16), transparent 45%),
        #0a1220;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(61, 255, 168, 0.2);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 8, 14, 0.25) 0%, rgba(5, 8, 14, 0.78) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 5rem 1rem 2.5rem;
    width: min(100%, 34rem);
}

.hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 4rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 40px rgba(61, 255, 168, 0.35);
}

.hero-sub {
    margin: 0.6rem 0 1.25rem;
    font-family: var(--font-script);
    font-size: 1.25rem;
    color: var(--aurora);
    font-style: italic;
}

.hero-auth {
    margin-top: 0.5rem;
    text-align: left;
}

.hero-auth .card {
    backdrop-filter: blur(8px);
    background: rgba(8, 14, 22, 0.78);
}

.about-block {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 2rem 1.25rem;
    max-width: 980px;
    margin: 0 auto;
}

@media (max-width: 720px) {
    .about-block { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.about-photo {
    width: min(100%, 220px);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--aurora);
    box-shadow: 0 0 0 6px rgba(61, 255, 168, 0.12), 0 12px 40px rgba(0, 0, 0, 0.45);
    background: #122033;
}

.about-photo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--aurora);
}

.about-copy h2 {
    margin: 0 0 0.35rem;
    font-family: var(--font-script);
    font-size: 2rem;
    font-weight: 500;
    color: var(--ice);
}

.about-headline {
    margin: 0 0 0.75rem;
    color: var(--aurora);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
}

.about-bio {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    white-space: pre-wrap;
}

.links-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.link-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.55rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(91, 140, 255, 0.45);
    background: linear-gradient(90deg, rgba(61, 255, 168, 0.12), rgba(91, 140, 255, 0.1));
    font-weight: 600;
}

.link-chip:hover {
    border-color: var(--aurora);
}

/* —— Profile after login —— */
.creator-hero {
    border: 1px solid rgba(61, 255, 168, 0.2);
    border-radius: 0.9rem;
    overflow: hidden;
    background: var(--surface-solid);
    margin-top: 0.75rem;
}

.creator-banner {
    height: 200px;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(61, 255, 168, 0.25), transparent 45%),
        radial-gradient(ellipse at 80% 20%, rgba(91, 140, 255, 0.3), transparent 40%),
        #0a1524;
    background-size: cover;
    background-position: center;
}

.creator-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    padding: 0 1.1rem 1rem;
    margin-top: -2.4rem;
}

.creator-avatar,
.creator-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    border: 3px solid var(--bg);
    outline: 2px solid var(--aurora);
    background: #122033;
    color: var(--aurora);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    object-fit: cover;
    flex-shrink: 0;
}

.creator-meta { min-width: 0; }

.creator-name {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.creator-bio {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.chat-lock-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    margin: 0 1rem 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(61, 255, 168, 0.35);
    border-radius: 0.65rem;
    background: rgba(61, 255, 168, 0.08);
    color: var(--text);
    font-size: 0.92rem;
}

.studio-tab {
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    padding: 0.7rem 0.4rem;
    border-radius: 0.45rem 0.45rem 0 0;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.studio-tab.is-active {
    color: #061018;
    background: linear-gradient(135deg, #2dd4a0, #5b8cff);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0.5rem 0 0.85rem;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-script);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--ice);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.media-card {
    background: #0a121c;
    border: 1px solid rgba(91, 140, 255, 0.25);
    border-radius: 0.65rem;
    overflow: hidden;
    min-height: 180px;
    position: relative;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.media-tag {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    background: rgba(61, 255, 168, 0.92);
    color: #061018;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.45rem;
    border-radius: 0.25rem;
}

.media-tag.vip {
    background: rgba(183, 148, 246, 0.95);
}

.media-locked {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted);
    padding: 1rem;
    background:
        radial-gradient(circle at 50% 40%, rgba(91, 140, 255, 0.2), transparent 55%),
        #0a121c;
}

.media-caption {
    margin: 0;
    padding: 0.55rem 0.7rem 0.75rem;
    font-size: 0.9rem;
}

.media-card.is-text {
    min-height: auto;
    padding: 0.25rem 0;
}

.media-card.is-text .media-caption {
    font-size: 1rem;
    line-height: 1.45;
    padding: 1rem;
}

.compose-plus-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0 0.85rem;
}

.admin-hero-edit {
    position: relative;
    margin-bottom: 0.75rem;
}

.admin-hero-edit .creator-banner {
    position: relative;
}

.admin-avatar-slot {
    position: relative;
    flex-shrink: 0;
}

.admin-media-plus {
    position: absolute;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 0.55rem;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: rgba(6, 16, 24, 0.72);
}

.admin-media-plus:hover {
    border-color: var(--aurora);
    color: var(--aurora);
}

.creator-banner .admin-media-plus {
    right: 0.75rem;
    bottom: 0.75rem;
}

.admin-media-plus-avatar {
    right: -0.15rem;
    bottom: -0.15rem;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
    border-radius: 999px;
}

.admin-welcome-bar {
    padding-top: 0.15rem;
}

.admin-welcome-preview {
    font-size: 0.9rem;
    min-width: 0;
}

.admin-bio-plus {
    margin-top: 0.5rem;
}

.compose-of-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #374151;
}

.compose-of-field input,
.compose-of-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.45rem 0.55rem;
    background: #fff;
    color: #111827;
    font: inherit;
}

.admin-ops {
    margin: 2.5rem 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.admin-ops-title {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-ops-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 720px) {
    .admin-ops-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-ops h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.admin-ops-links {
    margin: 0.75rem 0 0;
}

body.theme-viking {
    --aurora: #d4b56a;
    --aurora-2: #c47a4a;
    --aurora-3: #8b5a3c;
    --ice: #f0e0b8;
    --border: rgba(212, 181, 106, 0.35);
    --gold: #d4b56a;
}

body.theme-viking .creator-banner:not([style*="background-image"]) {
    background:
        radial-gradient(ellipse at 25% 30%, rgba(212, 181, 106, 0.28), transparent 42%),
        radial-gradient(ellipse at 75% 20%, rgba(196, 122, 74, 0.25), transparent 40%),
        #140e0a;
}

body.theme-midnight {
    --aurora: #7dd3fc;
    --aurora-2: #6366f1;
    --aurora-3: #312e81;
    --ice: #bae6fd;
    --border: rgba(125, 211, 252, 0.28);
}

body.theme-midnight .creator-banner:not([style*="background-image"]) {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(125, 211, 252, 0.18), transparent 42%),
        radial-gradient(ellipse at 80% 30%, rgba(99, 102, 241, 0.25), transparent 40%),
        #020617;
}

.compose-plus {
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    background: var(--surface-solid);
}

.compose-plus:hover {
    border-color: var(--aurora);
    color: var(--aurora);
}

.compose-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
}

.compose-modal[hidden] {
    display: none !important;
}

.compose-sheet {
    width: 100%;
    max-width: 28rem;
    max-height: 90dvh;
    overflow: auto;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.1rem 1.25rem;
}

.compose-sheet-of {
    max-width: 36rem;
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

.compose-sheet-of .compose-head h2 {
    color: #111827;
}

.compose-sheet-of .btn.ghost {
    color: #4b5563;
}

.compose-of-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compose-of-text {
    width: 100%;
    min-height: 10rem;
    border: 0;
    background: transparent;
    color: #111827;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1.45;
    resize: vertical;
    padding: 0.25rem 0.1rem;
    outline: none;
}

.compose-of-text::placeholder {
    color: #9ca3af;
}

.compose-of-file {
    margin: 0;
    font-size: 0.85rem;
}

.compose-of-price {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #374151;
}

.compose-of-price[hidden] {
    display: none !important;
}

.compose-of-price input {
    max-width: 8rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: #fff;
    color: #111827;
}

.compose-of-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding-top: 0.35rem;
    border-top: 1px solid #e5e7eb;
}

.compose-of-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.compose-of-icon:hover,
.compose-of-icon.is-active {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
}

.compose-of-spacer {
    flex: 1;
    min-width: 0.5rem;
}

.compose-of-publish {
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .compose-modal {
        align-items: center;
        padding: 1rem;
    }
    .compose-sheet {
        border-radius: 1rem;
    }
}

.compose-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.compose-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-compose-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
}

.chat-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
}

.chat-attach-btn input {
    max-width: 11rem;
    font-size: 0.75rem;
}

.chat-attach {
    display: block;
    margin-bottom: 0.35rem;
}

.chat-attach img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 0.45rem;
    display: block;
}

.chat-locked-compose {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.pack-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.pack-amount {
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--aurora);
}

.chat-locked-panel {
    max-width: 34rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.live-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1rem;
}

@media (max-width: 860px) {
    .live-layout { grid-template-columns: 1fr; }
}

.live-stage {
    position: relative;
    background: #0a121c;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    min-height: 360px;
    overflow: hidden;
    padding: 0.75rem;
}

.live-video {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #000;
    border-radius: 0.55rem;
}

.live-video.local {
    position: absolute;
    right: 1rem;
    bottom: 5.5rem;
    width: 120px;
    height: 160px;
    border: 1px solid var(--border);
}

.live-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(183, 40, 70, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

.live-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #fff;
}

.live-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.live-note, .live-status {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.live-status.is-on { color: var(--aurora); }

.live-chat {
    background: var(--surface-solid);
    border: 1px solid rgba(180, 190, 205, 0.18);
    border-radius: 0;
    padding: 0;
}

.live-chat h2 {
    margin-top: 0;
    font-family: var(--font-script);
    color: var(--muted);
}

.chat-inbox-shell {
    display: grid;
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
    border: 1px solid rgba(180, 190, 205, 0.22);
    min-height: 28rem;
    background: rgba(10, 14, 20, 0.55);
}

@media (max-width: 720px) {
    .chat-inbox-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .chat-inbox-list {
        max-height: 12rem;
        border-right: none !important;
        border-bottom: 1px solid rgba(180, 190, 205, 0.18);
    }
}

.chat-inbox-list {
    border-right: 1px solid rgba(180, 190, 205, 0.18);
    overflow: auto;
    background: rgba(8, 11, 16, 0.5);
}

.chat-inbox-list-head {
    padding: 0.75rem 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid rgba(180, 190, 205, 0.18);
}

.chat-inbox-row {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(180, 190, 205, 0.14);
    text-decoration: none;
    color: inherit;
    border-left: 2px solid transparent;
}

.chat-inbox-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-inbox-row.is-active {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(200, 210, 220, 0.55);
}

.chat-inbox-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-inbox-preview {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-inbox-empty {
    margin: 0;
    padding: 1rem 0.9rem;
    font-size: 0.85rem;
}

.chat-inbox-thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-inbox-thread-head {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(180, 190, 205, 0.18);
    font-weight: 600;
}

.chat-title-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(180, 190, 205, 0.18);
}

.chat-title-label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 650;
    flex: 1;
    min-width: 10rem;
}

.chat-inbox-sub {
    font-size: 0.75rem;
}

.chat-first-label {
    flex: 1 1 100%;
}

.chat-first-label textarea {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
}

.chat-first-bubble {
    opacity: 0.95;
}

.chat-log {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    max-height: 50vh;
    overflow: auto;
    margin: 0;
    padding: 1rem;
    border: none;
    border-radius: 0;
    background: transparent;
}

.adventure-chat .chat-composer {
    margin: 0;
    border-top: 1px solid rgba(180, 190, 205, 0.18);
    border-radius: 0;
    padding: 0.65rem 0.85rem;
    background: rgba(8, 11, 16, 0.35);
}

.bubble {
    max-width: 85%;
    padding: 0.65rem 0.85rem;
    border-radius: 0.35rem;
    line-height: 1.4;
}

.bubble.from-user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(180, 190, 205, 0.2);
    color: var(--text);
}

.bubble.from-admin {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(180, 190, 205, 0.16);
    color: var(--text);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.admin-panel h1,
.panel h1 {
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-panel h2,
.card h2 {
    font-family: var(--font-script);
    font-weight: 500;
    color: var(--muted);
}

.member-list { display: flex; flex-direction: column; gap: 0.75rem; }
.member-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(180, 190, 205, 0.14);
    padding-top: 0.75rem;
}

.inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.inline-row select { width: auto; min-width: 6rem; }
.admin-media { color: var(--muted); padding-left: 1.1rem; }

.home-title-plain {
    margin: 1rem 0 1.25rem;
    text-align: center;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.top-home {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-home { min-height: 100vh; }

/* Homepage templates */
.theme-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.theme-pick {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    cursor: pointer;
    background: var(--surface-solid);
}

.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }

.theme-pick-swatch {
    width: 100%;
    height: 72px;
    border-radius: 0.45rem;
}

.theme-pick-aurora .theme-pick-swatch {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(61, 255, 168, 0.55), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(91, 140, 255, 0.55), transparent 45%),
        #0a1220;
}

.theme-pick-viking .theme-pick-swatch {
    background:
        radial-gradient(ellipse at 30% 20%, rgba(212, 181, 106, 0.45), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(120, 60, 40, 0.4), transparent 45%),
        #1a120c;
}

.theme-pick-midnight .theme-pick-swatch {
    background:
        radial-gradient(ellipse at 40% 10%, rgba(125, 211, 252, 0.25), transparent 45%),
        radial-gradient(ellipse at 80% 70%, rgba(99, 102, 241, 0.35), transparent 50%),
        #04060c;
}

.theme-pick-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

.theme-pick.is-active {
    border-color: var(--aurora);
    box-shadow: 0 0 0 1px rgba(61, 255, 168, 0.35);
}

.landing.theme-viking {
    --aurora: #d4b56a;
    --aurora-2: #c47a4a;
    --aurora-3: #8b5a3c;
    --ice: #f0e0b8;
    --border: rgba(212, 181, 106, 0.35);
}

.landing.theme-viking .hero {
    background:
        radial-gradient(ellipse at 25% 30%, rgba(212, 181, 106, 0.22), transparent 42%),
        radial-gradient(ellipse at 75% 20%, rgba(196, 122, 74, 0.2), transparent 40%),
        radial-gradient(ellipse at 50% 90%, rgba(80, 40, 24, 0.35), transparent 45%),
        #140e0a;
}

.landing.theme-viking .btn {
    background: linear-gradient(135deg, #a67c3a, #d4b56a 50%, #c47a4a);
    border-color: #d4b56a;
    color: #1a120c;
}

.landing.theme-viking .btn.ghost {
    background: transparent;
    color: #d4b56a;
}

.landing.theme-viking .about-photo,
.landing.theme-viking .link-chip {
    border-color: rgba(212, 181, 106, 0.55);
}

.landing.theme-midnight {
    --aurora: #7dd3fc;
    --aurora-2: #6366f1;
    --aurora-3: #312e81;
    --ice: #bae6fd;
    --border: rgba(125, 211, 252, 0.28);
}

.landing.theme-midnight .hero {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(125, 211, 252, 0.14), transparent 42%),
        radial-gradient(ellipse at 80% 30%, rgba(99, 102, 241, 0.22), transparent 40%),
        radial-gradient(ellipse at 50% 100%, rgba(15, 23, 42, 0.9), transparent 50%),
        #020617;
}

.landing.theme-midnight .btn {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    border-color: #7dd3fc;
    color: #020617;
}

.landing.theme-midnight .btn.ghost {
    background: transparent;
    color: #7dd3fc;
}

.landing.theme-aurora .hero:not([style*="background-image"]) {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(61, 255, 168, 0.18), transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(91, 140, 255, 0.22), transparent 42%),
        radial-gradient(ellipse at 50% 90%, rgba(183, 148, 246, 0.16), transparent 45%),
        #0a1220;
}

/* Drafts / queue / templates */
.draft-workbench { margin-top: 1rem; display: grid; gap: 1rem; }
.draft-toolbar-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; justify-content: space-between; }
.draft-heading { margin: 0; font-size: 1.35rem; }
.draft-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.draft-batch-form, .draft-queue-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.draft-batch-count { display: grid; gap: 0.2rem; font-size: 0.8rem; }
.draft-batch-count input { width: 4.5rem; }
.draft-queue-panel { padding: 1rem; display: grid; gap: 0.55rem; }
.draft-queue-status { margin: 0; font-weight: 650; }
.draft-queue-url { font-size: 0.75rem; word-break: break-all; }
.draft-queue-input { width: 4.5rem; }
.draft-titles-list { display: grid; gap: 0.4rem; }
.draft-title-row { display: flex; gap: 0.45rem; align-items: center; }
.draft-title-num { width: 1.5rem; opacity: 0.7; }
.draft-title-input { flex: 1; }
.draft-queue-orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.45rem; }
.draft-queue-order-row { display: flex; gap: 0.45rem; align-items: center; }
.draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.draft-card { display: grid; gap: 0.65rem; }
.draft-queue-badge { font-size: 0.75rem; font-weight: 700; }
.draft-publish-form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.compose-of-link { display: grid; gap: 0.25rem; font-size: 0.85rem; }
.template-layout { display: grid; grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 800px) { .template-layout { grid-template-columns: 1fr; } }
.template-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.template-list-item.is-active { font-weight: 700; }
.template-blocks { display: grid; gap: 0.45rem; }
.template-block-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.pack-edit-rows { display: grid; gap: 0.75rem; }
.pack-edit-row {
  display: grid;
  grid-template-columns: 6rem 6rem auto 1fr auto;
  gap: 0.5rem;
  align-items: end;
}
@media (max-width: 700px) {
  .pack-edit-row { grid-template-columns: 1fr 1fr; }
}
.pack-vipps-field { grid-column: span 1; }
.pack-per-msg { font-size: 0.8rem; padding-bottom: 0.45rem; }
