@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
    --text: #071022;
    --muted: #667085;
    --panel: rgba(255, 255, 255, 0.74);
    --panel-strong: rgba(255, 255, 255, 0.92);
    --line: rgba(15, 23, 42, 0.105);
    --shadow: 0 28px 90px rgba(80, 94, 128, 0.18);
    --shadow-soft: 0 18px 48px rgba(80, 94, 128, 0.13);
    --rainbow: linear-gradient(96deg, #ff6a5f 0%, #ffbd35 20%, #65d66e 41%, #18aae9 63%, #6141ff 82%, #b72ded 100%);
    --glow-rainbow: 0 18px 44px rgba(116, 57, 255, 0.34), 0 8px 28px rgba(21, 170, 233, 0.2);
    --purple: #7b37ff;
}

[data-theme="dark"] {
    --text: #f8fbff;
    --muted: #a8b2c5;
    --panel: rgba(12, 17, 31, 0.72);
    --panel-strong: rgba(18, 24, 40, 0.9);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 20px 54px rgba(0, 0, 0, 0.34);
}

html,
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 19% 33%, rgba(255, 81, 159, 0.12), transparent 27%),
        radial-gradient(circle at 48% 38%, rgba(43, 214, 142, 0.12), transparent 31%),
        radial-gradient(circle at 86% 30%, rgba(119, 79, 255, 0.13), transparent 35%),
        linear-gradient(115deg, #ffffff 0%, #f8fcff 46%, #f5f3ff 100%);
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 16% 40%, rgba(255, 77, 148, 0.2), transparent 30%),
        radial-gradient(circle at 70% 42%, rgba(44, 190, 229, 0.18), transparent 33%),
        radial-gradient(circle at 90% 18%, rgba(132, 75, 255, 0.18), transparent 30%),
        linear-gradient(132deg, #050711 0%, #080d1d 52%, #0a0815 100%);
}

.ui-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.glass-panel,
.login-card,
.onboarding-header,
.onboarding-rail,
.onboarding-stage,
.app-topbar,
.mobile-bottom-nav {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
}

.brand-lockup {
    gap: 11px;
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
}

.brand-mark {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 10px 22px rgba(124, 55, 255, 0.24));
}

.rainbow-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    border-radius: 17px;
    font-weight: 900;
    background: var(--rainbow);
    color: #fff;
    box-shadow: var(--glow-rainbow);
}

.rainbow-button .ui-icon {
    width: 18px;
    height: 18px;
}

.rainbow-button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.theme-toggle {
    min-height: 42px;
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
    background: rgba(255, 255, 255, 0.62);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
}

.theme-toggle span {
    min-width: 58px;
    min-height: 33px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

[data-theme="light"] .theme-toggle .theme-sun,
[data-theme="dark"] .theme-toggle .theme-moon {
    background: var(--panel-strong);
    color: var(--text);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.icon-theme-button {
    width: 54px;
    height: 54px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
}

[data-theme="dark"] .icon-theme-button {
    background: rgba(255, 255, 255, 0.08);
}

.icon-theme-button span {
    display: none;
    min-width: 0;
    width: 32px;
    height: 32px;
    font-size: 0;
    box-shadow: none;
}

[data-theme="light"] .icon-theme-button .theme-sun,
[data-theme="dark"] .icon-theme-button .theme-moon {
    display: grid;
    place-items: center;
    background: transparent;
}

.icon-theme-button .theme-sun::before,
.theme-toggle .theme-sun::before {
    width: 18px;
    height: 18px;
    background: #ffbd35;
    box-shadow: 0 0 0 8px rgba(255, 189, 53, 0.18);
}

.icon-theme-button .theme-moon::before,
.theme-toggle .theme-moon::before {
    width: 18px;
    height: 18px;
    background: #7b55ff;
    box-shadow: inset -6px -1px 0 #d9e1ff;
}

/* Login */
.auth-body {
    grid-template-rows: 88px minmax(0, 1fr) 68px;
    overflow: hidden;
}

.auth-header {
    width: min(1440px, calc(100% - 72px));
    height: 88px;
    margin: 0 auto;
}

.auth-header-actions {
    gap: 18px;
}

.language-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    color: var(--text);
    background: transparent;
    font-weight: 850;
}

.language-pill .ui-icon {
    width: 21px;
    height: 21px;
}

.auth-shell {
    width: min(1210px, calc(100% - 72px));
    min-height: calc(100vh - 156px);
    padding: clamp(14px, 2.4vh, 28px) 0;
    grid-template-columns: minmax(330px, 0.96fr) minmax(440px, 1.04fr);
    gap: clamp(46px, 7vw, 106px);
    align-items: center;
}

.auth-brand-panel {
    align-self: center;
    transform: translateY(4px);
}

.auth-brand-panel .hero-logo {
    width: clamp(178px, 25vh, 285px);
    filter: drop-shadow(0 34px 58px rgba(128, 63, 255, 0.3));
}

.auth-brand-panel h1 {
    margin: clamp(16px, 2.2vh, 26px) 0 10px;
    font-size: clamp(74px, 13.5vh, 116px);
    line-height: 0.92;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-brand-panel p {
    font-size: clamp(19px, 3vh, 27px);
    line-height: 1.38;
    color: var(--muted);
}

.rainbow-text {
    margin-top: clamp(16px, 2.8vh, 30px);
    font-weight: 700;
    font-size: clamp(17px, 2.35vh, 22px);
}

.login-card {
    width: min(560px, 100%);
    padding: clamp(34px, 5.5vh, 56px);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    font-size: clamp(40px, 6vh, 54px);
    font-weight: 900;
    line-height: 1.02;
    margin-bottom: 10px;
}

.login-card > p {
    color: var(--muted);
    font-size: clamp(16px, 2.2vh, 20px);
    margin-bottom: clamp(22px, 3.2vh, 32px);
}

.auth-form {
    gap: 14px;
}

.auth-field {
    position: relative;
}

.auth-field .field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.auth-form .auth-field .field-icon,
.onboarding-form .field .field-icon {
    position: absolute;
    left: 19px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    color: #0b1220;
    opacity: 0.88;
    z-index: 1;
}

[data-theme="dark"] .auth-form .auth-field .field-icon,
[data-theme="dark"] .onboarding-form .field .field-icon {
    color: #e9edff;
}

.auth-form .auth-field input {
    min-height: 58px;
    border-radius: 17px;
    padding-left: 58px;
    padding-right: 18px;
    font-size: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .auth-form .auth-field input {
    background: rgba(255, 255, 255, 0.065);
}

.auth-form .field-password input {
    padding-right: 88px;
}

.auth-form .field-password button {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.auth-form .field-password button .ui-icon {
    width: 21px;
    height: 21px;
}

.auth-form .field-password button span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    font-size: 13px;
}

.forgot-link {
    color: var(--purple);
    font-weight: 850;
    margin: 2px 0 16px;
}

.divider {
    margin: clamp(22px, 3.8vh, 30px) 0 18px;
}

.social-row {
    gap: 14px;
}

.social-row button {
    min-height: 58px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 850;
    background: rgba(255, 255, 255, 0.48);
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.social-row button:hover {
    transform: translateY(-1px);
    border-color: rgba(123, 55, 255, 0.32);
    background: rgba(255, 255, 255, 0.74);
}

[data-theme="dark"] .social-row button {
    background: rgba(255, 255, 255, 0.065);
}

.social-row .ui-icon {
    width: 26px;
    height: 26px;
}

.social-row [data-social-login="Discord"] .ui-icon {
    color: #5865f2;
}

.switch-auth {
    font-size: 16px;
}

.auth-footer {
    min-height: 68px;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .auth-footer {
    background: rgba(2, 6, 23, 0.24);
}

.simple-auth-body {
    grid-template-rows: 88px 1fr;
    overflow: auto;
}

.simple-auth-shell {
    width: min(560px, calc(100% - 32px));
    min-height: calc(100vh - 88px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 28px 0 64px;
}

.legal-card {
    display: grid;
    gap: 18px;
}

.legal-card .rainbow-button {
    justify-self: start;
}

/* Onboarding */
.onboarding-body {
    min-height: 100vh;
    padding: 22px;
    overflow: hidden;
}

.onboarding-header {
    width: min(1180px, 100%);
    height: 76px;
    border-radius: 24px;
    padding: 14px 20px 14px 24px;
}

.onboarding-shell {
    width: min(1180px, 100%);
    max-width: 100%;
    min-height: calc(100vh - 122px);
    margin-top: 24px;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}

.onboarding-rail {
    min-height: min(640px, calc(100vh - 148px));
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
    scrollbar-width: none;
}

.onboarding-rail::-webkit-scrollbar {
    display: none;
}

.onboarding-rail li {
    min-height: 44px;
    border-radius: 14px;
    padding: 10px;
    font-size: 14px;
    font-weight: 850;
}

.onboarding-rail li span {
    width: 28px;
    height: 28px;
    font-weight: 900;
}

.onboarding-rail li.is-active {
    background: rgba(123, 55, 255, 0.13);
}

.onboarding-stage {
    width: min(480px, 100%);
    max-width: 100%;
    min-height: min(680px, calc(100vh - 148px));
    max-height: calc(100vh - 148px);
    border-radius: 26px;
    padding: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.step-meter {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 900;
}

.step-meter div {
    height: 5px;
    background: rgba(123, 55, 255, 0.13);
}

.step-meter i {
    background: var(--rainbow);
}

.onboarding-form {
    min-height: 0;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto auto;
}

.onboard-step {
    align-content: start;
    gap: 15px;
    min-height: 0;
    overflow: visible;
}

.onboard-step h1,
.onboard-step h2 {
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
}

.onboard-step p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.52;
    max-width: 100%;
    overflow-wrap: break-word;
}

.step-logo {
    width: clamp(132px, 23vh, 178px);
    margin-top: 12px;
    filter: drop-shadow(0 26px 42px rgba(123, 55, 255, 0.25));
}

.provider-stack {
    gap: 10px;
    margin-top: 12px;
}

.provider-stack button,
.choice-stack label,
.security-options label {
    min-height: 54px;
    border-radius: 16px;
    border-color: var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.46);
    font-weight: 900;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

[data-theme="dark"] .provider-stack button,
[data-theme="dark"] .choice-stack label,
[data-theme="dark"] .security-options label {
    background: rgba(255, 255, 255, 0.06);
}

.provider-stack button {
    gap: 11px;
}

.provider-stack button:hover,
.choice-stack label:hover,
.security-options label:hover {
    transform: translateY(-1px);
    border-color: rgba(123, 55, 255, 0.32);
    background: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .provider-stack button:hover,
[data-theme="dark"] .choice-stack label:hover,
[data-theme="dark"] .security-options label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.provider-stack .ui-icon {
    width: 22px;
    height: 22px;
}

.email-start-panel {
    margin-top: 2px;
    padding: 12px;
    border: 1px solid rgba(123, 55, 255, 0.12);
    background: rgba(123, 55, 255, 0.08);
}

.email-start-panel[hidden] {
    display: none;
}

.onboarding-form .field {
    position: relative;
}

.onboarding-form .field input,
.onboarding-form .field textarea {
    min-height: 54px;
    border-radius: 16px;
}

.onboarding-form .field .field-icon + input,
.onboarding-form .field .field-icon + textarea {
    padding-left: 54px;
}

.date-wheel {
    margin-top: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .date-wheel {
    background: rgba(255, 255, 255, 0.055);
}

.date-wheel select {
    min-height: clamp(140px, 24vh, 184px);
    font-weight: 750;
}

.mini-map {
    min-height: clamp(150px, 26vh, 210px);
}

.choice-stack {
    gap: 12px;
    margin-top: 18px;
}

.choice-stack label span,
.security-options label span,
.purpose span,
.safe-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.choice-stack label {
    padding: 0 18px;
}

.choice-stack label span {
    width: 100%;
}

.choice-stack .ui-icon {
    color: var(--purple);
}

.purpose-grid {
    gap: 10px;
}

.purpose {
    min-height: 43px;
    border-radius: 13px;
    font-size: 14px;
}

.purpose .ui-icon {
    width: 18px;
    height: 18px;
}

.upload-zone {
    min-height: clamp(170px, 30vh, 230px);
    border-radius: 20px;
    cursor: pointer;
}

.upload-plus {
    width: 34px;
    height: 34px;
    color: var(--purple);
    margin: 0 auto 4px;
}

.safe-note {
    justify-content: center;
    line-height: 1.4;
}

.safe-note .ui-icon {
    width: 20px;
    height: 20px;
}

.safe-orb {
    width: clamp(122px, 22vh, 156px);
    height: clamp(122px, 22vh, 156px);
}

.onboarding-actions {
    grid-template-columns: 58px 1fr;
    margin-top: 16px;
    width: 100%;
    min-width: 0;
}

.onboarding-actions .rainbow-button {
    width: 100%;
    min-width: 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
}

.back-button .ui-icon {
    width: 20px;
    height: 20px;
}

.back-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-height: 760px) and (min-width: 801px) {
    .auth-body {
        grid-template-rows: 72px minmax(0, 1fr) 54px;
    }

    .auth-header {
        height: 72px;
    }

    .auth-shell {
        min-height: calc(100vh - 126px);
        padding: 8px 0;
    }

    .auth-brand-panel .hero-logo {
        width: 176px;
    }

    .auth-brand-panel h1 {
        font-size: 76px;
        margin-top: 14px;
    }

    .auth-brand-panel p {
        font-size: 20px;
    }

    .rainbow-text {
        margin-top: 18px;
        font-size: 17px;
    }

    .login-card {
        padding: 28px 46px;
    }

    .login-card h2 {
        font-size: 40px;
    }

    .login-card > p {
        margin-bottom: 18px;
    }

    .auth-field input,
    .social-row button {
        min-height: 52px;
    }

    .rainbow-button {
        min-height: 54px;
    }

    .divider {
        margin: 16px 0 14px;
    }

    .switch-auth {
        margin-top: 14px;
    }

    .onboarding-body {
        padding: 12px;
    }

    .onboarding-header {
        height: 64px;
    }

    .onboarding-shell {
        min-height: calc(100vh - 88px);
        margin-top: 12px;
        align-items: center;
    }

    .onboarding-rail {
        min-height: calc(100vh - 112px);
    }

    .onboarding-stage {
        min-height: calc(100vh - 112px);
        max-height: calc(100vh - 112px);
        padding: 20px;
    }

    .step-meter {
        margin-bottom: 12px;
    }

    .onboard-step {
        gap: 9px;
    }

    .onboard-step h1,
    .onboard-step h2 {
        font-size: 24px;
    }

    .onboard-step p {
        font-size: 14px;
        line-height: 1.42;
    }

    .step-logo {
        width: 118px;
        margin-top: 4px;
    }

    .provider-stack {
        gap: 9px;
        margin-top: 8px;
    }

    .provider-stack button,
    .choice-stack label,
    .security-options label {
        min-height: 46px;
    }

    .step-login {
        display: none;
    }

    .onboarding-actions {
        margin-top: 10px;
    }

    .back-button,
    .onboarding-actions .rainbow-button {
        height: 50px;
        min-height: 50px;
    }
}

@media (max-width: 1100px) {
    .auth-body {
        overflow: auto;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        width: min(620px, calc(100% - 36px));
        gap: 24px;
        padding: 10px 0 42px;
    }

    .auth-brand-panel .hero-logo {
        width: 176px;
    }

    .auth-brand-panel h1 {
        font-size: 76px;
    }

    .auth-brand-panel p {
        font-size: 20px;
    }

    .login-card {
        justify-self: center;
    }

    .onboarding-shell {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .onboarding-rail {
        min-height: 0;
    }

    .onboarding-stage {
        justify-self: center;
        max-height: none;
        min-height: 620px;
    }
}

@media (max-width: 800px) {
    .auth-body {
        grid-template-rows: auto 1fr;
        overflow: auto;
    }

    .auth-header {
        margin-top: 3%;
        margin-left: 14px;
        margin-right: 14px;
        height: 66px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .auth-header .brand-lockup {
        font-size: 0;
    }

    .language-pill {
        display: none;
    }

    .icon-theme-button {
        width: 48px;
        height: 48px;
    }

    .auth-shell {
        min-height: auto;
        margin-left: 14px;
        margin-right: 14px;
        display: block;
        padding: 12px 0 34px;
        overflow: hidden;
    }

    .auth-form,
    .login-card,
    .auth-field,
    .auth-field input,
    .auth-form .rainbow-button,
    .social-row {
        width: 100%;
        max-width: 100%;
    }

    .auth-field input,
    .auth-form .rainbow-button,
    .divider,
    .social-row,
    .switch-auth {
        width: min(calc(100vw - 28px), 362px);
        max-width: min(calc(100vw - 28px), 362px);
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form,
    .auth-form .auth-field {
        width: min(calc(100vw - 28px), 362px);
        max-width: min(calc(100vw - 28px), 362px);
        margin-left: auto;
        margin-right: auto;
    }

    .auth-brand-panel {
        transform: none;
    }

    .auth-brand-panel .hero-logo {
        width: clamp(148px, 34vw, 205px);
    }

    .auth-brand-panel h1 {
        font-size: clamp(62px, 17vw, 86px);
        margin-top: 20px;
    }

    .auth-brand-panel p {
        font-size: clamp(18px, 5vw, 24px);
    }

    .rainbow-text {
        display: none;
    }

    .login-card {
        width: 100%;
        margin-top: 28px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .login-card h2,
    .login-card > p {
        display: none;
    }

    .auth-field input {
        min-height: 58px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.6);
    }

    [data-theme="dark"] .auth-field input {
        background: rgba(255, 255, 255, 0.08);
    }

    .forgot-link {
        margin-bottom: 22px;
    }

    .social-row button span {
        display: none;
    }

    .auth-footer {
        display: none;
    }

    .onboarding-body {
        padding: 8px;
        overflow: auto;
    }

    .onboarding-header {
        width: calc(100vw - 16px);
        height: 56px;
        border-radius: 18px;
        padding: 8px 12px;
    }

    .onboarding-header .brand-lockup {
        font-size: 16px;
    }

    .onboarding-header .brand-mark {
        width: 30px;
        height: 30px;
    }

    .onboarding-header .theme-toggle {
        width: 70px;
        padding: 3px;
    }

    .onboarding-header .theme-toggle span {
        min-width: 29px;
        min-height: 29px;
        font-size: 0;
    }

    .onboarding-shell {
        width: calc(100vw - 16px);
        min-height: auto;
        margin-top: 10px;
        gap: 10px;
    }

    .onboarding-rail {
        border-radius: 16px;
        padding: 10px 12px;
    }

    .onboarding-rail ol {
        grid-auto-columns: 36px;
        gap: 8px;
        justify-content: start;
    }

    .onboarding-rail li {
        min-height: 36px;
        width: 36px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .onboarding-rail li span {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .onboarding-stage {
        width: 100%;
        min-height: calc(100vh - 136px);
        border-radius: 18px;
        padding: 16px;
    }

    .step-meter {
        margin-bottom: 12px;
    }

    .step-logo {
        width: clamp(118px, 35vw, 150px);
        margin-top: 8px;
    }

    .onboard-step h1,
    .onboard-step h2 {
        font-size: 22px;
    }

    .onboard-step p {
        font-size: 14px;
        max-width: 300px;
        justify-self: center;
    }

    .provider-stack button {
        min-height: 48px;
    }

    .onboarding-actions {
        grid-template-columns: 54px 1fr;
        gap: 10px;
        width: calc(100% - 8px);
    }
}

.theme-toggle .theme-sun::before {
    content: "";
    width: 15px;
    height: 15px;
    display: block;
    border-radius: 50%;
    background: #ffbd35;
    box-shadow: 0 0 0 6px rgba(255, 189, 53, 0.18);
}

.theme-toggle .theme-moon::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    border-radius: 50%;
    background: #7954ff;
    box-shadow: inset -5px -1px 0 #dfe5ff;
}

@media (max-width: 420px) {
    .social-row {
        gap: 10px;
    }

    .social-row button {
        min-height: 54px;
    }

    .onboarding-stage {
        min-height: calc(100vh - 132px);
    }

    .date-wheel select {
        font-size: 13px;
    }
}

/* Final server polish */
.auth-header,
.onboarding-header.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 44px));
    height: 76px;
    border-radius: 24px;
    padding: 14px 20px 14px 24px;
    margin: 0 auto;
    margin-top: 3%;
}

.auth-header .theme-toggle,
.onboarding-header .theme-toggle {
    display: inline-grid;
}

.mobile-signup-cta {
    display: none;
}

.onboarding-shell {
    width: min(1180px, calc(100% - 44px));
    display: grid;
    grid-template-columns: minmax(176px, 12%) minmax(0, 80%);
    justify-content: center;
    gap: clamp(16px, 2vw, 28px);
}

.onboarding-rail {
    width: 100%;
    min-width: 0;
}

.onboarding-stage {
    width: 100%;
    justify-self: stretch;
}

.onboarding-stage .step-meter,
.onboarding-stage .onboarding-form {
    width: min(480px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.code-row .ghost-button {
    min-height: 54px;
    white-space: nowrap;
}

.code-status {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.code-status.is-success {
    color: #22b85f;
}

@media (max-height: 760px) and (min-width: 801px) {
    .onboarding-shell {
        width: min(1180px, calc(100% - 24px));
        grid-template-columns: minmax(176px, 12%) minmax(0, 80%);
    }

    .onboarding-stage .step-meter,
    .onboarding-stage .onboarding-form {
        width: min(440px, 100%);
    }

    .email-start-panel {
        padding: 10px;
    }

    .code-row .ghost-button {
        min-height: 46px;
        padding-inline: 12px;
    }
}

@media (max-height: 830px) and (min-width: 801px) {
    .step-login {
        display: none;
    }

    .step-logo {
        width: 116px;
        margin-top: 2px;
    }

    .provider-stack button {
        min-height: 46px;
    }
}

@media (max-width: 800px) {
    .auth-header,
    .onboarding-header.auth-header {
        height: 64px;
        position: static;
        left: auto;
        transform: none;
        padding: 8px 12px;
        border-radius: 18px;
    }

    .auth-header .brand-lockup {
        font-size: 18px;
    }

    .auth-header-actions {
        gap: 8px;
    }

    .auth-header .language-pill {
        display: none;
    }

    .auth-header .theme-toggle {
        width: 74px;
        min-height: 40px;
    }

    .auth-header .theme-toggle span {
        min-width: 31px;
        min-height: 31px;
        font-size: 0;
    }

    .auth-shell {
        position: static;
        left: auto;
        transform: none;
        overflow: visible;
    }

    .auth-form,
    .auth-form .auth-field,
    .auth-field input,
    .auth-form .rainbow-button,
    .divider,
    .social-row,
    .switch-auth {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .mobile-signup-cta {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        border-radius: 16px;
        border: 1px solid var(--line);
        color: var(--purple);
        background: rgba(255, 255, 255, 0.46);
        font-weight: 900;
    }

    [data-theme="dark"] .mobile-signup-cta {
        background: rgba(255, 255, 255, 0.06);
    }

    .onboarding-shell {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: center;
        gap: 10px;
        position: static;
        left: auto;
        transform: none;
    }

    .onboarding-stage {
        width: 100%;
        min-height: calc(100vh - 148px);
        overflow: hidden;
    }

    .onboarding-stage .step-meter,
    .onboarding-stage .onboarding-form {
        width: 100%;
    }

    .onboarding-rail {
        width: 100%;
    }

    .code-row {
        grid-template-columns: 1fr;
    }

    .code-row .ghost-button {
        min-height: 46px;
    }
}

/* Onboarding registration fixes */
.onboarding-stage {
    overflow: visible;
}

.onboarding-form {
    grid-template-rows: auto auto auto;
    min-height: 0;
}

.onboard-step {
    min-height: 0;
}

.email-start-panel {
    overflow: visible;
}

.custom-gender-field {
    margin-top: 2px;
}

.custom-gender-field[hidden] {
    display: none !important;
}

.mini-map.is-google-map {
    background: #172033;
}

.mini-map.is-google-map span {
    display: none;
}

.map-status {
    min-height: 18px;
}

.place-suggestions {
    position: absolute;
    z-index: 15;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-strong);
    box-shadow: var(--shadow-soft);
}

.place-suggestions[hidden] {
    display: none;
}

.place-suggestions button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--text);
    background: transparent;
    text-align: left;
    font-weight: 760;
}

.place-suggestions button:hover {
    background: rgba(121, 55, 255, 0.12);
}

.choice-stack label.is-disabled {
    opacity: 0.44;
    cursor: not-allowed;
}

.choice-stack label.is-disabled span {
    color: var(--muted);
}

.face-verify-panel {
    position: relative;
    min-height: 250px;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(121, 55, 255, 0.06);
}

.face-verify-panel video,
.face-verify-panel canvas {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    transform: none !important;
    scale: 1;
}

.face-scan-ring {
    position: absolute;
    z-index: 2;
    width: min(56%, 230px);
    aspect-ratio: 1;
    border: 2px solid rgba(121, 55, 255, 0.72);
    border-radius: 50%;
    box-shadow:
        0 0 0 999px rgba(4, 7, 16, 0.14),
        0 0 28px rgba(121, 55, 255, 0.34);
    pointer-events: none;
}

.face-verify-placeholder {
    display: grid;
    justify-items: center;
    gap: 12px;
    color: var(--purple);
    font-weight: 800;
    text-align: center;
    padding: 22px;
}

.face-verify-placeholder.is-success {
    color: var(--green);
}

.face-verify-placeholder .ui-icon {
    width: 54px;
    height: 54px;
}

.face-guide {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 3;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(7, 16, 31, 0.72);
    font-weight: 850;
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.face-guide[hidden],
.face-scan-ring[hidden] {
    display: none;
}

.face-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.face-progress span {
    min-height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(121, 55, 255, 0.08);
    font-size: 11px;
    font-weight: 850;
}

.face-progress span.is-complete {
    color: #fff;
    background: rgba(121, 55, 255, 0.72);
}

.face-progress span.is-active {
    background: var(--rainbow);
}

.face-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.face-actions .ghost-button {
    min-width: 0;
    gap: 8px;
}

@media (max-width: 560px) {
    .face-verify-panel {
        min-height: 230px;
    }

    .face-progress {
        gap: 4px;
    }

    .face-progress span {
        font-size: 10px;
        min-height: 30px;
    }
}

.premium-switch {
    cursor: not-allowed;
    opacity: 0.86;
}

.premium-switch input {
    pointer-events: none;
}

.premium-switch b {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(121, 55, 255, 0.85);
    font-size: 11px;
    line-height: 1;
}

.premium-switch b .ui-icon {
    width: 13px;
    height: 13px;
}

.safe-orb {
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.32), transparent 38%),
        var(--rainbow-soft);
}

.safe-orb .safe-shield-icon {
    width: clamp(74px, 13vh, 94px);
    height: clamp(74px, 13vh, 94px);
    color: var(--purple);
    filter: drop-shadow(0 16px 28px rgba(121, 55, 255, 0.32));
    stroke-width: 1.8;
}

.pin-field input {
    letter-spacing: 0.26em;
}

@media (max-height: 760px) and (min-width: 801px) {
    .onboarding-stage {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 800px) {
    .onboarding-stage {
        overflow: visible;
    }
}

/* Prism Safe unlock */
.safe-unlock-card {
    display: grid;
    gap: 14px;
    justify-items: stretch;
}

.safe-unlock-icon {
    width: 118px;
    height: 118px;
    margin: 0 auto 4px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rainbow-soft);
    color: var(--purple);
}

.safe-unlock-icon .safe-shield-icon {
    width: 66px;
    height: 66px;
}

.safe-unlock-actions,
.safe-reset-panel {
    display: grid;
    gap: 12px;
}

.safe-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(5, 7, 17, 0.74);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.safe-lock-overlay[hidden] {
    display: none;
}

.safe-lock-card {
    width: min(430px, 100%);
    padding: 24px;
    display: grid;
    gap: 14px;
    text-align: center;
}

.safe-lock-card .field {
    text-align: left;
}

/* New home */
.prism-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.home-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.home-stories {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 104px;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.story-card {
    min-height: 126px;
    border: 1px solid var(--line);
    border-radius: 22px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: var(--text);
    background: var(--panel);
    font-weight: 850;
    text-align: center;
}

.story-card .ui-icon {
    width: 30px;
    height: 30px;
    color: var(--purple);
}

.story-add {
    background: rgba(121, 55, 255, 0.08);
}

.story-avatar {
    position: relative;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.story-avatar i {
    position: absolute;
    right: 4px;
    bottom: 5px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--green);
}

.gradient-1 { background: linear-gradient(135deg, #1fdd93, #8e35ff); }
.gradient-2 { background: linear-gradient(135deg, #ff557d, #ffbf2f); }
.gradient-3 { background: linear-gradient(135deg, #128af3, #b735ed); }
.gradient-4 { background: linear-gradient(135deg, #101827, #ff7b48); }

.story-place {
    color: #f1ccff;
    text-transform: uppercase;
    background:
        radial-gradient(circle at center, rgba(183, 53, 237, 0.2), transparent 60%),
        rgba(10, 8, 18, 0.86);
}

.home-hero {
    min-height: 290px;
    padding: clamp(24px, 4vw, 42px);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 68% 45%, rgba(121, 55, 255, 0.28), transparent 42%),
        linear-gradient(135deg, rgba(255, 105, 95, 0.1), rgba(18, 138, 243, 0.09), rgba(183, 53, 237, 0.11)),
        var(--panel);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--purple);
    font-size: 0.84rem;
    font-weight: 900;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1;
    letter-spacing: 0;
}

.home-hero h1 span {
    background: var(--rainbow);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero p {
    max-width: 420px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.6;
}

.home-cta {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.hero-prism-scene {
    position: relative;
    min-height: 250px;
}

.hero-prism-scene img {
    position: absolute;
    width: min(56%, 330px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(10deg);
    filter: drop-shadow(0 34px 60px rgba(121, 55, 255, 0.34));
}

.orbit {
    position: absolute;
    inset: 14% 12%;
    border: 1px dashed rgba(183, 53, 237, 0.34);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.orbit-b {
    inset: 24% 22%;
    transform: rotate(24deg);
}

.floating-face {
    position: absolute;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 950;
    background: var(--rainbow);
    box-shadow: 0 12px 32px rgba(121, 55, 255, 0.24);
}

.face-a { left: 12%; bottom: 12%; }
.face-b { right: 12%; top: 18%; }
.face-c { right: 8%; bottom: 8%; }

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.home-feature {
    min-height: 146px;
    padding: 18px;
    display: grid;
    gap: 8px;
    align-content: center;
}

.home-feature .ui-icon {
    width: 32px;
    height: 32px;
    color: var(--purple);
}

.home-feature strong {
    font-size: 1.04rem;
    line-height: 1.2;
}

.home-feature span {
    color: var(--muted);
}

.protected-dot::before {
    content: "";
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--green);
}

.today-section {
    display: grid;
    gap: 14px;
}

.today-section header,
.upcoming-card header,
.people-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.today-section h2,
.upcoming-card h2,
.people-card h2 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.today-section a,
.upcoming-card a,
.people-card a {
    color: var(--purple);
    font-weight: 850;
}

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

.today-card {
    min-height: 230px;
    border-radius: 22px;
    padding: 16px;
    display: grid;
    align-content: end;
    gap: 7px;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 -90px 80px rgba(0, 0, 0, 0.42);
}

.today-card.live { background: linear-gradient(135deg, #250845, #b735ed 42%, #ff7b48); }
.today-card.event { background: linear-gradient(135deg, #233a75, #ff695f 64%, #ffbf2f); }
.today-card.people { background: linear-gradient(135deg, #10243a, #10a6f5 54%, #ff557d); }
.today-card.place { background: linear-gradient(135deg, #1e100b, #8e35ff 44%, #ff7b48); }

.today-card span {
    width: max-content;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(121, 55, 255, 0.86);
    font-size: 0.76rem;
    font-weight: 900;
}

.today-card strong {
    font-size: 1.12rem;
    line-height: 1.25;
}

.today-card small {
    color: rgba(255, 255, 255, 0.82);
}

.home-post-feed {
    margin-bottom: 40px;
}

.home-post-card {
    overflow: hidden;
}

.home-post-visual {
    min-height: 220px;
    border-radius: 18px;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.34), transparent),
        linear-gradient(135deg, #ff7b48, #7937ff 52%, #101827);
}

.home-right-rail {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 112px;
}

.vibe-card,
.upcoming-card,
.people-card {
    padding: 22px;
}

.vibe-card {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.vibe-orbs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vibe-orbs i {
    width: 74px;
    height: 74px;
    margin-left: -10px;
    border-radius: 50%;
    background: var(--rainbow-soft);
}

.vibe-orbs i:nth-child(2) {
    width: 104px;
    height: 104px;
    background: var(--rainbow);
    opacity: 0.54;
}

.upcoming-card {
    display: grid;
    gap: 16px;
}

.upcoming-card > a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 3px 12px;
    color: var(--text);
}

.upcoming-card > a span {
    grid-row: span 2;
    min-height: 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--pink);
    background: rgba(251, 61, 135, 0.08);
    font-size: 0.72rem;
    font-weight: 900;
}

.upcoming-card > a b {
    display: block;
    color: var(--text);
    font-size: 1.25rem;
}

.upcoming-card small,
.people-card small,
.vibe-card p {
    color: var(--muted);
}

.people-card {
    display: grid;
    gap: 16px;
}

.people-card > div {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: center;
}

.people-card .story-avatar {
    grid-row: span 2;
    width: 52px;
    height: 52px;
    font-size: 18px;
}

.people-card button {
    grid-row: span 2;
    border: 0;
    border-radius: 14px;
    min-height: 38px;
    padding: 0 16px;
    color: var(--purple);
    background: rgba(121, 55, 255, 0.1);
    font-weight: 900;
}

.home-floating-create {
    position: fixed;
    right: clamp(18px, 5vw, 56px);
    bottom: 96px;
    z-index: 32;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--rainbow);
    box-shadow: 0 20px 54px rgba(121, 55, 255, 0.42);
}

.home-floating-create .ui-icon {
    width: 34px;
    height: 34px;
}

@media (max-width: 1180px) {
    .prism-home {
        grid-template-columns: 1fr;
    }

    .home-right-rail {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

    .hero-prism-scene {
        min-height: 190px;
    }

    .home-feature-grid,
    .today-grid,
    .home-right-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .app-main {
        margin-top: 18px;
    }

    .home-stories {
        grid-auto-columns: 94px;
    }

    .home-hero {
        min-height: 470px;
        padding: 24px;
        border-radius: 22px;
    }

    .home-feature-grid,
    .today-grid,
    .home-right-rail {
        grid-template-columns: 1fr;
    }

    .today-card {
        min-height: 210px;
    }

    .home-floating-create {
        bottom: 106px;
        right: 24px;
        width: 64px;
        height: 64px;
    }
}

/* Reference-style Prism home */
body.prism-home-body {
    --bg: #02030a;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.68);
    --line: rgba(255, 255, 255, 0.13);
    --panel: rgba(12, 10, 24, 0.76);
    --panel-strong: rgba(18, 16, 34, 0.92);
    padding: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 20%, rgba(124, 48, 255, 0.16), transparent 34%),
        linear-gradient(180deg, #02030a 0%, #03030b 62%, #040410 100%);
}

.prism-home-body .app-topbar {
    display: none;
}

.prism-home-body .app-main {
    width: min(430px, 100%);
    margin: 0 auto 112px;
    padding: 24px 14px 0;
}

.prism-home-body .prism-home {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.home-phone-top {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-phone-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
}

.home-phone-brand img {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 10px 22px rgba(183, 53, 237, 0.55));
}

.home-phone-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.home-icon-button {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.home-icon-button .ui-icon {
    width: 22px;
    height: 22px;
}

.home-icon-button.has-dot::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7937ff;
}

.prism-home-body .home-stories {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 70px;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 8px;
    scrollbar-width: none;
}

.prism-home-body .home-stories::-webkit-scrollbar {
    display: none;
}

.prism-home-body .story-card {
    min-height: 92px;
    border: 0;
    border-radius: 0;
    gap: 7px;
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 700;
}

.prism-home-body .story-add,
.prism-home-body .story-place {
    min-height: 92px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.prism-home-body .story-card .ui-icon {
    width: 28px;
    height: 28px;
    color: #fff;
}

.prism-home-body .story-add .ui-icon {
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 12px 28px rgba(121, 55, 255, 0.22);
}

.prism-home-body .story-avatar {
    width: 62px;
    height: 62px;
    border: 3px solid transparent;
    outline: 2px solid rgba(183, 53, 237, 0.65);
    color: #fff;
    font-size: 1.2rem;
}

.prism-home-body .story-avatar i {
    right: 1px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-color: #02030a;
}

.prism-home-body .story-place {
    color: #f0a7ff;
    text-shadow: 0 0 14px rgba(240, 167, 255, 0.42);
}

.prism-home-body .story-avatar img,
.prism-home-body .floating-face img,
.prism-home-body .mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.prism-home-body .home-hero {
    min-height: 236px;
    padding: 18px;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 6px;
    align-items: center;
    border-radius: 26px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(4, 3, 14, 0.96) 0%, rgba(10, 5, 30, 0.88) 45%, rgba(19, 5, 33, 0.68) 100%),
        radial-gradient(circle at 64% 42%, rgba(251, 61, 135, 0.28), transparent 34%),
        radial-gradient(circle at 84% 82%, rgba(18, 138, 243, 0.22), transparent 30%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 22px 52px rgba(0, 0, 0, 0.28);
}

.prism-home-body .home-hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.prism-home-body .hero-kicker {
    gap: 6px;
    color: #c59cff;
    font-size: 0.68rem;
    line-height: 1.2;
}

.prism-home-body .hero-kicker .ui-icon {
    width: 16px;
    height: 16px;
}

.prism-home-body .home-hero h1 {
    margin: 14px 0 10px;
    color: #fff;
    font-size: 1.78rem;
    line-height: 1.08;
}

.prism-home-body .home-hero p {
    max-width: 168px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.45;
}

.prism-home-body .home-cta {
    min-height: 44px;
    margin-top: 10px;
    padding: 0 15px;
    border-radius: 18px;
    gap: 10px;
    font-size: 0.88rem;
}

.prism-home-body .home-cta .ui-icon {
    width: 20px;
    height: 20px;
}

.prism-home-body .hero-prism-scene {
    min-height: 204px;
    margin-right: -12px;
}

.prism-home-body .hero-prism-scene img {
    width: 138px;
    max-width: none;
    left: 48%;
    top: 52%;
    filter: drop-shadow(0 18px 34px rgba(121, 55, 255, 0.68));
}

.prism-home-body .orbit {
    inset: 18% 4% 20% 0;
    border-color: rgba(255, 105, 95, 0.35);
}

.prism-home-body .orbit-b {
    inset: 31% 10% 28% 8%;
    border-color: rgba(18, 138, 243, 0.28);
}

.prism-home-body .floating-face {
    width: 48px;
    height: 48px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.prism-home-body .face-a {
    left: 0;
    bottom: 16px;
}

.prism-home-body .face-b {
    left: 28px;
    right: auto;
    top: 2px;
}

.prism-home-body .face-c {
    right: 6px;
    bottom: 0;
}

.prism-home-body .home-feature-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.prism-home-body .home-feature {
    min-height: 118px;
    padding: 10px 7px;
    border-radius: 18px;
    justify-items: center;
    align-content: center;
    gap: 5px;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    box-shadow: none;
}

.prism-home-body .feature-glow {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #ad4dff;
    background: rgba(121, 55, 255, 0.14);
    filter: drop-shadow(0 0 14px rgba(121, 55, 255, 0.58));
}

.prism-home-body .home-feature .ui-icon {
    width: 22px;
    height: 22px;
    color: currentColor;
}

.prism-home-body .home-feature strong {
    font-size: 0.78rem;
    line-height: 1.15;
}

.prism-home-body .home-feature small,
.prism-home-body .home-feature span:not(.feature-glow):not(.feature-avatars):not(.mini-avatar) {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.7rem;
    line-height: 1.2;
}

.feature-avatars {
    display: flex;
    justify-content: center;
    min-height: 18px;
}

.feature-avatars i,
.mini-avatar {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    margin-left: -4px;
    border-radius: 50%;
    border: 1px solid #070713;
    background: var(--rainbow);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 900;
    overflow: hidden;
}

.feature-avatars i:first-child,
.mini-avatar:first-child {
    margin-left: 0;
}

.prism-home-body .protected-dot::before {
    width: 8px;
    height: 8px;
    margin-right: 4px;
}

.prism-home-body .today-section {
    gap: 12px;
}

.prism-home-body .today-section h2 {
    color: #fff;
    font-size: 1rem;
}

.prism-home-body .today-section h2 .ui-icon {
    width: 18px;
    height: 18px;
    color: #8f42ff;
}

.prism-home-body .today-section a {
    color: #b041ff;
    font-size: 0.86rem;
}

.prism-home-body .today-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.prism-home-body .today-card {
    min-height: 132px;
    padding: 10px;
    border-radius: 16px;
    box-shadow: inset 0 -70px 54px rgba(0, 0, 0, 0.6);
}

.prism-home-body .today-card span {
    padding: 4px 7px;
    font-size: 0.62rem;
}

.prism-home-body .today-card strong {
    font-size: 0.78rem;
    line-height: 1.22;
}

.prism-home-body .today-card small {
    font-size: 0.68rem;
}

.prism-home-body .home-post-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(9, 6, 18, 0.96), rgba(7, 6, 15, 0.86)),
        radial-gradient(circle at 95% 8%, rgba(251, 61, 135, 0.28), transparent 32%);
}

.prism-home-body .home-post-card header {
    margin-bottom: 12px;
}

.prism-home-body .home-post-card .avatar-ring {
    width: 44px;
    height: 44px;
}

.prism-home-body .home-post-card header strong {
    color: #fff;
}

.prism-home-body .home-post-card header span,
.prism-home-body .home-post-card p {
    color: rgba(255, 255, 255, 0.78);
}

.post-menu {
    margin-left: auto;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-size: 1.2rem;
    font-weight: 900;
}

.prism-home-body .home-post-visual {
    min-height: 176px;
    border-radius: 20px;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.04)),
        linear-gradient(140deg, #190b18 0%, #ff7b48 31%, #6438ff 68%, #07101f 100%);
}

.home-empty-line,
.home-empty-post {
    padding: 18px;
    color: rgba(255, 255, 255, 0.72);
}

.home-empty-post h2 {
    margin: 0 0 8px;
    color: #fff;
}

.home-empty-post .rainbow-button {
    width: max-content;
}

.prism-home-body .home-floating-create {
    right: max(18px, calc((100vw - 430px) / 2 + 18px));
    bottom: 112px;
    width: 62px;
    height: 62px;
    z-index: 34;
    background: linear-gradient(135deg, #ff7b48, #b735ed 58%, #6438ff);
    box-shadow: 0 18px 44px rgba(183, 53, 237, 0.5);
}

.prism-home-body .mobile-bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 14px;
    z-index: 33;
    width: min(404px, calc(100% - 24px));
    min-height: 86px;
    padding: 9px 12px 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 2px;
    transform: translateX(-50%);
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(17, 14, 28, 0.86), rgba(5, 4, 12, 0.9)),
        radial-gradient(circle at 9% 45%, rgba(121, 55, 255, 0.2), transparent 24%),
        radial-gradient(circle at 50% 18%, rgba(255, 123, 72, 0.14), transparent 22%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 -18px 48px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.prism-home-body .mobile-bottom-nav a {
    position: relative;
    min-height: 66px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    font-weight: 720;
    line-height: 1;
    background: transparent;
    box-shadow: none;
}

.prism-home-body .mobile-bottom-nav .ui-icon {
    position: relative;
    z-index: 1;
    width: 25px;
    height: 25px;
}

.prism-home-body .mobile-bottom-nav a span {
    position: relative;
    z-index: 1;
}

.prism-home-body .mobile-bottom-nav a.is-active {
    color: #a754ff;
    background: transparent;
    box-shadow: none;
}

.prism-home-body .mobile-bottom-nav a.is-active::before {
    content: "";
    position: absolute;
    top: 6px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 55, 255, 0.62), rgba(121, 55, 255, 0.18) 48%, transparent 72%);
    filter: blur(1px);
}

.prism-home-body .mobile-bottom-nav a.is-active .ui-icon {
    color: #b56cff;
    filter: drop-shadow(0 0 12px rgba(121, 55, 255, 0.9));
}

.prism-home-body .mobile-bottom-nav .nav-add {
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.prism-home-body .mobile-bottom-nav .nav-add .ui-icon {
    width: 52px;
    height: 52px;
    padding: 14px;
    border-radius: 50%;
    color: #fff;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.44), transparent 24%),
        linear-gradient(135deg, rgba(255, 123, 72, 0.92), rgba(183, 53, 237, 0.86) 58%, rgba(100, 56, 255, 0.9));
    box-shadow: 0 14px 32px rgba(121, 55, 255, 0.44);
}

.prism-home-body .mobile-bottom-nav .nav-add span {
    margin-top: -2px;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 18px;
    z-index: 2;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #7937ff;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
}

.discover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.discover-card.is-selected {
    border-color: rgba(121, 55, 255, 0.62);
    box-shadow: 0 0 0 4px rgba(121, 55, 255, 0.14), var(--shadow-soft);
}

.discover-card .rainbow-button {
    width: max-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Create fan and live post composer */
.home-create-fab {
    position: fixed;
    right: max(18px, calc((100vw - 430px) / 2 + 18px));
    bottom: 112px;
    z-index: 42;
}

.home-create-fab .home-floating-create {
    position: static;
    border: 0;
}

.create-fan-menu {
    position: absolute;
    right: 0;
    bottom: 74px;
    display: grid;
    gap: 10px;
    transform-origin: bottom right;
    animation: createFanIn 220ms ease both;
}

.create-fan-menu[hidden] {
    display: none;
}

.create-fan-menu a,
.create-fan-menu button {
    min-width: 190px;
    min-height: 52px;
    padding: 8px 15px 8px 10px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 19px;
    color: #fff;
    background: rgba(10, 8, 21, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    font-weight: 850;
    text-align: left;
}

.create-fan-menu .ui-icon {
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 14px;
    color: #b65cff;
    background: rgba(121, 55, 255, 0.18);
}

.home-create-fab.is-open .home-floating-create .ui-icon {
    transform: rotate(45deg);
}

@keyframes createFanIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.post-composer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(2, 3, 10, 0.78);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

body.composer-open {
    overflow: hidden;
}

.post-composer-backdrop[hidden] {
    display: none;
}

.post-composer {
    width: min(520px, 100%);
    max-height: min(880px, calc(100vh - 24px));
    overflow: auto;
    padding: 18px;
    border-radius: 28px;
    color: #fff;
    background: rgba(8, 7, 18, 0.96);
}

.post-composer > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.post-composer > header span {
    color: #b65cff;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.post-composer h2 {
    margin: 2px 0 0;
}

.post-composer > header button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.post-composer > header button .ui-icon {
    transform: rotate(45deg);
}

.post-composer form {
    display: grid;
    gap: 14px;
}

.composer-media-stage {
    position: relative;
    min-height: 300px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(121, 55, 255, 0.2), transparent 48%),
        rgba(255, 255, 255, 0.04);
}

.composer-media-stage input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.composer-media-stage label {
    display: grid;
    justify-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 850;
}

.composer-media-stage label .ui-icon {
    width: 54px;
    height: 54px;
    padding: 13px;
    border-radius: 18px;
    color: #b65cff;
    background: rgba(121, 55, 255, 0.18);
}

.composer-media-stage img,
.composer-media-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #05050d;
}

.filter-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.filter-strip button {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    min-height: 36px;
    padding: 0 13px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 820;
}

.filter-strip button.is-active {
    color: #fff;
    background: var(--rainbow);
}

.mention-suggestions,
.music-results {
    display: grid;
    gap: 8px;
}

.mention-suggestions[hidden] {
    display: none;
}

.mention-suggestions button,
.music-results button {
    min-height: 42px;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    text-align: left;
}

.mention-suggestions button::before {
    content: "@";
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--rainbow);
    font-weight: 900;
}

.composer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.music-results img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
}

.music-results strong,
.music-results small {
    display: block;
}

.music-results small {
    color: rgba(255, 255, 255, 0.62);
}

.post-options {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.post-options label:not(.field) {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 760;
}

.post-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7937ff;
}

.post-music-pill,
.post-location-pill {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 8px 10px 0;
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.post-music-pill .ui-icon,
.post-location-pill .ui-icon {
    width: 16px;
    height: 16px;
    color: #b65cff;
}

.post-action-menu {
    position: absolute;
    top: 58px;
    right: 16px;
    z-index: 4;
    width: 176px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(8, 7, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.post-action-menu[hidden] {
    display: none;
}

.post-action-menu button {
    border: 0;
    min-height: 36px;
    border-radius: 12px;
    padding: 0 10px;
    color: #fff;
    background: transparent;
    text-align: left;
    font-weight: 760;
}

.post-action-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-live-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-live-actions button {
    border: 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.07);
    font-weight: 830;
}

.post-live-actions button.is-active {
    color: #ff69a7;
}

.post-live-actions .ui-icon {
    width: 17px;
    height: 17px;
}

.post-live-actions small {
    color: rgba(255, 255, 255, 0.58);
}

.post-comments {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.post-comment {
    display: grid;
    gap: 3px;
    padding: 9px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.post-comment strong {
    color: #fff;
    font-size: 0.82rem;
}

.post-comment span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.post-comment img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 12px;
}

.post-comment-form {
    display: grid;
    grid-template-columns: 1fr 0.75fr 42px;
    gap: 8px;
    margin-top: 12px;
}

.post-comment-form input {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    outline: 0;
}

.post-comment-form button {
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--rainbow);
}

@media (max-width: 430px) {
    .post-composer-backdrop {
        padding: 0;
        place-items: end center;
    }

    .post-composer {
        width: 100%;
        max-height: 94vh;
        border-radius: 28px 28px 0 0;
    }

    .composer-grid,
    .post-comment-form {
        grid-template-columns: 1fr;
    }
}

/* Instagram-style post creation flow */
.ig-post-flow {
    place-items: stretch;
    padding: 0;
    background: #0f1217;
}

.ig-composer {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    margin: 0 auto;
    color: #fff;
    background: #0f1217;
    overflow: hidden;
}

.ig-composer form,
.ig-flow-step {
    height: 100%;
}

.ig-flow-step {
    display: none;
}

.ig-flow-step.is-active {
    display: grid;
}

.ig-dark-header,
.ig-light-header {
    height: 74px;
    display: grid;
    grid-template-columns: 64px 1fr 86px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ig-dark-header {
    color: #fff;
    background: #0f1217;
}

.ig-light-header {
    color: #05070d;
    background: #fff;
    border-bottom-color: #e7e9ee;
}

.ig-dark-header h2,
.ig-light-header h2 {
    margin: 0;
    text-align: center;
    font-size: 1.08rem;
    font-weight: 900;
}

.ig-dark-header button,
.ig-light-header button {
    border: 0;
    color: inherit;
    background: transparent;
    font-weight: 900;
}

.ig-x {
    position: relative;
    width: 48px;
    height: 48px;
}

.ig-x::before,
.ig-x::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 23px;
    width: 30px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.ig-x::before {
    transform: rotate(45deg);
}

.ig-x::after {
    transform: rotate(-45deg);
}

.ig-next {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #5a73ff !important;
    font-size: 1rem;
}

.ig-next:disabled {
    opacity: 0.42;
}

.ig-select-step {
    grid-template-rows: 74px minmax(280px, 48vh) 64px 1fr 72px;
}

.ig-media-preview {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #080a0f;
}

.ig-media-preview img,
.ig-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ig-pick-media {
    display: grid;
    justify-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 850;
}

.ig-pick-media .ui-icon {
    width: 54px;
    height: 54px;
}

.ig-expand {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(34, 37, 44, 0.88);
}

.ig-expand .ui-icon {
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
}

.ig-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    background: #0f1217;
}

.ig-gallery-head button,
.ig-gallery-head label {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 900;
}

.ig-gallery-head label {
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.1);
}

.ig-gallery-head .ui-icon {
    width: 20px;
    height: 20px;
}

.ig-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: start;
    gap: 2px;
    overflow: auto;
    background: #05070d;
}

.ig-gallery-tile {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(121, 55, 255, 0.2), rgba(16, 18, 24, 0.95)),
        #151922;
    background-size: cover;
    background-position: center;
}

.ig-gallery-tile.is-selected {
    outline: 3px solid #5a73ff;
    outline-offset: -3px;
}

.ig-gallery-tile .ui-icon {
    width: 26px;
    height: 26px;
    color: rgba(255, 255, 255, 0.5);
}

.ig-mode-tabs {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: end;
    gap: 24px;
    overflow-x: auto;
    padding: 14px 22px;
    background: rgba(70, 70, 76, 0.92);
    border-radius: 999px 0 0 999px;
    margin: 0 0 12px auto;
    max-width: 90%;
}

.ig-mode-tabs button {
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    font-size: 1.04rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.ig-mode-tabs button.is-active {
    color: #fff;
}

.ig-edit-step {
    grid-template-rows: 86px minmax(300px, 1fr) 118px;
    background: #0f1217;
}

.ig-edit-header {
    grid-template-columns: 58px 1fr 92px;
    border-bottom: 0;
}

.ig-music-chip {
    min-height: 54px;
    max-width: 260px;
    justify-self: center;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 8px;
    border-radius: 999px !important;
    padding: 5px 8px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.ig-music-chip::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--rainbow);
}

.ig-music-chip span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}

.ig-music-chip .ui-icon {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.ig-editor-stage {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #05070d;
}

.ig-editor-stage img,
.ig-editor-stage video,
.ig-share-preview img,
.ig-share-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ig-tap-text {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    border: 0;
    color: #fff;
    background: transparent;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.ig-text-overlay {
    position: absolute;
    left: 50%;
    top: 36%;
    transform: translate(-50%, -50%);
    z-index: 2;
    max-width: 82%;
    color: #fff;
    text-align: center;
    font-size: 2.1rem;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.ig-text-overlay.classic {
    font-family: Georgia, serif;
}

.ig-text-overlay.signature {
    font-family: "Brush Script MT", cursive;
    font-weight: 500;
}

.ig-tool-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    padding: 16px;
}

.ig-tool-row button {
    min-height: 76px;
    display: grid;
    place-items: center;
    gap: 6px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    font-weight: 800;
}

.ig-tool-row .ui-icon {
    width: 25px;
    height: 25px;
}

.ig-bottom-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 7;
    width: min(480px, 100%);
    max-height: 76vh;
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 16px;
    transform: translateX(-50%);
    border-radius: 28px 28px 0 0;
    color: #fff;
    background: #1b1f26;
    box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.52);
}

.ig-bottom-sheet[hidden] {
    display: none;
}

.ig-bottom-sheet > i {
    width: 42px;
    height: 4px;
    justify-self: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.ig-search {
    min-height: 54px;
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 14px;
    background: #30333b;
}

.ig-search input,
.ig-text-panel input {
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font-size: 1.1rem;
}

.ig-sound-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.ig-sound-tabs button {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    white-space: nowrap;
    color: #fff;
    background: #292d34;
    font-weight: 850;
}

.ig-sound-tabs button.is-active {
    color: #12151b;
    background: #fff;
}

.ig-music-list {
    gap: 4px;
}

.ig-music-list button {
    min-height: 62px;
    grid-template-columns: 54px minmax(0, 1fr) 28px;
    border: 0;
    background: transparent;
}

.ig-music-list .ig-note,
.ig-music-list img {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.52);
    background: #2b2f37;
}

.ig-music-list button > i {
    width: 20px;
    height: 28px;
    border: 3px solid #fff;
    border-top: 0;
    border-radius: 0 0 3px 3px;
}

.ig-youtube-preview {
    overflow: hidden;
    border-radius: 18px;
    background: #05070d;
    aspect-ratio: 16 / 9;
}

.ig-youtube-preview[hidden] {
    display: none;
}

.ig-youtube-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.ig-text-panel {
    max-height: none;
}

.ig-text-panel input {
    min-height: 56px;
    padding: 0 16px;
    border-radius: 16px;
    background: #292d34;
}

.ig-text-styles,
.ig-filter-strip,
.ig-adjust-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 14px;
    overflow-x: auto;
}

.ig-text-styles button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 12px 18px;
    color: #fff;
    background: transparent;
    font-size: 1rem;
    font-weight: 900;
}

.ig-text-styles button.is-active {
    color: #111;
    background: #fff;
}

.ig-done {
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: #4d63ff;
    font-weight: 900;
}

.ig-filter-strip button {
    width: 112px;
    height: 138px;
    display: grid;
    align-items: end;
    justify-items: center;
    border: 0;
    border-radius: 16px;
    padding: 10px;
    color: #fff;
    background:
        linear-gradient(180deg, transparent 0 54%, rgba(0, 0, 0, 0.62)),
        var(--rainbow);
    font-weight: 850;
}

.ig-filter-strip button.is-active {
    outline: 2px solid #fff;
}

.ig-adjust-strip label {
    width: 136px;
    display: grid;
    gap: 10px;
    justify-items: center;
    color: #fff;
    font-weight: 850;
}

.ig-adjust-strip input {
    width: 126px;
    accent-color: #fff;
}

.ig-bottom-sheet footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ig-bottom-sheet footer button {
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 1rem;
    font-weight: 800;
}

.ig-bottom-sheet footer strong {
    text-align: center;
}

.ig-share-step {
    grid-template-rows: 74px minmax(0, 1fr) auto auto;
    color: #05070d;
    background: #fff;
}

.ig-share-content {
    overflow: auto;
    padding: 22px 16px 110px;
}

.ig-share-preview {
    position: relative;
    width: 190px;
    aspect-ratio: 1;
    margin: 0 auto 26px;
    overflow: hidden;
    border-radius: 12px;
    background: #0f1217;
}

.ig-share-preview .ig-text-overlay {
    font-size: 1.1rem;
}

.ig-share-content textarea {
    width: 100%;
    min-height: 114px;
    border: 0;
    outline: 0;
    resize: vertical;
    color: #10131a;
    background: #fff;
    font-size: 1.05rem;
}

.ig-mini-actions {
    display: flex;
    gap: 10px;
    margin: 12px 0 24px;
}

.ig-mini-actions button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    color: #111;
    background: #f1f3f6;
    font-weight: 850;
}

.ig-mini-actions .ui-icon {
    width: 20px;
    height: 20px;
}

.ig-share-row,
.ig-switch-row {
    width: 100%;
    min-height: 62px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 0;
    border-top: 1px solid #edf0f3;
    padding: 10px 0;
    color: #111;
    background: #fff;
    text-align: left;
    font-size: 1.04rem;
}

.ig-share-row > .ui-icon,
.ig-switch-row > .ui-icon {
    width: 28px;
    height: 28px;
}

.ig-share-row small,
.ig-switch-row small {
    display: block;
    color: #757b86;
    font-size: 0.82rem;
    line-height: 1.25;
}

.ig-share-row select,
.ig-location-input {
    border: 0;
    color: #757b86;
    background: transparent;
    font: inherit;
    text-align: right;
}

.ig-location-input {
    width: 100%;
    min-height: 42px;
    padding: 0 2px;
    text-align: left;
    outline: 0;
}

.ig-location-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 12px;
}

.ig-location-chips button {
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    white-space: nowrap;
    color: #10131a;
    background: #f1f3f6;
}

.ig-switch-row input,
.ig-more-options input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ig-switch-row i,
.ig-more-options i {
    width: 62px;
    height: 34px;
    border-radius: 999px;
    background: #6e7580;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.ig-switch-row i::before,
.ig-more-options i::before {
    content: "";
    width: 28px;
    height: 28px;
    display: block;
    margin: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform 180ms ease;
}

.ig-switch-row input:checked + i,
.ig-more-options input:checked + i {
    background: #4d63ff;
}

.ig-switch-row input:checked + i::before,
.ig-more-options input:checked + i::before {
    transform: translateX(28px);
}

.ig-more-options {
    display: grid;
    gap: 2px;
    padding: 10px 0 20px;
    border-top: 8px solid #f4f6f8;
}

.ig-more-options[hidden] {
    display: none;
}

.ig-more-options label {
    min-height: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: #111;
    font-size: 1rem;
}

.ig-share-submit {
    position: sticky;
    bottom: 0;
    width: calc(100% - 32px);
    min-height: 58px;
    margin: 0 16px 16px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: #405cff;
    font-size: 1.05rem;
    font-weight: 900;
}

.ig-share-step .form-message {
    min-height: 22px;
    margin-bottom: 8px;
}

.post-media-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.post-media-frame .post-media {
    margin: 0;
}

.post-media-overlay {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    max-width: 82%;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.post-media-overlay.classic {
    font-family: Georgia, serif;
}

.post-media-overlay.signature {
    font-family: "Brush Script MT", cursive;
    font-weight: 500;
}

/* Post composer repair: Prism carousel flow */
body.composer-open {
    overflow: hidden;
}

.ig-composer {
    position: relative;
}

.ig-mode-tabs button {
    letter-spacing: 0;
}

.ig-media-preview {
    min-height: 0;
}

.ig-preview-carousel,
.ig-editor-carousel,
.ig-share-carousel {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.ig-preview-carousel::-webkit-scrollbar,
.ig-editor-carousel::-webkit-scrollbar,
.ig-share-carousel::-webkit-scrollbar {
    display: none;
}

.ig-carousel-track {
    height: 100%;
    display: flex;
}

.ig-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    scroll-snap-align: center;
    background: #05070d;
}

.ig-carousel-slide img,
.ig-carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ig-carousel-slide small,
.ig-carousel-count {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 4;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 0.78rem;
    font-weight: 850;
}

.ig-carousel-count.edit {
    top: auto;
    bottom: 12px;
}

.ig-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(20, 23, 30, 0.72);
    transform: translateY(-50%);
}

.ig-carousel-nav.prev {
    left: 12px;
}

.ig-carousel-nav.next {
    right: 12px;
}

.ig-post-flow.has-media .ig-carousel-nav {
    display: grid;
}

.ig-pick-media {
    position: absolute;
    inset: 0;
    z-index: 2;
    align-content: center;
}

.ig-post-flow.has-media .ig-pick-media {
    display: none;
}

.ig-expand {
    z-index: 6;
}

.ig-expand .ui-icon {
    transform: rotate(45deg);
}

.ig-gallery-grid {
    min-height: 0;
}

.ig-gallery-tile {
    position: relative;
    border: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.68);
}

.ig-gallery-tile img,
.ig-gallery-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-gallery-tile b {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ff7a5c, #23d5f0, #9b31ff);
    font-size: 0.75rem;
}

.ig-gallery-tile.is-empty span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
}

.ig-tool-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: #101319;
    scrollbar-width: none;
}

.ig-tool-row::-webkit-scrollbar {
    display: none;
}

.ig-tool-row button {
    flex: 0 0 86px;
    min-height: 84px;
    padding: 9px 6px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.05;
}

.ig-tool-row b {
    font-size: 1.4rem;
}

.ig-text-overlay {
    left: 50%;
    top: 38%;
    touch-action: none;
    cursor: grab;
    user-select: none;
}

.ig-text-overlay:active {
    cursor: grabbing;
}

.ig-panel-hint {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.ig-tag-list,
.ig-location-results {
    display: grid;
    gap: 4px;
}

.ig-tag-list button,
.ig-location-results button {
    min-height: 62px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 16px;
    padding: 8px;
    color: #fff;
    background: transparent;
    text-align: left;
}

.ig-tag-list button.is-selected {
    background: rgba(137, 69, 255, 0.24);
}

.ig-tag-list img,
.ig-tag-list button > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    object-fit: cover;
    color: #fff;
    background: var(--rainbow);
    font-weight: 900;
}

.ig-location-results button {
    grid-template-columns: minmax(0, 1fr);
    color: #12151b;
    background: #fff;
}

.ig-location-results small {
    color: #707680;
}

.ig-location-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ig-location-panel header button {
    border: 0;
    color: #8b5cf6;
    background: transparent;
    font-weight: 850;
}

.ig-share-row,
.ig-switch-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(0, auto) 30px;
    font-size: 1rem;
}

.ig-share-row select {
    max-width: 118px;
    border: 0;
    color: #737985;
    background: transparent;
    font: inherit;
    text-align: right;
}

.ig-share-row small {
    max-width: 130px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: right;
}

.ig-switch-row i,
.ig-more-options i {
    background: #8a92a0;
}

.ig-switch-row input:checked + i,
.ig-more-options input:checked + i {
    background: linear-gradient(90deg, #ff745c, #ffd23f, #59dd75, #23c8f2, #8d35ff);
}

.ig-more-options label.is-locked {
    opacity: 0.56;
}

.ig-more-options input:disabled + i {
    opacity: 0.55;
}

.ig-share-preview {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.ig-share-preview .ig-share-carousel {
    border-radius: inherit;
}

.ig-publish-state {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 7, 13, 0.72);
    backdrop-filter: blur(14px);
}

.ig-publish-state[hidden] {
    display: none;
}

.ig-publish-state div {
    width: min(300px, 90%);
    display: grid;
    justify-items: center;
    gap: 10px;
    border-radius: 24px;
    padding: 28px 22px;
    color: #fff;
    background: rgba(22, 25, 34, 0.96);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.ig-publish-state span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.16);
    border-top-color: #8d35ff;
    animation: prismSpin 800ms linear infinite;
}

@keyframes prismSpin {
    to {
        transform: rotate(360deg);
    }
}

.post-media-carousel {
    background: #05070d;
}

.post-media-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.post-media-track::-webkit-scrollbar {
    display: none;
}

.post-media-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: center;
}

.post-media-slide .post-media {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.post-media-dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.post-media-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.48);
}

.post-media-dots i.is-active {
    background: #fff;
}

@media (max-width: 380px) {
    .prism-home-body .app-main {
        padding-inline: 10px;
    }

    .prism-home-body .home-feature {
        padding-inline: 5px;
    }

    .prism-home-body .home-feature strong {
        font-size: 0.72rem;
    }

    .prism-home-body .home-hero {
        padding: 16px;
    }
}
