:root {
    --bg-dark: #0a0a0a;
    --bg-soft: #121212;
    --panel-bg: rgba(17, 17, 17, 0.92);
    --panel-bg-strong: #141414;
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent: #ff2d55;
    --accent-strong: #ff5b98;
    --accent-soft: rgba(255, 45, 85, 0.16);
    --text-main: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.84);
    --text-dim: #8d8d96;
    --hover-bg: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, 0.16);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, 0.16);
    --red-soft: rgba(239, 68, 68, 0.16);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 45, 85, 0.14), transparent 28%),
        radial-gradient(circle at right bottom, rgba(255, 91, 152, 0.08), transparent 24%),
        var(--bg-dark);
    color: var(--text-main);
}

body.modal-open {
    overflow: hidden;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-body {
    min-height: 100vh;
}

.site-body-public,
.site-body-auth {
    overflow-x: hidden;
}

.wordmark {
    display: inline-flex;
    align-items: center;
}

.brand-word {
    font-size: 40px;
    font-weight: 700;
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-style: italic;
    letter-spacing: 0.6px;
    color: #fff8fb;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

.brand-ai {
    text-shadow: 0 0 12px rgba(255, 91, 152, 0.72), 0 0 28px rgba(255, 45, 85, 0.48);
}

.public-shell,
.auth-shell {
    position: relative;
    min-height: 100vh;
}

.public-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #050505;
    pointer-events: none;
}

.public-backdrop-video,
.public-backdrop-tint {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.public-backdrop-video {
    object-fit: cover;
    opacity: 0.72;
    transform: scale(1.03);
    filter: saturate(1.05) contrast(1.02);
}

.public-backdrop-tint {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.76) 100%),
        radial-gradient(circle at center, rgba(255, 45, 85, 0.14) 0%, rgba(0, 0, 0, 0.16) 38%, rgba(0, 0, 0, 0.82) 100%);
}

.public-topbar {
    position: relative;
    z-index: 12;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 34px 54px 0;
}

.public-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.locale-menu {
    position: relative;
}

.locale-menu summary {
    list-style: none;
}

.locale-menu summary::-webkit-details-marker {
    display: none;
}

.locale-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    min-width: 168px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.locale-menu-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 45, 85, 0.36);
}

.locale-menu[open] .locale-menu-toggle {
    border-color: rgba(255, 45, 85, 0.48);
    background: rgba(255, 255, 255, 0.09);
}

.locale-menu-current,
.locale-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.locale-menu-labels {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.locale-menu-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
}

.locale-menu-code {
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 1.1;
    text-transform: uppercase;
}

.locale-menu-caret {
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    border-bottom: 2px solid rgba(255, 255, 255, 0.75);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.locale-menu[open] .locale-menu-caret {
    transform: rotate(-135deg) translateY(-1px);
}

.locale-menu-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    display: grid;
    gap: 6px;
    min-width: 220px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(14, 14, 14, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.locale-menu-item {
    padding: 10px 12px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.locale-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.locale-menu-item.is-active {
    background: rgba(255, 45, 85, 0.12);
}

.locale-flag {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.public-link,
.public-cta {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.public-link:hover,
.public-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 45, 85, 0.5);
}

.public-cta {
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 45, 85, 0.28);
}

.public-main {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 26px;
    padding: 46px 54px 52px;
}

.intro-home {
    min-height: calc(100vh - 120px);
}

.intro-center {
    display: flex;
    min-height: calc(100vh - 160px);
    align-items: center;
    justify-content: center;
    padding: 40px 24px 70px;
    text-align: center;
}

.intro-content {
    width: min(760px, 100%);
}

.intro-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 0.94;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.intro-title-top {
    display: block;
    width: max-content;
    font-size: clamp(42px, 5vw, 76px);
    letter-spacing: -1.3px;
    white-space: nowrap;
}

.intro-title-bottom {
    display: block;
    width: 100%;
    font-size: clamp(66px, 7.9vw, 118px);
    letter-spacing: -2.4px;
    white-space: nowrap;
    text-align: left;
}

.intro-copy {
    margin: 20px auto 0;
    max-width: 620px;
    font-size: 22px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.intro-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.intro-cta {
    margin: 0;
    padding: 18px 38px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(255, 45, 85, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.intro-cta:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
    box-shadow: 0 16px 36px rgba(255, 45, 85, 0.46), 0 0 34px rgba(255, 91, 152, 0.34);
}

.intro-cta-secondary {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: center;
}

.landing-hero-compact {
    grid-template-columns: 1fr;
    min-height: 56vh;
}

.landing-copy {
    width: min(760px, 100%);
}

.intro-kicker,
.auth-kicker-row,
.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 10, 0.34);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffd9e7;
}

.intro-kicker::before,
.auth-kicker-row::before,
.auth-kicker::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent-strong);
    box-shadow: 0 0 14px rgba(255, 91, 152, 0.8);
}

.landing-title,
.auth-hero-title {
    margin: 22px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    line-height: 0.95;
    font-size: clamp(52px, 7vw, 110px);
    font-weight: 800;
    letter-spacing: -2px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.landing-description,
.auth-hero-copy {
    margin: 22px 0 0;
    max-width: 640px;
    color: var(--text-soft);
    font-size: 21px;
    line-height: 1.6;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.hero-cta {
    padding: 18px 30px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
}

.hero-cta-primary {
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 45, 85, 0.34);
}

.hero-cta-secondary {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
}

.landing-proof {
    display: grid;
    gap: 8px;
    margin-top: 26px;
}

.intro-stars {
    font-size: 28px;
    letter-spacing: 4px;
    color: #ffca45;
    text-shadow: 0 0 18px rgba(255, 202, 69, 0.3);
}

.intro-proof-text {
    color: rgba(255, 255, 255, 0.84);
}

.landing-showcase,
.feature-grid {
    display: grid;
    gap: 18px;
}

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

.showcase-visual {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.showcase-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-visual-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.88) 100%);
}

.showcase-visual-copy h3 {
    margin: 0 0 8px;
}

.showcase-visual-copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.showcase-card,
.feature-panel {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.showcase-card h3,
.feature-panel h2 {
    margin: 0 0 10px;
}

.showcase-card p,
.feature-panel p {
    margin: 0;
    color: var(--text-dim);
    line-height: 1.7;
}

.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffd9e7;
}

.public-footer {
    position: relative;
    z-index: 2;
    padding: 0 54px 40px;
    color: var(--text-dim);
    font-size: 14px;
}

.auth-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.86fr);
    gap: 28px;
    min-height: 100vh;
    padding: 34px 54px 46px;
    align-items: center;
}

.auth-shell-toolbar {
    position: relative;
    z-index: 12;
    display: flex;
    justify-content: flex-end;
    padding: 28px 54px 0;
}

.auth-hero {
    display: grid;
    gap: 18px;
    align-content: center;
}

.auth-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-proof-pill {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 13px;
}

.auth-preview {
    margin-top: 10px;
    overflow: hidden;
    max-width: 420px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

.auth-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-panel {
    padding: 34px;
    border-radius: 30px;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-copy h2 {
    margin: 16px 0 10px;
    font-size: 38px;
    letter-spacing: -1px;
}

.auth-copy p {
    margin: 0;
    color: var(--text-dim);
    line-height: 1.7;
}

.auth-form,
.app-form-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-row label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]),
.app-form-stack textarea,
.app-form-stack select,
.app-form-stack input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:focus,
.app-form-stack textarea:focus,
.app-form-stack select:focus,
.app-form-stack input:focus {
    border-color: rgba(255, 45, 85, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.app-form-stack textarea {
    min-height: 140px;
    resize: vertical;
}

.auth-form input[disabled],
.app-form-stack input[disabled] {
    color: var(--text-dim);
    opacity: 0.75;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.actions.left {
    justify-content: flex-start;
}

.button-primary,
.button,
.top-action,
.button-primary:visited,
.button:visited,
.top-action:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button-primary,
.top-action-primary,
.button.primary {
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 45, 85, 0.24);
}

.button,
.top-action-secondary,
.button.secondary {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
}

.button-primary:hover,
.button:hover,
.top-action:hover {
    transform: translateY(-2px);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    font-size: 13px;
}

.auth-links a {
    color: #ffd9e7;
}

.auth-footnote {
    margin-top: 22px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.7;
}

.auth-modal-root {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
}

.auth-modal-root.is-active {
    display: block;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.auth-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    display: none;
    width: min(460px, calc(100vw - 32px));
    padding: 28px;
    border-radius: 30px;
    transform: translate(-50%, -50%);
    background: rgba(16, 16, 16, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.auth-modal.is-active {
    display: block;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.auth-modal-brand {
    margin-bottom: 18px;
    text-align: center;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.auth-form-modal {
    margin-top: 0;
}

.auth-modal-flash {
    margin: 0 0 18px;
}

.auth-links-centered {
    justify-content: center;
}

.auth-switch {
    border: none;
    background: transparent;
    color: #ffd9e7;
    cursor: pointer;
    font: inherit;
}

.starter-auth-note {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
}

.starter-auth-note p {
    margin: 8px 0 0;
    word-break: break-word;
}

.starter-auth-note a {
    color: #ffd9e7;
}

.flash {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.6;
}

.flash-floating {
    margin-top: 0;
}

.flash.success {
    background: var(--green-soft);
    border-color: rgba(52, 211, 153, 0.22);
    color: #d7fff0;
}

.flash.warn {
    background: var(--amber-soft);
    border-color: rgba(251, 191, 36, 0.24);
    color: #ffeab2;
}

.flash.error {
    background: var(--red-soft);
    border-color: rgba(239, 68, 68, 0.26);
    color: #ffd6d6;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--panel-bg-strong);
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px;
    position: relative;
    z-index: 20;
}

.sidebar-wordmark .brand-word {
    font-size: 34px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.sidebar-note span {
    display: block;
    margin-top: 4px;
    color: var(--text-dim);
    font-size: 12px;
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-link {
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: 0.25s;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--accent);
    transform: translateX(5px);
}

.nav-link.active {
    background: #1a1a1a;
    color: #fff;
    border-left: 4px solid var(--accent);
}

.nav-link-label {
    text-align: left;
}

.nav-link-meta {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.76;
}

.nav-button-link {
    border: none;
    background: transparent;
    text-align: left;
}

.logout-form {
    margin: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-nav {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 42px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
}

.top-nav-copy h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
}

.top-nav-copy p {
    margin: 8px 0 0;
    color: var(--text-dim);
    line-height: 1.6;
}

.top-nav-kicker {
    margin-bottom: 6px;
    color: #ffd9e7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.studio-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
    font-size: 13px;
}

.studio-chip strong {
    color: #fff;
}

.progress {
    height: 4px;
    background: #1c1c1c;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
}

.stage-ready {
    width: 14%;
}

.page-stage {
    flex: 1;
    overflow-y: auto;
    padding: 34px 42px 44px;
}

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

.page-grid.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
    gap: 20px;
    margin-top: 22px;
}

.users-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
    gap: 20px;
}

.mini-stack {
    display: grid;
    gap: 18px;
}

.card,
.panel,
.stat-card,
.mini-card,
.pricing-card,
.showcase-card,
.feature-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
}

.card {
    border-radius: var(--radius-xl);
}

.stat-card {
    padding: 22px;
}

.eyebrow {
    display: inline-block;
    color: #ffd9e7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.stat-value {
    margin-top: 14px;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.stat-copy,
.panel-copy {
    color: var(--text-dim);
    line-height: 1.7;
}

.stat-copy {
    margin: 12px 0 0;
}

.panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.panel-head h2,
.mini-card h3 {
    margin: 0;
}

.panel-head p {
    margin: 8px 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.pill.success {
    background: var(--green-soft);
    color: #d7fff0;
}

.pill.warn {
    background: var(--amber-soft);
    color: #ffeab2;
}

.table-shell {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 14px 16px;
    text-align: left;
    color: #ffd9e7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

tbody td {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.user-meta {
    color: var(--text-dim);
    font-size: 13px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.status.active {
    background: var(--green-soft);
    color: #c8ffe8;
}

.status.pending {
    background: var(--amber-soft);
    color: #ffe5a0;
}

.status.failed {
    background: var(--red-soft);
    color: #ffcece;
}

.mini-card,
.pricing-card {
    padding: 18px;
    border-radius: 20px;
}

.panel > .mini-card + .mini-card,
.app-form-stack > .mini-card + .mini-card {
    margin-top: 14px;
}

.mini-card p,
.pricing-card p,
.detail-row,
.companion-card-copy,
.field-help,
.page-footer-note {
    color: var(--text-dim);
    line-height: 1.7;
}

.detail-grid {
    display: grid;
    gap: 14px;
}

.detail-row {
    display: grid;
    gap: 4px;
}

.detail-row strong {
    color: #ffd9e7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.pricing-amount {
    font-size: 30px;
    font-weight: 800;
    margin: 12px 0 8px;
}

.pricing-price {
    color: #fff;
    font-weight: 700;
}

.panel-head-spaced {
    margin-top: 24px;
}

.ledger-positive {
    color: #c8ffe8;
    font-weight: 700;
}

.ledger-negative {
    color: #ffcece;
    font-weight: 700;
}

.companion-card {
    gap: 8px;
}

.creator-wizard {
    display: grid;
    gap: 24px;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.creator-progress {
    display: grid;
    gap: 14px;
}

.creator-progress-rail {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.creator-progress-fill {
    width: 33.333%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    transition: width 0.25s ease;
}

.creator-progress-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.creator-progress-step {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-align: center;
    text-transform: uppercase;
}

.creator-progress-step.is-active {
    color: #fff;
    border-color: rgba(255, 45, 85, 0.28);
    background: rgba(255, 45, 85, 0.14);
}

.creator-builder {
    padding: 28px;
    border-radius: 30px;
    background: rgba(12, 12, 12, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.creator-stage {
    display: none;
}

.creator-stage.is-active {
    display: block;
}

.creator-stage-title,
.creator-section h3 {
    margin: 0 0 20px;
    text-align: center;
    font-size: clamp(24px, 3vw, 40px);
    letter-spacing: -0.6px;
}

.proto-video-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.proto-video-card {
    position: relative;
    width: min(100%, 300px);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(11, 11, 11, 0.98));
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.proto-video-card:hover:not(.is-disabled),
.proto-choice-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 45, 85, 0.42);
}

.proto-video-card.is-selected,
.proto-choice-card.is-selected {
    border-color: rgba(255, 45, 85, 0.72);
    box-shadow: 0 18px 44px rgba(255, 45, 85, 0.18);
}

.proto-video-card.is-disabled {
    opacity: 0.62;
}

.proto-video-card-label,
.proto-choice-card-label {
    display: block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-align: center;
    text-transform: uppercase;
}

.proto-video-card-media {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 0.52 / 1;
    background: #111;
}

.proto-video-card-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proto-video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.proto-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.creator-stage-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.creator-stage-editor {
    max-width: 1020px;
    margin: 0 auto;
}

.creator-preview-card {
    margin: 0 auto 28px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.creator-preview-title {
    margin-bottom: 10px;
    color: #ffd9e7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.creator-preview-summary {
    margin-bottom: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.creator-preview-text {
    color: var(--text-dim);
    line-height: 1.8;
}

.creator-field-row {
    margin-bottom: 28px;
}

.creator-label {
    display: block;
    margin-bottom: 12px;
    color: #ffd9e7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

.creator-name-input {
    display: block;
    width: min(360px, 100%);
    margin: 0 auto;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    text-align: center;
}

.creator-section {
    margin-top: 26px;
}

.proto-choice-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.proto-choice-card {
    width: 180px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.proto-choice-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px;
}

.proto-choice-grid-haircolor {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.proto-choice-grid-eyes .proto-choice-card {
    width: 200px;
}

.creator-range {
    display: block;
    width: min(760px, 100%);
    margin: 0 auto;
    accent-color: var(--accent);
}

.creator-range-value {
    margin-top: 12px;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
}

.creator-slider-shell {
    width: min(760px, 100%);
    margin: 18px auto 0;
}

.creator-slider-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.companion-library {
    margin-top: 28px;
    display: grid;
    gap: 18px;
}

.companion-library-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.companion-library-head h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.8px;
}

.companion-library-empty {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
}

.companion-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.companion-library-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.companion-library-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.companion-library-card-head h3 {
    margin: 0;
    font-size: 20px;
}

.companion-library-summary {
    margin-top: 14px;
    color: var(--text-soft);
    line-height: 1.7;
}

.companion-library-meta {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    color: var(--text-dim);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.history-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.history-tab.is-active {
    background: linear-gradient(135deg, #ff5b98 0%, #ff2d55 52%, #ff7ab0 100%);
    border-color: transparent;
    color: #fff;
}

.empty-state {
    display: grid;
    gap: 12px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 45, 85, 0.08), rgba(255, 45, 85, 0.03));
    border: 1px dashed rgba(255, 45, 85, 0.25);
}

.empty-state h3 {
    margin: 0;
}

.empty-state p {
    margin: 0;
    color: var(--text-dim);
    line-height: 1.7;
}

code {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

@media (max-width: 1120px) {
    .landing-hero,
    .auth-layout,
    .page-grid.dashboard-layout,
    .users-layout,
    .page-grid.stats {
        grid-template-columns: 1fr;
    }

    .top-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .proto-choice-grid-haircolor {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .page-stage {
        padding: 26px 18px 34px;
    }

    .top-nav {
        padding: 18px;
    }

    .public-topbar,
    .public-main,
    .auth-shell-toolbar,
    .auth-layout,
    .public-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .landing-title,
    .auth-hero-title {
        font-size: clamp(42px, 13vw, 72px);
    }

    .brand-word {
        font-size: 34px;
    }

    .showcase-visual {
        min-height: 320px;
    }

    .creator-builder {
        padding: 18px;
    }

    .proto-video-card {
        width: min(100%, 260px);
    }

    .proto-choice-card,
    .proto-choice-grid-eyes .proto-choice-card {
        width: calc(50% - 12px);
    }

    .companion-library-card-head,
    .companion-library-meta,
    .creator-stage-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .public-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-topbar-right,
    .auth-shell-toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .locale-menu {
        width: 100%;
    }

    .locale-menu-toggle {
        width: 100%;
    }

    .locale-menu-list {
        left: 0;
        right: auto;
        min-width: 100%;
    }

    .public-nav,
    .landing-actions,
    .auth-links,
    .top-nav-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .public-link,
    .public-cta,
    .hero-cta,
    .intro-cta,
    .top-action,
    .button,
    .button-primary {
        width: 100%;
    }

    .auth-panel {
        padding: 24px 18px;
    }

    .creator-progress-steps,
    .proto-choice-grid-haircolor {
        grid-template-columns: 1fr;
    }

    .proto-choice-card,
    .proto-choice-grid-eyes .proto-choice-card,
    .proto-video-card {
        width: 100%;
    }
}
