* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    color: #f4efe9;
    background: #000;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

.app-shell {
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #000;
}

.content {
    position: relative;
    width: 100vw;
    min-height: 100dvh;
    background: #000;
    overflow-x: hidden;
    overflow-y: visible;
}

.viewport-frame {
    position: relative;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #000;
    overflow: hidden;
}

@media (max-width: 768px) {
    .viewport-frame {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        overflow: hidden;
    }
}

/* ---------------------------------------------------------------- */
/* Top status icon + instruction stack, transparent and screen-safe   */
/* ---------------------------------------------------------------- */

.app-topbar {
    position: absolute;
    top: 66px;
    left: 0;
    z-index: 30;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    pointer-events: none;
    background: transparent;
}

.app-topbar a,
.app-topbar span,
.app-topbar button {
    pointer-events: auto;
}

.profile-trigger {
    position: absolute;
    left: calc((100vw - min(420px, 42vw)) / 2 + 10px);
    top: 0;
    width: 40px;
    height: 34px;
    border: 1px solid rgba(255, 177, 104, 0.45);
    border-radius: 10px;
    background: rgba(20, 17, 15, 0.78);
    color: #ffb14d;
    cursor: pointer;
}

.ui-toggle-trigger {
    position: absolute;
    left: calc((100vw - min(420px, 42vw)) / 2 + 10px);
    top: 42px;
    width: 40px;
    height: 34px;
    border: 1px solid rgba(255, 177, 104, 0.45);
    border-radius: 10px;
    background: rgba(20, 17, 15, 0.78);
    color: #ffb14d;
    cursor: pointer;
}

.viewport-frame.ui-items-hidden .status-pill,
.viewport-frame.ui-items-hidden .profile-trigger,
.viewport-frame.ui-items-hidden .category-dock,
.viewport-frame.ui-items-hidden .reel-caption-overlay,
.viewport-frame.ui-items-hidden .reel-controls,
.viewport-frame.ui-items-hidden .reel-nav-btn,
.viewport-frame.ui-items-hidden .lock-badge,
.viewport-frame.ui-items-hidden .reel-center-icon,
.viewport-frame.ui-items-hidden .premium-lock-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.top-left-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 106px;
}

.brand-mark {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb168;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
}

.brand-mark-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #f4efe9;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(255, 177, 104, 0.5) inset;
}

.status-pill {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(220px, 32vw);
    min-width: 180px;
    max-width: 220px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(16, 14, 12, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
    backdrop-filter: blur(6px);
    text-align: center;
}

.status-instruction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4px 8px;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: transparent;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.status-text {
    font-size: 10.5px;
    font-weight: 600;
    color: #f4efe9;
    white-space: nowrap;
}

.status-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: #ffb168;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}

.status-link-login,
.status-link-subscribe {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
    border-radius: 9px;
    padding: 6px 10px;
    background: rgba(255, 177, 104, 0.2);
    border: 1px solid rgba(255, 177, 104, 0.45);
    width: auto;
    min-width: 120px;
}

.lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lock-text {
    font-size: 11px;
}

@media (max-width: 768px) {
    .profile-trigger {
        left: 12px;
        top: 6px;
    }

    .ui-toggle-trigger {
        left: 12px;
        top: 48px;
    }

    .app-topbar {
        position: absolute;
        top: 46px;
        left: 0;
        right: auto;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        background: transparent;
        backdrop-filter: blur(2px);
        pointer-events: auto;
    }

    .top-left-stack {
        flex-direction: column;
        align-items: center;
        min-width: 80px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .status-pill {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        flex-wrap: wrap;
        gap: 7px;
        padding: 8px 10px;
        background: rgba(16, 14, 12, 0.54);
        border-radius: 14px;
        width: auto;
        max-width: min(92vw, 420px);
    }

    .status-instruction {
        white-space: normal;
        font-size: 11px;
        line-height: 1.2;
        padding: 4px 8px;
    }

    .status-text {
        font-size: 11px;
    }

    .status-link {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 9px;
    }

    .lock-text {
        font-size: 11px;
    }
}

/* ---------------------------------------------------------------- */
/* Category dock — collapsed to one icon-only control, expands to a   */
/* clean category list without an overlapping scrollbar.               */
/* ---------------------------------------------------------------- */

.category-dock {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    z-index: 35;
    width: 60px;
    max-height: 76px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-radius: 22px;
    background: rgba(20, 17, 15, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s, border-radius 0.32s;
    cursor: pointer;
    scrollbar-width: none;
}

.category-dock.expanded {
    width: 154px;
    max-height: min(62vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch;
    padding: 8px;
    border-radius: 18px;
    cursor: default;
    scroll-snap-type: y proximity;
}

.category-dock.expanded::-webkit-scrollbar {
    width: 5px;
}

.category-dock.expanded::-webkit-scrollbar-track {
    background: transparent;
}

.category-dock.expanded::-webkit-scrollbar-thumb {
    background: rgba(255, 177, 104, 0.5);
    border-radius: 999px;
}

.dock-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 16px;
    text-decoration: none;
    color: #f4efe9;
    min-width: 52px;
}

.category-dock:not(.expanded) .dock-label {
    display: none;
}

.category-dock:not(.expanded) .dock-item:not(:first-child) {
    display: none;
}

.category-dock:not(.expanded) .dock-item:first-child .dock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.category-dock:not(.expanded) .dock-item:first-child {
    width: 52px;
    align-self: center;
}

.category-dock.expanded .dock-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 9px;
    padding: 8px 6px;
}

.category-dock.expanded .dock-icon {
    width: 34px;
    height: 34px;
    font-size: 11px;
}

.category-dock.expanded .dock-label {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #f4efe9;
}

.dock-label {
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-item.active .dock-icon {
    border-color: #ffb14d;
    background: rgba(255, 177, 77, 0.18);
    color: #ffb14d;
}

.dock-item.active .dock-icon::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3ddc84;
    border: 2px solid rgba(20, 17, 15, 0.9);
}

.category-dock.expanded .dock-item.active {
    background: rgba(255, 177, 104, 0.16);
}

.category-dock.expanded .dock-item.active .dock-icon {
    box-shadow: 0 0 0 1px rgba(255, 177, 104, 0.45);
}

/* ---------------------------------------------------------------- */
/* Reel feed                                                         */
/* ---------------------------------------------------------------- */

.reels-feed {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-snap-stop: always;
    scroll-behavior: smooth;
    scroll-padding: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    background: transparent;
    scrollbar-width: none;
}

.reels-feed::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.reel-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
}

.reel-card {
    position: relative;
    width: min(420px, 42vw);
    height: min(760px, calc(100vh - 120px));
    min-height: 560px;
    margin: 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    scroll-margin: 0;
}

.reel-video-frame {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.reel-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at center, #241f1c, #000);
}

.reel-buffer-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    z-index: 8;
    animation: reel-spin 0.8s linear infinite;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@keyframes reel-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reel-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(16, 14, 12, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 6;
}

.reel-center-icon.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.lock-badge {
    position: absolute;
    left: 14px;
    top: 66px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(16, 14, 12, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #ffb168;
    text-decoration: none;
}

.reel-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(to top, rgba(6, 5, 4, 0.88), rgba(6, 5, 4, 0.38) 76%, transparent);
}

.reel-caption-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 58px;
    z-index: 5;
    padding: 14px 16px 16px;
    background: transparent;
}

.reel-details-wrap {
    position: relative;
    z-index: 2;
}

.reel-description {
    color: #d9d2c9;
    font-size: 13.5px;
    line-height: 1.45;
    margin: 0;
    max-height: 3.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    cursor: pointer;
}

.reel-description.expanded {
    max-height: none;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: initial;
}

.category-label {
    display: inline-block;
    color: #ffb14d;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 177, 77, 0.4);
    margin-bottom: 8px;
}

.reel-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
}

.reel-description {
    color: #d9d2c9;
    font-size: 13.5px;
    line-height: 1.45;
    margin: 0;
}

.empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.reel-controls {
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    pointer-events: auto;
    background: transparent;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    backdrop-filter: blur(2px);
}

.audio-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(16, 14, 12, 0.74);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.audio-toggle.is-muted {
    background: rgba(40, 40, 40, 0.82);
    border-color: rgba(255, 177, 104, 0.4);
    color: #ffd8b8;
}

.audio-toggle.is-unmuted {
    background: rgba(26, 26, 26, 0.74);
    color: #fff;
}

.seek-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: transparent;
    border: none;
}

.seekbar {
    flex: 1;
    accent-color: #ffb14d;
    height: 2px;
    opacity: 0.9;
}

.duration-readout {
    min-width: 42px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

/* Desktop up/down nav, positioned on the far right of the viewport */
.reel-nav-btn {
    display: none;
    position: absolute;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 177, 104, 0.08);
    border: 1px solid rgba(255, 177, 104, 0.45);
    color: #ffb14d;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
}

.reel-nav-btn:disabled {
    opacity: 0.28;
    cursor: default;
    pointer-events: none;
}

.reel-nav-prev {
    bottom: calc(50% + 26px);
}

.reel-nav-next {
    top: calc(50% + 26px);
}

@media (min-width: 769px) {
    .viewport-frame {
        position: relative;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #000;
        overflow: hidden;
    }

    .category-dock {
        left: calc((100vw - min(420px, 42vw)) / 2 + 8px);
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        min-width: 60px;
        z-index: 55;
    }

    .reels-feed {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        scroll-snap-type: y mandatory;
        scroll-snap-stop: always;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
        padding: 0;
    }

    .reels-feed::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .reel-list {
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 40px;
        padding: 40px 0;
    }

    .reel-card {
        width: min(420px, 42vw);
        height: calc(100dvh - 80px);
        min-height: 560px;
        max-height: calc(100dvh - 80px);
        margin: 0 auto;
        border-radius: 16px;
        overflow: hidden;
        border: none;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
        background: #000;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .reel-video-frame {
        inset: 0;
        border-radius: 16px;
    }

    .reel-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .reel-caption-overlay {
        padding: 14px 16px 18px;
        bottom: 58px;
        background: transparent;
    }

    .reel-controls {
        position: absolute;
        right: 12px;
        bottom: 10px;
        left: 12px;
        z-index: 8;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 38px;
        pointer-events: auto;
        background: transparent;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        padding: 4px 8px;
        backdrop-filter: blur(2px);
    }

    .reel-nav-btn {
        display: flex;
        right: 14px;
    }

    .reel-nav-prev {
        bottom: calc(50% + 26px);
    }

    .reel-nav-next {
        top: calc(50% + 26px);
    }

    .status-link-login {
        display: inline-flex;
    }
}

@media (max-width: 768px) {
    .viewport-frame {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        max-height: none;
        overflow: hidden;
        background: #000;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .auth-modal-window {
        width: min(100vw - 18px, 380px);
        max-width: calc(100vw - 18px);
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-login-form,
    .auth-signup-form {
        width: min(100%, 300px);
        max-width: 100%;
        margin: 0 auto;
    }

    .auth-field,
    .password-field-wrap,
    .auth-phone-row,
    .auth-field input,
    .auth-field select,
    .password-field-wrap input {
        box-sizing: border-box;
        max-width: 100%;
    }

    .reels-feed {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        background: #000;
        scroll-snap-type: y mandatory;
        scroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
    }

    .reel-list {
        width: 100vw;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .reel-card {
        position: relative;
        width: 100vw;
        min-height: 100dvh;
        height: 100dvh;
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
        border: none;
        overflow: hidden;
        box-shadow: none;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .reel-video-frame {
        position: absolute;
        inset: 0;
        border-radius: 0;
    }

    .reel-video {
        position: absolute;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        object-fit: cover;
    }
}

.auth-panel,
.billing-page,
.subscription-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 177, 104, 0.08), transparent 24%),
        linear-gradient(180deg, #090807 0%, #11100e 100%);
}

.auth-card,
.billing-card {
    width: min(420px, calc(100vw - 32px));
    background: rgba(20, 17, 15, 0.84);
    border: 1px solid rgba(255, 177, 104, 0.22);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.auth-card h1,
.billing-card h1,
.page-heading h1 {
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    margin: 0 0 16px;
}

.auth-card,
.billing-card,
.plan-card {
    color: #f4efe9;
}

.auth-card form,
.billing-card .plan-summary {
    color: #f4efe9;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-card input,
.auth-card select {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: #f4efe9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    padding: 10px 12px;
    margin: 8px 0 12px;
}

.auth-card input:focus,
.auth-card select:focus {
    outline: none;
    border-color: #ffb14d;
    box-shadow: 0 0 0 2px rgba(255, 177, 104, 0.16);
}

.auth-card p,
.billing-card p,
.billing-card .billing-plan-row {
    margin: 0 0 14px;
}

.auth-card form .helptext,
.auth-card form label {
    color: #d9d2c9;
    font-size: 12px;
}

.auth-card form p {
    margin: 0 0 12px;
}

.auth-card form p label {
    display: block;
    color: #ffb14d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.auth-card form p input,
.auth-card form p select {
    margin: 0;
}

.auth-card .auth-note,
.billing-empty {
    color: #d9d2c9;
    font-size: 13px;
}

.auth-card .auth-note {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 16px;
    padding-top: 14px;
}

.auth-card-head,
.billing-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-card-head {
    flex-direction: column;
    align-items: center;
}

.auth-card-head h1,
.billing-heading h1 {
    text-align: center;
}

.auth-subtitle,
.overline-label {
    margin: 0 0 8px;
    color: #d9d2c9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.brand-mark-small {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 177, 104, 0.08);
    border: 1px solid rgba(255, 177, 104, 0.46);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffb168;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 0 0 22px rgba(255, 177, 104, 0.1);
}

.auth-button,
.billing-button {
    width: 100%;
}

.auth-footer,
.billing-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
    color: #d9d2c9;
}

.auth-footer span {
    color: #d9d2c9;
    font-size: 12px;
}

.text-link {
    color: #ffb168;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.text-link:hover {
    color: #ffd8b8;
}

.billing-card {
    width: min(640px, calc(100vw - 32px));
}

.billing-heading {
    align-items: center;
    justify-content: center;
}

.billing-heading h1 {
    margin: 0;
}

.billing-plan {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 11px 0;
}

.billing-plan-row:last-child {
    border-bottom: none;
}

.billing-label {
    color: #d9d2c9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.billing-value {
    color: #ffb168;
    font-weight: 800;
}

.billing-provider,
.billing-empty {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billing-button {
    width: auto;
}

.billing-links {
    margin-top: 14px;
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.auth-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.auth-modal-window {
    width: min(400px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    min-height: 400px;
    background: rgba(20, 17, 15, 0.82);
    border: 1px solid rgba(255, 177, 104, 0.2);
    border-radius: 22px;
    padding: 16px 16px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
    position: relative;
    backdrop-filter: blur(8px);
}

.auth-modal-nav,
.auth-modal-close {
    position: absolute;
    top: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
}

.auth-modal-nav {
    left: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.auth-modal-close {
    right: 14px;
    font-size: 28px;
}

.auth-modal-body {
    min-height: 220px;
    padding-top: 18px;
}

.auth-modal-body h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    line-height: 1.1;
    text-align: center;
    font-weight: 800;
}

.auth-modal-panel {
    display: none;
}

.auth-modal-panel.is-active {
    display: block;
}

.auth-login-form,
.auth-signup-form {
    width: min(340px, calc(100vw - 40px));
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-field {
    position: relative;
    width: 100%;
}

.auth-field input,
.auth-field select {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #fff;
    padding: 0 12px;
    outline: none;
    font-size: 13px;
    color-scheme: dark;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #2a2725 inset;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-field input:focus,
.auth-field select:focus,
.profile-form input:focus,
.profile-form select:focus {
    background: #2a2725;
    color: #fff;
    border-color: #ffb14d;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 177, 77, 0.16);
}

.auth-field.has-inline-error input,
.auth-field.has-inline-error select {
    border-color: #f06a65;
    box-shadow: 0 0 0 2px rgba(240, 106, 101, 0.13);
}

.auth-field.is-valid input,
.auth-field.is-valid select {
    border-color: #48bb78;
}

.field-inline-error {
    display: block;
    min-height: 0;
    margin-top: 4px;
    color: #ff827c;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.auth-field.is-valid .field-inline-error { color: #48bb78; }
.auth-field.has-inline-error .field-inline-error { color: #ff827c; }

.field-inline-error:empty { display: none; }

.auth-field select {
    color-scheme: dark;
    color: #fff;
}

.auth-field select option {
    background: #2a2725;
    color: #fff;
}

.auth-field input::placeholder,
.auth-field select::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.login-identifier-field.is-username .auth-country-prefix,
.login-identifier-field.is-username .auth-phone-join {
    display: none;
}

.login-identifier-field.is-username .login-identifier-input {
    padding-left: 12px;
}

.auth-login-form .auth-modal-login-button,
.auth-signup-form .auth-modal-signup-button {
    width: 100%;
    background: rgba(255, 177, 104, 0.18);
    color: #fff;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid rgba(255, 177, 104, 0.22);
}

.auth-login-form .auth-button,
.auth-signup-form .auth-button {
    margin-top: 16px;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-switch {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: space-between;
    color: #d9d2c9;
    font-size: 11.5px;
    font-weight: 700;
    margin: 2px 0 4px;
}

.auth-switch-phone {
    color: #fff;
    font-weight: 800;
}

.auth-switch-username {
    color: #d9d2c9;
    font-weight: 600;
}

.auth-phone-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 44px;
}

.auth-country-selector {
    flex: 0 0 94px;
    min-width: 94px;
    height: 30px;
    padding: 0 3px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    outline: none;
    text-align: center;
}

.country-selection-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 20px;
    margin: 5px 2px 0;
    padding: 2px 8px;
    border: 1px solid rgba(255, 177, 77, 0.45);
    border-radius: 999px;
    background: rgba(255, 177, 77, 0.12);
    color: #ffb14d;
    font-size: 10px;
    font-weight: 800;
}

@media (min-width: 769px) {
    .auth-modal-panel[data-auth-content="register"] h2 { font-size: 1.8rem; }
}

.auth-country-selector option {
    background: #2a2725;
    color: #fff;
}

.auth-country-prefix {
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    min-width: 78px;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding-right: 8px;
}

.auth-phone-join {
    color: #fff;
    font-size: 16px;
    opacity: 0.75;
}

.auth-phone-number,
.auth-code {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
}

.auth-phone-number::placeholder,
.auth-code::placeholder {
    color: #d9d2c9;
}

.auth-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 12px;
}

.auth-code {
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-send-code {
    height: 44px;
    padding: 0 14px;
    background: rgba(255, 177, 104, 0.20);
    color: #fff;
    border-radius: 10px;
    border: 1px solid rgba(255, 177, 104, 0.30);
    font-weight: 800;
}

.auth-password-use {
    width: 100%;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
}

.signup-title {
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    margin-bottom: 12px;
}

.signup-birthday {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.signup-birthday select {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 8px;
    border: 1px solid rgba(255, 177, 104, 0.20);
    padding: 10px;
    font-size: 12px;
}

.signup-privacy {
    color: #d9d2c9;
    font-size: 12px;
    margin: 14px 0 12px;
    text-align: center;
}

.auth-account-prompt {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f0eb;
    font-size: 11.5px;
    font-weight: 700;
    gap: 4px;
}

.auth-account-prompt span {
    margin-right: 2px;
}

.auth-modal-switch {
    background: transparent;
    border: none;
    color: #ffb168;
    cursor: pointer;
    font-weight: 800;
    padding: 0;
}

.password-field-wrap {
    position: relative;
    width: 100%;
}

.password-field-wrap input {
    padding-right: 42px;
    box-sizing: border-box;
}

.password-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 0;
}

.password-field-wrap .password-eye {
    top: 21px;
}

.password-eye svg {
    width: 15px;
    height: 15px;
    stroke: #fff;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-eye.is-visible {
    background: rgba(255, 255, 255, 0.1);
}

.pill-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #ffb14d;
    color: #111;
    font-weight: 800;
    border: none;
    text-decoration: none;
}

.toast-stack {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    width: min(88vw, 300px);
    pointer-events: none;
}

.app-toast {
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.app-toast-success { background: #247a4b; border-color: #48bb78; }
.app-toast-error { background: #9f302d; border-color: #f06a65; }

.button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-spin 700ms linear infinite;
}

button.is-loading,
a.is-loading { pointer-events: none; opacity: 0.72; }

button.is-loading,
a.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

@keyframes button-spin {
    to { transform: rotate(360deg); }
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 91;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.app-modal-backdrop.is-open { opacity: 1; visibility: visible; }

.app-modal-window {
    position: relative;
    width: min(440px, calc(100vw - 28px));
    max-height: min(86dvh, 680px);
    overflow-y: auto;
    padding: 28px 16px 20px;
    border: 1px solid rgba(255, 177, 104, 0.25);
    border-radius: 22px;
    background: rgba(20, 17, 15, 0.88);
    color: #fff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65);
}

.subscription-modal-window {
    width: min(360px, calc(100vw - 28px));
    max-height: none;
    overflow: visible;
    padding: 24px 14px 16px;
}

.profile-modal-window { width: min(380px, calc(100vw - 28px)); }
.delete-confirm-window { width: min(340px, calc(100vw - 28px)); text-align: center; }
.delete-confirm-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin: 0 auto 10px; border: 1px solid rgba(255, 116, 96, 0.5); border-radius: 10px; background: rgba(255, 116, 96, 0.12); color: #ff9b8e; }
.app-modal-window h2 { margin: 0 0 16px; color: #fff; font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.1; text-align: center; font-weight: 800; }
.app-modal-window.profile-modal-window h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.app-modal-window.delete-confirm-window h2 { font-size: clamp(1.15rem, 2.3vw, 1.45rem); }
.subscription-modal-window h2 { font-size: clamp(1.55rem, 2.8vw, 1.95rem); }
.modal-subtitle { margin: 6px 0 18px; color: #d9d2c9; font-size: 12px; text-align: center; }
.app-modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: #fff; font-size: 25px; cursor: pointer; }
.profile-form { display: grid; gap: 10px; }
.profile-form label { display: grid; gap: 5px; color: #d9d2c9; font-size: 11px; font-weight: 700; }
.profile-form input, .profile-form select { width: 100%; box-sizing: border-box; min-height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 13px; }
.profile-phone-field .auth-phone-row { width: 100%; box-sizing: border-box; }
.profile-phone-field .auth-phone-row input { min-width: 0; border: 0; background: transparent; }
.profile-country-badge { margin-left: 0; }
.profile-form .pill-button { width: 100%; margin-top: 6px; border-radius: 10px; min-height: 42px; }
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.profile-actions form { margin: 0; }
.profile-action-button { width: 100%; min-height: 38px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 800; }
.logout-button { border: 1px solid rgba(255, 177, 77, 0.45); background: rgba(255, 177, 77, 0.14); color: #ffb14d; }
.delete-button { border: 1px solid rgba(255, 116, 96, 0.45); background: rgba(255, 116, 96, 0.1); color: #ff9b8e; }
.delete-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.cancel-delete-button { border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #f4efe9; }
.modal-plan-grid { display: grid; gap: 10px; }
.modal-plan-card { display: grid; gap: 6px; padding: 11px 12px; border: 1px solid rgba(255, 177, 104, 0.18); border-radius: 10px; background: linear-gradient(135deg, rgba(255, 177, 104, 0.1), rgba(255,255,255,.035)); }
.plan-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card-heading strong { color: #fff; font-size: 14px; }
.plan-period-badge { padding: 4px 8px; border: 1px solid rgba(255, 177, 77, 0.4); border-radius: 999px; color: #ffb14d; font-size: 10px; font-weight: 800; }
.plan-country { color: #d9d2c9; font-size: 11px; }
.plan-price { color: #ffb14d; font-size: 16px; }
.choose-plan-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 30px; padding: 0 12px; border: 1px solid rgba(255, 177, 77, 0.5); border-radius: 8px; background: rgba(255, 177, 77, 0.14); color: #ffb14d; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 800; text-decoration: none; }

.premium-lock-overlay { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; background: linear-gradient(180deg, rgba(10, 9, 8, 0.32), rgba(10, 9, 8, 0.88)); color: #fff; text-align: center; }
.premium-lock-thumbnail { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.72) brightness(0.72); }
.premium-lock-overlay strong { font-size: 18px; }
.premium-lock-overlay > span:not(.premium-lock-icon) { color: #d9d2c9; font-size: 12px; }
.premium-lock-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(255, 177, 77, 0.55); border-radius: 50%; background: rgba(255, 177, 77, 0.14); color: #ffb14d; font-size: 18px; }

.subscription-page {
    flex-direction: column;
    gap: 12px;
}

.page-heading {
    text-align: center;
}

.plan-grid {
    width: min(900px, calc(100vw - 30px));
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.plan-card {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(255, 177, 104, 0.22);
    background: rgba(20, 17, 15, 0.84);
}

.plan-name {
    color: #ffb14d;
    font-weight: 900;
}

.plan-period,
.plan-price,
.country-summary {
    color: #d9d2c9;
}

.country-summary {
    font-size: 13px;
}

.billing-card a {
    color: #ffb14d;
}
