:root {
    --bg: #f7efe7;
    --bg-strong: #f2e2d3;
    --surface: rgba(255, 252, 248, 0.8);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --text: #27160f;
    --muted: #785646;
    --line: rgba(85, 46, 30, 0.14);
    --brand: #ff612f;
    --brand-deep: #cb461d;
    --accent: #1c1a1c;
    --shadow: 0 24px 80px rgba(76, 35, 19, 0.18);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --content-width: 1180px;
}

.home-announcement-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 0 0 28px;
}

.home-announcement-carousel {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0 0 28px;
}

.home-announcement-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.home-announcement-track::-webkit-scrollbar {
    display: none;
}

.home-announcement-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: start;
}

.home-announcement-card {
    display: grid;
    gap: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 20px 45px rgba(37, 23, 11, 0.12);
    background: #fff5ef;
}

.home-announcement-image {
    display: block;
    width: 100%;
    max-height: 180px;
    aspect-ratio: 21 / 8;
    object-fit: cover;
}

.home-announcement-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, rgba(255, 250, 246, 0.92), rgba(255, 244, 238, 0.98));
}

.announcement-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.announcement-cta-btn:hover,
.announcement-cta-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(255, 97, 47, 0.24);
    filter: saturate(1.04);
}

.home-announcement-carousel .story-carousel-btn {
    top: calc(50% - 24px);
}

.home-announcement-carousel .story-carousel-btn.is-prev {
    left: 12px;
}

.home-announcement-carousel .story-carousel-btn.is-next {
    right: 12px;
}

.home-announcement-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.home-announcement-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 999px;
    padding: 0;
    background: rgba(120, 86, 70, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.home-announcement-dot.is-active {
    width: 28px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
}

.admin-shell {
    padding-bottom: 56px;
    display: grid;
    gap: 24px;
}

.admin-hero-card {
    padding: 26px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(255, 123, 71, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 246, 240, 0.96));
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 28px 56px rgba(40, 23, 11, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.admin-header-copy {
    display: grid;
    gap: 10px;
    max-width: 720px;
}

.admin-header-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
}

.admin-header-copy p:last-child {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.admin-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-header-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 250, 246, 0.92);
    border: 1px solid rgba(28, 23, 15, 0.08);
}

.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.admin-hero-stat-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-hero-stat-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: grid;
    gap: 8px;
}

.admin-hero-stat-label {
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-hero-stat-card strong {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1;
    color: var(--ink-strong);
}

.admin-hero-stat-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 16px;
}

.admin-sidebar-card {
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 20px 46px rgba(40, 23, 11, 0.08);
}

.admin-sidebar-card-accent {
    background:
        linear-gradient(180deg, rgba(255, 248, 242, 0.98), rgba(255, 242, 234, 0.98));
}

.admin-sidebar-head h3,
.admin-sidebar-card h3 {
    margin: 0;
}

.admin-sidebar-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.admin-sidebar-list-item {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 97, 47, 0.08);
}

.admin-sidebar-list-item strong {
    color: var(--ink-strong);
    font-size: 1.1rem;
}

.admin-sidebar-list-item span {
    color: var(--muted);
    line-height: 1.5;
}

.admin-main-column {
    display: grid;
    gap: 24px;
}

.admin-admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(28, 23, 15, 0.08);
}

.admin-admin-chip div {
    display: grid;
    gap: 2px;
}

.admin-admin-chip span {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-section-nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.admin-section-nav a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(28, 23, 15, 0.1);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-section-nav a.is-active,
.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(255, 97, 47, 0.16);
}

.admin-section-nav-copywrap {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.admin-section-nav-label {
    font-weight: 800;
}

.admin-section-nav-copy {
    color: inherit;
    opacity: 0.78;
    font-size: 0.84rem;
    line-height: 1.45;
}

.admin-section-nav-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(39, 22, 15, 0.06);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-section-nav a.is-active .admin-section-nav-count,
.admin-section-nav a:hover .admin-section-nav-count,
.admin-section-nav a:focus-visible .admin-section-nav-count {
    background: rgba(255, 255, 255, 0.2);
}

.admin-section {
    display: grid;
    gap: 20px;
    margin-bottom: 8px;
    padding: 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 22px 50px rgba(40, 23, 11, 0.08);
}

.admin-section-heading,
.admin-card-head,
.admin-table-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.admin-section-support,
.admin-card-caption {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.admin-live-status {
    margin: 10px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2a5db0;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-live-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #7aa6ee;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3);
    animation: admin-live-pulse 1.8s ease-out infinite;
}

.admin-live-status[data-state="loading"]::before {
    background: #f59e0b;
    box-shadow: none;
}

.admin-live-status[data-state="error"]::before {
    background: #d33a49;
    box-shadow: none;
    animation: none;
}

.admin-live-status[data-state="live"]::before {
    background: #1aa36f;
}

.admin-live-status[data-state="idle"]::before {
    background: #3b82f6;
}

.admin-section-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 97, 47, 0.1);
    border: 1px solid rgba(255, 97, 47, 0.14);
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-card-eyebrow {
    margin: 0 0 6px;
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-metric-grid,
.admin-dual-grid,
.admin-banner-grid {
    display: grid;
    gap: 18px;
}

.admin-metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-dual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-banner-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.admin-panel-card,
.admin-table-card,
.admin-banner-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(28, 23, 15, 0.08);
    border-radius: 26px;
    box-shadow: 0 20px 50px rgba(40, 23, 11, 0.08);
}

.admin-panel-card,
.admin-banner-card {
    padding: 22px;
}

.admin-table-card {
    overflow: hidden;
}

.admin-table-head {
    padding: 20px 22px 0;
}

.admin-table-head h3,
.admin-card-head h3,
.admin-panel-card h3,
.admin-section-heading h2 {
    margin: 0;
}

.admin-form {
    margin-top: 8px;
}

.admin-form textarea {
    width: 100%;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(247, 251, 255, 0.96);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

.admin-form textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.72);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.admin-message-body {
    min-height: 180px;
}

.admin-recipient-picker {
    display: grid;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94));
}

.admin-recipient-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(37, 99, 235, 0.1);
    cursor: pointer;
}

.admin-recipient-option input {
    margin-top: 3px;
}

.admin-recipient-copy {
    display: grid;
    gap: 3px;
}

.admin-recipient-copy strong {
    color: var(--text);
}

.admin-recipient-copy span {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

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

.admin-table th,
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(28, 23, 15, 0.08);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: rgba(255, 244, 235, 0.85);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-user-cell,
.admin-story-cell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.admin-user-cell p,
.admin-story-cell p,
.admin-banner-copy p {
    margin: 4px 0 0;
    color: var(--muted);
}

.admin-name-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-story-thumb {
    width: 58px;
    min-width: 58px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.story-library-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.admin-inline-form select,
.admin-score-input {
    min-width: 88px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(28, 23, 15, 0.14);
    background: #fff;
}

.admin-inline-note,
.admin-empty-copy {
    color: var(--muted);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 123, 71, 0.14), rgba(255, 97, 47, 0.16) 70%, rgba(204, 70, 29, 0.18));
    border: 1px solid rgba(255, 97, 47, 0.2);
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 18px rgba(255, 97, 47, 0.12);
}

.verified-badge-icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.verified-badge-icon-inline {
    width: 20px;
    height: 20px;
}

.verified-badge-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
    background: #fff7f1;
    border: 1px solid rgba(255, 97, 47, 0.16);
    box-shadow: 0 6px 12px rgba(255, 97, 47, 0.12);
}

.verified-badge-check {
    position: absolute;
    right: -3px;
    bottom: -2px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff7f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #fff7f1;
    box-shadow: 0 4px 8px rgba(255, 97, 47, 0.2);
}

.verified-badge-check svg {
    width: 8px;
    height: 8px;
    display: block;
}

.verified-badge-admin {
    padding: 5px 9px;
}

.verified-badge-profile {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.admin-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 800;
}

.admin-status-pill-approved,
.admin-status-pill-active {
    background: rgba(29, 170, 116, 0.16);
    color: #147552;
}

.admin-status-pill-pending {
    background: rgba(255, 194, 91, 0.18);
    color: #8b4c14;
}

.admin-status-pill-rejected,
.admin-status-pill-banned,
.admin-status-pill-suspended {
    background: rgba(211, 58, 73, 0.14);
    color: #9f2230;
}

.admin-stack-copy,
.admin-mini-list {
    display: grid;
    gap: 10px;
}

.admin-mini-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 245, 239, 0.8);
    border: 1px solid rgba(255, 97, 47, 0.08);
}

.admin-mini-card-stack {
    display: grid;
    gap: 8px;
}

.admin-mini-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-mini-card-time {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-mini-card.is-fresh {
    border-color: rgba(26, 163, 111, 0.32);
    box-shadow: 0 0 0 1px rgba(26, 163, 111, 0.12), 0 14px 28px rgba(26, 163, 111, 0.12);
}

.admin-banner-card {
    display: grid;
    gap: 14px;
}

.admin-banner-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
}

.admin-danger-btn {
    border-color: rgba(211, 58, 73, 0.24);
    color: #9f2230;
}

.admin-login-panel {
    display: grid;
    gap: 18px;
}

.admin-login-hint {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 245, 239, 0.88);
    color: var(--muted);
}

.admin-login-hint p {
    margin: 0;
}

@keyframes admin-live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.26);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@media (max-width: 900px) {
    .admin-workspace {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .admin-hero-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-dual-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
    }

    .admin-header-actions {
        justify-content: flex-start;
    }

    .admin-section-heading,
    .admin-card-head,
    .admin-table-head {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .admin-hero-card {
        padding: 18px;
        border-radius: 24px;
    }

    .admin-hero-stat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-sidebar-card,
    .admin-section {
        padding: 18px;
        border-radius: 22px;
    }

    .admin-section-nav a {
        padding: 12px 14px;
        border-radius: 18px;
    }

    .admin-section-nav-count {
        font-size: 0.7rem;
    }

    .home-announcement-strip {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-announcement-carousel {
        gap: 12px;
    }

    .home-announcement-carousel .story-carousel-btn {
        width: 38px;
        height: 38px;
        top: calc(50% - 18px);
    }

    .home-announcement-carousel .story-carousel-btn.is-prev {
        left: 8px;
    }

    .home-announcement-carousel .story-carousel-btn.is-next {
        right: 8px;
    }

    .admin-table-card {
        overflow: hidden;
    }

    .admin-inline-form,
    .admin-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-inline-form .story-library-btn,
    .admin-score-input,
    .admin-inline-form select {
        width: 100%;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tbody {
        display: grid;
        gap: 14px;
        padding: 16px;
    }

    .admin-table tr {
        padding: 16px;
        border-radius: 18px;
        background: rgba(255, 250, 246, 0.96);
        border: 1px solid rgba(28, 23, 15, 0.08);
    }

    .admin-table td {
        display: grid;
        grid-template-columns: minmax(90px, 108px) minmax(0, 1fr);
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(28, 23, 15, 0.06);
        align-items: start;
    }

    .admin-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .admin-user-cell,
    .admin-story-cell {
        min-width: 0;
    }

    .admin-user-cell p,
    .admin-story-cell p,
    .admin-banner-copy p,
    .admin-stack-copy span {
        word-break: break-word;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 143, 94, 0.28), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 205, 149, 0.4), transparent 26%),
        linear-gradient(135deg, #fff9f2 0%, #f6e8db 55%, #f0ddd0 100%);
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
}

img {
    display: block;
    max-width: 100%;
}

.splash-page,
.auth-page {
    position: relative;
    overflow-x: hidden;
}

.splash-shell,
.auth-shell {
    width: min(calc(100% - 32px), var(--content-width));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    align-items: center;
    position: relative;
    z-index: 1;
}

.splash-shell {
    padding: 32px 0;
}

.glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.55;
    pointer-events: none;
}

.glow-left {
    top: 8%;
    left: -80px;
    background: rgba(255, 97, 47, 0.2);
}

.glow-right {
    right: -70px;
    bottom: 10%;
    background: rgba(255, 194, 91, 0.32);
}

.splash-card,
.auth-panel,
.auth-hero {
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.splash-card {
    width: min(100%, 620px);
    margin: 0 auto;
    padding: 48px 38px;
    border-radius: 40px;
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.92), rgba(255, 244, 236, 0.84));
    text-align: center;
}

.logo-orbit {
    width: 180px;
    height: 180px;
    margin: 0 auto 24px;
    position: relative;
    display: grid;
    place-items: center;
}

.brand-logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(255, 97, 47, 0.18);
    animation: floatLogo 2.8s ease-in-out infinite;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 97, 47, 0.22);
}

.orbit-ring-one {
    inset: 10px;
    animation: spin 7s linear infinite;
}

.orbit-ring-two {
    inset: 0;
    border-style: dashed;
    animation: spinReverse 9s linear infinite;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand-deep);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.76rem;
    font-weight: 700;
}

h1,
h2 {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", serif;
    line-height: 1.05;
}

.splash-card h1,
.auth-hero h1 {
    font-size: clamp(2.7rem, 5vw, 4.8rem);
}

.splash-copy,
.auth-copy,
.hero-feature p,
.hero-quote p,
.switch-copy {
    color: var(--muted);
}

.splash-copy {
    width: min(100%, 420px);
    margin: 14px auto 28px;
    line-height: 1.7;
    font-size: 1rem;
}

.progress-track {
    width: min(100%, 340px);
    height: 14px;
    margin: 0 auto 18px;
    background: rgba(39, 22, 15, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8852 0%, #ff612f 55%, #c6421d 100%);
    animation: loadBar 2.8s ease-in-out forwards;
}

.loading-status {
    margin: 0;
    font-size: 0.96rem;
    color: var(--muted);
}

.auth-shell {
    grid-template-columns: 1.15fr 0.95fr;
    gap: 28px;
    padding: 32px 0;
}

.signup-view .auth-shell {
    grid-template-columns: minmax(320px, 560px);
    justify-content: center;
}

.auth-hero,
.auth-panel {
    border-radius: var(--radius-xl);
}

.auth-hero {
    padding: 54px;
    background:
        linear-gradient(160deg, rgba(39, 22, 15, 0.92), rgba(77, 38, 23, 0.82)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.25), rgba(255, 209, 151, 0.18));
    color: #fffaf5;
    position: relative;
    overflow: hidden;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 174, 112, 0.26), transparent 65%);
}

.auth-hero .eyebrow,
.auth-hero .auth-copy,
.auth-hero .hero-feature p,
.auth-hero .hero-quote p {
    color: rgba(255, 241, 229, 0.82);
}

.auth-copy {
    max-width: 520px;
    margin: 18px 0 34px;
    line-height: 1.8;
    font-size: 1.02rem;
}

.hero-feature-list {
    display: grid;
    gap: 14px;
}

.hero-feature,
.hero-quote {
    border-radius: var(--radius-md);
    background: rgba(255, 248, 242, 0.08);
    border: 1px solid rgba(255, 240, 232, 0.14);
}

.hero-feature {
    padding: 18px 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.hero-feature span {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-feature p,
.hero-quote p {
    margin: 0;
    line-height: 1.7;
}

.hero-quote {
    padding: 22px 24px;
}

.auth-panel {
    padding: 32px;
    background: var(--surface-strong);
    align-self: center;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.panel-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 18px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(255, 97, 47, 0.14), rgba(255, 194, 91, 0.18));
}

.panel-kicker {
    margin: 0 0 6px;
    font-size: 0.8rem;
    color: var(--brand-deep);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

.auth-panel h2 {
    font-size: 2.25rem;
}

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

.social-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.social-btn {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.14);
    border-radius: 999px;
    padding: 14px 18px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.social-btn:hover,
.social-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.32);
}

.social-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.social-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853 50%, #fbbc05 75%, #ea4335 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.92rem;
}

.auth-divider {
    margin: 8px 0 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    color: #8f6c5d;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: rgba(85, 46, 30, 0.12);
}

.form-message {
    margin-bottom: 18px;
    border-radius: 16px;
    padding: 14px 16px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.form-message p {
    margin: 0;
}

.form-message p + p {
    margin-top: 8px;
}

.form-message-error {
    background: rgba(182, 46, 22, 0.08);
    border: 1px solid rgba(182, 46, 22, 0.18);
    color: #922f1d;
}

.form-message-success {
    background: rgba(32, 119, 73, 0.08);
    border: 1px solid rgba(32, 119, 73, 0.16);
    color: #1d6a44;
}

.auth-form label {
    font-size: 0.94rem;
    font-weight: 700;
}

.auth-form input {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-form input::placeholder {
    color: #a48778;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
    transform: translateY(-1px);
}

.primary-btn {
    margin-top: 6px;
    border: none;
    border-radius: 999px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(255, 97, 47, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-btn:hover,
.primary-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(255, 97, 47, 0.28);
    filter: saturate(1.05);
}

.switch-copy {
    margin: 22px 0 0;
    text-align: center;
    line-height: 1.7;
}

.switch-copy a {
    color: var(--brand-deep);
    font-weight: 700;
    text-decoration: none;
}

.switch-copy a:hover,
.switch-copy a:focus-visible {
    text-decoration: underline;
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 248, 242, 0.9);
    border: 1px solid rgba(255, 97, 47, 0.14);
    line-height: 1.6;
}

.terms-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

.terms-check span {
    display: inline;
    font-size: 0.94rem;
    color: var(--text);
}

.terms-link {
    color: var(--brand-deep);
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 210, 154, 0.18), rgba(255, 123, 71, 0.18));
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 97, 47, 0.18);
    white-space: nowrap;
}

.terms-link:hover,
.terms-link:focus-visible {
    text-decoration: underline;
}

.terms-help {
    margin: -4px 2px 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.terms-page {
    max-width: 820px;
}

.terms-copy {
    display: grid;
    gap: 18px;
    color: var(--text);
    line-height: 1.75;
}

.terms-copy h3,
.terms-copy p {
    margin: 0;
}

.terms-copy ol {
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 16px;
}

.terms-copy ul {
    margin: 10px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 8px;
}

.terms-copy li::marker {
    font-weight: 800;
    color: var(--brand-deep);
}

.primary-btn:disabled,
.social-btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
    filter: none;
}

.site-footer {
    width: min(calc(100% - 32px), 1180px);
    margin: 0 auto 24px;
    display: flex;
    justify-content: center;
}

.site-footer-brand {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(100%, 520px);
    padding: 16px 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(85, 46, 30, 0.1);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(14px);
}

.site-footer-topline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.site-footer-socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer-social-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.96);
    color: var(--brand-deep);
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-footer-social-link svg {
    width: 15px;
    height: 15px;
}

.site-footer-social-link:hover,
.site-footer-social-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.site-footer-links a {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
    color: var(--brand-deep);
    text-decoration: underline;
}

.site-footer-copy {
    font-size: 0.78rem;
    line-height: 1.5;
}

.mobile-bottom-nav {
    display: none;
}

.home-shell {
    width: min(calc(100% - 32px), 1180px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 48px;
    display: grid;
    gap: 26px;
    align-content: start;
}

.app-topbar,
.announcement-bar,
.discover-welcome,
.editor-panel,
.editor-sidecard,
.profile-hero,
.home-banner,
.story-section {
    border-radius: var(--radius-xl);
    background: var(--surface-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.app-topbar {
    display: grid;
    grid-template-columns: auto minmax(220px, 360px) auto auto;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    position: sticky;
    top: 14px;
    z-index: 80;
    transition: transform 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

body.has-topbar-overlay {
    overflow: hidden;
}

.app-brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.app-topbar-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 16px;
    padding: 8px;
    background: linear-gradient(145deg, rgba(255, 97, 47, 0.14), rgba(255, 194, 91, 0.18));
}

.app-topbar-title,
.discover-welcome h2,
.story-section h2,
.story-empty-card h3,
.editor-sidecard h3,
.profile-hero h2 {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", serif;
}

.app-topbar-title {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    color: #000;
}

.app-topbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-topbar-search-field {
    display: block;
    flex: 1 1 auto;
}

.app-topbar-search-field input {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
}

.app-topbar-search-field input::placeholder {
    color: #a48778;
}

.app-topbar-search-field input:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.app-topbar-search-btn {
    border: 1px solid rgba(85, 46, 30, 0.14);
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-topbar-search-btn:hover,
.app-topbar-search-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.app-nav-link,
.app-logout-link,
.profile-drawer-link {
    text-decoration: none;
    color: var(--text);
    border-radius: 999px;
    padding: 11px 16px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.app-nav-link:hover,
.app-nav-link:focus-visible,
.app-logout-link:hover,
.app-logout-link:focus-visible,
.profile-drawer-link:hover,
.profile-drawer-link:focus-visible {
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    transform: translateY(-1px);
}

.app-nav-link.is-active {
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.22);
}

.topbar-icon-link {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topbar-icon-link svg {
    width: 24px;
    height: 24px;
}

.topbar-icon-link:hover,
.topbar-icon-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(39, 22, 15, 0.12);
    border-color: rgba(255, 97, 47, 0.24);
    color: var(--brand-deep);
}

.topbar-icon-link.is-active {
    border-color: rgba(255, 97, 47, 0.32);
    color: var(--brand-deep);
}

.notification-drawer,
.profile-drawer {
    position: relative;
    z-index: 90;
}

.notification-drawer summary,
.profile-drawer summary {
    list-style: none;
}

.notification-drawer summary::-webkit-details-marker,
.profile-drawer summary::-webkit-details-marker {
    display: none;
}

.topbar-icon-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(255, 97, 47, 0.22);
}

.app-logout-link {
    border: 1px solid rgba(85, 46, 30, 0.12);
}

.profile-drawer-trigger {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.95);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
}

.profile-drawer[open] .profile-drawer-trigger {
    border-color: rgba(255, 97, 47, 0.28);
    box-shadow: 0 16px 28px rgba(255, 97, 47, 0.14);
}

.notification-drawer[open] .topbar-icon-link {
    border-color: rgba(255, 97, 47, 0.28);
    box-shadow: 0 16px 28px rgba(255, 97, 47, 0.14);
}

.profile-drawer-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 230px;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 22px 48px rgba(39, 22, 15, 0.16);
    display: grid;
    gap: 8px;
    z-index: 120;
}

.notification-drawer-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: min(72vh, 640px);
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 22px 48px rgba(39, 22, 15, 0.16);
    display: grid;
    gap: 14px;
    overflow-y: auto;
    z-index: 120;
}

.topbar-overlay-backdrop {
    position: fixed;
    top: var(--topbar-overlay-top, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 79;
    border: none;
    background: rgba(39, 22, 15, 0.12);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.profile-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px 10px;
    border-bottom: 1px solid rgba(85, 46, 30, 0.08);
    margin-bottom: 4px;
}

.profile-drawer-name,
.profile-drawer-handle {
    margin: 0;
}

.profile-drawer-name {
    font-weight: 800;
}

.profile-drawer-handle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.profile-drawer-link {
    display: block;
    width: 100%;
}

.profile-drawer-link.is-active {
    background: rgba(255, 97, 47, 0.1);
    color: var(--brand-deep);
}

.notification-drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.notification-drawer-head h3,
.notification-empty-state p,
.notification-group-title,
.notification-mini-copy p {
    margin: 0;
}

.notification-drawer-head h3 {
    font-size: 1.2rem;
}

.notification-head-form {
    margin: 0;
}

.notification-read-btn {
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.notification-read-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.notification-count-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notification-count-pill {
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font-size: 0.9rem;
    font-weight: 800;
}

.notification-empty-state {
    padding: 6px 0 2px;
    color: var(--muted);
}

.notification-drawer-group {
    display: grid;
    gap: 10px;
}

.notification-group-title {
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.notification-mini-list {
    display: grid;
    gap: 10px;
}

.notification-mini-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    color: inherit;
    text-decoration: none;
    display: grid;
    gap: 10px;
}

.notification-mini-card.is-unread {
    border-color: rgba(255, 97, 47, 0.24);
    background: rgba(255, 243, 236, 0.98);
}

.notification-mini-media {
    width: 100%;
}

.notification-mini-image {
    width: 100%;
    max-height: 168px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
    border: 1px solid rgba(85, 46, 30, 0.08);
}

.notification-mini-copy {
    display: grid;
    gap: 6px;
}

.notification-mini-copy strong {
    font-size: 0.95rem;
}

.notification-mini-copy p {
    color: var(--text);
    line-height: 1.6;
}

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 22px;
}

.search-page-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
}

.search-result-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.search-result-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: var(--brand-deep);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.search-result-label strong {
    color: #13305d;
    font-size: 0.95rem;
}

.search-page-field {
    display: block;
    flex: 1 1 auto;
}

.search-page-field input {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 999px;
    padding: 14px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
}

.search-page-field input::placeholder {
    color: #a48778;
}

.search-page-field input:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.search-page-btn {
    border: 1px solid rgba(85, 46, 30, 0.14);
    border-radius: 999px;
    padding: 14px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-page-btn:hover,
.search-page-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.search-panel {
    display: grid;
    gap: 18px;
}

.search-story-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
}

.search-story-grid .story-card-shell {
    gap: 0;
}

.search-story-grid .story-card-link {
    display: block;
}

.search-story-grid .story-card-link .story-card {
    border-radius: 24px;
    overflow: hidden;
}

.search-story-grid .story-card-link:hover .story-card,
.search-story-grid .story-card-link:focus-visible .story-card {
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.16);
}

.search-user-list {
    display: grid;
    gap: 16px;
}

.search-user-card {
    display: block;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-user-card:hover,
.search-user-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(39, 22, 15, 0.12);
    border-color: rgba(255, 97, 47, 0.22);
}

.search-user-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-user-copy {
    min-width: 0;
}

.search-user-copy h3,
.search-user-copy p,
.search-user-about {
    margin: 0;
}

.search-user-copy h3 {
    font-size: 1.15rem;
}

.search-user-copy p,
.search-user-about {
    color: var(--muted);
    line-height: 1.7;
}

.search-user-copy p {
    margin-top: 4px;
}

.search-user-about {
    margin-top: 14px;
}

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

.library-cover-grid .story-card-link .story-card {
    border-radius: 24px;
    overflow: hidden;
}

.library-cover-grid .story-card-link:hover .story-card,
.library-cover-grid .story-card-link:focus-visible .story-card {
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.16);
}

.inbox-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.inbox-message-list {
    display: grid;
    gap: 18px;
}

.inbox-message-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.1);
}

.inbox-message-card.is-unread,
.inbox-message-card.is-selected {
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.14);
}

.inbox-message-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.inbox-message-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.inbox-message-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.inbox-message-copy h3,
.inbox-message-copy p,
.inbox-message-text,
.inbox-message-time {
    margin: 0;
}

.inbox-message-copy h3 {
    font-size: 1.1rem;
}

.inbox-message-copy p,
.inbox-message-time {
    color: var(--muted);
}

.inbox-message-time {
    font-size: 0.9rem;
    white-space: nowrap;
}

.inbox-message-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.14);
    color: var(--brand-deep);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inbox-message-image {
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.inbox-message-text {
    line-height: 1.8;
    color: var(--text);
}

.inbox-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.user-avatar {
    display: block;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
}

.user-avatar-md {
    width: 56px;
    height: 56px;
}

.user-avatar-lg {
    width: 88px;
    height: 88px;
}

.user-avatar-xl {
    width: 112px;
    height: 112px;
}

.user-avatar.is-fallback {
    background: linear-gradient(135deg, #ffb58e, #ff7b47 60%, #cc461d);
    display: inline-grid;
    place-items: center;
    box-shadow: 0 14px 24px rgba(255, 97, 47, 0.2);
}

.user-avatar-icon {
    position: relative;
    width: 62%;
    height: 62%;
    display: block;
}

.user-avatar-head,
.user-avatar-body {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.96);
}

.user-avatar-head {
    top: 4%;
    width: 34%;
    height: 34%;
    border-radius: 50%;
}

.user-avatar-body {
    bottom: 6%;
    width: 64%;
    height: 42%;
    border-radius: 48% 48% 38% 38%;
}

.announcement-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background:
        linear-gradient(135deg, rgba(255, 245, 236, 0.96), rgba(255, 237, 223, 0.92)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.08), rgba(255, 206, 135, 0.08));
}

.announcement-bar p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.announcement-label {
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.discover-welcome,
.profile-hero {
    padding: 28px;
}

.discover-welcome h2,
.profile-hero h2 {
    font-size: clamp(2rem, 3vw, 2.9rem);
}

.discover-copy,
.profile-copy,
.editor-sidecopy {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.discover-chips,
.story-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.discover-chips {
    margin-top: 18px;
}

.discover-chips span,
.section-status,
.story-empty-badge {
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.86rem;
    font-weight: 700;
}

.discover-chips span,
.story-meta-row span {
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 0.12);
}

.story-section {
    padding: 28px;
}

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

.story-section h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.section-status {
    background: rgba(255, 97, 47, 0.1);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 0.18);
}

.story-empty {
    display: grid;
}

.story-empty-card {
    min-height: 220px;
    padding: 28px;
    border-radius: 26px;
    display: grid;
    align-content: end;
    background:
        linear-gradient(145deg, rgba(255, 248, 241, 0.96), rgba(248, 232, 219, 0.92)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.12), rgba(255, 206, 135, 0.12));
    border: 1px solid rgba(85, 46, 30, 0.12);
}

.story-empty-card.accent-one {
    background:
        radial-gradient(circle at top right, rgba(255, 185, 116, 0.38), transparent 28%),
        linear-gradient(145deg, rgba(255, 248, 241, 0.96), rgba(248, 232, 219, 0.92));
}

.story-empty-badge {
    justify-self: start;
    margin-bottom: 16px;
    background: rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
}

.story-empty-card h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.story-empty-card p {
    margin: 12px 0 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.8;
}

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

.story-card-shell {
    position: relative;
    display: grid;
    gap: 12px;
}

.story-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
}

.story-rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.26);
}

.story-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.story-grid-covers .story-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.story-grid-covers .story-card-shell,
.story-grid-unified-strip .story-card-shell {
    scroll-snap-align: start;
}

.story-grid-covers .story-card-link .story-card {
    border-radius: 24px;
    overflow: hidden;
}

.story-grid-covers .story-card-link:hover .story-card,
.story-grid-covers .story-card-link:focus-visible .story-card {
    box-shadow: 0 18px 32px rgba(39, 22, 15, 0.14);
}

.story-grid-unified-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 220px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.story-grid-unified-strip::-webkit-scrollbar {
    height: 10px;
}

.story-grid-unified-strip::-webkit-scrollbar-thumb {
    background: rgba(85, 46, 30, 0.18);
    border-radius: 999px;
}

.story-grid-unified-strip .story-card-link {
    scroll-snap-align: start;
}

.story-carousel {
    position: relative;
    display: grid;
    align-items: center;
}

.story-carousel .story-grid-unified-strip {
    padding-inline: 10px;
    scrollbar-width: thin;
}

.story-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(39, 22, 15, 0.14);
    transform: translateY(-50%);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(14px);
}

.story-carousel-btn.is-prev {
    left: -8px;
}

.story-carousel-btn.is-next {
    right: -8px;
}

.story-carousel-btn span {
    font-size: 1.8rem;
    line-height: 1;
    transform: translateY(-1px);
}

.story-carousel-btn:hover,
.story-carousel-btn:focus-visible {
    box-shadow: 0 16px 28px rgba(39, 22, 15, 0.18);
}

.story-carousel-btn:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

.story-card-link .story-card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.story-card-link:hover .story-card,
.story-card-link:focus-visible .story-card {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px rgba(39, 22, 15, 0.12);
    border-color: rgba(255, 97, 47, 0.22);
}

.story-cover {
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #ff915e, #f5be76 55%, #f9e3c7);
}

.story-cover-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #f0ddd0;
}

.story-cover.tone-sunset {
    background: linear-gradient(135deg, #ff915e, #f5be76 55%, #f9e3c7);
}

.story-cover.tone-forest {
    background: linear-gradient(135deg, #3c806b, #9ec98b 55%, #dff0d1);
}

.story-cover.tone-midnight {
    background: linear-gradient(135deg, #1f294a, #41538a 55%, #c2cdf5);
}

.story-cover.tone-rose {
    background: linear-gradient(135deg, #b64d6c, #ef9ba8 55%, #fde1dc);
}

.story-card-body {
    padding: 18px;
}

.story-card-kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--brand-deep);
}

.story-card-kicker {
    color: var(--brand-deep);
}

.story-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.story-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.story-card-copy {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-meta-row {
    margin-top: 14px;
}

.story-library-form {
    margin: 0;
}

.story-library-btn {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 999px;
    padding: 12px 16px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.story-library-btn:hover,
.story-library-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.story-library-btn.is-saved {
    background: rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    border-color: rgba(255, 97, 47, 0.18);
}

.story-grid-covers .story-library-form,
.story-grid-unified-strip .story-library-form {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
}

.story-library-btn-overlay {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(39, 22, 15, 0.16);
}

.story-library-btn-inline {
    margin-top: 2px;
}

.story-detail-library-btn {
    width: auto;
    min-width: 170px;
    background: rgba(255, 250, 246, 0.95);
}

.story-reader-hero {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.story-reader-cover-wrap {
    width: 100%;
}

.story-reader-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: #f0ddd0;
}

.story-reader-copy {
    display: grid;
    gap: 16px;
    align-content: start;
}

.story-detail-copy h2 {
    font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.story-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-author-link {
    width: fit-content;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.story-author-link:hover,
.story-author-link:focus-visible {
    transform: translateY(-1px);
}

.story-author-name,
.story-author-role,
.story-comment-copy {
    margin: 0;
}

.story-author-name {
    font-weight: 800;
    font-size: 1.05rem;
}

.story-author-role {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.94rem;
}

.story-detail-tags,
.story-stat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.story-detail-tags span,
.story-stat-pill,
.story-toggle-btn {
    border-radius: 999px;
    padding: 9px 14px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.story-detail-tags span {
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    border-color: rgba(255, 97, 47, 0.12);
}

.story-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.story-start-btn {
    margin-top: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.story-disabled-pill {
    opacity: 0.72;
    cursor: default;
    pointer-events: none;
}

.story-inline-form {
    margin: 0;
}

.story-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.story-toggle-btn:hover,
.story-toggle-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.story-toggle-btn.is-active {
    background: rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    border-color: rgba(255, 97, 47, 0.18);
}

.story-toggle-btn.is-save.is-active {
    background: rgba(255, 194, 91, 0.2);
    color: #8b4c14;
    border-color: rgba(255, 194, 91, 0.24);
}

.story-reader-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.story-reader-tags span {
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 0.12);
    font-size: 0.86rem;
    font-weight: 700;
}

.story-reader-section {
    display: grid;
    gap: 18px;
}

.chapter-reader-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
}

.chapter-reader-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
}

.chapter-back-link {
    white-space: nowrap;
}

.story-reader-text {
    display: grid;
    gap: 16px;
}

.story-reader-text p {
    margin: 0;
    color: var(--text);
    line-height: 1.9;
    white-space: normal;
    word-break: break-word;
}

.reader-chapter-list,
.story-comment-list {
    display: grid;
    gap: 18px;
}

.reader-chapter-links {
    display: grid;
    gap: 14px;
}

.reader-chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.reader-chapter-link:hover,
.reader-chapter-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 18px 30px rgba(39, 22, 15, 0.12);
}

.reader-chapter-link-arrow {
    color: var(--brand-deep);
    font-size: 1.4rem;
    line-height: 1;
}

.reader-chapter-card,
.story-comment-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
}

.story-comment-form {
    gap: 14px;
}

.story-comment-form textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
}

.story-comment-form textarea:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.story-comment-copy {
    margin-top: 16px;
    color: var(--text);
    line-height: 1.8;
}

.notification-list {
    display: grid;
    gap: 18px;
}

.notification-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.notification-card:hover,
.notification-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 18px 30px rgba(39, 22, 15, 0.12);
}

.notification-copy {
    margin: 16px 0 0;
    color: var(--text);
    line-height: 1.8;
}

.chapter-progress-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.chapter-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.chapter-nav-link {
    min-width: 168px;
}

.chapter-reader-content {
    min-height: 40vh;
}

.menu-library-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.reader-page {
    background: #ffffff;
    color: #121212;
}

.reader-page .story-section,
.reader-page .app-topbar,
.reader-page .mobile-bottom-nav {
    display: none;
}

.reader-shell {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 34px 32px 180px;
}

.reader-chapter-panel,
.reader-comments-panel {
    width: 100%;
}

.reader-chapter-header h1 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.reader-chapter-content {
    margin-top: 28px;
    display: grid;
    gap: 34px;
}

.reader-chapter-content p {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 2;
    color: #111111;
}

.reader-end-card {
    margin-top: 48px;
    padding: 24px;
    border-radius: 28px;
    background: #f8f1ea;
    border: 1px solid rgba(85, 46, 30, 0.1);
    display: grid;
    gap: 14px;
}

.reader-end-meta {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.reader-continue-btn {
    width: fit-content;
    margin-top: 0;
}

.reader-comments-panel {
    margin-top: 52px;
}

.reader-comment-form {
    margin-top: 20px;
}

.reader-actions {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 860px);
    padding: 14px 16px;
    border-radius: 28px;
    background: #2d2857;
    box-shadow: 0 20px 40px rgba(23, 17, 54, 0.28);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    z-index: 200;
}

.reader-action-form {
    margin: 0;
}

.reader-action-btn {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.reader-action-btn:hover,
.reader-action-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.reader-action-btn.is-active {
    background: rgba(255, 113, 144, 0.18);
    color: #ffd4df;
}

.reader-action-btn.is-primary {
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.26);
}

.reader-action-count {
    opacity: 0.92;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.editor-panel,
.editor-sidecard {
    padding: 28px;
}

.story-editor-form textarea,
.story-editor-form select {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
}

.story-editor-form input[type="file"] {
    width: 100%;
    border: 1px dashed rgba(85, 46, 30, 0.22);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--muted);
    font: inherit;
}

.story-editor-form textarea {
    resize: vertical;
    min-height: 130px;
}

.story-editor-form .story-content-area {
    min-height: 280px;
}

.story-editor-form textarea:focus,
.story-editor-form select:focus,
.story-editor-form input[type="file"]:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.compact-form {
    margin-top: 12px;
}

.secondary-action-btn {
    border: 1px solid rgba(85, 46, 30, 0.14);
    border-radius: 999px;
    padding: 14px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.secondary-action-btn:hover,
.secondary-action-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-summary {
    justify-content: flex-start;
}

.profile-summary > div {
    min-width: 0;
    flex: 1 1 auto;
}

.profile-avatar-form {
    margin: 0;
}

.profile-avatar-button {
    display: inline-grid;
    justify-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

.profile-avatar-overlay {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    border: 3px solid rgba(255, 252, 248, 0.98);
    box-shadow: 0 14px 24px rgba(255, 97, 47, 0.24);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.profile-avatar-overlay svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.profile-avatar-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.profile-detail-list {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.profile-detail-pill {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-detail-pill-link {
    display: inline-flex;
    align-items: center;
    appearance: none;
    font: inherit;
    color: var(--brand-deep);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-detail-pill-link:hover,
.profile-detail-pill-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 97, 47, 0.14);
    border-color: rgba(255, 97, 47, 0.22);
    box-shadow: 0 12px 22px rgba(39, 22, 15, 0.08);
}

.profile-about {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
    max-width: 640px;
}

.profile-about-title {
    margin: 16px 0 0;
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-tabs {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 560px;
}

.profile-tab {
    min-width: 0;
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.profile-tab.is-active {
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 97, 47, 0.2);
}

.profile-tab:hover,
.profile-tab:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.24);
}

.profile-tab-label {
    line-height: 1.2;
    font-size: 0.92rem;
}

.profile-tab-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(39, 22, 15, 0.06);
    font-size: 0.82rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.profile-tab.is-active .profile-tab-count {
    background: rgba(255, 255, 255, 0.24);
}

.profile-follow-form {
    margin-top: 14px;
}

.profile-follow-form-inline {
    margin-top: 0;
    display: inline-flex;
    flex: 0 0 auto;
}

.profile-follow-form-inline .profile-follow-btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.profile-follow-btn {
    margin-top: 0;
    padding: 10px 16px;
    min-height: 42px;
    font-size: 0.92rem;
    box-shadow: 0 10px 20px rgba(255, 97, 47, 0.16);
}

.secondary-action-btn.profile-follow-btn {
    box-shadow: none;
}

.secondary-action-btn.profile-follow-btn:hover,
.secondary-action-btn.profile-follow-btn:focus-visible {
    box-shadow: 0 10px 18px rgba(39, 22, 15, 0.08);
}

@media (max-width: 640px) {
    .profile-detail-list {
        gap: 6px;
    }

    .profile-detail-pill {
        padding: 7px 10px;
        font-size: 0.76rem;
    }

    .profile-follow-form-inline .profile-follow-btn {
        min-height: 36px;
        padding: 7px 12px;
        font-size: 0.81rem;
    }
}

.settings-hero h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.settings-card {
    align-self: start;
}

.settings-head-compact {
    margin-bottom: 20px;
}

.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.settings-avatar-copy h3 {
    margin: 0;
    font-size: 1.4rem;
}

.settings-avatar-copy p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.settings-form {
    max-width: 760px;
}

.settings-readonly-list {
    display: grid;
    gap: 14px;
}

.settings-readonly-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
}

.settings-readonly-item span,
.settings-readonly-item strong {
    display: block;
}

.settings-readonly-item span {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.settings-readonly-item strong {
    font-size: 1rem;
}

.conversation-composer {
    display: grid;
    gap: 18px;
}

.conversation-textarea {
    min-height: 160px;
}

.conversation-feed {
    display: grid;
    gap: 16px;
}

.conversation-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
}

.conversation-card-head,
.conversation-card-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-list {
    display: grid;
    gap: 16px;
}

.connections-overlay-backdrop {
    position: fixed;
    inset: var(--connections-overlay-top, 0px) 0 0;
    border: none;
    background: rgba(39, 22, 15, 0.16);
    backdrop-filter: blur(10px);
    z-index: 59;
    cursor: pointer;
}

.connections-overlay-panel {
    position: fixed;
    top: calc(var(--connections-overlay-top, 0px) + 18px);
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - var(--connections-overlay-top, 0px) - 38px);
    display: flex;
    flex-direction: column;
    background: rgba(255, 252, 249, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 48px rgba(39, 22, 15, 0.18);
    z-index: 60;
    overflow: hidden;
}

.connections-overlay-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 14px;
}

.connections-overlay-head h3,
.connections-overlay-subtitle {
    margin: 0;
}

.connections-overlay-head h3 {
    color: var(--ink-strong);
    font-size: 1.32rem;
}

.connections-overlay-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 700;
}

.connections-overlay-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 999px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--brand-deep);
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.connections-overlay-close:hover,
.connections-overlay-close:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.08);
}

.connections-overlay-tabs {
    margin: 0 24px 14px;
    max-width: none;
}

.connections-overlay-body {
    padding: 0 24px 24px;
    overflow-y: auto;
}

.connections-overlay-list[hidden] {
    display: none;
}

.connections-simple-list {
    display: grid;
    gap: 12px;
}

.connections-simple-item {
    display: block;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.07);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.connections-simple-item:hover,
.connections-simple-item:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.2);
    box-shadow: 0 16px 28px rgba(39, 22, 15, 0.1);
}

.connections-simple-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.connections-simple-copy {
    min-width: 0;
}

.connections-simple-meta {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.connection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
}

.connection-card-main {
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.connection-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.connection-card-copy {
    min-width: 0;
}

.connection-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.connection-card-name h3 {
    margin: 0;
    color: var(--ink-strong);
    font-size: 1.02rem;
}

.connection-card-username {
    margin: 4px 0 0;
    color: var(--brand-deep);
    font-weight: 700;
}

.connection-card-about {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.connection-card-action {
    flex: 0 0 auto;
    margin: 0;
}

.connection-card-main:hover .connection-card-name h3,
.connection-card-main:focus-visible .connection-card-name h3 {
    color: var(--brand-red);
}

body.has-connections-overlay {
    overflow: hidden;
}

body.has-connections-overlay .app-topbar {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media (max-width: 720px) {
    .connections-overlay-panel {
        width: calc(100vw - 20px);
        top: calc(var(--connections-overlay-top, 0px) + 10px);
        max-height: calc(100dvh - var(--connections-overlay-top, 0px) - 20px);
        border-radius: 24px;
    }

    .connections-overlay-head,
    .connections-overlay-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .connections-overlay-head {
        padding-top: 18px;
        padding-bottom: 12px;
    }

    .connections-overlay-tabs {
        margin: 0 18px 14px;
        width: calc(100% - 36px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .connections-simple-item {
        padding: 14px 14px;
        border-radius: 18px;
    }

    .connections-simple-head {
        align-items: flex-start;
        gap: 12px;
    }

    .connections-simple-meta {
        font-size: 0.88rem;
    }
}

@media (max-width: 640px) {
    .connections-overlay-head {
        min-width: 0;
    }

    .connections-overlay-tabs .profile-tab {
        width: auto;
        box-sizing: border-box;
        min-width: 0;
        padding: 10px 12px;
        gap: 8px;
    }

    .connections-overlay-tabs .profile-tab-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.82rem;
    }

    .connections-overlay-tabs .profile-tab-count {
        min-width: 24px;
        height: 24px;
        font-size: 0.74rem;
        margin-left: auto;
    }
}

.conversation-author,
.conversation-meta,
.conversation-message {
    margin: 0;
}

.conversation-author {
    font-weight: 800;
}

.conversation-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.conversation-message {
    margin-top: 14px;
    color: var(--text);
    line-height: 1.8;
    white-space: normal;
    word-break: break-word;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.menu-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    display: grid;
    gap: 16px;
    align-content: start;
}

.menu-card-accent {
    background:
        radial-gradient(circle at top right, rgba(255, 185, 116, 0.34), transparent 28%),
        linear-gradient(145deg, rgba(255, 248, 241, 0.96), rgba(248, 232, 219, 0.92));
}

.menu-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

.menu-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.menu-form label,
.rating-fieldset legend {
    font-size: 0.94rem;
    font-weight: 700;
}

.menu-form textarea {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    resize: vertical;
    min-height: 120px;
}

.menu-form textarea:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.rating-fieldset {
    margin: 0;
    padding: 0;
    border: none;
    display: grid;
    gap: 12px;
}

.rating-help {
    margin: -4px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.rating-stars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rating-star {
    position: relative;
    cursor: pointer;
    display: grid;
    justify-items: center;
    gap: 8px;
}

.rating-star input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-star span[aria-hidden="true"] {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.12);
    color: #c9a88f;
    font-size: 1.5rem;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.rating-star:hover span[aria-hidden="true"],
.rating-star input:checked + span[aria-hidden="true"] {
    color: #ff9a2f;
    background: rgba(255, 158, 54, 0.14);
    border-color: rgba(255, 158, 54, 0.26);
    transform: translateY(-1px);
}

.rating-star-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.novel-hero h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.novel-builder {
    display: grid;
    gap: 24px;
}

.novel-section {
    display: grid;
    gap: 20px;
}

.novel-section-header {
    display: grid;
    gap: 16px;
}

.novel-section-header.split {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    align-items: end;
}

.novel-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.94rem;
    font-weight: 700;
}

.novel-section-copy,
.selection-helper,
.upload-tile-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.novel-builder input[type="text"],
.novel-builder select,
.novel-builder textarea {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.novel-builder input[type="text"]:focus,
.novel-builder select:focus,
.novel-builder textarea:focus,
.tag-input:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
    transform: translateY(-1px);
}

.novel-builder textarea {
    resize: vertical;
}

.novel-synopsis {
    min-height: 220px;
}

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

.slug-prefix {
    padding: 15px 18px;
    border-radius: 16px;
    background: rgba(39, 22, 15, 0.06);
    border: 1px solid rgba(85, 46, 30, 0.1);
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.slug-check-btn {
    white-space: nowrap;
}

.slug-status {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.slug-status.is-success {
    color: #1d6a44;
}

.slug-status.is-error {
    color: #922f1d;
}

.novel-note-grid,
.novel-guidance-grid,
.novel-upload-grid,
.novel-disclaimer-grid {
    display: grid;
    gap: 18px;
}

.novel-note-grid,
.novel-guidance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.novel-upload-grid,
.novel-disclaimer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.novel-upload-grid.single-upload {
    grid-template-columns: 1fr;
}

.novel-note-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 250, 246, 0.92);
    border: 1px solid rgba(85, 46, 30, 0.1);
}

.novel-note-card p,
.novel-note-card h3 {
    margin-top: 0;
}

.novel-note-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.novel-note-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.7;
}

.novel-note-list li + li {
    margin-top: 8px;
}

.upload-tile {
    min-height: 220px;
    padding: 28px;
    border-radius: 24px;
    border: 1px dashed rgba(85, 46, 30, 0.24);
    background:
        linear-gradient(145deg, rgba(255, 248, 241, 0.96), rgba(248, 232, 219, 0.92)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.08), rgba(255, 206, 135, 0.12));
    display: grid;
    align-content: center;
    gap: 12px;
    cursor: pointer;
    text-align: center;
}

.upload-tile-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.upload-tile input[type="file"] {
    margin-top: 8px;
    border: 1px dashed rgba(85, 46, 30, 0.22);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font: inherit;
}

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

.pill-option {
    position: relative;
    display: block;
}

.pill-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pill-option span {
    display: block;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
    color: var(--text);
    font-weight: 700;
    line-height: 1.4;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.pill-option input:checked + span {
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(255, 97, 47, 0.18);
}

.tag-builder {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-chip {
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tag-chip::after {
    content: " ×";
}

.tag-input {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.novel-submit-row {
    display: flex;
    justify-content: flex-end;
}

@keyframes floatLogo {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes loadBar {
    0% {
        width: 12%;
    }
    55% {
        width: 72%;
    }
    100% {
        width: 100%;
    }
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .login-view .auth-hero {
        display: none;
    }

    .auth-hero,
    .auth-panel,
    .splash-card {
        padding: 32px 24px;
    }

    .auth-hero {
        order: 2;
    }

    .auth-panel {
        order: 1;
    }

    .app-topbar,
    .editor-layout,
    .settings-layout,
    .profile-hero,
    .announcement-bar,
    .search-layout {
        grid-template-columns: 1fr;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

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

    .story-grid-unified-strip {
        grid-auto-columns: minmax(160px, 200px);
    }

    .story-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .novel-section-header.split,
    .novel-note-grid,
    .novel-guidance-grid,
    .novel-upload-grid,
    .novel-disclaimer-grid,
    .option-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .splash-shell,
    .auth-shell,
    .home-shell {
        width: min(calc(100% - 20px), var(--content-width));
        padding: 18px 0;
    }

    .logo-orbit {
        width: 146px;
        height: 146px;
    }

    .brand-logo {
        width: 92px;
        height: 92px;
    }

    .splash-card h1,
    .auth-hero h1 {
        font-size: clamp(2.3rem, 11vw, 3.2rem);
    }

    .auth-panel h2 {
        font-size: 1.9rem;
    }

    .hero-feature {
        grid-template-columns: 1fr;
    }

    .panel-header {
        align-items: flex-start;
    }

    .app-topbar {
        top: 10px;
        gap: 12px;
        padding: 14px 16px;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .app-topbar.is-mobile-hidden {
        transform: translateY(calc(-100% - 18px));
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
    }

    .announcement-bar,
    .discover-welcome,
    .editor-panel,
    .editor-sidecard,
    .profile-hero,
    .story-section {
        padding: 22px 20px;
    }

    .profile-hero {
        align-items: flex-start;
    }

    .profile-summary {
        flex-direction: column;
    }

    .profile-summary > div {
        width: 100%;
    }

    .settings-avatar-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-tabs {
        width: 100%;
        gap: 8px;
    }

    .profile-tab {
        min-height: 46px;
        padding: 10px 12px;
        gap: 8px;
    }

    .profile-tab-label {
        font-size: 0.84rem;
    }

    .profile-tab-count {
        min-width: 24px;
        height: 24px;
        font-size: 0.74rem;
    }

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

    .slug-prefix {
        white-space: normal;
    }

    .novel-submit-row {
        justify-content: stretch;
    }

    .novel-submit-row .primary-btn {
        width: 100%;
    }

    .story-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-form input,
    .primary-btn {
        padding: 15px 16px;
    }

    .app-nav {
        display: none;
    }

    .app-nav-link,
    .app-logout-link {
        width: auto;
        text-align: left;
    }

    .app-brand-lockup {
        gap: 10px;
        min-width: 0;
    }

    .app-topbar-search {
        display: none;
    }

    .app-topbar-logo {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        padding: 6px;
    }

    .app-topbar-title {
        display: block;
        font-size: 1.1rem;
    }

    .profile-drawer {
        display: block;
    }

    .search-page .app-topbar,
    .inbox-page .app-topbar,
    .menu-page .app-topbar {
        display: none;
    }

    .search-story-grid {
        grid-template-columns: 1fr;
    }

    .search-page-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-result-labels {
        gap: 8px;
    }

    .search-result-label {
        width: 100%;
        justify-content: space-between;
    }

    .library-cover-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inbox-message-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .inbox-message-time {
        white-space: normal;
    }

    .app-nav-link-publish {
        display: none;
    }

    .site-footer {
        width: min(calc(100% - 20px), var(--content-width));
        margin-bottom: 18px;
    }

    .site-footer-brand {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 24px;
    }

    .site-footer-links {
        gap: 10px;
    }

    .profile-drawer {
        width: auto;
        flex: 0 0 auto;
    }

    .profile-drawer-menu {
        left: auto;
        right: 0;
        width: min(320px, calc(100vw - 24px));
    }

    .notification-drawer-menu {
        position: fixed;
        top: calc(var(--topbar-overlay-top, 0px) + 12px);
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - var(--topbar-overlay-top, 0px) - 96px);
        padding: 16px 14px;
        border-radius: 26px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-drawer-trigger {
        width: 44px;
        height: 44px;
    }

    .topbar-icon-link {
        width: 44px;
        height: 44px;
    }

    .topbar-icon-link svg {
        width: 22px;
        height: 22px;
    }

    .notification-drawer-head {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-count-strip {
        gap: 8px;
    }

    .notification-count-pill {
        flex: 1 1 0;
        justify-content: center;
        text-align: center;
        min-width: 0;
        padding-inline: 12px;
    }

    .notification-read-btn {
        width: 100%;
        justify-content: center;
    }

    .notification-mini-card {
        padding: 13px;
        border-radius: 16px;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 130;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid rgba(85, 46, 30, 0.1);
        box-shadow: 0 -14px 28px rgba(39, 22, 15, 0.08);
        backdrop-filter: blur(18px);
    }

    .mobile-tab {
        display: grid;
        justify-items: center;
        gap: 8px;
        padding: 8px 4px 6px;
        text-decoration: none;
        color: #9ea4b4;
        font-weight: 700;
        font-size: 0.85rem;
    }

    .mobile-tab-icon {
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
    }

    .mobile-tab-icon svg {
        width: 28px;
        height: 28px;
    }

    .mobile-tab.is-active {
        color: #ef4b4b;
    }

    .mobile-tab-label {
        line-height: 1.1;
    }

    .home-shell {
        padding-bottom: 108px;
    }

    .site-footer {
        margin-bottom: 96px;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-grid-covers {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(140px, 52vw);
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .home-shell:not(.admin-shell) .story-grid-covers,
    .home-shell:not(.admin-shell) .story-grid-unified-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        overflow: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
    }

    .story-grid-covers::-webkit-scrollbar {
        display: none;
    }

    .story-grid-covers .story-card-link {
        scroll-snap-align: start;
    }

    .home-shell:not(.admin-shell) .story-grid-covers .story-card-link,
    .home-shell:not(.admin-shell) .story-grid-unified-strip .story-card-link {
        min-width: 0;
    }

    .story-grid-unified-strip {
        grid-auto-columns: minmax(140px, 52vw);
        gap: 14px;
        padding-bottom: 8px;
    }

    .story-grid-unified-strip::-webkit-scrollbar {
        display: none;
    }

    .story-carousel .story-grid-unified-strip {
        padding-inline: 0;
    }

    .home-shell:not(.admin-shell) .story-carousel-btn {
        display: none;
    }

    .story-carousel-btn {
        width: 38px;
        height: 38px;
        top: calc(50% - 8px);
    }

    .story-carousel-btn.is-prev {
        left: -6px;
    }

    .story-carousel-btn.is-next {
        right: -6px;
    }

    .story-reader-hero {
        grid-template-columns: 1fr;
    }

    .story-reader-cover-wrap {
        max-width: 280px;
        margin: 0 auto;
    }

    .chapter-reader-head,
    .story-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .story-stat-list {
        width: 100%;
    }

    .chapter-nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .chapter-nav-link,
    .chapter-back-link,
    .reader-chapter-link {
        width: 100%;
    }

    .reader-shell {
        width: min(calc(100% - 24px), 980px);
        padding: 24px 0 164px;
    }

    .reader-actions {
        width: min(calc(100% - 20px), 860px);
        bottom: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
        border-radius: 24px;
    }

    .reader-action-btn {
        min-height: 50px;
        font-size: 0.92rem;
    }

    .reader-chapter-content {
        gap: 28px;
    }

    .reader-chapter-content p {
        font-size: 1.02rem;
        line-height: 1.9;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-card {
        padding: 20px;
        border-radius: 22px;
    }

.rating-star span[aria-hidden="true"] {
    width: 44px;
    height: 44px;
}
}

.creator-page {
    background:
        radial-gradient(circle at top left, rgba(26, 190, 148, 0.08), transparent 24%),
        linear-gradient(180deg, #2c2a2a 0%, #202020 100%);
    color: #f4f1ec;
}

.creator-page .app-topbar,
.creator-page .story-section,
.creator-page .editor-panel,
.creator-page .creator-portal,
.creator-page .creator-editor-card {
    background: rgba(32, 32, 32, 0.96);
    border-color: rgba(115, 141, 183, 0.24);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.creator-page .app-topbar,
.creator-page .app-nav-link,
.creator-page .profile-drawer-link,
.creator-page .story-section,
.creator-page .editor-panel,
.creator-page .creator-portal,
.creator-page .creator-editor-card,
.creator-page .story-card h3,
.creator-page .story-card p,
.creator-page .story-card-copy,
.creator-page .story-meta-row span,
.creator-page .story-reader-text p {
    color: #f4f1ec;
}

.creator-page .app-nav-link:hover,
.creator-page .profile-drawer-link:hover,
.creator-page .profile-drawer-link:focus-visible,
.creator-page .app-nav-link:focus-visible {
    background: rgba(27, 183, 143, 0.12);
    color: #9ff3d4;
}

.creator-page .app-nav-link.is-active {
    background: linear-gradient(135deg, #0ac59f, #0ba88a 70%, #067963);
    box-shadow: 0 12px 24px rgba(10, 197, 159, 0.22);
}

.creator-page .panel-kicker,
.creator-page .section-status,
.creator-page .story-empty-badge,
.creator-page .app-brand-lockup .panel-kicker {
    color: #91e9cc;
}

.creator-page .profile-drawer-menu {
    background: rgba(27, 27, 27, 0.98);
    border-color: rgba(115, 141, 183, 0.22);
}

.creator-page .profile-drawer-handle,
.creator-page .creator-page-copy,
.creator-page .creator-greeting,
.creator-page .creator-stat-card span,
.creator-page .creator-story-copy p,
.creator-page .chapter-card-copy,
.creator-page .story-empty-card p {
    color: #c4ccd9;
}

.creator-page .story-empty-card {
    border-color: rgba(115, 141, 183, 0.2);
    background:
        radial-gradient(circle at top right, rgba(14, 195, 155, 0.12), transparent 28%),
        linear-gradient(145deg, rgba(34, 34, 34, 0.96), rgba(27, 27, 27, 0.94));
}

.creator-portal {
    display: grid;
    gap: 28px;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.creator-heading {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.creator-heading h2,
.creator-section h3,
.creator-editor-card h3,
.creator-story-copy h4,
.chapter-card h4 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
}

.creator-greeting {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
}

.creator-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.creator-stat-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.06);
    display: grid;
    gap: 10px;
}

.creator-stat-card p,
.creator-stat-card strong,
.creator-stat-card span {
    margin: 0;
}

.creator-stat-card p {
    font-size: 0.96rem;
    font-weight: 700;
}

.creator-stat-card strong {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    line-height: 1;
}

.creator-stat-card span {
    font-size: 0.88rem;
    color: var(--muted);
}

.creator-section {
    display: grid;
    gap: 20px;
}

.creator-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.creator-section-head-tight {
    align-items: start;
}

.creator-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 13px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.2);
}

.creator-filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.creator-search-input,
.creator-type-select {
    display: block;
    min-width: 220px;
}

.creator-filter-bar input,
.creator-filter-bar select,
.creator-page .story-editor-form input,
.creator-page .story-editor-form textarea {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
}

.creator-filter-bar input::placeholder,
.creator-page .story-editor-form input::placeholder,
.creator-page .story-editor-form textarea::placeholder {
    color: #a48778;
}

.creator-filter-bar input:focus,
.creator-filter-bar select:focus,
.creator-page .story-editor-form input:focus,
.creator-page .story-editor-form textarea:focus {
    outline: none;
    border-color: rgba(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.12);
}

.creator-page .secondary-action-btn {
    background: rgba(44, 44, 44, 0.96);
    border-color: rgba(82, 110, 154, 0.28);
    color: #f4f1ec;
}

.creator-story-list,
.chapter-list {
    display: grid;
    gap: 18px;
}

.creator-story-card-shell {
    display: grid;
    gap: 10px;
}

.creator-story-card,
.chapter-card,
.creator-editor-card {
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
}

.creator-story-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.creator-story-card:hover,
.creator-story-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 18px 30px rgba(39, 22, 15, 0.12);
}

.creator-story-delete-form {
    margin: 0;
    display: flex;
    justify-content: flex-end;
}

.creator-story-delete-form .creator-danger-btn {
    width: auto;
}

.creator-story-cover {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

.creator-story-copy {
    display: grid;
    gap: 10px;
}

.creator-story-type,
.creator-story-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 800;
}

.creator-story-type {
    background: rgba(255, 97, 47, 0.12);
    border: 1px solid rgba(255, 97, 47, 0.18);
    color: var(--brand-deep);
}

.creator-story-copy p,
.creator-page-copy,
.chapter-card-copy {
    color: var(--muted);
    line-height: 1.7;
}

.creator-page-copy {
    margin: 10px 0 0;
}

.chapter-card-copy {
    white-space: normal;
    word-break: break-word;
}

.creator-compact-copy p {
    color: var(--muted);
    line-height: 1.7;
}

.creator-story-meta {
    display: grid;
    justify-items: end;
    gap: 12px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 700;
}

.creator-story-tags span {
    border-radius: 8px;
    padding: 7px 10px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font-size: 0.88rem;
    font-weight: 700;
}

.creator-story-status {
    background: rgba(255, 194, 91, 0.18);
    color: #8b4c14;
}

.creator-story-status-approved {
    background: rgba(29, 170, 116, 0.16);
    color: #147552;
}

.creator-story-status-rejected {
    background: rgba(211, 58, 73, 0.14);
    color: #9f2230;
}

.creator-story-status-pending {
    background: rgba(255, 194, 91, 0.18);
    color: #8b4c14;
}

.creator-story-copy h4 {
    font-size: 1.9rem;
    line-height: 1.1;
}

.creator-story-copy p {
    margin: 0;
}

.creator-story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chapter-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px;
}

.creator-editor-card {
    padding: 24px;
}

.creator-compact-story {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.creator-compact-cover {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

.creator-compact-copy {
    display: grid;
    gap: 10px;
}

.creator-compact-copy h4,
.creator-compact-copy p,
.chapter-card-copy {
    margin: 0;
}

.creator-preview-card {
    margin-top: 10px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 244, 236, 0.82);
    border: 1px solid rgba(85, 46, 30, 0.08);
}

.chapter-card {
    padding: 22px;
}

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

.chapter-card h4 {
    font-size: 1.2rem;
}

.chapter-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.inline-action-form {
    margin: 0;
}

.creator-danger-btn {
    border-color: rgba(182, 46, 22, 0.2);
    background: rgba(182, 46, 22, 0.08);
    color: #922f1d;
}

.creator-danger-btn:hover,
.creator-danger-btn:focus-visible {
    border-color: rgba(182, 46, 22, 0.34);
    box-shadow: 0 12px 24px rgba(146, 47, 29, 0.08);
}

.creator-page .mobile-bottom-nav {
    background: rgba(30, 30, 30, 0.97);
    border-top-color: rgba(82, 110, 154, 0.26);
}

.creator-page .mobile-tab {
    color: #9ea4b4;
}

.creator-page .mobile-tab.is-active {
    color: #1be0b5;
}

@media (max-width: 980px) {
    .creator-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .creator-story-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .creator-story-meta {
        grid-column: 1 / -1;
        justify-items: start;
        grid-auto-flow: column;
    }

    .chapter-editor-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .creator-portal {
        padding: 22px;
        gap: 22px;
        border-radius: 26px;
    }

    .creator-heading {
        gap: 10px;
        padding-bottom: 16px;
    }

    .creator-greeting {
        font-size: 1.8rem;
    }

    .creator-stats-grid {
        grid-template-columns: 1fr;
    }

    .creator-section-head,
    .creator-filter-bar,
    .chapter-card-head,
    .chapter-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .creator-create-btn,
    .creator-search-input,
    .creator-type-select {
        width: 100%;
    }

    .creator-story-card,
    .creator-compact-story {
        grid-template-columns: 1fr;
    }

    .creator-story-cover,
    .creator-compact-cover {
        width: 112px;
    }

    .creator-story-meta {
        grid-column: auto;
        grid-auto-flow: row;
    }

    .creator-editor-card,
    .chapter-card {
        padding: 20px;
    }
}

:root {
    --bg: #eef5ff;
    --bg-strong: #dce9ff;
    --surface: rgba(244, 249, 255, 0.84);
    --surface-strong: rgba(252, 254, 255, 0.92);
    --text: #10213d;
    --muted: #58709a;
    --line: rgba(40, 76, 138, 0.14);
    --brand: #3b82f6;
    --brand-deep: #1d4ed8;
    --brand-soft: #93c5fd;
    --accent: #0f172a;
    --shadow: 0 24px 80px rgba(29, 78, 216, 0.16);
}

body {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 30%),
        radial-gradient(circle at bottom right, rgba(147, 197, 253, 0.28), transparent 26%),
        linear-gradient(135deg, #f7fbff 0%, #e8f1ff 55%, #d8e6ff 100%);
}

.glow-left {
    background: rgba(59, 130, 246, 0.16);
}

.glow-right {
    background: rgba(147, 197, 253, 0.26);
}

.splash-card,
.home-announcement-card,
.admin-hero-card,
.admin-section,
.admin-banner-card,
.story-card,
.app-topbar,
.announcement-bar,
.discover-welcome,
.editor-panel,
.editor-sidecard,
.profile-hero,
.home-banner,
.story-section,
.topbar-icon-link,
.profile-drawer-trigger,
.profile-drawer-menu,
.notification-panel {
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 22px 52px rgba(37, 99, 235, 0.12);
}

.splash-card,
.home-announcement-card,
.admin-section,
.admin-banner-card,
.story-card,
.topbar-icon-link,
.profile-drawer-trigger,
.profile-drawer-menu,
.notification-panel {
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.96), rgba(238, 245, 255, 0.92));
}

.admin-hero-card {
    background:
        radial-gradient(circle at top right, rgba(147, 197, 253, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.96));
}

.home-announcement-actions,
.announcement-bar {
    background:
        linear-gradient(180deg, rgba(249, 252, 255, 0.94), rgba(237, 244, 255, 0.98)),
        linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(147, 197, 253, 0.12));
}

.announcement-label,
.admin-field-note {
    background: rgba(59, 130, 246, 0.1);
    color: var(--brand-deep);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.admin-field-note {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.app-topbar-logo,
.verified-badge {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.14), rgba(147, 197, 253, 0.2));
}

.verified-badge-logo {
    background: #f6faff;
    border-color: rgba(59, 130, 246, 0.16);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.12);
}

.primary-btn,
.announcement-cta-btn,
.home-announcement-dot.is-active,
.app-nav-link.is-active,
.topbar-icon-badge,
.story-rank-badge,
.reader-action-btn.is-primary,
.verified-badge-check,
.admin-section-nav a.is-active,
.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
    background: linear-gradient(135deg, #7db4ff, var(--brand) 68%, var(--brand-deep));
    color: #fff;
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.22);
}

.primary-btn:hover,
.primary-btn:focus-visible,
.announcement-cta-btn:hover,
.announcement-cta-btn:focus-visible {
    box-shadow: 0 18px 32px rgba(59, 130, 246, 0.26);
}

.app-nav-link:hover,
.app-nav-link:focus-visible,
.app-logout-link:hover,
.app-logout-link:focus-visible,
.profile-drawer-link:hover,
.profile-drawer-link:focus-visible {
    background: rgba(59, 130, 246, 0.08);
    color: var(--brand-deep);
}

.app-nav-link.is-active,
.topbar-icon-link.is-active,
.topbar-icon-link:hover,
.topbar-icon-link:focus-visible {
    border-color: rgba(59, 130, 246, 0.24);
    color: var(--brand-deep);
}

.progress-bar {
    background: linear-gradient(90deg, #93c5fd 0%, #3b82f6 55%, #1d4ed8 100%);
}

.auth-hero {
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.86)),
        linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(147, 197, 253, 0.16));
    color: #f8fbff;
}

.auth-hero::after {
    background: radial-gradient(circle, rgba(147, 197, 253, 0.24), transparent 65%);
}

.auth-hero .eyebrow,
.auth-hero .auth-copy,
.auth-hero .hero-feature p,
.auth-hero .hero-quote p {
    color: rgba(232, 242, 255, 0.84);
}

.auth-form input,
.story-editor-form textarea,
.story-editor-form select,
.story-editor-form input[type="file"],
.story-comment-form textarea,
.menu-form textarea,
.novel-builder textarea,
.novel-builder select,
.conversation-textarea {
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(247, 251, 255, 0.96);
}

.auth-form input::placeholder,
.story-editor-form textarea::placeholder,
.menu-form textarea::placeholder,
.novel-builder textarea::placeholder,
.conversation-textarea::placeholder {
    color: #7b91b5;
}

.auth-form input:focus,
.story-editor-form textarea:focus,
.story-editor-form select:focus,
.story-comment-form textarea:focus,
.menu-form textarea:focus,
.novel-builder textarea:focus,
.novel-builder select:focus,
.conversation-textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.72);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

@media (min-width: 961px) {
    .login-view .auth-shell {
        grid-template-columns: minmax(320px, 560px);
        justify-content: center;
    }

    .login-view .auth-hero {
        display: none;
    }
}

@media (max-width: 960px) {
    .login-view .auth-hero {
        display: block;
    }
}

.admin-page .admin-sidebar-card,
.admin-page .admin-panel-card,
.admin-page .admin-table-card,
.admin-page .admin-hero-stat-card,
.admin-page .admin-admin-chip,
.admin-page .admin-header-meta span,
.admin-page .admin-sidebar-list-item,
.admin-page .admin-mini-card,
.admin-page .admin-inline-form select,
.admin-page .admin-score-input,
.admin-page .story-library-btn {
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94));
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.1);
}

.admin-page .admin-sidebar-card-accent {
    background:
        radial-gradient(circle at top right, rgba(147, 197, 253, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(234, 243, 255, 0.95));
}

.admin-page .admin-table th {
    background: rgba(219, 234, 254, 0.7);
    color: var(--brand-deep);
}

.admin-page .admin-table td {
    border-bottom-color: rgba(37, 99, 235, 0.08);
}

.admin-page .admin-section-status,
.admin-page .admin-login-hint,
.admin-page .story-library-btn.is-saved {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.16);
    color: var(--brand-deep);
}

.admin-page .admin-sidebar-list-item strong,
.admin-page .admin-hero-stat-card strong {
    color: #13305d;
}

.admin-page .story-library-btn:hover,
.admin-page .story-library-btn:focus-visible {
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.14);
}

.admin-login-page .panel-logo {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.14), rgba(147, 197, 253, 0.2));
}

.admin-login-page .social-btn,
.admin-login-page .admin-login-hint {
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.1);
}

.admin-login-page .social-btn:hover,
.admin-login-page .social-btn:focus-visible {
    border-color: rgba(59, 130, 246, 0.24);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.14);
}

.admin-login-page .auth-divider {
    color: #6a86b4;
}

.admin-login-page .auth-divider::before,
.admin-login-page .auth-divider::after {
    background: rgba(59, 130, 246, 0.14);
}

@media (max-width: 640px) {
    .mobile-bottom-nav,
    .creator-page .mobile-bottom-nav {
        background: rgba(244, 249, 255, 0.98);
        border-top: 1px solid rgba(37, 99, 235, 0.14);
        box-shadow: 0 -14px 28px rgba(37, 99, 235, 0.12);
    }

    .mobile-tab,
    .creator-page .mobile-tab {
        color: #6f83a8;
    }

    .mobile-tab.is-active,
    .creator-page .mobile-tab.is-active {
        color: var(--brand-deep);
    }

    .app-topbar,
    .profile-drawer-menu,
    .notification-drawer-menu,
    .connections-overlay-panel,
    .site-footer-brand,
    .story-library-btn,
    .story-library-btn-overlay,
    .story-library-btn-inline,
    .search-page-field input,
    .search-page-btn,
    .notification-read-btn,
    .notification-mini-card,
    .reader-end-card,
    .profile-tab,
    .connections-overlay-close {
        background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94));
        border-color: rgba(37, 99, 235, 0.14);
        box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12);
    }

    .notification-mini-card.is-unread,
    .story-library-btn.is-saved,
    .section-status,
    .profile-tab-count,
    .notification-count-pill,
    .profile-tab.is-active .profile-tab-count {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.16);
        color: var(--brand-deep);
    }

    .profile-tab.is-active {
        background: linear-gradient(135deg, #7db4ff, var(--brand) 68%, var(--brand-deep));
        color: #fff;
        border-color: transparent;
        box-shadow: 0 14px 28px rgba(59, 130, 246, 0.2);
    }

    .profile-tab.is-active .profile-tab-count {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .search-page-field input:focus,
    .app-topbar-search-field input:focus {
        border-color: rgba(59, 130, 246, 0.72);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    }

    .search-page-btn:hover,
    .search-page-btn:focus-visible,
    .notification-read-btn:hover,
    .notification-read-btn:focus-visible,
    .story-library-btn:hover,
    .story-library-btn:focus-visible,
    .connections-overlay-close:hover,
    .connections-overlay-close:focus-visible {
        border-color: rgba(59, 130, 246, 0.24);
        box-shadow: 0 14px 28px rgba(59, 130, 246, 0.14);
    }

    .reader-page {
        background: linear-gradient(180deg, #f7fbff 0%, #e8f1ff 100%);
    }

    .reader-actions {
        background: linear-gradient(135deg, #234c98, #1d4ed8 72%, #163a8a);
        box-shadow: 0 20px 40px rgba(29, 78, 216, 0.24);
    }

    .reader-action-btn.is-active {
        background: rgba(147, 197, 253, 0.2);
        color: #eff6ff;
    }
}

@media (max-width: 640px) {
    body,
    .creator-page,
    .reader-page {
        background:
            radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32%),
            radial-gradient(circle at bottom right, rgba(147, 197, 253, 0.26), transparent 28%),
            linear-gradient(135deg, #f7fbff 0%, #e8f1ff 55%, #d8e6ff 100%) !important;
        color: var(--text) !important;
    }

    .auth-panel,
    .auth-hero,
    .announcement-bar,
    .discover-welcome,
    .editor-panel,
    .editor-sidecard,
    .profile-hero,
    .home-banner,
    .story-section,
    .search-user-card,
    .admin-hero-card,
    .admin-section,
    .admin-panel-card,
    .admin-table-card,
    .admin-banner-card,
    .admin-sidebar-card,
    .admin-admin-chip,
    .admin-hero-stat-card,
    .admin-sidebar-list-item,
    .creator-page .app-topbar,
    .creator-page .story-section,
    .creator-page .editor-panel,
    .creator-page .creator-portal,
    .creator-page .creator-editor-card,
    .creator-page .creator-stat-card,
    .creator-page .creator-story-card,
    .creator-page .creator-compact-story,
    .creator-page .chapter-card,
    .creator-page .story-empty-card,
    .creator-page .secondary-action-btn,
    .creator-page .creator-filter-bar input,
    .creator-page .creator-filter-bar select,
    .creator-page .story-editor-form input,
    .creator-page .story-editor-form textarea {
        background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(237, 244, 255, 0.94)) !important;
        border-color: rgba(37, 99, 235, 0.14) !important;
        box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12) !important;
        color: var(--text) !important;
    }

    .admin-sidebar-card-accent,
    .creator-page .story-empty-card {
        background:
            radial-gradient(circle at top right, rgba(147, 197, 253, 0.18), transparent 34%),
            linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(234, 243, 255, 0.95)) !important;
    }

    .admin-header-meta span,
    .admin-section-status,
    .creator-page .section-status,
    .creator-page .story-empty-badge,
    .section-status,
    .notification-count-pill,
    .profile-tab-count,
    .story-library-btn.is-saved {
        background: rgba(59, 130, 246, 0.1) !important;
        border-color: rgba(59, 130, 246, 0.16) !important;
        color: var(--brand-deep) !important;
    }

    .admin-table th {
        background: rgba(219, 234, 254, 0.72) !important;
        color: var(--brand-deep) !important;
    }

    .admin-table td {
        border-bottom-color: rgba(37, 99, 235, 0.08) !important;
    }

    .creator-page .panel-kicker,
    .creator-page .app-brand-lockup .panel-kicker,
    .creator-page .creator-stat-card span,
    .creator-page .creator-story-copy p,
    .creator-page .chapter-card-copy,
    .creator-page .creator-page-copy,
    .creator-page .story-card h3,
    .creator-page .story-card p,
    .creator-page .story-card-copy,
    .creator-page .story-meta-row span,
    .creator-page .story-reader-text p,
    .creator-page .profile-drawer-link,
    .creator-page .app-nav-link {
        color: var(--text) !important;
    }

    .panel-logo,
    .app-topbar-logo {
        background: linear-gradient(145deg, rgba(59, 130, 246, 0.14), rgba(147, 197, 253, 0.2)) !important;
    }

    .creator-create-btn,
    .primary-btn,
    .search-page-btn,
    .app-topbar-search-btn {
        background: linear-gradient(135deg, #7db4ff, var(--brand) 68%, var(--brand-deep)) !important;
        color: #fff !important;
        border-color: transparent !important;
        box-shadow: 0 14px 28px rgba(59, 130, 246, 0.22) !important;
    }

    .login-view .auth-hero {
        display: none !important;
    }

    .login-view .auth-shell {
        grid-template-columns: 1fr !important;
        justify-content: center;
    }
}
