: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(260px, 320px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

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

.admin-sidebar-card {
    padding: 24px;
    border-radius: 30px;
    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-head {
    display: grid;
    gap: 8px;
}

.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: 12px;
    margin-top: 18px;
}

.admin-section-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid rgba(28, 23, 15, 0.1);
    background: rgba(255, 255, 255, 0.92);
    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: rgba(255, 255, 255, 0.98);
    color: var(--text);
    transform: translateY(-1px);
    border-color: rgba(79, 141, 255, 0.3);
    box-shadow: 0 16px 26px rgba(79, 141, 255, 0.14);
}

.admin-section-nav-label {
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.2;
}

.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-nav-arrow {
    flex: 0 0 auto;
    color: var(--brand-deep);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.admin-section-nav a.is-active .admin-section-nav-arrow,
.admin-section-nav a:hover .admin-section-nav-arrow,
.admin-section-nav a:focus-visible .admin-section-nav-arrow {
    color: inherit;
}

.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-sidebar-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.admin-sidebar-actions .story-library-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.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;
}

.admin-monetization-story-form,
.admin-paid-chapter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.admin-monetization-story-form label,
.admin-paid-chapter-form .admin-checkbox {
    margin-right: 2px;
}

.admin-search-field {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-search-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(28, 23, 15, 0.14);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.admin-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);
}

.admin-search-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-search-form-row input {
    flex: 1 1 320px;
}

.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-user-table td[data-label="Actions"] {
    width: 1%;
    white-space: nowrap;
}

.admin-user-actions {
    flex-direction: column;
    align-items: stretch;
    min-width: 168px;
}

.admin-user-status-form {
    flex-direction: column;
    align-items: stretch;
}

.admin-user-status-form select,
.admin-user-actions .story-library-btn,
.admin-user-actions .admin-inline-form {
    width: 100%;
}

.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(43, 185, 246, 0.12), rgba(8, 118, 229, 0.16));
    border: 1px solid rgba(8, 118, 229, 0.22);
    color: #07589f;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 18px rgba(8, 118, 229, 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-mark {
    width: 100%;
    height: 100%;
    object-fit: contain;
    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-identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.admin-mini-card-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-mini-card-label-story {
    background: rgba(47, 103, 199, 0.14);
    color: #1f57b6;
}

.admin-mini-card-label-comment {
    background: rgba(26, 163, 111, 0.14);
    color: #148055;
}

.admin-mini-card-label-general {
    background: rgba(255, 97, 47, 0.14);
    color: #c14a1f;
}

.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-report-grid {
    display: grid;
    gap: 18px;
}

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

.admin-report-statuses,
.admin-report-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-report-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-report-body {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 245, 239, 0.8);
    border: 1px solid rgba(255, 97, 47, 0.08);
}

.admin-report-body p,
.admin-report-response p {
    margin: 0;
    line-height: 1.7;
    white-space: pre-wrap;
}

.admin-report-response {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
    color: var(--muted);
}

.admin-report-response strong {
    color: var(--text);
}

.admin-report-response span {
    font-size: 0.84rem;
}

.admin-report-form {
    gap: 12px;
}

.admin-report-textarea {
    min-height: 120px;
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.admin-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-pagination .story-library-btn.is-active {
    background: linear-gradient(135deg, #ff612f, #cc461d);
    color: #fff7f1;
    border-color: transparent;
}

.admin-pagination .story-library-btn.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.admin-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    color: var(--muted);
    font-weight: 700;
}

.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;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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: none;
}

.legal-doc-page .home-shell {
    width: min(calc(100% - 32px), var(--content-width));
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 40px;
}

.legal-doc-page .legal-doc-main-shell {
    width: min(100%, 1180px);
    min-height: auto;
    margin: 0 auto;
    padding: 32px 0 56px;
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
}

.legal-doc-shell.auth-panel {
    padding: 40px;
    align-self: stretch;
}

.legal-doc-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(85, 46, 30, 0.12);
}

.legal-doc-hero-copy {
    display: grid;
    gap: 10px;
    max-width: 720px;
}

.legal-doc-title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    line-height: 1.05;
}

.legal-doc-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.legal-page-actions {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.legal-page-actions .secondary-action-btn {
    padding: 9px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none;
}

.legal-page-actions .secondary-action-btn:hover,
.legal-page-actions .secondary-action-btn:focus-visible {
    box-shadow: 0 8px 16px rgba(39, 22, 15, 0.06);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.legal-meta span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font-size: 0.84rem;
    font-weight: 700;
}

.legal-doc-layout {
    display: grid;
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 28px;
}

.legal-doc-sidebar {
    position: sticky;
    top: 28px;
}

.legal-sidebar-card {
    display: grid;
    gap: 18px;
    padding: 18px 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 252, 248, 0.94);
}

.legal-sidebar-section {
    display: grid;
    gap: 10px;
}

.legal-sidebar-section + .legal-sidebar-section {
    padding-top: 14px;
    border-top: 1px solid rgba(85, 46, 30, 0.12);
}

.legal-sidebar-heading {
    margin: 0;
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legal-policy-nav,
.legal-page-toc {
    display: grid;
    gap: 6px;
}

.legal-policy-link,
.legal-page-toc-link {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.legal-policy-link {
    font-weight: 700;
}

.legal-page-toc-link {
    color: var(--muted);
    font-size: 0.95rem;
}

.legal-page-toc-link.is-child {
    padding-left: 22px;
    font-size: 0.9rem;
}

.legal-policy-link:hover,
.legal-policy-link:focus-visible,
.legal-page-toc-link:hover,
.legal-page-toc-link:focus-visible {
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
    transform: translateX(2px);
}

.legal-policy-link.is-active {
    background: #2d2757;
    color: #fff;
}

.legal-doc-content {
    min-width: 0;
}

.legal-doc-content [id] {
    scroll-margin-top: 112px;
}

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

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

.terms-copy a {
    color: var(--brand-deep);
    font-weight: 700;
}

.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);
}

@media (max-width: 900px) {
    .legal-doc-page .home-shell {
        width: min(calc(100% - 24px), var(--content-width));
    }

    .legal-doc-page .legal-doc-main-shell {
        width: 100%;
        padding: 20px 0 40px;
    }

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

    .legal-doc-hero {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 20px;
    }

    .legal-page-actions {
        justify-content: flex-start;
    }

    .legal-doc-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .legal-doc-sidebar {
        position: static;
    }
}

.about-brand-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.about-inline-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(255, 97, 47, 0.12), rgba(255, 194, 91, 0.18));
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.08);
}

.about-info-block {
    display: grid;
    gap: 14px;
}

.about-info-block h3 {
    margin: 0;
}

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

.about-info-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.9);
    border: 1px solid rgba(85, 46, 30, 0.1);
}

.about-info-card strong {
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-deep);
}

.about-info-card span {
    color: var(--text);
    line-height: 1.65;
}

.about-leadership-block {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
}

.about-leadership-photo {
    width: min(100%, 320px);
    justify-self: center;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(39, 22, 15, 0.12);
    border: 1px solid rgba(85, 46, 30, 0.08);
}

.about-leadership-copy {
    display: grid;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.about-leadership-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
    align-items: start;
}

.about-leadership-detail-card {
    align-content: start;
    min-width: 0;
}

.about-leadership-detail-card h3 {
    margin: 0;
}

.about-leadership-detail-card p,
.about-leadership-detail-card ul {
    margin: 0;
    line-height: 1.8;
    overflow-wrap: break-word;
    word-break: normal;
}

.about-leadership-detail-card ul {
    padding-left: 20px;
}

@media (max-width: 760px) {
    .about-leadership-details {
        grid-template-columns: 1fr;
    }
}

.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: 8px;
    width: min(100%, 420px);
    padding: 14px 22px 12px;
    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: grid;
    justify-items: center;
}

.site-footer-logo {
    width: auto;
    height: 38px;
    max-width: 160px;
    object-fit: contain;
}

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

.site-footer-social-link {
    width: 34px;
    height: 34px;
    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: 17px;
    height: 17px;
}

.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-secondary {
    gap: 10px;
}

.site-footer-links-secondary a:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: rgba(88, 112, 154, 0.72);
}

.site-footer-links a {
    color: var(--muted);
    font-size: 0.8rem;
    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.8rem;
    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.is-mobile-hidden {
    transform: translateY(calc(-100% - 18px));
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
}

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

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

body.has-read-mode-modal {
    overflow: hidden;
}

body.has-share-modal {
    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;
    position: relative;
}

.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-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    z-index: 35;
    display: grid;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 252, 249, 0.98);
    box-shadow: 0 24px 50px rgba(39, 22, 15, 0.16);
}

.app-topbar-search-section {
    display: grid;
    gap: 12px;
}

.app-topbar-search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-topbar-search-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #7f7f90;
}

.app-topbar-search-clear {
    border: 0;
    padding: 0;
    background: transparent;
    color: #5b76d6;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.app-topbar-search-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.app-topbar-search-list {
    display: grid;
    gap: 6px;
}

.app-topbar-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px 0;
    color: var(--text);
    text-decoration: none;
}

.app-topbar-search-item::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(85, 46, 30, 0.38);
    border-radius: 4px;
}

.app-topbar-search-item-history::before {
    border-radius: 999px;
}

.app-topbar-search-item-copy {
    display: grid;
    min-width: 0;
}

.app-topbar-search-item-copy strong,
.app-topbar-search-item-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-search-item-copy strong {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 500;
}

.app-topbar-search-item-copy small {
    color: var(--muted);
    font-size: 0.82rem;
}

.app-topbar-search-item:hover .app-topbar-search-item-copy strong,
.app-topbar-search-item:focus-visible .app-topbar-search-item-copy strong {
    color: var(--brand-deep);
}

.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);
}

.notification-drawer-mobile {
    display: none;
}

.notification-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 40px;
    padding-inline: 11px;
}

.notification-nav-link-icon {
    width: 18px;
    height: 18px;
}

.topbar-icon-badge-nav {
    top: -7px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.62rem;
}

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

.profile-drawer-trigger {
    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);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
}

.profile-drawer-trigger-mobile-only {
    display: none;
    text-decoration: none;
}

.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-balance {
    margin: 10px 0 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-drawer-balance span,
.profile-drawer-balance strong {
    margin: 0;
}

.profile-drawer-balance span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.profile-drawer-balance strong {
    color: var(--brand-deep);
    font-size: 0.94rem;
}

.profile-drawer-monetization {
    margin: 6px 0 4px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 250, 246, 0.96);
    border: 1px solid rgba(85, 46, 30, 0.1);
    display: grid;
    gap: 10px;
}

.profile-drawer-monetization-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.profile-drawer-monetization-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.profile-drawer-monetization-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 97, 47, 0.06);
    border: 1px solid rgba(255, 97, 47, 0.1);
    display: grid;
    gap: 4px;
}

.profile-drawer-monetization-item span,
.profile-drawer-monetization-item strong {
    margin: 0;
}

.profile-drawer-monetization-item span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.profile-drawer-monetization-item strong {
    font-size: 0.9rem;
    color: var(--brand-deep);
}

.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;
    min-width: 0;
}

.search-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.search-story-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 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;
}

.search-page-section-discovery .search-page-form {
    margin-bottom: 28px;
}

.search-discovery {
    display: grid;
    gap: 22px;
}

.search-discovery-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.search-quick-panel {
    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);
    display: grid;
    gap: 14px;
}

.search-quick-panel-head,
.search-quick-panel-head h3,
.search-quick-panel-head p {
    margin: 0;
}

.search-quick-panel-head h3 {
    font-size: 1.1rem;
}

.search-quick-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(85, 46, 30, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.search-chip span,
.search-chip strong {
    margin: 0;
}

.search-chip span {
    line-height: 1.4;
}

.search-chip strong {
    min-width: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--brand-deep);
    font-size: 0.8rem;
    text-align: center;
}

.search-chip-popular strong {
    background: rgba(255, 97, 47, 0.12);
    color: #c24f20;
}

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

.search-discovery-head h3,
.search-discovery-head p {
    margin: 0;
}

.search-discovery-head h3 {
    font-size: 1.55rem;
    line-height: 1.05;
}

.search-discovery-head p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
}

.search-discovery-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #7f8595;
}

.search-discovery-icon svg {
    width: 24px;
    height: 24px;
}

.search-suggestion-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
}

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

.search-suggestion-grid .story-card.story-card-cover-only {
    border-radius: 30px;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.search-suggestion-grid .story-card.story-card-cover-only .story-cover-image,
.search-suggestion-grid .story-card.story-card-cover-only .story-cover {
    aspect-ratio: 0.78;
    border-radius: 30px;
}

.search-suggestion-grid .story-card-link:hover .story-card.story-card-cover-only,
.search-suggestion-grid .story-card-link:focus-visible .story-card.story-card-cover-only {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.12);
}

.profile-story-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

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

.profile-story-grid .story-card.story-card-cover-only {
    border-radius: 28px;
    overflow: hidden;
}

.profile-story-grid .story-card.story-card-cover-only .story-cover-image,
.profile-story-grid .story-card.story-card-cover-only .story-cover {
    aspect-ratio: 0.72;
    border-radius: 28px;
}

.profile-story-grid .story-card-link:hover .story-card.story-card-cover-only,
.profile-story-grid .story-card-link:focus-visible .story-card.story-card-cover-only {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.12);
}

.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;
}

.feed-compose-section,
.feed-post-list {
    display: grid;
    gap: 18px;
}

.feed-compose-card,
.feed-post-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.96);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 16px 30px rgba(39, 22, 15, 0.08);
}

.feed-compose-head,
.feed-post-head,
.feed-post-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feed-post-head {
    justify-content: space-between;
    align-items: flex-start;
}

.feed-post-meta {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.feed-post-user-copy,
.feed-compose-head > div {
    display: grid;
    gap: 4px;
}

.feed-post-user-copy h3,
.feed-post-user-copy p,
.feed-post-time,
.feed-compose-head h3,
.feed-compose-head p {
    margin: 0;
}

.feed-post-user-copy h3,
.feed-compose-head h3 {
    font-size: 1rem;
}

.feed-post-user-copy p,
.feed-post-time,
.feed-compose-head p,
.feed-upload-note {
    color: var(--muted);
    font-size: 0.88rem;
}

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

.feed-compose-textarea {
    min-height: 140px;
    resize: vertical;
}

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

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

.feed-upload-btn {
    cursor: pointer;
}

.feed-upload-note {
    margin-right: auto;
}

.feed-image-preview,
.feed-current-image-block,
.feed-post-manage-panel {
    display: grid;
    gap: 12px;
}

.feed-image-preview {
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(85, 46, 30, 0.1);
    background: rgba(255, 255, 255, 0.7);
}

.feed-image-preview[hidden] {
    display: none;
}

.feed-image-preview-image {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(85, 46, 30, 0.08);
}

.feed-image-preview-copy {
    display: grid;
    gap: 10px;
}

.feed-image-preview-name {
    margin: 0;
    color: var(--text);
    word-break: break-word;
}

.feed-image-preview-clear {
    justify-self: start;
}

.feed-post-text {
    margin: 0;
    color: var(--text);
    line-height: 1.85;
    white-space: normal;
    word-break: break-word;
}

.feed-post-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.feed-post-link:hover,
.feed-post-link:focus-visible {
    color: var(--accent-strong);
}

.feed-post-image {
    width: min(100%, 720px);
    border-radius: 22px;
    border: 1px solid rgba(85, 46, 30, 0.08);
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.1);
}

.feed-post-engagement {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(85, 46, 30, 0.08);
}

.feed-post-action-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.feed-reaction-form {
    position: relative;
}

.feed-post-icon-btn {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    color: #6f4a3b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.feed-post-icon-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.feed-post-icon-glyph {
    font-size: 1.6rem;
    line-height: 1;
}

.feed-reaction-trigger.is-heart,
.feed-reaction-option.is-heart {
    color: #e11d48;
}

.feed-reaction-trigger.is-laugh,
.feed-reaction-option.is-laugh {
    color: #d97706;
}

.feed-reaction-trigger.is-sad,
.feed-reaction-option.is-sad {
    color: #0284c7;
}

.feed-reaction-picker {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.14);
    backdrop-filter: blur(14px);
}

.feed-reaction-option {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 248, 241, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.feed-reaction-option:hover,
.feed-reaction-option:focus-visible,
.feed-reaction-option.is-selected {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 24px rgba(39, 22, 15, 0.12);
    background: #ffffff;
}

.feed-current-image {
    max-width: 360px;
}

.feed-post-edited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(156, 93, 62, 0.12);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feed-post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.feed-post-manage {
    flex: 1 1 100%;
}

.feed-post-manage-trigger {
    list-style: none;
    display: inline-flex;
}

.feed-post-manage-trigger::-webkit-details-marker {
    display: none;
}

.feed-post-manage-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(85, 46, 30, 0.08);
}

.feed-post-comments {
    display: grid;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(85, 46, 30, 0.08);
}

.feed-post-comments.is-open {
    animation: feed-comments-reveal 0.22s ease;
}

.feed-post-comments-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.feed-post-comments-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-post-comments-head h4,
.feed-post-comments-note {
    margin: 0;
}

.feed-post-comments-head h4 {
    font-size: 1rem;
}

.feed-post-comments-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.feed-post-comments-close {
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feed-post-comments-close:hover,
.feed-post-comments-close:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
}

.feed-post-comment-form {
    gap: 10px;
}

.feed-post-comment-form .primary-btn {
    justify-self: start;
}

.feed-comment-copy {
    line-height: 1.75;
}

.feed-remove-image-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

@keyframes feed-comments-reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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);
}

.section-status-link {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.section-status-link:hover,
.section-status-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(255, 97, 47, 0.14);
}

.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-compact {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.story-card-link:hover .story-card.story-card-compact,
.story-card-link:focus-visible .story-card.story-card-compact {
    box-shadow: none;
}

.story-card-compact .story-cover-image,
.story-card-compact .story-cover {
    display: block;
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card-link:hover .story-card-compact .story-cover-image,
.story-card-link:hover .story-card-compact .story-cover,
.story-card-link:focus-visible .story-card-compact .story-cover-image,
.story-card-link:focus-visible .story-card-compact .story-cover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(39, 22, 15, 0.16);
}

.story-card-compact .story-card-body {
    display: grid;
    gap: 4px;
    padding: 12px 4px 0;
}

.story-card-compact h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-author {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-recommendation-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 182px);
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.story-recommendation-strip .story-card-shell,
.story-recommendation-strip .story-card-link {
    min-width: 0;
}

.story-recommendation-strip .story-card-shell {
    gap: 0;
    scroll-snap-align: start;
}

.story-recommendation-strip .story-card-compact .story-cover-image,
.story-recommendation-strip .story-card-compact .story-cover {
    border-radius: 22px;
    box-shadow: 0 14px 28px rgba(39, 22, 15, 0.14);
}

.story-recommendation-strip .story-card-link:hover .story-card-compact .story-cover-image,
.story-recommendation-strip .story-card-link:hover .story-card-compact .story-cover,
.story-recommendation-strip .story-card-link:focus-visible .story-card-compact .story-cover-image,
.story-recommendation-strip .story-card-link:focus-visible .story-card-compact .story-cover {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px rgba(39, 22, 15, 0.18);
}

.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;
}

.blankink-blog-grid,
.blankink-blog-strip {
    gap: 14px;
}

.blankink-blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: start;
}

.blankink-blog-card-link {
    height: 100%;
    max-width: none;
}

.blankink-blog-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    height: 100%;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 14px 24px rgba(39, 22, 15, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.blankink-blog-card-media {
    width: 94px;
    min-width: 94px;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(247, 237, 228, 0.9);
    border: 1px solid rgba(85, 46, 30, 0.08);
    box-shadow: 0 8px 18px rgba(39, 22, 15, 0.08);
}

.blankink-blog-card .story-cover,
.blankink-blog-card .story-cover-image {
    display: block;
    width: 100%;
}

.blankink-blog-card .story-cover {
    aspect-ratio: 2 / 3;
}

.blankink-blog-card .story-cover-image {
    height: auto;
    max-height: 128px;
    aspect-ratio: auto;
    object-fit: contain;
    background: transparent;
}

.blankink-blog-card-title {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.blankink-blog-card-title h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blankink-blog-card-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.blankink-article-hero {
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
}

.blankink-article-hero .story-reader-copy {
    justify-content: center;
}

.blankink-article-hero .story-reader-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.blankink-article-page .home-shell {
    gap: 24px;
}

.blankink-article-layout {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 28px;
    gap: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 244, 0.96));
}

.blankink-article-header {
    display: grid;
    gap: 22px;
}

.blankink-article-cover {
    width: 100%;
    max-height: 540px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 24px 44px rgba(39, 22, 15, 0.12);
}

.blankink-article-title-wrap {
    width: min(100%, 760px);
    margin: 0 auto;
    display: grid;
    gap: 10px;
    text-align: center;
}

.blankink-article-title-wrap h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.blankink-article-body {
    width: min(100%, 760px);
    margin: 0 auto;
    gap: 20px;
}

.blankink-article-body,
.blankink-article-body div,
.blankink-article-body p,
.blankink-article-body li {
    font-size: clamp(1.02rem, 1.35vw, 1.12rem);
    line-height: 1.95;
}

.blankink-article-body h2 {
    margin-top: 12px;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.blankink-article-body h3 {
    margin-top: 10px;
    font-size: clamp(1.32rem, 2.2vw, 1.7rem);
}

.blankink-article-body img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 20px auto;
    border-radius: 24px;
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.12);
}

@media (max-width: 640px) {
    .blankink-blog-card {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .blankink-blog-card-media {
        width: 82px;
        min-width: 82px;
        border-radius: 10px;
    }

    .blankink-blog-card .story-cover-image {
        max-height: 112px;
    }

    .blankink-blog-card-title h3 {
        font-size: 0.92rem;
    }

    .blankink-blog-card-title p {
        font-size: 0.82rem;
    }

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

    .blankink-article-hero .story-reader-copy h2 {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    .blankink-article-layout {
        width: 100%;
        padding: 18px 16px;
        gap: 20px;
    }

    .blankink-article-cover {
        max-height: 240px;
        border-radius: 20px;
    }

    .blankink-article-title-wrap {
        width: 100%;
        gap: 8px;
    }

    .blankink-article-title-wrap h1 {
        font-size: clamp(1.65rem, 8vw, 2.2rem);
        line-height: 1.06;
    }

    .blankink-article-body {
        width: 100%;
        gap: 18px;
    }

    .blankink-article-body,
    .blankink-article-body div,
    .blankink-article-body p,
    .blankink-article-body li {
        font-size: 0.98rem;
        line-height: 1.82;
    }

    .blankink-article-body img {
        margin: 18px auto;
        border-radius: 18px;
    }

    .article-editor img {
        margin: 16px auto;
    }
}

.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-action-button-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.story-action-button-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-action-button-icon svg {
    width: 100%;
    height: 100%;
}

.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;
    justify-content: 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-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.story-stat-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-deep);
}

.story-stat-icon svg {
    width: 100%;
    height: 100%;
}

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

.story-detail-meta {
    display: grid;
    gap: 12px;
}

.story-detail-meta-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(112, 154, 237, 0.14);
    box-shadow: 0 12px 24px rgba(70, 108, 184, 0.08);
}

.story-detail-meta-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(79, 141, 255, 0.12);
    color: #2f67c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-detail-meta-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.story-detail-meta-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.story-detail-meta-label {
    margin: 0;
    color: #486182;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.story-detail-meta-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-detail-meta-values span {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(79, 141, 255, 0.1);
    color: var(--brand-deep);
    border: 1px solid rgba(112, 154, 237, 0.16);
    font-size: 0.88rem;
    font-weight: 700;
}

.story-action-row {
    display: grid;
    gap: 14px;
    align-items: start;
}

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

.story-secondary-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 18px;
}

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

.story-read-mobile-modes {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.story-progress-note {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 640px) {
    .story-start-btn-desktop {
        display: inline-flex !important;
        width: 100%;
    }

    .story-read-mobile-modes {
        display: none !important;
    }
}

.story-read-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 24px;
}

.story-read-modal[hidden] {
    display: none;
}

.story-read-modal-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(8, 8, 10, 0.68);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.story-read-modal-dialog {
    position: relative;
    width: min(100%, 620px);
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(26, 26, 28, 0.98), rgba(19, 19, 21, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
    color: #f6f7fb;
    display: grid;
    gap: 18px;
}

.story-read-modal-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.story-read-modal-dialog h2,
.story-read-modal-copy {
    margin: 0;
    text-align: center;
}

.story-read-modal-dialog h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.story-read-modal-copy {
    color: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
}

.story-read-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.story-read-choice {
    min-height: 240px;
    border-radius: 22px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: #f6f7fb;
    padding: 22px;
    display: grid;
    align-content: space-between;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.story-read-choice::after {
    content: "";
    width: 88px;
    height: 88px;
    justify-self: center;
    border-radius: 24px;
    border: 4px solid rgba(222, 231, 247, 0.92);
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.04);
    opacity: 0.92;
}

.story-read-choice:first-child::after {
    background:
        linear-gradient(90deg, transparent 0 20%, rgba(222, 231, 247, 0.92) 20% 24%, transparent 24%),
        radial-gradient(circle at 62% 28%, rgba(222, 231, 247, 0.92) 0 10%, transparent 11%),
        radial-gradient(circle at 42% 45%, rgba(222, 231, 247, 0.92) 0 8%, transparent 9%),
        linear-gradient(180deg, transparent 0 72%, rgba(222, 231, 247, 0.92) 72% 78%, transparent 78%);
}

.story-read-choice:last-child::after {
    background:
        linear-gradient(180deg, rgba(222, 231, 247, 0.92) 0 6%, transparent 6% 28%, rgba(222, 231, 247, 0.92) 28% 34%, transparent 34% 56%, rgba(222, 231, 247, 0.92) 56% 62%, transparent 62% 84%, rgba(222, 231, 247, 0.92) 84% 90%, transparent 90%),
        linear-gradient(90deg, transparent 0 14%, rgba(222, 231, 247, 0.92) 14% 20%, transparent 20%);
}

.story-read-choice:hover,
.story-read-choice:focus-visible,
.story-read-choice.is-selected {
    transform: translateY(-2px);
    border-color: rgba(212, 159, 43, 0.8);
    background: rgba(212, 159, 43, 0.08);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
}

.story-read-choice-title,
.story-read-choice-copy {
    display: block;
}

.story-read-choice-title {
    font-size: 1.5rem;
    font-weight: 800;
}

.story-read-choice-copy {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.65;
    font-size: 0.95rem;
}

.story-read-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.story-read-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #f6f7fb;
    border-color: rgba(255, 255, 255, 0.08);
}

.story-read-confirm {
    min-width: 140px;
    justify-content: center;
    background: linear-gradient(135deg, #b48923, #9c7719 72%, #6b5210);
    box-shadow: 0 14px 28px rgba(156, 119, 25, 0.28);
}

.story-share-modal {
    position: fixed;
    inset: 0;
    z-index: 225;
    display: grid;
    place-items: center;
    padding: 24px;
}

.story-share-modal[hidden] {
    display: none;
}

.story-share-modal-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(16, 19, 28, 0.24);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.story-share-modal-dialog {
    position: relative;
    width: min(100%, 680px);
    padding: 36px 30px 28px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(40, 53, 86, 0.1);
    box-shadow: 0 28px 60px rgba(20, 33, 61, 0.18);
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}

.story-share-modal-dismiss {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6f7894;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.story-share-modal-dismiss:hover,
.story-share-modal-dismiss:focus-visible {
    background: rgba(111, 120, 148, 0.12);
    color: #24304e;
}

.story-share-modal-dismiss svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.story-share-modal-kicker {
    margin: 18px 0 0;
    color: #64708f;
    font-size: 1.05rem;
    line-height: 1.5;
}

.story-share-modal-dialog h2 {
    margin: 0;
    max-width: 28ch;
    color: #1e2740;
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    line-height: 1.3;
}

.story-share-modal-status {
    min-height: 24px;
    margin: 0;
    color: #20744a;
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.story-share-modal-status.is-visible {
    opacity: 1;
}

.story-share-modal-grid {
    width: 100%;
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.story-share-action-card {
    border: 1px solid rgba(129, 157, 211, 0.2);
    border-radius: 18px;
    padding: 18px 14px 16px;
    background: linear-gradient(180deg, #f5f9ff, #eef4fb);
    color: #1f2a44;
    display: grid;
    justify-items: center;
    gap: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.story-share-action-card:hover,
.story-share-action-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(49, 109, 223, 0.28);
    box-shadow: 0 18px 28px rgba(53, 84, 139, 0.12);
}

.story-share-action-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #ffffff;
    color: #121826;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(129, 157, 211, 0.12);
}

.story-share-action-card[data-share-action="facebook"] .story-share-action-icon {
    color: #1877f2;
}

.story-share-action-card[data-share-action="instagram"] .story-share-action-icon {
    color: #111111;
}

.story-share-action-card[data-share-action="copy"] .story-share-action-icon {
    color: #55627f;
}

.story-share-action-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.story-share-action-label {
    display: block;
    color: #31405f;
    font-size: 0.95rem;
}

.story-report-modal {
    position: fixed;
    inset: 0;
    z-index: 226;
    display: grid;
    place-items: center;
    padding: 24px;
}

.story-report-modal[hidden] {
    display: none;
}

.story-report-modal-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(16, 19, 28, 0.24);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.story-report-modal-dialog {
    position: relative;
    width: min(100%, 520px);
    padding: 34px 28px 26px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(40, 53, 86, 0.1);
    box-shadow: 0 28px 60px rgba(20, 33, 61, 0.18);
}

.story-report-modal-dismiss {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6f7894;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.story-report-modal-dismiss:hover,
.story-report-modal-dismiss:focus-visible {
    background: rgba(111, 120, 148, 0.12);
    color: #24304e;
}

.story-report-modal-dismiss svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.story-report-modal-form {
    display: grid;
    gap: 14px;
    color: #1f2a44;
}

.story-report-modal-form h2 {
    margin: 0;
    text-align: center;
    color: #1e2740;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.story-report-modal-copy {
    margin: 0;
    text-align: center;
    color: #64708f;
    line-height: 1.55;
}

.story-report-modal-message {
    margin-top: -2px;
}

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

.story-report-fieldset legend,
.story-report-details-label {
    padding: 0;
    color: #1e2740;
    font-weight: 800;
}

.story-report-option-list {
    display: grid;
    gap: 12px;
}

.story-report-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
}

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

.story-report-option-box {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 6px;
    border: 1.5px solid rgba(95, 111, 145, 0.72);
    background: #ffffff;
    box-shadow: inset 0 0 0 0 rgba(47, 103, 199, 0.18);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.story-report-option-copy {
    color: #6a7898;
    font-weight: 700;
    line-height: 1.45;
}

.story-report-option input:checked + .story-report-option-box {
    border-color: #2f67c7;
    background: rgba(47, 103, 199, 0.12);
    box-shadow: inset 0 0 0 4px #ffffff, 0 0 0 1px rgba(47, 103, 199, 0.18);
}

.story-report-option input:checked + .story-report-option-box + .story-report-option-copy {
    color: #2f67c7;
}

.story-report-details {
    width: 100%;
    min-height: 118px;
    border: 1px solid rgba(196, 207, 230, 0.88);
    border-radius: 10px;
    padding: 12px 14px;
    background: #ffffff;
    color: #1f2a44;
    font: inherit;
    resize: vertical;
}

.story-report-details:focus {
    outline: none;
    border-color: rgba(47, 103, 199, 0.54);
    box-shadow: 0 0 0 4px rgba(47, 103, 199, 0.12);
}

.story-report-char-count,
.story-report-helper-copy {
    margin: 0;
    color: #7a88a7;
    font-size: 0.94rem;
    line-height: 1.55;
}

.story-report-helper-copy a {
    color: #20a6ea;
    text-decoration: none;
}

.story-report-helper-copy a:hover,
.story-report-helper-copy a:focus-visible {
    text-decoration: underline;
}

.story-report-confirm-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    background: #b6b3c3;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.story-report-confirm-btn.is-active {
    background: linear-gradient(135deg, #2f67c7 0%, #20a6ea 100%);
    box-shadow: 0 14px 30px rgba(32, 166, 234, 0.24);
}

.story-report-confirm-btn:hover,
.story-report-confirm-btn:focus-visible {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.story-comment-report-modal {
    position: fixed;
    inset: 0;
    z-index: 227;
    display: grid;
    place-items: center;
    padding: 24px;
}

.story-comment-report-modal[hidden] {
    display: none;
}

.story-comment-report-modal-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(16, 19, 28, 0.24);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.story-comment-report-modal-dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: min(86vh, 820px);
    overflow-y: auto;
    padding: 34px 28px 26px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(40, 53, 86, 0.1);
    box-shadow: 0 28px 60px rgba(20, 33, 61, 0.18);
}

.story-comment-report-modal-dismiss {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6f7894;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.story-comment-report-modal-dismiss:hover,
.story-comment-report-modal-dismiss:focus-visible {
    background: rgba(111, 120, 148, 0.12);
    color: #24304e;
}

.story-comment-report-modal-dismiss svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.story-comment-report-modal-form {
    display: grid;
    gap: 16px;
    color: #1f2a44;
}

.story-comment-report-modal-form h2 {
    margin: 0;
    text-align: center;
    color: #1e2740;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.story-comment-report-modal-copy {
    margin: 0;
    text-align: center;
    color: #64708f;
    line-height: 1.55;
}

.story-comment-report-modal-message {
    margin-top: -4px;
}

.story-comment-report-fieldset {
    margin: 0;
    border: none;
    padding: 0;
}

.story-comment-report-option-list {
    display: grid;
    gap: 12px;
}

.story-comment-report-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
}

.story-comment-report-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.story-comment-report-option-box {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1.5px solid rgba(95, 111, 145, 0.72);
    background: #ffffff;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.story-comment-report-option-copy {
    display: grid;
    gap: 4px;
    color: #6a7898;
}

.story-comment-report-option-copy strong {
    color: #1e2740;
    font-size: 1rem;
}

.story-comment-report-option-copy span {
    line-height: 1.5;
}

.story-comment-report-option input:checked + .story-comment-report-option-box {
    border-color: #2f67c7;
    background: rgba(47, 103, 199, 0.12);
    box-shadow: inset 0 0 0 4px #ffffff, 0 0 0 1px rgba(47, 103, 199, 0.18);
}

.story-comment-report-option input:checked + .story-comment-report-option-box + .story-comment-report-option-copy strong {
    color: #2f67c7;
}

.story-comment-report-confirm-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    background: #b6b3c3;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.story-comment-report-confirm-btn.is-active {
    background: linear-gradient(135deg, #2f67c7 0%, #20a6ea 100%);
    box-shadow: 0 14px 30px rgba(32, 166, 234, 0.24);
}

.story-comment-report-confirm-btn:hover,
.story-comment-report-confirm-btn:focus-visible {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.story-share-menu {
    position: relative;
}

.story-share-menu[open] {
    z-index: 60;
}

.story-share-menu summary {
    list-style: none;
}

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

.story-share-trigger {
    width: auto;
    min-width: 170px;
    text-align: center;
}

.story-share-report-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 18px;
}

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

.story-report-trigger {
    width: auto;
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.story-manage-trigger {
    min-width: 0;
    width: 54px;
    height: 54px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.story-manage-trigger svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.story-share-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 200px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 18px 36px rgba(39, 22, 15, 0.14);
    display: grid;
    gap: 8px;
    z-index: 30;
}

.story-manage-panel {
    left: auto;
    right: 0;
}

.story-share-option {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 14px;
    padding: 11px 14px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.story-share-option:hover,
.story-share-option:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.story-share-option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.story-manage-option.is-danger {
    color: #a93b28;
}

.story-manage-message {
    margin-top: 8px;
}

.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;
}

.story-synopsis-block {
    display: grid;
    gap: 16px;
}

.story-synopsis-toggle {
    width: fit-content;
    border: none;
    padding: 0;
    background: none;
    color: #2f67c7;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.story-synopsis-toggle:hover,
.story-synopsis-toggle:focus-visible {
    color: #214f9a;
}

.story-synopsis-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.story-synopsis-toggle.is-expanded svg {
    transform: rotate(180deg);
}

[data-content-protected],
[data-content-protected] * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.article-reader-text {
    gap: 22px;
}

.article-reader-text h2,
.article-reader-text h3,
.article-reader-text div,
.article-reader-text blockquote,
.article-reader-text ul,
.article-reader-text ol,
.article-reader-text img {
    margin: 0;
}

.article-reader-text h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.2;
}

.article-reader-text h3 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.3;
}

.article-reader-text div {
    color: var(--text);
    line-height: 1.9;
}

.article-reader-text blockquote {
    padding: 18px 22px;
    border-left: 4px solid rgba(255, 97, 47, 0.42);
    border-radius: 0 18px 18px 0;
    background: rgba(255, 246, 240, 0.9);
    color: var(--muted);
    font-style: italic;
}

.article-reader-text ul,
.article-reader-text ol {
    padding-left: 24px;
    color: var(--text);
    line-height: 1.85;
}

.article-reader-text li + li {
    margin-top: 8px;
}

.article-reader-text a {
    color: var(--brand-deep);
    font-weight: 700;
    text-decoration: underline;
}

.article-reader-text img {
    display: block;
    width: min(100%, 820px);
    border-radius: 22px;
    box-shadow: 0 18px 34px rgba(39, 22, 15, 0.12);
}

.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-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.reader-chapter-thumb {
    width: 76px;
    min-width: 76px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 145, 96, 0.24), rgba(47, 98, 207, 0.14));
    box-shadow: 0 10px 24px rgba(39, 22, 15, 0.14);
}

.reader-chapter-thumb-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.reader-chapter-link-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.reader-chapter-link-copy strong {
    font-size: 1rem;
    line-height: 1.35;
}

.reader-chapter-link-meta {
    color: rgba(49, 78, 143, 0.82);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.reader-chapter-link-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.reader-chapter-link.is-locked {
    border-color: rgba(64, 100, 184, 0.2);
    background: linear-gradient(135deg, rgba(255, 250, 246, 0.98), rgba(235, 242, 255, 0.96));
}

.reader-chapter-link.is-resume {
    border-color: rgba(255, 97, 47, 0.28);
    box-shadow: 0 20px 34px rgba(39, 22, 15, 0.11);
}

.reader-chapter-lock-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(64, 100, 184, 0.12);
    color: #2f62cf;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.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;
}

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

.story-comment-actions {
    position: relative;
    flex: 0 0 auto;
}

.story-comment-actions summary {
    list-style: none;
}

.story-comment-actions summary::-webkit-details-marker {
    display: none;
}

.story-comment-actions-trigger {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 999px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.story-comment-actions-trigger:hover,
.story-comment-actions-trigger:focus-visible,
.story-comment-actions[open] .story-comment-actions-trigger {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(39, 22, 15, 0.08);
    border-color: rgba(255, 97, 47, 0.24);
}

.story-comment-actions-trigger svg {
    width: 18px;
    height: 18px;
}

.story-comment-actions-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 170px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(85, 46, 30, 0.12);
    box-shadow: 0 16px 30px rgba(39, 22, 15, 0.12);
    z-index: 30;
}

.story-comment-action-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.story-comment-action-option-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-comment-action-option-icon svg {
    width: 100%;
    height: 100%;
}

.story-comment-reply-block {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.story-comment-reply-trigger {
    width: fit-content;
    list-style: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.14);
    color: var(--brand-deep);
    font-size: 0.9rem;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.story-comment-reply-trigger::-webkit-details-marker {
    display: none;
}

.story-comment-reply-trigger:hover,
.story-comment-reply-trigger:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 12px 22px rgba(255, 97, 47, 0.12);
}

.story-comment-reply-form {
    margin-top: 4px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 244, 236, 0.9);
    border: 1px solid rgba(255, 97, 47, 0.12);
}

.story-comment-reply-form textarea {
    min-height: 110px;
}

.story-comment-replies {
    margin-top: 18px;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 2px solid rgba(255, 97, 47, 0.14);
    display: grid;
    gap: 14px;
}

.story-comment-card-reply {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 247, 241, 0.95);
}

.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 {
    --reader-app-bg: #fbfbfd;
    --reader-surface: rgba(255, 255, 255, 0.94);
    --reader-surface-strong: #ffffff;
    --reader-panel: #ffffff;
    --reader-panel-soft: #f4f6fb;
    --reader-border: rgba(40, 53, 86, 0.12);
    --reader-text: #20273a;
    --reader-muted: #6d7892;
    --reader-accent: #5368eb;
    --reader-accent-strong: #4055d6;
    --reader-accent-soft: rgba(83, 104, 235, 0.1);
    --reader-copy-size: 20px;
    --reader-copy-family: "Merriweather", Georgia, "Times New Roman", serif;
    background: linear-gradient(180deg, #ffffff 0%, var(--reader-app-bg) 100%);
    color: var(--reader-text);
}

.reader-page[data-reader-theme="sepia"] {
    --reader-app-bg: #f6eddc;
    --reader-surface: rgba(255, 252, 246, 0.96);
    --reader-surface-strong: #fffdf8;
    --reader-border: rgba(139, 113, 73, 0.16);
    --reader-text: #34261b;
    --reader-muted: #7f6c58;
    --reader-accent: #a96f3b;
    --reader-accent-strong: #8b5727;
    --reader-accent-soft: rgba(169, 111, 59, 0.12);
}

.reader-page[data-reader-theme="midnight"] {
    --reader-app-bg: #161a25;
    --reader-surface: rgba(24, 29, 43, 0.98);
    --reader-surface-strong: #1a2030;
    --reader-border: rgba(196, 206, 255, 0.12);
    --reader-text: #eff3ff;
    --reader-muted: #b5bfdc;
    --reader-accent: #90a4ff;
    --reader-accent-strong: #bfd0ff;
    --reader-accent-soft: rgba(144, 164, 255, 0.16);
}

.reader-page[data-reader-font="classic"] {
    --reader-copy-family: "Merriweather", Georgia, "Times New Roman", serif;
}

.reader-page[data-reader-font="clean"] {
    --reader-copy-family: "Nunito Sans", "Segoe UI", "Segoe UI Variable", sans-serif;
}

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

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

.reader-affinity-layout {
    position: relative;
}

.reader-main-column {
    width: min(100%, 760px);
    margin: 0 auto;
}

.reader-story-hero {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin-bottom: 42px;
    text-align: center;
}

.reader-story-hero-cover {
    display: block;
    width: min(100%, 214px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(92, 106, 144, 0.16);
    box-shadow: 0 18px 30px rgba(27, 37, 61, 0.1);
    background: #181515;
}

.reader-story-hero-cover-fallback {
    place-items: center;
    display: grid;
    color: #ffffff;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3252, #5f3564);
}

.reader-story-hero h1 {
    margin: 0;
    max-width: 19ch;
    font-family: "Merriweather", Georgia, "Times New Roman", serif;
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    color: var(--reader-text);
}

.reader-story-hero p {
    margin: 0;
    color: var(--reader-muted);
    font-size: 1rem;
}

.reader-story-hero a {
    color: var(--reader-accent);
    text-decoration: none;
    font-weight: 700;
}

.reader-story-hero a:hover,
.reader-story-hero a:focus-visible {
    text-decoration: underline;
}

.reader-utility-rail {
    position: fixed;
    left: max(18px, calc((100vw - 1280px) / 2 + 18px));
    top: 50%;
    width: 76px;
    padding: 14px 10px;
    border-radius: 28px;
    background: linear-gradient(180deg, #303752 0%, #191f31 100%);
    box-shadow: 0 24px 40px rgba(17, 23, 38, 0.26);
    display: grid;
    gap: 12px;
    transform: translateY(-50%);
    z-index: 280;
}

.reader-utility-btn {
    border: none;
    border-radius: 18px;
    padding: 12px 8px;
    background: transparent;
    color: rgba(244, 247, 255, 0.84);
    display: grid;
    justify-items: center;
    gap: 8px;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.reader-utility-btn svg {
    width: 19px;
    height: 19px;
}

.reader-utility-btn:hover,
.reader-utility-btn:focus-visible,
.reader-utility-btn.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.reader-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 38vw);
    max-height: none;
    padding: 22px 24px 28px;
    border-radius: 0;
    border-left: 1px solid rgba(37, 49, 79, 0.12);
    background: #ffffff;
    color: #1f2638;
    box-shadow: -24px 0 48px rgba(24, 31, 47, 0.08);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(36px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 290;
}

.reader-side-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.reader-side-panel-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-bottom: 10px;
}

.reader-side-panel-head p {
    display: none;
}

.reader-side-panel-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #7b8294;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

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

.reader-side-panel-copy span {
    display: none;
}

.reader-side-panel-copy h2 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.25;
    color: #111827;
}

.reader-side-panel-copy p {
    margin: 8px 0 0;
    color: #717b90;
    font-size: 0.95rem;
    line-height: 1.6;
}

.reader-panel-message {
    margin: 0;
}

.reader-chapter-group {
    display: flex;
    align-items: center;
}

.reader-chapter-group-label {
    color: #8b95aa;
    font-size: 0.9rem;
}

.reader-chapter-list {
    display: grid;
    gap: 0;
}

.reader-chapter-list-item {
    padding: 16px 12px 16px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(35, 47, 78, 0.12);
    color: #1c2436;
    text-decoration: none;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.reader-chapter-list-item:hover,
.reader-chapter-list-item:focus-visible,
.reader-chapter-list-item.is-active {
    color: var(--reader-accent);
    transform: translateX(2px);
}

.reader-chapter-list-item.is-locked {
    opacity: 0.72;
}

.reader-chapter-list-number {
    color: inherit;
    font-size: 0.98rem;
    line-height: 1.6;
}

.reader-chapter-list-content {
    display: grid;
    gap: 4px;
}

.reader-chapter-list-status {
    color: #8a93a6;
    font-size: 0.82rem;
}

.reader-chapter-list-item strong {
    color: inherit;
    font-size: 1rem;
    font-weight: 500;
}

.reader-display-group {
    display: grid;
    gap: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.reader-display-group h3,
.reader-display-slider-head h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #707b92;
    font-weight: 600;
}

.reader-display-theme-list,
.reader-display-font-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reader-display-choice {
    position: relative;
}

.reader-display-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reader-display-choice-theme {
    display: inline-flex;
    cursor: pointer;
}

.reader-display-theme-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(82, 95, 128, 0.16);
    display: inline-block;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.reader-display-theme-swatch-ivory {
    background: #ffffff;
}

.reader-display-theme-swatch-sepia {
    background: #f7efd6;
}

.reader-display-theme-swatch-midnight {
    background: #20252e;
}

.reader-display-choice-theme input:checked + .reader-display-theme-swatch {
    border-color: var(--reader-accent);
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 1px var(--reader-accent);
}

.reader-display-choice-theme input:checked + .reader-display-theme-swatch::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-right: 2px solid var(--reader-accent);
    border-bottom: 2px solid var(--reader-accent);
    transform: rotate(45deg);
}

.reader-display-choice-font {
    cursor: pointer;
}

.reader-display-choice-font span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(88, 103, 137, 0.24);
    background: #ffffff;
    color: #2b3346;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.reader-display-choice-font input:checked + span {
    border-color: var(--reader-accent);
    color: var(--reader-accent);
    background: rgba(83, 104, 235, 0.05);
}

.reader-display-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reader-display-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reader-display-switch {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.reader-display-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reader-display-switch-track {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #d7dceb;
    position: relative;
    transition: background 0.2s ease;
}

.reader-display-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(29, 37, 59, 0.16);
    transition: transform 0.2s ease;
}

.reader-display-switch input:checked + .reader-display-switch-track {
    background: var(--reader-accent);
}

.reader-display-switch input:checked + .reader-display-switch-track::after {
    transform: translateX(18px);
}

.reader-comments-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #7e879b;
    font-size: 0.88rem;
}

.reader-comments-view {
    display: grid;
    gap: 16px;
}

.reader-comment-compose {
    display: grid;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.reader-comment-compose label {
    color: #8a93a6;
    font-size: 0.86rem;
    font-weight: 600;
}

.reader-comment-textarea {
    min-height: 54px;
    padding: 15px 18px;
    border: 1px solid rgba(88, 103, 137, 0.22);
    border-radius: 20px;
    background: #ffffff;
    color: #1f2638;
    resize: vertical;
}

.reader-comment-compose .primary-btn {
    justify-self: start;
    min-width: 148px;
    border-radius: 999px;
    box-shadow: none;
}

.reader-highlight-preview {
    display: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(144, 164, 255, 0.12);
    border: 1px solid rgba(144, 164, 255, 0.2);
}

.reader-highlight-preview.is-visible {
    display: flex;
}

.reader-highlight-preview span {
    display: block;
    color: #76829b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reader-highlight-preview blockquote {
    margin: 8px 0 0;
    color: #1f2638;
    font-size: 0.92rem;
    line-height: 1.65;
}

.reader-clear-highlight-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(83, 104, 235, 0.08);
    color: #2c3750;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.reader-comment-list {
    display: grid;
    gap: 14px;
}

.reader-comment-card {
    padding: 16px;
    border-radius: 18px;
    background: #f7f9fc;
    border: 1px solid rgba(92, 107, 144, 0.12);
    display: grid;
    gap: 12px;
}

.reader-comment-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.reader-comment-quote {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(83, 104, 235, 0.08);
    border-left: 3px solid rgba(83, 104, 235, 0.38);
    color: #263149;
    line-height: 1.6;
}

.reader-comment-copy {
    margin: 0;
    color: #283046;
    line-height: 1.72;
}

.reader-comment-empty {
    padding: 54px 24px;
    border-radius: 20px;
    background: #fbfcfe;
    border: 1px dashed rgba(92, 107, 144, 0.18);
    color: #79859f;
    text-align: center;
}

.reader-comment-empty h3,
.reader-comment-empty p {
    margin: 0;
}

.reader-comment-empty h3 + p {
    margin-top: 8px;
}

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

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

.affinity-chapter-block {
    display: grid;
    gap: 22px;
    padding: 32px;
    border-radius: 30px;
    background: var(--reader-surface);
    border: 1px solid var(--reader-border);
    box-shadow: 0 20px 36px rgba(39, 29, 24, 0.07);
    backdrop-filter: blur(10px);
}

.affinity-chapter-block.is-active {
    border-color: rgba(61, 79, 162, 0.28);
    box-shadow: 0 24px 40px rgba(39, 29, 24, 0.12);
}

.affinity-chapter-head h2 {
    margin: 8px 0 0;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    color: var(--reader-text);
}

.affinity-chapter-body {
    display: grid;
    gap: 22px;
    font-family: var(--reader-copy-family);
    font-size: var(--reader-copy-size);
    line-height: 1.95;
    color: var(--reader-text);
}

.affinity-chapter-body p,
.affinity-chapter-body div,
.affinity-chapter-body blockquote,
.affinity-chapter-body ul,
.affinity-chapter-body ol {
    margin: 0;
}

.affinity-chapter-body strong {
    font-weight: 800;
}

.affinity-chapter-body em {
    font-style: italic;
}

.affinity-chapter-body u {
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.affinity-chapter-body img {
    display: block;
    width: auto;
    max-width: min(100%, 620px);
    max-height: 520px;
    margin: 12px auto;
    border-radius: 22px;
    box-shadow: 0 18px 30px rgba(76, 35, 19, 0.12);
}

.affinity-chapter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--reader-border);
}

.affinity-chapter-action-form {
    margin: 0;
}

.affinity-chapter-action-btn {
    width: 100%;
    min-height: 72px;
    border: 1px solid var(--reader-border);
    border-radius: 22px;
    background: var(--reader-surface-strong);
    color: var(--reader-text);
    display: grid;
    justify-items: center;
    gap: 2px;
    font: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.affinity-chapter-action-btn strong {
    font-size: 1.2rem;
}

.affinity-chapter-action-btn span {
    color: var(--reader-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.affinity-chapter-action-btn:hover,
.affinity-chapter-action-btn:focus-visible,
.affinity-chapter-action-btn.is-active {
    border-color: rgba(61, 79, 162, 0.28);
    box-shadow: 0 16px 30px rgba(39, 29, 24, 0.08);
    transform: translateY(-1px);
}

.affinity-chapter-action-btn.is-active {
    background: var(--reader-accent-soft);
}

.reader-highlight-action {
    position: absolute;
    z-index: 260;
    transform: translate(-50%, 0);
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--reader-accent), var(--reader-accent-strong));
    color: #ffffff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 18px 28px rgba(26, 31, 47, 0.24);
    cursor: pointer;
}

.reader-actions {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 500px);
    padding: 10px 12px;
    border-radius: 22px;
    background: linear-gradient(135deg, #20263b, #131724 72%, #0d111c);
    box-shadow: 0 20px 40px rgba(18, 22, 35, 0.28);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    z-index: 200;
}

.reader-actions-single {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.reader-actions-single .reader-action-btn {
    width: min(100%, 220px);
}

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

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

.reader-page-affinity .reader-actions {
    transition: transform 0.22s ease, opacity 0.22s ease, background 0.2s ease;
}

.reader-page-affinity .reader-actions.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(120%);
}

.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(144, 164, 255, 0.18);
    color: #f4f7ff;
}

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

.reader-paywall-shell {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 12px 0 52px;
}

.reader-paywall-hero {
    padding: 18px 18px 42px;
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 18px;
}

.reader-paywall-eyebrow {
    margin: 0;
    color: #8c4f29;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reader-paywall-hero h1 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #20130f;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.reader-paywall-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    color: #725344;
    font-size: 0.98rem;
}

.reader-paywall-author {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.reader-paywall-author p,
.reader-paywall-author a {
    margin: 0;
}

.reader-paywall-author p {
    color: #20130f;
    font-weight: 700;
}

.reader-paywall-author a {
    color: #8c4f29;
    text-decoration: none;
    font-size: 0.92rem;
}

.reader-paywall-author a:hover,
.reader-paywall-author a:focus-visible {
    text-decoration: underline;
}

.reader-paywall-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto -22px;
    width: min(100%, 760px);
    position: relative;
    z-index: 1;
}

.reader-paywall-lock-line {
    flex: 1;
    height: 1px;
    background: rgba(64, 37, 25, 0.16);
}

.reader-paywall-lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff7f2;
    border: 1px solid rgba(64, 37, 25, 0.12);
    box-shadow: 0 10px 18px rgba(39, 22, 15, 0.08);
    display: inline-grid;
    place-items: center;
    color: #8c4f29;
    font-size: 1.15rem;
}

.reader-paywall-card {
    padding: 74px 44px 40px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(255, 196, 162, 0.28), transparent 26%),
        linear-gradient(180deg, rgba(255, 250, 246, 0.98), rgba(248, 241, 234, 0.98));
    border: 1px solid rgba(85, 46, 30, 0.08);
    box-shadow: 0 22px 40px rgba(39, 22, 15, 0.08);
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.reader-paywall-sidecard {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.reader-paywall-sidecard strong {
    color: #20130f;
    font-size: 1.1rem;
}

.reader-paywall-sidecard p {
    margin: 0;
    color: #725344;
    line-height: 1.65;
}

.reader-paywall-sidecopy {
    font-weight: 700;
    color: #20130f;
}

.reader-paywall-part-label {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 97, 47, 0.1);
    color: #8c4f29;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.reader-paywall-main {
    display: grid;
    gap: 18px;
    justify-items: center;
    text-align: center;
}

.reader-paywall-main h2 {
    margin: 0;
    max-width: 20ch;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.28;
    color: #20130f;
}

.reader-paywall-main > p {
    margin: 0;
    max-width: 640px;
    color: #725344;
    font-size: 1.03rem;
    line-height: 1.8;
}

.reader-paywall-balance {
    font-weight: 700;
    color: #3d2418;
}

.reader-paywall-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}

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

.reader-paywall-form,
.reader-paywall-actions > a {
    flex: 1 1 250px;
    max-width: 290px;
}

.reader-paywall-btn {
    width: 100%;
    min-height: 82px;
    padding: 0;
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: stretch;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.reader-paywall-btn:hover,
.reader-paywall-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(39, 22, 15, 0.16);
    filter: saturate(1.02);
}

.reader-paywall-btn-price,
.reader-paywall-btn-copy {
    min-height: 82px;
    display: inline-flex;
    align-items: center;
}

.reader-paywall-btn-price {
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff7f2;
    background: rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.reader-paywall-btn-copy {
    justify-content: flex-start;
    padding: 0 22px;
    font-size: 1.12rem;
    font-weight: 800;
    color: #fff7f2;
}

.reader-paywall-btn-primary {
    background: linear-gradient(135deg, #1a1716, #2a2623 68%, #171311);
}

.reader-paywall-btn-secondary {
    background: linear-gradient(135deg, #d36e35, #b65023 72%, #8d3915);
}

.reader-paywall-notes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    color: #725344;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .reader-paywall-card {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 68px 28px 30px;
    }

    .reader-paywall-main h2 {
        max-width: 24ch;
    }
}

@media (max-width: 640px) {
    .reader-paywall-shell {
        padding-bottom: 34px;
    }

    .reader-paywall-hero {
        padding: 8px 0 36px;
    }

    .reader-paywall-hero h1 {
        font-size: clamp(1.7rem, 8vw, 2.35rem);
    }

    .reader-paywall-meta {
        gap: 10px 14px;
        font-size: 0.9rem;
    }

    .reader-paywall-author {
        gap: 10px;
    }

    .reader-paywall-card {
        padding: 62px 18px 22px;
        border-radius: 24px;
    }

    .reader-paywall-form,
    .reader-paywall-actions > a {
        flex-basis: 100%;
        max-width: none;
    }

    .reader-paywall-btn {
        min-height: 72px;
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .reader-paywall-btn-price,
    .reader-paywall-btn-copy {
        min-height: 72px;
    }

    .reader-paywall-btn-price {
        font-size: 1.2rem;
    }

    .reader-paywall-btn-copy {
        padding: 0 16px;
        font-size: 1rem;
    }
}

.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;
    }
}

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

.coins-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: start;
}

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

.coin-package-card,
.gcash-cashin-card,
.gcash-confirm-summary,
.gcash-steps-card {
    border: 1px solid rgba(255, 97, 47, 0.12);
    box-shadow: 0 18px 36px rgba(76, 35, 19, 0.08);
}

.coin-package-card {
    display: grid;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.coin-package-card.is-selected {
    border-color: rgba(255, 97, 47, 0.3);
    box-shadow: 0 20px 40px rgba(255, 97, 47, 0.16);
    transform: translateY(-2px);
}

.coin-package-card h3,
.gcash-cashin-card h3 {
    margin: 0;
}

.coin-package-card p,
.gcash-cashin-card p,
.gcash-steps-card p {
    margin: 0;
}

.coin-package-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.coins-purchase-form textarea {
    min-height: 120px;
}

.coins-help-card {
    display: grid;
    gap: 12px;
}

.coins-help-card h3,
.coins-help-card p {
    margin: 0;
}

.gcash-cashin-card,
.gcash-confirm-form {
    align-self: stretch;
}

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

.gcash-detail-card,
.gcash-confirm-summary,
.gcash-steps-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 250, 246, 0.92);
}

.gcash-detail-card {
    display: grid;
    gap: 8px;
}

.gcash-detail-card span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.gcash-detail-card strong {
    font-size: 1.02rem;
    color: var(--text);
    word-break: break-word;
}

.gcash-confirm-summary {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
}

.gcash-steps-card {
    display: grid;
    gap: 10px;
}

.gcash-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.coin-copy-btn {
    border: 1px solid rgba(255, 97, 47, 0.18);
    border-radius: 999px;
    padding: 12px 18px;
    background: rgba(255, 250, 246, 0.98);
    color: var(--brand-deep);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.coin-copy-btn:hover,
.coin-copy-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.3);
    box-shadow: 0 12px 24px rgba(255, 97, 47, 0.12);
}

.coin-copy-feedback {
    min-height: 1.2em;
    color: var(--brand-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .coins-stats-grid,
    .coins-package-grid,
    .coins-layout {
        grid-template-columns: 1fr;
    }

    .gcash-detail-grid {
        grid-template-columns: 1fr;
    }
}

.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;
}

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

.push-settings-copy,
.push-settings-feedback {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.push-settings-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 250, 246, 0.95);
    border: 1px solid rgba(85, 46, 30, 0.12);
}

.push-settings-meta span {
    color: var(--muted);
    font-size: 0.92rem;
}

.push-settings-meta strong {
    color: var(--text);
    font-size: 1.15rem;
}

.push-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.push-settings-actions > * {
    flex: 1 1 180px;
}

.push-settings-feedback[data-state="success"] {
    color: #22743f;
}

.push-settings-feedback[data-state="warning"] {
    color: #9b4d1f;
}

.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 input,
.menu-form select,
.menu-form label,
.rating-fieldset legend {
    font-size: 0.94rem;
    font-weight: 700;
}

.menu-form input,
.menu-form select,
.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 input,
.menu-form select {
    min-height: 54px;
}

.menu-form input:focus,
.menu-form select:focus,
.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);
}

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

.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;
}

.menu-mobile-shell {
    display: none;
}

.menu-mobile-profile {
    display: grid;
    gap: 20px;
}

.menu-mobile-profile-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "avatar copy"
        "avatar action";
    align-items: center;
    column-gap: 16px;
    row-gap: 10px;
}

.menu-mobile-profile-avatar {
    grid-area: avatar;
    display: inline-flex;
    align-self: start;
    border-radius: 50%;
    text-decoration: none;
}

.menu-mobile-profile-avatar:focus-visible {
    outline: 3px solid rgba(255, 123, 71, 0.34);
    outline-offset: 4px;
}

.menu-mobile-profile-copy {
    grid-area: copy;
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 6px;
}

.menu-mobile-profile-copy h2,
.menu-mobile-profile-copy p {
    margin: 0;
}

.menu-mobile-profile-copy h2 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.menu-mobile-profile-copy p {
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.menu-mobile-profile-action {
    grid-area: action;
    justify-self: start;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 12px 22px rgba(39, 22, 15, 0.08);
}

.menu-mobile-profile-action svg,
.menu-mobile-link-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-mobile-profile-action-label {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
}

.menu-mobile-section {
    border-bottom: 1px solid rgba(85, 46, 30, 0.12);
}

.menu-mobile-section-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    cursor: pointer;
    font-size: 1.22rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.menu-mobile-section-caret {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.menu-mobile-section[open] .menu-mobile-section-caret {
    transform: rotate(180deg);
}

.menu-mobile-section-body {
    padding: 0 0 20px;
}

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

.menu-mobile-link-list {
    display: grid;
    gap: 10px;
}

.menu-mobile-link-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-mobile-link {
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(85, 46, 30, 0.1);
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(39, 22, 15, 0.06);
}

.menu-mobile-link-emphasis {
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 16px 28px rgba(255, 97, 47, 0.18);
}

.menu-mobile-theme-toggle {
    width: 100%;
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.menu-mobile-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 250, 246, 0.94);
    border: 1px solid rgba(85, 46, 30, 0.1);
    display: grid;
    gap: 14px;
    box-shadow: 0 14px 26px rgba(39, 22, 15, 0.07);
}

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

.menu-mobile-card h3,
.menu-mobile-story-card h4,
.menu-mobile-story-card p {
    margin: 0;
}

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

.menu-mobile-story-list {
    display: grid;
    gap: 10px;
}

.menu-mobile-story-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(85, 46, 30, 0.08);
    display: grid;
    gap: 10px;
}

.menu-mobile-story-card p {
    color: var(--muted);
    line-height: 1.6;
}

.menu-mobile-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.menu-mobile-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    margin-top: 12px;
    border-radius: 22px;
    background: #25244a;
    color: #fff;
    text-decoration: none;
    font-size: 1.18rem;
    font-weight: 800;
    box-shadow: 0 18px 28px rgba(37, 36, 74, 0.18);
}

.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;
}

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

.article-studio-hero,
.article-section {
    display: grid;
    gap: 18px;
}

.article-studio-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.article-input-group {
    display: grid;
    gap: 10px;
}

.article-input-group label {
    display: block;
    font-size: 0.94rem;
    font-weight: 700;
}

.article-title-input {
    width: 100%;
    border: 1px solid rgba(85, 46, 30, 0.16);
    border-radius: 20px;
    padding: 20px 22px;
    background: rgba(255, 250, 246, 0.95);
    color: var(--text);
    font: inherit;
    font-size: clamp(1.4rem, 2.3vw, 2rem);
    font-weight: 800;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.article-title-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);
}

.article-upload-tile {
    min-height: 180px;
}

.article-editor-shell {
    position: relative;
    border-radius: 24px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    background: rgba(255, 250, 246, 0.98);
    overflow: hidden;
}

.article-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(85, 46, 30, 0.1);
    background: linear-gradient(180deg, rgba(255, 249, 244, 0.98), rgba(251, 240, 231, 0.98));
}

.article-tool-btn {
    min-width: 48px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(85, 46, 30, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-tool-btn:hover,
.article-tool-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);
}

.article-image-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(85, 46, 30, 0.08);
    background: rgba(255, 252, 248, 0.94);
}

.article-image-size-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--muted);
    font-weight: 700;
}

.article-image-size-control input[type="range"] {
    flex: 1 1 auto;
}

.article-image-size-value {
    min-width: 58px;
    color: var(--text);
    font-weight: 800;
    text-align: right;
}

.article-image-reset-btn {
    min-width: auto;
}

.article-image-resize-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    box-shadow: 0 10px 20px rgba(255, 97, 47, 0.24);
    transform: translate(-50%, -50%);
    cursor: nwse-resize;
    z-index: 3;
}

.article-image-resize-handle::before,
.article-image-resize-handle::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.article-image-resize-handle::before {
    width: 12px;
    height: 2px;
    inset: 11px 6px auto;
    transform: rotate(-45deg);
}

.article-image-resize-handle::after {
    width: 2px;
    height: 12px;
    inset: 6px auto auto 11px;
    transform: rotate(-45deg);
}

.article-editor {
    min-height: 520px;
    padding: 28px;
    color: var(--text);
    line-height: 1.9;
    outline: none;
}

.article-editor:empty::before {
    content: attr(data-placeholder);
    color: #a48778;
}

.article-editor h2,
.article-editor h3,
.article-editor div,
.article-editor p,
.article-editor blockquote,
.article-editor ul,
.article-editor ol {
    margin-top: 0;
}

.article-editor img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 18px auto;
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(39, 22, 15, 0.1);
    cursor: pointer;
}

.article-editor img.is-selected {
    outline: 3px solid rgba(255, 97, 47, 0.34);
    outline-offset: 4px;
}

.article-editor blockquote {
    padding: 16px 20px;
    border-left: 4px solid rgba(255, 97, 47, 0.38);
    background: rgba(255, 246, 240, 0.9);
    color: var(--muted);
    border-radius: 0 16px 16px 0;
}

.article-submit-row {
    justify-content: flex-start;
}

@media (max-width: 720px) {
    .article-studio-hero {
        grid-template-columns: 1fr;
    }

    .article-toolbar {
        gap: 8px;
    }

    .article-image-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .article-image-size-control {
        flex: 1 1 100%;
    }

    .article-image-size-value {
        min-width: 0;
        text-align: left;
    }

    .article-image-resize-handle {
        width: 22px;
        height: 22px;
    }

    .article-tool-btn {
        flex: 1 1 calc(25% - 8px);
    }

    .article-editor {
        min-height: 420px;
        padding: 20px;
    }
}

.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;
}

.story-create-stack {
    display: grid;
    gap: 26px;
}

.story-create-block {
    display: grid;
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(85, 46, 30, 0.1);
    box-shadow: 0 18px 36px rgba(76, 35, 19, 0.06);
}

.story-create-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.story-create-meta-grid-top {
    align-items: end;
}

.story-create-field-stack {
    display: grid;
    gap: 14px;
}

.story-create-subtitle,
.story-create-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.story-create-subtitle {
    font-size: 0.98rem;
}

.story-create-note-grid {
    margin-top: 2px;
}

.story-create-note-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

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

.story-create-cover-tile {
    min-height: 180px;
}

.upload-tile-copy-inline {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--muted);
}

@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,
    .story-create-meta-grid,
    .story-create-choice-grid {
        grid-template-columns: 1fr;
    }

    .story-create-block {
        padding: 22px;
    }
}

@media (max-width: 640px) {
    .menu-mobile-shell {
        display: grid;
        gap: 2px;
        padding: 8px 8px 0;
    }

    .menu-desktop-panel {
        display: none;
    }

    .menu-page .home-shell {
        width: min(calc(100% - 24px), 100%);
        padding: 10px 0 112px;
        gap: 14px;
    }

    .menu-page .form-message {
        margin: 0 8px;
    }

    .menu-page .site-footer {
        display: none !important;
    }

    .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-actions {
        gap: 8px;
    }

    .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;
    }

    .profile-drawer-desktop-only {
        display: none;
    }

    .profile-drawer-trigger-mobile-only {
        display: grid;
    }

    .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;
    }

    .search-page-section-discovery {
        padding: 18px 18px 22px;
        background: #ffffff;
        border: none;
        box-shadow: none;
    }

    .search-page-section-discovery .story-section-head {
        display: none;
    }

    .search-page-section-discovery .search-page-form {
        margin: 4px 0 12px;
    }

    .search-page-section-discovery .search-page-field input {
        padding: 18px 24px;
        border-width: 2px;
        border-color: rgba(123, 126, 137, 0.55);
        background: #ffffff;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        color: #2f3542;
        font-size: 1rem;
    }

    .search-page-section-discovery .search-page-field input::placeholder {
        color: #7f8595;
    }

    .search-page-section-discovery .search-page-btn {
        display: none;
    }

    .search-discovery {
        gap: 18px;
    }

    .search-discovery-panels {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .search-discovery-head {
        gap: 10px;
        align-items: center;
    }

    .search-discovery-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .search-discovery-icon svg {
        width: 19px;
        height: 19px;
    }

    .search-discovery-head h3 {
        font-size: 1.95rem;
        font-family: "Palatino Linotype", "Book Antiqua", serif;
    }

    .search-discovery-head p {
        display: none;
    }

    .search-suggestion-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .search-suggestion-grid .story-card.story-card-cover-only,
    .search-suggestion-grid .story-card.story-card-cover-only .story-cover-image,
    .search-suggestion-grid .story-card.story-card-cover-only .story-cover {
        border-radius: 22px;
    }

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

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

    .profile-story-grid .story-card.story-card-cover-only,
    .profile-story-grid .story-card.story-card-cover-only .story-cover-image,
    .profile-story-grid .story-card.story-card-cover-only .story-cover {
        border-radius: 22px;
    }

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

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

    .feed-post-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .feed-post-action-cluster,
    .feed-post-comments-head-actions {
        width: 100%;
    }

    .feed-reaction-picker {
        left: 0;
        right: auto;
        max-width: calc(100vw - 48px);
    }

    .feed-compose-actions {
        align-items: stretch;
    }

    .feed-post-meta {
        justify-items: start;
    }

    .feed-image-preview {
        grid-template-columns: 1fr;
    }

    .feed-upload-note {
        margin-right: 0;
        width: 100%;
    }

    .menu-mobile-profile {
        padding: 10px 0 18px;
    }

    .menu-mobile-profile-main {
        column-gap: 14px;
        row-gap: 10px;
    }

    .menu-mobile-profile-avatar .user-avatar-xl {
        width: 88px;
        height: 88px;
    }

    .menu-mobile-profile-copy h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .menu-mobile-profile-copy p {
        font-size: 0.95rem;
    }

    .menu-mobile-profile-action {
        min-height: 44px;
        padding: 9px 14px;
    }

    .menu-mobile-profile-action svg {
        width: 20px;
        height: 20px;
    }

    .menu-mobile-section-summary {
        padding: 20px 0;
        font-size: 1.06rem;
    }

    .menu-mobile-link-list-compact {
        grid-template-columns: 1fr;
    }

    .menu-mobile-link,
    .menu-mobile-theme-toggle {
        min-height: 50px;
        padding: 13px 14px;
        border-radius: 16px;
        font-size: 0.96rem;
    }

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

    .menu-mobile-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .menu-mobile-stat-grid .creator-stat-card {
        padding: 14px;
        border-radius: 18px;
    }

    .menu-mobile-stat-grid .creator-stat-card strong {
        font-size: 1.3rem;
    }

    .menu-mobile-logout {
        min-height: 56px;
        font-size: 1.08rem;
        border-radius: 20px;
    }

    .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;
    }

    .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-covers,
    .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-unified-strip {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(140px, 52vw);
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .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;
    }

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

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

    .story-recommendation-strip {
        grid-auto-columns: minmax(132px, 42vw);
        gap: 12px;
        padding-bottom: 6px;
    }

    .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-buttons {
        align-items: stretch;
        flex-direction: column;
    }

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

    .story-secondary-actions,
    .story-share-menu,
    .story-share-report-group,
    .story-share-trigger,
    .story-report-form {
        width: 100%;
    }

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

    .story-share-report-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .story-share-panel {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .story-share-modal {
        padding: 16px;
    }

    .story-share-modal-dialog {
        width: min(100%, 380px);
        padding: 28px 16px 18px;
        border-radius: 20px;
    }

    .story-share-modal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .story-share-modal-kicker {
        margin-top: 12px;
        font-size: 0.95rem;
    }

    .story-share-modal-dialog h2 {
        font-size: 1.35rem;
    }

    .story-share-action-card {
        padding: 14px 10px 12px;
        border-radius: 16px;
        gap: 8px;
    }

    .story-share-action-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .story-report-modal {
        padding: 16px;
    }

    .story-report-modal-dialog {
        width: min(100%, 420px);
        padding: 28px 16px 18px;
        border-radius: 20px;
    }

    .story-report-modal-form {
        gap: 12px;
    }

    .story-report-modal-form h2 {
        font-size: 1.45rem;
    }

    .story-report-modal-copy,
    .story-report-char-count,
    .story-report-helper-copy,
    .story-report-option-copy {
        font-size: 0.92rem;
    }

    .story-comment-report-modal {
        padding: 16px;
    }

    .story-comment-report-modal-dialog {
        width: min(100%, 420px);
        padding: 28px 16px 18px;
        border-radius: 20px;
    }

    .story-comment-report-modal-form {
        gap: 12px;
    }

    .story-comment-report-modal-form h2 {
        font-size: 1.45rem;
    }

    .story-comment-report-option-copy strong,
    .story-comment-report-option-copy span,
    .story-comment-report-modal-copy {
        font-size: 0.92rem;
    }

    .story-share-action-icon svg {
        width: 22px;
        height: 22px;
    }

    .story-share-action-label {
        font-size: 0.84rem;
    }

    .story-read-modal {
        padding: 16px;
    }

    .story-read-modal-dialog {
        padding: 24px 18px;
    }

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

    .story-read-choice {
        min-height: 180px;
    }

    .story-read-modal-actions {
        flex-direction: column-reverse;
    }

    .story-read-cancel,
    .story-read-confirm {
        width: 100%;
    }

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

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

    .reader-chapter-thumb {
        width: 60px;
        min-width: 60px;
        border-radius: 14px;
    }

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

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

    .reader-actions-single {
        grid-template-columns: minmax(0, 1fr);
    }

    .reader-action-btn {
        min-height: 40px;
        font-size: 0.88rem;
    }

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

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

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

    .menu-monetization-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(255, 123, 71, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 181, 142, 0.24), transparent 26%),
        linear-gradient(135deg, #fff9f4 0%, #f9eee5 55%, #f2e2d3 100%);
    color: var(--text);
}

.creator-page .app-topbar,
.creator-page .story-section,
.creator-page .editor-panel,
.creator-page .creator-portal,
.creator-page .creator-editor-card {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border-color: rgba(255, 97, 47, 0.12);
    box-shadow: 0 22px 52px rgba(76, 35, 19, 0.1);
}

.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: var(--text);
}

.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(255, 97, 47, 0.08);
    color: var(--brand-deep);
}

.creator-page .app-nav-link.is-active {
    background: linear-gradient(135deg, #ff915e, var(--brand) 68%, var(--brand-deep));
    box-shadow: 0 14px 28px rgba(255, 97, 47, 0.22);
}

.creator-page .panel-kicker,
.creator-page .section-status,
.creator-page .story-empty-badge,
.creator-page .app-brand-lockup .panel-kicker {
    color: var(--brand-deep);
}

.creator-page .profile-drawer-menu {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border-color: rgba(255, 97, 47, 0.14);
    box-shadow: 0 16px 34px rgba(76, 35, 19, 0.1);
}

.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: var(--muted);
}

.creator-page .story-empty-card {
    border-color: rgba(255, 97, 47, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 181, 142, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 243, 235, 0.95));
}

.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-portal-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.creator-sidebar {
    position: sticky;
    top: 112px;
    display: grid;
    gap: 24px;
    padding: 26px 18px;
    border-radius: 28px;
    border: 1px solid rgba(255, 97, 47, 0.12);
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    box-shadow: 0 22px 52px rgba(76, 35, 19, 0.1);
}

.creator-sidebar-head {
    display: grid;
    gap: 8px;
}

.creator-sidebar-head h2 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI Variable", sans-serif;
    font-size: 1.35rem;
}

.creator-sidebar-nav,
.creator-sidebar-support {
    display: grid;
    gap: 10px;
}

.creator-sidebar-support {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 97, 47, 0.12);
}

.creator-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.creator-sidebar-link:hover,
.creator-sidebar-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 97, 47, 0.08);
    color: var(--brand-deep);
}

.creator-sidebar-link.is-active {
    background: linear-gradient(135deg, #ffb736, #ffab21 70%, #f39800);
    color: #1f1d18;
    box-shadow: 0 14px 28px rgba(243, 152, 0, 0.2);
}

.creator-sidebar-link-secondary {
    min-height: 46px;
}

.creator-sidebar-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.creator-sidebar-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.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: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border: 1px solid rgba(255, 97, 47, 0.12);
    box-shadow: 0 16px 36px rgba(76, 35, 19, 0.1);
    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-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.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-create-btn.is-secondary {
    background: rgba(255, 250, 246, 0.98);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 0.18);
    box-shadow: none;
}

.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,
.creator-page .story-editor-form select,
.creator-page .story-editor-form input[type="file"] {
    width: 100%;
    border: 1px solid rgba(255, 97, 47, 0.16);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 249, 244, 0.96);
    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: #9a786a;
}

.creator-filter-bar input:focus,
.creator-filter-bar select:focus,
.creator-page .story-editor-form input:focus,
.creator-page .story-editor-form textarea:focus,
.creator-page .story-editor-form select:focus,
.creator-page .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);
}

.creator-page .secondary-action-btn {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border-color: rgba(255, 97, 47, 0.14);
    box-shadow: 0 16px 34px rgba(76, 35, 19, 0.1);
    color: var(--text);
}

.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: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border: 1px solid rgba(255, 97, 47, 0.12);
    box-shadow: 0 16px 36px rgba(76, 35, 19, 0.1);
}

.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(76, 35, 19, 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.1);
    border: 1px solid rgba(255, 97, 47, 0.16);
    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;
}

.story-overview-card {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
    gap: 24px;
}

.story-overview-media {
    display: flex;
    justify-content: center;
}

.story-overview-cover {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
}

.story-overview-copy {
    display: grid;
    gap: 18px;
}

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

.story-overview-copy-head h3,
.story-overview-body p {
    margin: 0;
}

.story-overview-copy-head h3 {
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    line-height: 1.1;
}

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

.story-overview-tags span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    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.88rem;
    font-weight: 800;
}

.story-overview-body {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 246, 239, 0.9);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.story-overview-body .panel-kicker {
    margin: 0;
}

.story-overview-body p:not(.panel-kicker) {
    color: var(--muted);
    line-height: 1.75;
}

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

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

.creator-page .creator-editor-card {
    display: grid;
    gap: 18px;
    align-content: start;
}

.creator-page .creator-editor-card .story-section-head,
.creator-page .creator-editor-card .creator-page-copy {
    margin: 0;
}

.creator-page .story-editor-form {
    display: grid;
    gap: 14px;
    align-content: start;
}

.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: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 243, 235, 0.95));
    border: 1px solid rgba(255, 97, 47, 0.12);
}

.creator-story-detail {
    display: grid;
    gap: 22px;
}

.creator-story-hero {
    display: grid;
    gap: 18px;
}

.creator-story-hero-backdrop {
    padding: 20px 24px;
    border-radius: 28px;
    border: 1px solid rgba(255, 97, 47, 0.12);
    background:
        radial-gradient(circle at top right, rgba(255, 196, 156, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(255, 251, 247, 0.98), rgba(255, 240, 229, 0.96));
    box-shadow: 0 18px 36px rgba(76, 35, 19, 0.12);
}

.creator-story-hero-backdrop.tone-forest {
    background:
        radial-gradient(circle at top right, rgba(169, 213, 181, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(248, 252, 247, 0.98), rgba(234, 244, 232, 0.96));
}

.creator-story-hero-backdrop.tone-rose {
    background:
        radial-gradient(circle at top right, rgba(244, 188, 196, 0.24), transparent 34%),
        linear-gradient(135deg, rgba(255, 250, 250, 0.98), rgba(249, 235, 237, 0.96));
}

.creator-story-hero-backdrop.tone-midnight {
    background:
        radial-gradient(circle at top right, rgba(170, 193, 230, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(248, 250, 255, 0.98), rgba(234, 240, 252, 0.96));
}

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

.creator-story-hero-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.9rem);
    line-height: 1.02;
}

.creator-story-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
    gap: 20px;
    align-items: start;
}

.creator-story-detail-main {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
}

.creator-story-detail-cover-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.creator-story-detail-cover {
    width: 132px;
    max-width: 100%;
    max-height: 198px;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 18px;
    background: rgba(18, 13, 11, 0.92);
    box-shadow: 0 14px 28px rgba(76, 35, 19, 0.14);
}

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

.creator-story-detail-heading {
    align-items: start;
}

.creator-story-detail-heading h3 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.creator-story-detail-statusbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.creator-story-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 97, 47, 0.12);
    border: 1px solid rgba(255, 97, 47, 0.16);
    color: var(--brand-deep);
    font-weight: 800;
}

.creator-story-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.creator-story-author-copy .panel-kicker,
.creator-story-author-copy strong {
    margin: 0;
}

.creator-story-badge-row,
.creator-chip-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.14);
    color: var(--brand-deep);
    font-size: 0.84rem;
    font-weight: 800;
}

.creator-meta-pill.is-accent {
    background: rgba(255, 194, 91, 0.18);
    color: #8b4c14;
}

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

.creator-story-detail-text > div {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 246, 239, 0.82);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.creator-story-detail-text .panel-kicker,
.creator-story-detail-text p {
    margin: 0;
}

.creator-story-detail-side {
    display: grid;
    gap: 16px;
}

.creator-story-sidecard {
    gap: 14px !important;
}

.creator-story-sidecard .panel-kicker {
    margin: 0;
}

.creator-story-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.creator-story-stat-tile {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 246, 239, 0.86);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.creator-story-stat-tile strong,
.creator-story-stat-tile span {
    margin: 0;
}

.creator-story-stat-tile strong {
    font-size: 1.1rem;
}

.creator-story-stat-tile span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.creator-story-manage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 20px;
    align-items: start;
}

.creator-chapter-table-card {
    gap: 18px;
}

.creator-chapter-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

.creator-chapter-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.creator-chapter-table th,
.creator-chapter-table td {
    padding: 14px 12px;
    text-align: left;
    border-top: 1px solid rgba(255, 97, 47, 0.1);
    vertical-align: top;
}

.creator-chapter-table thead th {
    border-top: 0;
    color: #8f6b5d;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.creator-chapter-title-cell {
    display: grid;
    gap: 6px;
}

.creator-chapter-title-cell strong,
.creator-chapter-title-cell span {
    margin: 0;
}

.creator-chapter-title-cell span {
    color: var(--muted);
    line-height: 1.55;
}

.creator-chapter-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.creator-story-quick-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.creator-icon-button,
.creator-chapter-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 97, 47, 0.18);
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    box-shadow: 0 12px 24px rgba(76, 35, 19, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    padding: 0;
}

.creator-icon-button:hover,
.creator-icon-button:focus-visible,
.creator-chapter-action-icon:hover,
.creator-chapter-action-icon:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.34);
    box-shadow: 0 14px 28px rgba(76, 35, 19, 0.12);
}

.creator-icon-button svg,
.creator-chapter-action-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.creator-icon-button {
    color: #c87d10;
}

.creator-story-settings-shell {
    margin-top: 12px;
    display: block;
}

.creator-story-settings-shell[hidden] {
    display: none !important;
}

.creator-story-settings-panel {
    width: 100%;
    margin-top: 0;
    gap: 18px !important;
}

.creator-page.has-chapter-editor-open {
    overflow: hidden;
}

.creator-story-settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.creator-chapter-action-icon {
    color: var(--brand-deep);
    text-decoration: none;
}

.creator-chapter-action-icon.is-view {
    color: #2966c7;
}

.creator-chapter-action-icon.is-edit {
    color: #1f9b58;
}

.creator-chapter-action-icon.is-takedown {
    color: #c87d10;
}

.creator-chapter-action-icon.is-delete {
    color: #c43d2d;
}

.creator-chapter-action-icon.is-disabled,
.creator-chapter-action-icon:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    color: #9a8d86;
}

.creator-chapter-editor-shell {
    position: fixed;
    inset: 0;
    z-index: 1210;
    padding: 28px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    background: rgba(35, 20, 15, 0.5);
    backdrop-filter: blur(8px);
}

.creator-chapter-editor-shell[hidden] {
    display: none !important;
}

.creator-chapter-editor-panel {
    width: min(100%, 980px);
    margin-top: 16px;
}

.creator-chapter-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 246, 239, 0.82);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.creator-chapter-workspace-meta {
    display: grid;
    gap: 6px;
}

.creator-chapter-workspace-meta .panel-kicker,
.creator-chapter-workspace-meta h3 {
    margin: 0;
}

.creator-chapter-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.creator-chapter-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.creator-chapter-setting-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 246, 239, 0.82);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.creator-chapter-setting-card .panel-kicker,
.creator-note-list {
    margin: 0;
}

.creator-note-list {
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.65;
}

.creator-chapter-editor-area {
    min-height: 360px;
}

.chapter-editor-shell {
    display: grid;
    gap: 12px;
}

.chapter-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 246, 239, 0.82);
    border: 1px solid rgba(255, 97, 47, 0.1);
}

.chapter-editor-tool {
    min-width: 42px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 97, 47, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chapter-editor-tool:hover,
.chapter-editor-tool:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 97, 47, 0.32);
    box-shadow: 0 12px 22px rgba(76, 35, 19, 0.08);
}

.chapter-rich-editor {
    overflow-y: auto;
    white-space: normal;
}

.chapter-rich-editor:focus {
    outline: none;
}

.chapter-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #9a786a;
}

.chapter-rich-editor p,
.chapter-rich-editor div,
.chapter-rich-editor h2,
.chapter-rich-editor h3,
.chapter-rich-editor blockquote,
.chapter-rich-editor ul,
.chapter-rich-editor ol {
    margin: 0 0 1em;
}

.chapter-rich-editor img {
    display: block;
    width: auto;
    max-width: min(100%, 520px);
    max-height: 480px;
    margin: 16px auto;
    border-radius: 18px;
    box-shadow: 0 18px 30px rgba(76, 35, 19, 0.12);
}

.chapter-editor-source {
    display: none;
}

.chapter-editor-status-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 16px;
    align-items: center;
}

.chapter-editor-status-row .creator-page-copy {
    margin: 0;
}

.chapter-editor-word-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 97, 47, 0.08);
    border: 1px solid rgba(255, 97, 47, 0.12);
    color: var(--brand-deep);
    font-size: 0.84rem;
    font-weight: 800;
}

.chapter-cover-preview-card {
    display: flex;
    justify-content: flex-start;
}

.chapter-cover-preview-image {
    width: min(100%, 180px);
    max-height: 270px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(18, 13, 11, 0.92);
    box-shadow: 0 16px 28px rgba(76, 35, 19, 0.12);
}

.creator-chapter-submit-row {
    align-items: center;
}

.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-monetization-section {
    display: grid;
    gap: 20px;
}

.creator-monetization-note {
    max-width: 42ch;
    margin: 0;
}

.creator-monetization-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.creator-monetization-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 20px;
    align-items: start;
}

.creator-wallet-card,
.creator-cashout-history-card,
.creator-monetized-story-card {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 243, 235, 0.95));
    border: 1px solid rgba(255, 97, 47, 0.12);
    box-shadow: 0 18px 34px rgba(76, 35, 19, 0.08);
}

.creator-wallet-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.creator-wallet-metric {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 97, 47, 0.1);
    display: grid;
    gap: 6px;
}

.creator-wallet-metric span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.creator-wallet-metric strong {
    font-size: 1.25rem;
    color: var(--brand-deep);
}

.creator-cashout-form textarea {
    min-height: 120px;
}

.creator-cashout-history {
    display: grid;
    gap: 12px;
}

.creator-cashout-history-card {
    padding: 18px;
    border-radius: 20px;
    display: grid;
    gap: 8px;
}

.creator-cashout-history-card p,
.creator-monetized-story-card h4,
.creator-monetized-story-card p {
    margin: 0;
}

.creator-cashout-history-head,
.creator-monetized-story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.creator-cashout-history-head strong,
.creator-monetized-story-meta strong {
    font-size: 1.08rem;
    color: var(--brand-deep);
}

.creator-monetized-story-list {
    display: grid;
    gap: 12px;
}

.creator-monetized-story-card {
    padding: 18px 20px;
    border-radius: 22px;
    display: grid;
    gap: 12px;
}

.creator-monetized-story-card .panel-kicker {
    margin: 0 0 2px;
}

.creator-monetized-story-card h4 {
    font-size: 1.2rem;
    line-height: 1.15;
}

.creator-monetized-story-meta span {
    color: var(--muted);
    font-weight: 700;
}

.creator-page .mobile-bottom-nav {
    background: rgba(255, 249, 244, 0.98);
    border-top-color: rgba(255, 97, 47, 0.14);
    box-shadow: 0 -14px 28px rgba(76, 35, 19, 0.1);
}

.creator-page .mobile-tab {
    color: #8f6b5d;
}

.creator-page .mobile-tab.is-active {
    color: var(--brand-deep);
}

@media (max-width: 980px) {
    .creator-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .creator-monetization-stats,
    .creator-wallet-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .creator-story-detail-grid,
    .creator-story-manage-layout,
    .creator-monetization-grid {
        grid-template-columns: 1fr;
    }

    .creator-chapter-workspace-grid {
        grid-template-columns: 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;
    }

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

@media (max-width: 640px) {
    .creator-portal-layout {
        grid-template-columns: 1fr;
    }

    .creator-sidebar {
        position: static;
        padding: 20px 16px;
        border-radius: 24px;
    }

    .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-monetization-stats,
    .creator-wallet-summary {
        grid-template-columns: 1fr;
    }

    .creator-section-head,
    .creator-filter-bar,
    .creator-story-hero-head,
    .creator-story-detail-statusbar,
    .creator-story-settings-actions,
    .creator-chapter-workspace-head,
    .chapter-card-head,
    .chapter-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .creator-chapter-editor-shell {
        padding: 16px 12px 24px;
        align-items: start;
    }

    .creator-chapter-editor-panel {
        width: 100%;
        margin-top: 0;
    }

    .creator-create-btn,
    .creator-search-input,
    .creator-type-select {
        width: 100%;
    }

    .creator-cashout-history-head,
    .creator-monetized-story-meta {
        align-items: flex-start;
    }

    .creator-story-card,
    .creator-compact-story,
    .creator-story-detail-main,
    .story-overview-card {
        grid-template-columns: 1fr;
    }

    .creator-story-cover,
    .creator-compact-cover,
    .creator-story-detail-cover,
    .story-overview-cover {
        width: 112px;
        max-height: 168px;
    }

    .creator-story-hero-backdrop {
        padding: 18px 16px;
    }

    .creator-story-hero-head {
        align-items: stretch;
    }

    .creator-story-detail-cover-column {
        justify-content: flex-start;
    }

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

    .creator-story-meta {
        grid-column: auto;
        grid-auto-flow: row;
    }

    .creator-editor-card,
    .chapter-card {
        padding: 20px;
    }

    .creator-chapter-table {
        min-width: 0;
    }

    .creator-chapter-table-wrap {
        overflow-x: visible;
    }

    .creator-chapter-table thead {
        display: none;
    }

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

    .creator-chapter-table tr {
        padding: 16px;
        border: 1px solid rgba(255, 97, 47, 0.12);
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 247, 242, 0.94));
        box-shadow: 0 14px 28px rgba(76, 35, 19, 0.06);
    }

    .creator-chapter-table tr + tr {
        margin-top: 14px;
    }

    .creator-chapter-table tr:first-child {
        padding-top: 16px;
    }

    .creator-chapter-table td {
        border-top: 0;
        padding: 8px 0;
    }

    .creator-chapter-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #8f6b5d;
        font-size: 0.74rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .creator-chapter-row-actions {
        justify-content: flex-start;
    }
}

:root {
    --bg: #f7efe7;
    --bg-strong: #f2e2d3;
    --surface: rgba(255, 252, 248, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --text: #27160f;
    --muted: #785646;
    --line: rgba(85, 46, 30, 0.14);
    --brand: #ff612f;
    --brand-deep: #cb461d;
    --brand-soft: #ffb58e;
    --accent: #1c1a1c;
    --shadow: 0 24px 80px rgba(76, 35, 19, 0.18);
}

body {
    background:
        radial-gradient(circle at top left, rgba(255, 123, 71, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 181, 142, 0.24), transparent 26%),
        linear-gradient(135deg, #fff9f4 0%, #f9eee5 55%, #f2e2d3 100%);
}

.glow-left {
    background: rgba(255, 97, 47, 0.14);
}

.glow-right {
    background: rgba(255, 181, 142, 0.24);
}

.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(255, 97, 47, 0.1);
    box-shadow: 0 22px 52px rgba(76, 35, 19, 0.1);
}

.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(255, 252, 248, 0.96), rgba(255, 245, 238, 0.92));
}

.admin-hero-card {
    background:
        radial-gradient(circle at top right, rgba(255, 181, 142, 0.22), transparent 36%),
        linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 246, 240, 0.96));
}

.home-announcement-actions,
.announcement-bar {
    background:
        linear-gradient(180deg, rgba(255, 252, 248, 0.94), rgba(255, 245, 239, 0.98)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.06), rgba(255, 181, 142, 0.12));
}

.announcement-label,
.admin-field-note {
    background: rgba(255, 97, 47, 0.1);
    color: var(--brand-deep);
    border: 1px solid rgba(255, 97, 47, 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 {
    background: linear-gradient(145deg, rgba(255, 97, 47, 0.14), rgba(255, 181, 142, 0.2));
}

.verified-badge {
    background: linear-gradient(135deg, rgba(43, 185, 246, 0.12), rgba(8, 118, 229, 0.16));
}

.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 {
    background: linear-gradient(135deg, #ff915e, var(--brand) 68%, var(--brand-deep));
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 97, 47, 0.22);
}

.primary-btn:hover,
.primary-btn:focus-visible,
.announcement-cta-btn:hover,
.announcement-cta-btn:focus-visible {
    box-shadow: 0 18px 32px rgba(255, 97, 47, 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(255, 97, 47, 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(255, 97, 47, 0.24);
    color: var(--brand-deep);
}

.progress-bar {
    background: linear-gradient(90deg, #ffb58e 0%, #ff612f 55%, #cb461d 100%);
}

.auth-hero {
    background:
        linear-gradient(160deg, rgba(39, 22, 15, 0.94), rgba(77, 38, 23, 0.86)),
        linear-gradient(135deg, rgba(255, 97, 47, 0.24), rgba(255, 181, 142, 0.16));
    color: #fff9f5;
}

.auth-hero::after {
    background: radial-gradient(circle, rgba(255, 181, 142, 0.24), transparent 65%);
}

.auth-hero .eyebrow,
.auth-hero .auth-copy,
.auth-hero .hero-feature p,
.auth-hero .hero-quote p {
    color: rgba(255, 236, 226, 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(255, 97, 47, 0.16);
    background: rgba(255, 249, 244, 0.96);
}

.auth-form input::placeholder,
.story-editor-form textarea::placeholder,
.menu-form textarea::placeholder,
.novel-builder textarea::placeholder,
.conversation-textarea::placeholder {
    color: #9a786a;
}

.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(255, 97, 47, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 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(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border-color: rgba(255, 97, 47, 0.12);
    box-shadow: 0 16px 36px rgba(76, 35, 19, 0.1);
}

.admin-page .admin-sidebar-card-accent {
    background:
        radial-gradient(circle at top right, rgba(255, 181, 142, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 243, 235, 0.95));
}

.admin-page .admin-table th {
    background: rgba(255, 228, 214, 0.82);
    color: var(--brand-deep);
}

.admin-page .admin-table td {
    border-bottom-color: rgba(255, 97, 47, 0.08);
}

.admin-page .admin-section-status,
.admin-page .admin-login-hint,
.admin-page .story-library-btn.is-saved {
    background: rgba(255, 97, 47, 0.1);
    border-color: rgba(255, 97, 47, 0.16);
    color: var(--brand-deep);
}

.admin-page .admin-sidebar-list-item strong,
.admin-page .admin-hero-stat-card strong {
    color: var(--text);
}

.admin-page .story-library-btn:hover,
.admin-page .story-library-btn:focus-visible {
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 14px 28px rgba(255, 97, 47, 0.14);
}

.admin-login-page .panel-logo {
    background: linear-gradient(145deg, rgba(255, 97, 47, 0.14), rgba(255, 181, 142, 0.2));
}

.admin-login-page .social-btn,
.admin-login-page .admin-login-hint {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
    border: 1px solid rgba(255, 97, 47, 0.12);
    box-shadow: 0 16px 36px rgba(76, 35, 19, 0.1);
}

.admin-login-page .social-btn:hover,
.admin-login-page .social-btn:focus-visible {
    border-color: rgba(255, 97, 47, 0.24);
    box-shadow: 0 14px 28px rgba(255, 97, 47, 0.14);
}

.admin-login-page .auth-divider {
    color: #9a786a;
}

.admin-login-page .auth-divider::before,
.admin-login-page .auth-divider::after {
    background: rgba(255, 97, 47, 0.14);
}

@media (max-width: 640px) {
    .mobile-bottom-nav,
    .creator-page .mobile-bottom-nav {
        background: rgba(255, 249, 244, 0.98);
        border-top: 1px solid rgba(255, 97, 47, 0.14);
        box-shadow: 0 -14px 28px rgba(76, 35, 19, 0.1);
    }

    .mobile-tab,
    .creator-page .mobile-tab {
        color: #8f6b5d;
    }

    .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(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94));
        border-color: rgba(255, 97, 47, 0.14);
        box-shadow: 0 16px 34px rgba(76, 35, 19, 0.1);
    }

    .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(255, 97, 47, 0.1);
        border-color: rgba(255, 97, 47, 0.16);
        color: var(--brand-deep);
    }

    .profile-tab.is-active {
        background: linear-gradient(135deg, #ff915e, var(--brand) 68%, var(--brand-deep));
        color: #fff;
        border-color: transparent;
        box-shadow: 0 14px 28px rgba(255, 97, 47, 0.2);
    }

    .profile-tab.is-active .profile-tab-count {
        background: rgba(255, 245, 239, 0.24);
        color: #fff;
    }

    .search-page-field input:focus,
    .app-topbar-search-field input:focus {
        border-color: rgba(255, 97, 47, 0.72);
        box-shadow: 0 0 0 4px rgba(255, 97, 47, 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(255, 97, 47, 0.24);
        box-shadow: 0 14px 28px rgba(255, 97, 47, 0.14);
    }

    .reader-page {
        background: linear-gradient(180deg, #fffaf6 0%, #f7ede4 100%);
    }

    .reader-actions {
        background: linear-gradient(135deg, #6f2d18, #cb461d 72%, #7f2914);
        box-shadow: 0 20px 40px rgba(76, 35, 19, 0.24);
    }

    .reader-action-btn.is-active {
        background: rgba(255, 233, 220, 0.2);
        color: #fff8f3;
    }
}

@media (max-width: 640px) {
    body,
    .creator-page,
    .reader-page {
        background:
            radial-gradient(circle at top left, rgba(255, 123, 71, 0.16), transparent 32%),
            radial-gradient(circle at bottom right, rgba(255, 181, 142, 0.24), transparent 28%),
            linear-gradient(135deg, #fff9f4 0%, #f9eee5 55%, #f2e2d3 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(255, 252, 248, 0.98), rgba(255, 245, 239, 0.94)) !important;
        border-color: rgba(255, 97, 47, 0.14) !important;
        box-shadow: 0 16px 34px rgba(76, 35, 19, 0.1) !important;
        color: var(--text) !important;
    }

    .admin-sidebar-card-accent,
    .creator-page .story-empty-card {
        background:
            radial-gradient(circle at top right, rgba(255, 181, 142, 0.18), transparent 34%),
            linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 243, 235, 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(255, 97, 47, 0.1) !important;
        border-color: rgba(255, 97, 47, 0.16) !important;
        color: var(--brand-deep) !important;
    }

    .admin-table th {
        background: rgba(255, 228, 214, 0.82) !important;
        color: var(--brand-deep) !important;
    }

    .admin-table td {
        border-bottom-color: rgba(255, 97, 47, 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(255, 97, 47, 0.14), rgba(255, 181, 142, 0.2)) !important;
    }

    .creator-create-btn,
    .primary-btn,
    .search-page-btn,
    .app-topbar-search-btn {
        background: linear-gradient(135deg, #ff915e, var(--brand) 68%, var(--brand-deep)) !important;
        color: #fff !important;
        border-color: transparent !important;
        box-shadow: 0 14px 28px rgba(255, 97, 47, 0.22) !important;
    }

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

    .login-view .auth-shell {
        grid-template-columns: 1fr !important;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .about-brand-intro,
    .about-leadership-block,
    .about-info-grid,
    .about-leadership-details {
        grid-template-columns: 1fr;
    }

    .about-inline-logo {
        width: 68px;
        height: 68px;
    }

    .auth-form input,
    .search-page-field input,
    .app-topbar-search-field input {
        font-size: 16px;
    }

    .home-page .home-shell {
        width: min(calc(100% - 18px), var(--content-width));
        gap: 18px;
        padding: 14px 0 112px;
    }

    .home-page .app-topbar,
    .home-page .announcement-bar,
    .home-page .story-section {
        border-radius: 24px;
    }

    .home-page .app-topbar {
        top: 8px;
        gap: 10px;
        padding: 12px 14px;
    }

    .home-page .app-brand-lockup {
        min-width: 0;
    }

    .home-page .app-topbar-title {
        min-width: 0;
        font-size: clamp(0.98rem, 4vw, 1.15rem);
        line-height: 1.08;
    }

    .home-page .app-topbar-actions {
        gap: 8px;
    }

    .home-page .topbar-icon-link,
    .home-page .profile-drawer-trigger {
        width: 42px;
        height: 42px;
    }

    .home-page .story-section {
        padding: 18px 16px;
    }

    .home-page .story-section-head {
        gap: 10px;
        margin-bottom: 14px;
    }

    .home-page .story-section h2 {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
        line-height: 1.15;
    }

    .home-page .section-status {
        font-size: 0.76rem;
    }

    .home-page .home-announcement-strip,
    .home-page .home-announcement-carousel {
        margin-bottom: 0;
    }

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

    .home-page .home-announcement-card {
        border-radius: 20px;
    }

    .home-page .home-announcement-image {
        max-height: 112px;
        aspect-ratio: 3 / 1;
    }

    .home-page .home-announcement-actions {
        padding: 12px;
    }

    .home-page .announcement-cta-btn {
        width: 100%;
        min-height: 40px;
    }

    .home-page .story-grid,
    .home-page .story-grid-covers,
    .home-page .story-grid-unified-strip {
        gap: 12px;
    }

    .home-page .home-shell:not(.admin-shell) .story-grid-covers,
    .home-page .home-shell:not(.admin-shell) .story-grid-unified-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-covers,
    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-unified-strip,
    .home-page .story-grid-unified-strip {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding-inline: 0;
        padding-bottom: 6px;
        gap: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-covers .story-card-link,
    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-unified-strip .story-card-link,
    .home-page .story-grid-unified-strip .story-card-link {
        flex: 0 0 min(128px, 46vw);
        min-width: min(128px, 46vw);
    }

    .home-page .story-rank-badge {
        top: 8px;
        left: 8px;
        min-height: 28px;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

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

    .home-page .site-footer-brand {
        padding: 14px 16px;
        gap: 10px;
    }

    .home-page .mobile-bottom-nav {
        padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    }

    .home-page .story-carousel-mobile .story-carousel-btn {
        display: grid;
    }

    .home-page .mobile-tab {
        min-width: 0;
        gap: 4px;
        padding: 6px 2px;
    }

    .home-page .mobile-tab-icon,
    .home-page .mobile-tab-icon svg {
        width: 24px;
        height: 24px;
    }

    .home-page .mobile-tab-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.7rem;
    }
}

@media (max-width: 420px) {
    .home-page .home-shell {
        width: min(calc(100% - 14px), var(--content-width));
        gap: 16px;
        padding-bottom: 108px;
    }

    .home-page .app-topbar {
        padding: 10px 12px;
    }

    .home-page .app-topbar-logo {
        width: 38px;
        height: 38px;
    }

    .home-page .topbar-icon-link,
    .home-page .profile-drawer-trigger {
        width: 40px;
        height: 40px;
    }

    .home-page .story-section {
        padding: 16px 14px;
    }

    .home-page .story-section h2 {
        font-size: 1.2rem;
    }

    .home-page .home-announcement-card {
        border-radius: 18px;
    }

    .home-page .home-announcement-image {
        max-height: 96px;
        aspect-ratio: 11 / 4;
    }

    .home-page .announcement-cta-btn {
        font-size: 0.92rem;
    }

    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-covers,
    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-unified-strip,
    .home-page .story-grid-unified-strip {
        gap: 10px;
    }

    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-covers .story-card-link,
    .home-page .home-shell:not(.admin-shell) .story-carousel-mobile .story-grid-unified-strip .story-card-link,
    .home-page .story-grid-unified-strip .story-card-link {
        flex-basis: min(120px, 64vw);
        min-width: min(120px, 64vw);
    }

    .home-page .story-grid,
    .home-page .story-grid-covers,
    .home-page .story-grid-unified-strip {
        gap: 10px;
    }

    .home-page .notification-drawer-menu {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 640px) {
    .home-page .home-story-carousel-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        grid-auto-flow: column !important;
        grid-auto-columns: auto !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        padding-inline: 0 !important;
        padding-bottom: 8px !important;
        gap: 12px !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .home-page .home-story-carousel-track::-webkit-scrollbar {
        display: none;
    }

    .home-page .home-story-carousel-track > .story-card-link {
        flex: 0 0 min(138px, 48vw) !important;
        min-width: min(138px, 48vw) !important;
        scroll-snap-align: start;
    }

    .home-page .story-carousel-mobile .story-carousel-btn {
        display: grid !important;
    }
}

@media (max-width: 420px) {
    .home-page .home-story-carousel-track {
        gap: 10px !important;
    }

    .home-page .home-story-carousel-track > .story-card-link {
        flex-basis: min(128px, 62vw) !important;
        min-width: min(128px, 62vw) !important;
    }
}

.landing-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 123, 71, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(125, 180, 255, 0.18), transparent 28%),
        linear-gradient(180deg, #fdf6f0 0%, #fffaf6 42%, #f7fbff 100%);
    color: var(--text);
    overflow-x: hidden;
}

.has-guest-consent-modal {
    overflow: hidden;
}

.guest-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 440;
    display: grid;
    place-items: center;
    padding: 16px;
}

.guest-consent-modal[hidden] {
    display: none;
}

.guest-consent-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(20, 24, 37, 0.56);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.guest-consent-dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 20px 28px 30px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 26px 48px rgba(18, 24, 39, 0.22);
    display: grid;
    gap: 18px;
    text-align: center;
}

.guest-consent-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #707b92;
    font: inherit;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.guest-consent-brand {
    display: grid;
    justify-items: center;
    padding-top: 12px;
}

.guest-consent-brand-logo {
    width: auto;
    max-width: 120px;
    height: 42px;
    object-fit: contain;
}

.guest-consent-copy {
    display: grid;
    gap: 12px;
}

.guest-consent-copy p {
    margin: 0;
    color: #6d7892;
    font-size: 0.98rem;
    line-height: 1.6;
}

.guest-consent-actions {
    display: grid;
}

.guest-consent-accept {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #2d295c 0%, #241f4f 100%);
    color: #ffffff;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guest-consent-accept:hover,
.guest-consent-accept:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(36, 31, 79, 0.22);
}

.guest-consent-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    color: #939cb0;
    font-size: 0.95rem;
}

.guest-consent-links a {
    color: #4b4f73;
    text-decoration: none;
}

.guest-consent-links a:hover,
.guest-consent-links a:focus-visible {
    text-decoration: underline;
}

.landing-shell {
    width: min(calc(100% - 40px), var(--content-width));
    margin: 0 auto;
    padding: 28px 0 56px;
    display: grid;
    gap: 28px;
}

.landing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 18px 40px rgba(40, 23, 11, 0.08);
    backdrop-filter: blur(16px);
}

.landing-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.landing-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    object-fit: contain;
    background: linear-gradient(145deg, rgba(255, 123, 71, 0.12), rgba(125, 180, 255, 0.16));
    padding: 7px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.landing-brand-name {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-topbar-actions,
.landing-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.landing-topbar-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.landing-topbar-link:hover,
.landing-topbar-link:focus-visible,
.landing-login-copy a:hover,
.landing-login-copy a:focus-visible,
.landing-section-link:hover,
.landing-section-link:focus-visible {
    text-decoration: underline;
}

.landing-topbar-cta,
.landing-hero-cta {
    min-height: 48px;
    padding-inline: 20px;
}

.landing-hero {
    display: block;
}

.landing-hero-copy,
.landing-hero-panel,
.landing-feature-card,
.landing-showcase-section,
.landing-empty-card {
    border-radius: 32px;
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 24px 54px rgba(40, 23, 11, 0.08);
}

.landing-hero-copy {
    padding: clamp(28px, 5vw, 52px);
    background:
        radial-gradient(circle at top left, rgba(255, 123, 71, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 241, 0.94));
}

.landing-eyebrow,
.landing-card-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-deep);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.landing-hero-copy h1 {
    margin: 16px 0 14px;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.landing-hero-copy p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.75;
}

.landing-login-copy {
    margin-top: 16px !important;
    font-weight: 600;
}

.landing-login-copy a,
.landing-section-link {
    color: var(--brand-deep);
    text-decoration: none;
    font-weight: 800;
}

.landing-hero-panel {
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(125, 180, 255, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.96));
    display: grid;
    gap: 16px;
}

.landing-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.landing-hero-card,
.landing-feature-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(28, 23, 15, 0.08);
}

.landing-hero-card strong,
.landing-feature-card h2,
.landing-section-head h2 {
    display: block;
    margin: 10px 0 8px;
}

.landing-hero-card strong,
.landing-feature-card h2 {
    font-size: 1.2rem;
    line-height: 1.3;
}

.landing-hero-card p,
.landing-feature-card p,
.landing-empty-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.landing-hero-card-highlight {
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(255, 123, 71, 0.14), rgba(125, 180, 255, 0.14)),
        rgba(255, 255, 255, 0.86);
}

.landing-feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.landing-showcase-section {
    padding: 24px;
    background: rgba(255, 255, 255, 0.82);
}

.landing-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
}

.landing-section-head h2,
.landing-empty-card h3,
.landing-story-copy h3 {
    margin: 0;
}

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

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

.landing-story-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 243, 0.96));
    border: 1px solid rgba(28, 23, 15, 0.08);
    box-shadow: 0 16px 36px rgba(40, 23, 11, 0.08);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-story-card:hover,
.landing-story-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 22px 40px rgba(40, 23, 11, 0.12);
    border-color: rgba(255, 97, 47, 0.22);
}

.landing-story-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
}

.landing-story-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.landing-story-copy h3 {
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.landing-story-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.landing-rank-pill {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b47, #ff612f 70%, #cc461d);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    box-shadow: 0 12px 22px rgba(255, 97, 47, 0.22);
}

.landing-empty-card {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.94));
}

@media (max-width: 1100px) {
    .landing-story-grid-ranking {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .landing-story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .guest-consent-dialog {
        width: min(100%, 390px);
        padding: 18px 20px 24px;
        gap: 16px;
    }

    .guest-consent-brand-logo {
        max-width: 108px;
        height: 38px;
    }

    .guest-consent-copy p {
        font-size: 0.94rem;
    }

    .guest-consent-links {
        gap: 10px;
        font-size: 0.9rem;
    }

    .landing-shell {
        width: min(calc(100% - 18px), var(--content-width));
        padding: 14px 0 112px;
        gap: 18px;
    }

    .landing-topbar,
    .landing-hero-copy,
    .landing-hero-panel,
    .landing-showcase-section,
    .landing-feature-card,
    .landing-empty-card {
        border-radius: 20px;
        box-sizing: border-box;
    }

    .landing-topbar {
        padding: 10px 12px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .landing-brand-name {
        font-size: 0.92rem;
        letter-spacing: 0.06em;
    }

    .landing-brand-mark {
        width: 100%;
        justify-content: center;
        gap: 10px;
        min-width: 0;
    }

    .landing-topbar-actions {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .landing-topbar-link,
    .landing-topbar-cta {
        min-height: 38px;
        padding-inline: 12px;
        font-size: 0.88rem;
    }

    .landing-hero-copy {
        padding: 18px 14px;
        text-align: center;
    }

    .landing-hero-copy h1 {
        margin: 10px 0 12px;
        font-size: clamp(1.65rem, 8.2vw, 2.25rem);
        line-height: 1.02;
        letter-spacing: -0.04em;
    }

    .landing-hero-copy p {
        max-width: none;
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .landing-hero-actions {
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }

    .landing-hero-cta {
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }

    .landing-login-copy {
        text-align: center;
        font-size: 0.88rem;
    }

    .landing-eyebrow,
    .landing-card-label {
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    .landing-story-carousel-track {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        gap: 10px;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .landing-story-carousel-track::-webkit-scrollbar {
        display: none;
    }

    .landing-story-carousel-track .landing-story-card {
        flex: 0 0 calc((100% - 10px) / 2);
        min-width: calc((100% - 10px) / 2);
        scroll-snap-align: start;
        padding: 9px;
        gap: 8px;
        border-radius: 18px;
    }

    .landing-story-cover {
        border-radius: 14px;
    }

    .landing-story-copy h3 {
        font-size: 0.86rem;
    }

    .landing-story-copy p {
        font-size: 0.76rem;
    }

    .landing-showcase-section {
        padding: 18px 16px;
    }

    .landing-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .landing-section-head h2 {
        font-size: 1.45rem;
    }

    .landing-rank-pill {
        top: 12px;
        left: 12px;
        min-height: 26px;
        padding: 5px 10px;
        font-size: 0.7rem;
    }

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

    .landing-page .site-footer-brand {
        padding: 14px 16px;
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .landing-shell {
        width: min(calc(100% - 14px), var(--content-width));
        padding: 8px 0 108px;
        gap: 16px;
    }

    .landing-topbar {
        padding: 10px 12px;
    }

    .landing-brand-logo {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .landing-brand-name {
        font-size: 0.74rem;
    }

    .landing-hero-copy {
        padding: 16px 12px;
    }

    .landing-hero-copy h1 {
        font-size: clamp(1.45rem, 8vw, 1.95rem);
        line-height: 1.06;
    }

    .landing-hero-copy p {
        font-size: 0.82rem;
    }

    .landing-story-carousel-track {
        gap: 8px;
    }

    .landing-story-carousel-track .landing-story-card {
        flex-basis: calc((100% - 8px) / 2);
        min-width: calc((100% - 8px) / 2);
    }

    .landing-showcase-section {
        padding: 16px 14px;
    }

    .landing-section-head h2 {
        font-size: 1.28rem;
    }

    .landing-story-copy h3 {
        font-size: 0.78rem;
    }

    .landing-story-copy p {
        font-size: 0.7rem;
    }

}

/* Readability refresh */
:root {
    --bg: #f5f5f7;
    --bg-strong: #ececef;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --text: #1f2328;
    --muted: #5f6b76;
    --line: rgba(15, 23, 42, 0.1);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body,
.creator-page,
.reader-page,
.landing-page,
.home-page,
.admin-page {
    background:
        linear-gradient(180deg, #fafafa 0%, #f2f3f5 100%) !important;
    color: var(--text) !important;
}

.glow-left,
.glow-right {
    background: rgba(255, 255, 255, 0.55) !important;
}

.app-topbar,
.story-section,
.story-card,
.story-comment-card,
.reader-chapter-link,
.editor-panel,
.editor-sidecard,
.creator-portal,
.creator-editor-card,
.creator-stat-card,
.creator-story-card,
.creator-compact-story,
.chapter-card,
.story-empty-card,
.secondary-action-btn,
.admin-sidebar-card,
.admin-panel-card,
.admin-table-card,
.admin-hero-stat-card,
.admin-admin-chip,
.admin-header-meta span,
.admin-sidebar-list-item,
.admin-mini-card,
.admin-inline-form select,
.admin-score-input,
.story-library-btn,
.profile-drawer-menu,
.notification-panel,
.notification-mini-card,
.connections-overlay-panel,
.site-footer-brand,
.landing-topbar,
.landing-hero-copy,
.landing-hero-panel,
.landing-showcase-section,
.landing-feature-card,
.landing-empty-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 251, 0.98)) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06) !important;
    color: var(--text) !important;
}

.panel-kicker,
.section-status,
.story-empty-badge,
.story-card-kicker,
.story-detail-tags span,
.story-overview-tags span,
.creator-story-type,
.creator-story-tags span,
.notification-count-pill,
.profile-tab-count,
.announcement-label,
.admin-field-note {
    background: rgba(255, 97, 47, 0.08) !important;
    border-color: rgba(255, 97, 47, 0.14) !important;
    color: var(--brand-deep) !important;
}

.app-topbar-search-field input,
.search-page-field input,
.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,
.creator-filter-bar input,
.creator-filter-bar select,
.creator-page .story-editor-form input,
.creator-page .story-editor-form textarea,
.creator-page .story-editor-form select,
.creator-page .story-editor-form input[type="file"] {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.app-topbar-search-field input::placeholder,
.search-page-field input::placeholder,
.auth-form input::placeholder,
.story-editor-form textarea::placeholder,
.story-comment-form textarea::placeholder,
.menu-form textarea::placeholder,
.novel-builder textarea::placeholder,
.conversation-textarea::placeholder,
.creator-filter-bar input::placeholder,
.creator-page .story-editor-form input::placeholder,
.creator-page .story-editor-form textarea::placeholder {
    color: #7a8591 !important;
}

.app-topbar-search-field input:focus,
.search-page-field input:focus,
.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,
.creator-filter-bar input:focus,
.creator-filter-bar select:focus,
.creator-page .story-editor-form input:focus,
.creator-page .story-editor-form textarea:focus,
.creator-page .story-editor-form select:focus,
.creator-page .story-editor-form input[type="file"]:focus {
    border-color: rgba(255, 97, 47, 0.42) !important;
    box-shadow: 0 0 0 4px rgba(255, 97, 47, 0.1) !important;
}

.reader-page {
    background: linear-gradient(180deg, #fbfbfc 0%, #f1f2f4 100%) !important;
}

.reader-action-btn:hover,
.reader-action-btn:focus-visible {
    background: rgba(15, 23, 42, 0.05) !important;
}

.story-comment-card-reply,
.story-comment-reply-form,
.story-comment-replies {
    background: transparent !important;
}

.story-comment-replies {
    border-left-color: rgba(15, 23, 42, 0.1) !important;
}

.story-comment-reply-trigger {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.mobile-bottom-nav,
.creator-page .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08) !important;
}

.mobile-tab,
.creator-page .mobile-tab {
    color: #6b7280 !important;
}

.mobile-tab.is-active,
.creator-page .mobile-tab.is-active,
.app-nav-link.is-active,
.topbar-icon-link.is-active,
.topbar-icon-link:hover,
.topbar-icon-link:focus-visible,
.profile-tab.is-active {
    color: var(--brand-deep) !important;
    background: rgba(255, 97, 47, 0.08) !important;
    border-color: rgba(255, 97, 47, 0.12) !important;
    box-shadow: none !important;
}

/* Control Center theme */
:root {
    --bg: #ecf3ff;
    --bg-strong: #dbe8ff;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --text: #16325c;
    --muted: #5372a3;
    --line: rgba(78, 128, 229, 0.18);
    --brand: #4f8dff;
    --brand-deep: #2157d8;
    --brand-soft: #b7d0ff;
    --accent: #102342;
    --shadow: 0 24px 54px rgba(70, 108, 184, 0.14);
}

body,
.creator-page,
.reader-page,
.landing-page,
.home-page,
.admin-page {
    background:
        radial-gradient(circle at top left, rgba(160, 200, 255, 0.5), transparent 24%),
        radial-gradient(circle at top right, rgba(199, 221, 255, 0.44), transparent 26%),
        radial-gradient(circle at bottom left, rgba(179, 210, 255, 0.34), transparent 24%),
        linear-gradient(180deg, #eef5ff 0%, #e3efff 100%) !important;
    color: var(--text) !important;
}

.glow-left,
.glow-right {
    background: rgba(167, 196, 255, 0.3) !important;
}

.admin-hero-card,
.admin-sidebar-card-accent,
.creator-page .story-empty-card,
.landing-hero-copy,
.landing-hero-panel {
    background:
        radial-gradient(circle at top right, rgba(190, 214, 255, 0.54), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.94)) !important;
    border-color: rgba(112, 154, 237, 0.22) !important;
    box-shadow: 0 22px 46px rgba(70, 108, 184, 0.14) !important;
}

.story-author-role,
.panel-kicker,
.admin-field-note,
.admin-header-copy p:last-child,
.admin-sidebar-list-item span,
.creator-page .profile-drawer-handle,
.creator-page .creator-page-copy,
.creator-page .creator-greeting,
.creator-page .chapter-card-copy,
.creator-page .story-empty-card p,
.story-card p,
.landing-hero-copy p,
.landing-feature-card p,
.landing-showcase-section p,
.notification-card p,
.search-user-copy p {
    color: var(--muted) !important;
}

.panel-kicker,
.section-status,
.story-empty-badge,
.story-card-kicker,
.story-detail-tags span,
.story-overview-tags span,
.creator-story-type,
.creator-story-tags span,
.notification-count-pill,
.profile-tab-count,
.announcement-label,
.admin-field-note,
.admin-section-status,
.admin-login-hint,
.story-library-btn.is-saved {
    background: rgba(79, 141, 255, 0.1) !important;
    border-color: rgba(79, 141, 255, 0.18) !important;
    color: var(--brand-deep) !important;
}

.app-topbar-logo,
.panel-logo,
.admin-login-page .panel-logo {
    background: linear-gradient(145deg, rgba(120, 165, 255, 0.18), rgba(207, 226, 255, 0.26)) !important;
}

.verified-badge {
    background: linear-gradient(135deg, rgba(43, 185, 246, 0.14), rgba(8, 118, 229, 0.18)) !important;
    border-color: rgba(43, 185, 246, 0.24) !important;
    color: #07589f !important;
}

.app-topbar-search-field input,
.search-page-field input,
.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,
.creator-filter-bar input,
.creator-filter-bar select,
.creator-page .story-editor-form input,
.creator-page .story-editor-form textarea,
.creator-page .story-editor-form select,
.creator-page .story-editor-form input[type="file"] {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(112, 154, 237, 0.22) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.app-topbar-search-field input::placeholder,
.search-page-field input::placeholder,
.auth-form input::placeholder,
.story-editor-form textarea::placeholder,
.story-comment-form textarea::placeholder,
.menu-form textarea::placeholder,
.novel-builder textarea::placeholder,
.conversation-textarea::placeholder,
.creator-filter-bar input::placeholder,
.creator-page .story-editor-form input::placeholder,
.creator-page .story-editor-form textarea::placeholder {
    color: #7d93bc !important;
}

.app-topbar-search-field input:focus,
.search-page-field input:focus,
.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,
.creator-filter-bar input:focus,
.creator-filter-bar select:focus,
.creator-page .story-editor-form input:focus,
.creator-page .story-editor-form textarea:focus,
.creator-page .story-editor-form select:focus,
.creator-page .story-editor-form input[type="file"]:focus {
    border-color: rgba(79, 141, 255, 0.42) !important;
    box-shadow: 0 0 0 4px rgba(79, 141, 255, 0.12) !important;
}

.app-nav-link.is-active,
.topbar-icon-link.is-active,
.topbar-icon-link:hover,
.topbar-icon-link:focus-visible,
.mobile-tab.is-active,
.creator-page .mobile-tab.is-active {
    color: var(--brand-deep) !important;
    background: rgba(79, 141, 255, 0.1) !important;
    border-color: rgba(79, 141, 255, 0.18) !important;
    box-shadow: none !important;
}

.mobile-bottom-nav,
.creator-page .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(112, 154, 237, 0.18) !important;
    box-shadow: 0 -14px 28px rgba(70, 108, 184, 0.1) !important;
}

.mobile-tab,
.creator-page .mobile-tab {
    color: #6d83ad !important;
}

.reader-action-btn:hover,
.reader-action-btn:focus-visible {
    background: rgba(79, 141, 255, 0.08) !important;
}

.story-comment-card-reply {
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(241, 247, 255, 0.96)) !important;
    border: 1px solid rgba(112, 154, 237, 0.16) !important;
}

.story-comment-reply-form {
    background: linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(238, 245, 255, 0.94)) !important;
    border-color: rgba(112, 154, 237, 0.16) !important;
}

.story-comment-replies {
    border-left-color: rgba(112, 154, 237, 0.18) !important;
}

.story-comment-reply-trigger {
    background: rgba(79, 141, 255, 0.08) !important;
    border-color: rgba(79, 141, 255, 0.16) !important;
    color: var(--brand-deep) !important;
    box-shadow: none !important;
}

/* Story detail readability polish */
.story-detail-hero {
    position: relative;
    overflow: hidden;
    grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
    gap: 34px;
    background:
        radial-gradient(circle at top left, rgba(174, 206, 255, 0.44), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 185, 142, 0.2), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(242, 248, 255, 0.95)) !important;
    border-color: rgba(112, 154, 237, 0.24) !important;
    box-shadow: 0 24px 50px rgba(70, 108, 184, 0.14) !important;
}

.story-detail-hero::before {
    content: "";
    position: absolute;
    inset: auto -6% -28% auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 141, 255, 0.16) 0%, rgba(79, 141, 255, 0) 72%);
    pointer-events: none;
}

.story-detail-hero > * {
    position: relative;
    z-index: 1;
}

.story-detail-hero .story-reader-cover-wrap {
    width: min(100%, 340px);
    justify-self: start;
    position: relative;
    padding: 18px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(225, 238, 255, 0.82));
    border: 1px solid rgba(112, 154, 237, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 18px 34px rgba(70, 108, 184, 0.12);
}

.story-detail-hero .story-reader-cover-wrap::before {
    content: "";
    position: absolute;
    inset: 28px 20px -8px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(18, 44, 84, 0.24), rgba(18, 44, 84, 0.02));
    filter: blur(18px);
    opacity: 0.34;
    pointer-events: none;
}

.story-detail-hero .story-reader-cover-wrap::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    pointer-events: none;
}

.story-detail-hero .story-reader-cover {
    position: relative;
    z-index: 1;
    display: block;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 22px 42px rgba(18, 44, 84, 0.2);
    filter: saturate(1.08) contrast(1.06);
    background: linear-gradient(180deg, #eef4ff, #dce9ff);
}

.story-detail-copy {
    padding: 28px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 255, 0.74)) !important;
    border: 1px solid rgba(112, 154, 237, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.story-detail-copy .panel-kicker {
    width: fit-content;
    margin: 0;
    padding: 10px 14px;
    border-radius: 999px;
    letter-spacing: 0.16em;
}

.story-detail-copy h2 {
    margin: 0;
    color: #0d2647 !important;
    line-height: 1.02;
}

.story-detail-copy .story-author-row {
    width: 100%;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(112, 154, 237, 0.14);
    box-shadow: 0 12px 24px rgba(70, 108, 184, 0.08);
}

.story-detail-copy .story-author-name {
    color: var(--text) !important;
}

.story-detail-copy .story-author-role {
    color: #5a76a6 !important;
    font-weight: 700;
}

.story-detail-copy .story-detail-tags,
.story-detail-copy .story-stat-list,
.story-detail-copy .story-action-buttons {
    gap: 10px;
}

.story-detail-copy > *,
.story-detail-copy .story-secondary-actions,
.story-detail-copy .story-share-report-group,
.story-detail-copy .story-detail-meta-copy {
    min-width: 0;
}

.story-detail-copy .story-stat-list {
    width: 100%;
    justify-content: center;
}

.story-detail-copy .story-action-buttons {
    justify-content: center;
}

.story-detail-copy .story-detail-meta-row {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(112, 154, 237, 0.14);
    box-shadow: 0 12px 24px rgba(70, 108, 184, 0.08);
}

.story-detail-copy .story-detail-meta-values span {
    background: rgba(79, 141, 255, 0.1);
    color: var(--brand-deep);
    border-color: rgba(112, 154, 237, 0.16);
}

.story-detail-copy .story-action-row {
    gap: 18px;
}

.story-detail-copy .story-detail-tags span,
.story-detail-copy .story-stat-pill,
.story-detail-copy .story-toggle-btn,
.story-detail-copy .story-detail-library-btn,
.story-detail-copy .story-share-trigger,
.story-detail-copy .story-manage-trigger {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(112, 154, 237, 0.18) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

.story-detail-copy .story-stat-pill {
    justify-content: center;
    min-width: 140px;
    text-align: center;
}

.story-detail-copy .story-detail-tags span {
    background: rgba(79, 141, 255, 0.1) !important;
    color: var(--brand-deep) !important;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.story-detail-copy .story-detail-meta-values span,
.story-detail-copy .story-stat-pill {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.story-detail-copy .story-detail-library-btn:hover,
.story-detail-copy .story-detail-library-btn:focus-visible,
.story-detail-copy .story-share-trigger:hover,
.story-detail-copy .story-share-trigger:focus-visible,
.story-detail-copy .story-manage-trigger:hover,
.story-detail-copy .story-manage-trigger:focus-visible {
    background: #ffffff !important;
}

.story-detail-copy .story-share-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.98)) !important;
    border-color: rgba(112, 154, 237, 0.18) !important;
    box-shadow: 0 16px 30px rgba(70, 108, 184, 0.12) !important;
}

.story-reader-section .story-reader-text {
    max-width: 72ch;
}

.story-reader-section .story-reader-text p {
    font-size: 1.03rem;
    line-height: 1.95;
    color: #1b355f !important;
}

@media (max-width: 900px) {
    .story-detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 22px !important;
    }

    .story-detail-hero .story-reader-cover-wrap {
        width: min(100%, 320px);
        justify-self: center;
    }

    .story-detail-copy {
        width: 100%;
        min-width: 0;
        padding: 24px;
    }

    .story-detail-copy h2 {
        font-size: clamp(2rem, 6vw, 2.8rem);
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .story-detail-copy .story-author-row,
    .story-detail-copy .story-action-row,
    .story-detail-copy .story-action-buttons,
    .story-detail-copy .story-secondary-actions,
    .story-detail-copy .story-share-report-group,
    .story-detail-copy .story-detail-tags,
    .story-detail-copy .story-detail-meta,
    .story-detail-copy .story-stat-list,
    .story-detail-copy .story-library-form,
    .story-detail-copy .story-share-menu,
    .story-detail-copy .story-report-form {
        width: 100%;
        min-width: 0;
    }

    .story-detail-copy .story-action-buttons,
    .story-detail-copy .story-secondary-actions,
    .story-detail-copy .story-share-report-group {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
    }

    .story-detail-copy .story-detail-tags,
    .story-detail-copy .story-detail-meta-values {
        justify-content: flex-start;
    }

    .story-detail-copy .story-stat-list {
        justify-content: stretch;
    }

    .story-detail-copy .story-stat-pill {
        width: 100%;
        min-width: 0;
    }

    .story-detail-copy .story-start-btn,
    .story-detail-copy .story-detail-library-btn,
    .story-detail-copy .story-share-trigger,
    .story-detail-copy .story-report-trigger,
    .story-detail-copy .story-manage-trigger {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .story-detail-hero {
        gap: 20px;
        padding: 20px 16px !important;
    }

    .story-detail-hero .story-reader-cover-wrap {
        width: min(100%, 260px);
        justify-self: center;
    }

    .story-detail-copy {
        width: 100%;
        min-width: 0;
        padding: 22px 18px;
        border-radius: 24px;
    }

    .story-detail-copy h2 {
        font-size: clamp(1.95rem, 9vw, 2.6rem);
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .story-detail-copy .story-author-row,
    .story-detail-copy .story-action-row,
    .story-detail-copy .story-action-buttons,
    .story-detail-copy .story-detail-tags,
    .story-detail-copy .story-detail-meta,
    .story-detail-copy .story-stat-list {
        width: 100%;
        min-width: 0;
    }

    .story-detail-meta-row {
        padding: 12px 13px;
        gap: 10px;
    }

    .story-detail-meta-icon {
        width: 38px;
        height: 38px;
    }

    .story-detail-meta-values span {
        font-size: 0.84rem;
    }

    .story-detail-copy .story-author-name,
    .story-detail-copy .story-author-role {
        overflow-wrap: anywhere;
    }

    .story-detail-copy .story-start-btn,
    .story-detail-copy .story-detail-library-btn,
    .story-detail-copy .story-share-trigger,
    .story-detail-copy .story-report-trigger,
    .story-detail-copy .story-manage-trigger {
        width: 100%;
        justify-content: center;
    }

    .story-reader-section .story-reader-text p {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .story-page .app-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand actions";
        padding: 14px;
    }

    .story-page .app-topbar-search,
    .story-page .app-nav {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .app-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "search search"
            "nav nav";
        align-items: center;
        gap: 12px;
        padding: 14px 14px 16px;
    }

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

    .app-brand-lockup {
        grid-area: brand;
        min-width: 0;
    }

    .app-topbar-actions {
        grid-area: actions;
    }

    .app-topbar-search {
        grid-area: search;
        display: flex !important;
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .app-topbar-search-field {
        min-width: 0;
    }

    .app-topbar-search-field input {
        min-height: 46px;
    }

    .app-topbar-search-panel {
        display: none !important;
    }

    .app-topbar-search-btn {
        min-height: 46px;
        padding-inline: 18px;
    }

    .app-nav {
        grid-area: nav;
        display: flex !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-top: 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .app-nav::-webkit-scrollbar {
        display: none;
    }

    .app-nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.84rem;
    }

    .story-page .app-topbar {
        grid-template-areas: "brand actions";
    }

    .story-page .app-topbar-search,
    .story-page .app-nav {
        display: none !important;
    }

    .search-page .app-topbar,
    .inbox-page .app-topbar,
    .menu-page .app-topbar {
        display: grid !important;
    }

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

    .inbox-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .inbox-toolbar > *,
    .inbox-toolbar form,
    .inbox-toolbar .notification-read-btn,
    .inbox-message-actions .story-library-btn,
    .creator-story-delete-form .creator-danger-btn {
        width: 100%;
    }

    .creator-head-actions {
        width: 100%;
        justify-content: stretch;
    }

    .creator-head-actions .creator-create-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .creator-story-delete-form {
        justify-content: stretch;
    }

    .story-section-head > div,
    .search-user-head,
    .inbox-message-user {
        min-width: 0;
    }

    .story-section h2,
    .search-user-copy h3,
    .inbox-message-copy h3,
    .creator-story-copy h4 {
        overflow-wrap: anywhere;
    }

    .notification-drawer-menu,
    .profile-drawer-menu {
        width: min(calc(100vw - 20px), 360px);
    }
}

@media (max-width: 420px) {
    .app-topbar {
        padding: 12px 12px 14px;
    }

    .app-topbar-search {
        flex-direction: column;
        align-items: stretch;
    }

    .app-topbar-search-btn {
        width: 100%;
    }

    .app-nav-link {
        padding: 10px 13px;
    }

    .notification-drawer-menu,
    .profile-drawer-menu {
        width: calc(100vw - 16px);
    }
}

@media (max-width: 640px) {
    .app-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand actions";
    }

    .app-topbar-search,
    .app-nav {
        display: none !important;
    }
}

/* Auth redesign */
body.login-view,
body.signup-view {
    min-height: 100vh;
    background: #efe5dc !important;
    position: relative;
    isolation: isolate;
}

body.login-view::before,
body.login-view::after,
body.signup-view::before,
body.signup-view::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.login-view::before,
body.signup-view::before {
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(255, 248, 242, 0.2), rgba(255, 248, 242, 0.18)),
        url("cover.jpg") center center / cover no-repeat;
    transform: scale(1.02);
}

body.login-view::after,
body.signup-view::after {
    z-index: -1;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.3), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(242, 223, 210, 0.24) 45%, rgba(206, 177, 220, 0.26));
    backdrop-filter: blur(4px);
}

body.login-view .auth-shell.auth-shell-single,
body.signup-view .auth-shell.auth-shell-single {
    width: min(calc(100% - 32px), 560px) !important;
    min-height: 100vh;
    padding: 28px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: center;
    align-items: center;
}

body.signup-view .auth-shell.auth-shell-single {
    width: min(calc(100% - 32px), 620px) !important;
}

body.login-view .auth-panel.auth-panel-card,
body.signup-view .auth-panel.auth-panel-card {
    width: 100%;
    padding: clamp(24px, 4vw, 40px) !important;
    border-radius: 30px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.26)) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow:
        0 30px 80px rgba(50, 34, 31, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

body.login-view .auth-brand-lockup,
body.signup-view .auth-brand-lockup {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

body.login-view .auth-brand-logo.panel-logo,
body.signup-view .auth-brand-logo.panel-logo {
    width: 72px;
    height: 72px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.42) !important;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 16px 32px rgba(62, 34, 25, 0.1);
}

body.login-view .auth-brand-name,
body.signup-view .auth-brand-name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #69483d;
}

body.login-view .auth-heading,
body.signup-view .auth-heading {
    text-align: center;
    margin-bottom: 24px;
}

body.login-view .auth-title,
body.signup-view .auth-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 2.55rem);
    line-height: 1.08;
    color: #241a1d;
}

body.login-view .auth-subtitle,
body.signup-view .auth-subtitle {
    margin: 12px auto 0;
    max-width: 420px;
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(46, 31, 35, 0.74);
}

body.login-view .social-stack,
body.signup-view .social-stack {
    gap: 14px;
    margin-bottom: 18px;
}

body.login-view .social-btn,
body.login-view .primary-btn,
body.login-view .auth-form input,
body.login-view .terms-check,
body.signup-view .social-btn,
body.signup-view .primary-btn,
body.signup-view .auth-form input,
body.signup-view .terms-check {
    border-radius: 18px !important;
}

body.login-view .social-btn,
body.signup-view .social-btn {
    min-height: 58px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.44) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #1f1a23 !important;
}

body.login-view .social-btn:hover,
body.login-view .social-btn:focus-visible,
body.signup-view .social-btn:hover,
body.signup-view .social-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        0 14px 24px rgba(67, 41, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

body.login-view .social-btn:disabled,
body.login-view .primary-btn:disabled,
body.signup-view .social-btn:disabled,
body.signup-view .primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
}

body.login-view .social-mark,
body.signup-view .social-mark {
    width: 34px;
    height: 34px;
    background: #ffffff;
    color: #4285f4;
    box-shadow: 0 8px 18px rgba(66, 133, 244, 0.16);
}

body.login-view .auth-divider,
body.signup-view .auth-divider {
    margin: 6px 0 18px;
    color: rgba(64, 43, 47, 0.62);
}

body.login-view .auth-divider::before,
body.login-view .auth-divider::after,
body.signup-view .auth-divider::before,
body.signup-view .auth-divider::after {
    background: rgba(255, 255, 255, 0.52);
}

body.login-view .auth-form,
body.signup-view .auth-form {
    gap: 14px;
}

body.login-view .auth-field,
body.signup-view .auth-field {
    display: grid;
    gap: 8px;
}

body.login-view .auth-form label,
body.signup-view .auth-form label {
    color: #443239;
    font-size: 0.92rem;
}

body.login-view .auth-form input,
body.signup-view .auth-form input {
    min-height: 56px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.42) !important;
    color: #22181d !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.login-view .auth-form input::placeholder,
body.signup-view .auth-form input::placeholder {
    color: rgba(79, 62, 67, 0.58) !important;
}

body.login-view .auth-form input:focus,
body.signup-view .auth-form input:focus {
    border-color: rgba(154, 108, 219, 0.54) !important;
    box-shadow:
        0 0 0 4px rgba(168, 128, 219, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
    transform: none;
}

body.login-view .primary-btn,
body.signup-view .primary-btn {
    min-height: 58px;
    margin-top: 4px;
    background: linear-gradient(135deg, rgba(173, 136, 219, 0.96), rgba(130, 98, 204, 0.94)) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 18px 30px rgba(121, 88, 182, 0.28) !important;
}

body.login-view .primary-btn:hover,
body.login-view .primary-btn:focus-visible,
body.signup-view .primary-btn:hover,
body.signup-view .primary-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(121, 88, 182, 0.32) !important;
}

body.login-view .form-message,
body.signup-view .form-message {
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #2c1f25;
}

body.login-view .form-message-error,
body.signup-view .form-message-error {
    background: rgba(170, 58, 68, 0.16);
    border-color: rgba(170, 58, 68, 0.24);
    color: #6f1f28;
}

body.login-view .form-message-success,
body.signup-view .form-message-success {
    background: rgba(57, 148, 97, 0.16);
    border-color: rgba(57, 148, 97, 0.24);
    color: #1e6a44;
}

body.login-view .terms-check,
body.signup-view .terms-check {
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.38) !important;
}

body.login-view .terms-check input[type="checkbox"],
body.signup-view .terms-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0;
}

body.login-view .terms-check span,
body.login-view .terms-help,
body.login-view .switch-copy,
body.signup-view .terms-check span,
body.signup-view .terms-help,
body.signup-view .switch-copy {
    color: rgba(54, 38, 44, 0.72);
}

body.login-view .terms-help,
body.signup-view .terms-help {
    margin: -4px 0 2px;
    font-size: 0.88rem;
}

body.login-view .terms-link,
body.login-view .switch-copy a,
body.signup-view .terms-link,
body.signup-view .switch-copy a {
    color: #6f46b8;
    font-weight: 700;
}

body.login-view .switch-copy,
body.signup-view .switch-copy {
    margin-top: 22px;
}

@media (max-width: 640px) {
    body.login-view .auth-shell.auth-shell-single,
    body.signup-view .auth-shell.auth-shell-single {
        width: min(calc(100% - 20px), 100%) !important;
        padding: 16px 0;
        align-items: start;
    }

    body.login-view .auth-panel.auth-panel-card,
    body.signup-view .auth-panel.auth-panel-card {
        padding: 20px 16px !important;
        border-radius: 24px !important;
    }

    body.login-view .auth-brand-logo.panel-logo,
    body.signup-view .auth-brand-logo.panel-logo {
        width: 64px;
        height: 64px;
        border-radius: 20px;
    }

    body.login-view .auth-brand-name,
    body.signup-view .auth-brand-name {
        letter-spacing: 0.24em;
        font-size: 0.84rem;
    }

    body.login-view .auth-heading,
    body.signup-view .auth-heading {
        margin-bottom: 20px;
    }

    body.login-view .auth-title,
    body.signup-view .auth-title {
        font-size: clamp(1.72rem, 8vw, 2.2rem);
    }

    body.login-view .auth-subtitle,
    body.signup-view .auth-subtitle {
        font-size: 0.92rem;
        line-height: 1.58;
    }

    body.login-view .social-btn,
    body.login-view .primary-btn,
    body.login-view .auth-form input,
    body.signup-view .social-btn,
    body.signup-view .primary-btn,
    body.signup-view .auth-form input {
        min-height: 54px;
    }

    body.login-view .social-btn,
    body.login-view .primary-btn,
    body.signup-view .social-btn,
    body.signup-view .primary-btn {
        font-size: 0.96rem;
    }

    body.login-view .form-message,
    body.login-view .terms-check,
    body.signup-view .form-message,
    body.signup-view .terms-check {
        padding: 13px 14px;
    }
}

/* Topbar redesign */
.app-brand-link {
    text-decoration: none;
    color: inherit;
}

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

.more-drawer {
    position: relative;
    z-index: 90;
}

.more-drawer summary {
    list-style: none;
}

.more-drawer summary::-webkit-details-marker {
    display: none;
}

.app-topbar {
    grid-template-columns: auto auto minmax(240px, 1fr) auto !important;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(29, 36, 68, 0.08) !important;
    box-shadow: 0 14px 36px rgba(29, 36, 68, 0.08) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-brand-lockup {
    gap: 12px;
}

.app-topbar-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    padding: 7px;
    background: rgba(245, 247, 255, 0.96) !important;
}

.app-topbar-title {
    font-size: 1.18rem;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    color: #1d2142;
    line-height: 1.08;
}

.app-nav {
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.app-nav-link,
.app-nav-link-more,
.more-drawer-link,
.profile-drawer-link {
    color: #2c3153;
}

.app-nav-link,
.app-nav-link-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: transparent;
}

.app-nav-link:hover,
.app-nav-link:focus-visible,
.app-nav-link-more:hover,
.app-nav-link-more:focus-visible {
    background: rgba(29, 36, 68, 0.06);
    color: #1d2142;
}

.app-nav-link.is-active,
.more-drawer[open] .app-nav-link-more,
.app-nav-link-more.is-active {
    background: #25244a;
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 36, 74, 0.18);
}

.app-nav-link-caret {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.more-drawer[open] .app-nav-link-caret {
    transform: rotate(180deg);
}

.app-topbar-search {
    width: 100%;
    justify-content: flex-end;
}

.app-topbar-search-field input {
    min-height: 46px;
    padding: 11px 16px;
    border-radius: 14px;
    border-color: rgba(29, 36, 68, 0.12);
    background: #fff !important;
    color: #1d2142;
}

.app-topbar-search-field input::placeholder {
    color: #97a0bb !important;
}

.app-topbar-search-field input:focus {
    border-color: rgba(80, 95, 190, 0.42);
    box-shadow: 0 0 0 4px rgba(80, 95, 190, 0.12);
}

.app-topbar-actions {
    gap: 10px;
}

.topbar-publish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #28c76f, #1eb45f);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(30, 180, 95, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.topbar-publish-btn:hover,
.topbar-publish-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(30, 180, 95, 0.24);
    filter: saturate(1.05);
}

.topbar-publish-btn.is-active {
    box-shadow: 0 0 0 3px rgba(30, 180, 95, 0.16), 0 14px 28px rgba(30, 180, 95, 0.24);
}

.topbar-icon-link,
.profile-drawer-trigger {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff !important;
    border: 1px solid rgba(29, 36, 68, 0.1);
    box-shadow: none;
    color: #25244a;
}

.topbar-icon-link:hover,
.topbar-icon-link:focus-visible,
.profile-drawer-trigger:hover,
.profile-drawer-trigger:focus-visible,
.profile-drawer[open] .profile-drawer-trigger {
    border-color: rgba(37, 36, 74, 0.2);
    box-shadow: 0 10px 24px rgba(37, 36, 74, 0.12);
    color: #25244a;
}

.nav-theme-toggle-icon {
    width: 22px;
    height: 22px;
}

.more-drawer-menu,
.profile-drawer-menu {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(29, 36, 68, 0.1) !important;
    box-shadow: 0 22px 48px rgba(29, 36, 68, 0.16) !important;
}

.more-drawer-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 220px;
    display: grid;
    gap: 8px;
    z-index: 120;
}

.more-drawer-link,
.nav-theme-toggle-inline {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: #2c3153;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.more-drawer-link:hover,
.more-drawer-link:focus-visible,
.nav-theme-toggle-inline:hover,
.nav-theme-toggle-inline:focus-visible,
.profile-drawer-link:hover,
.profile-drawer-link:focus-visible {
    background: rgba(29, 36, 68, 0.06);
    color: #1d2142;
}

.more-drawer-link.is-active,
.profile-drawer-link.is-active {
    background: rgba(37, 36, 74, 0.08);
    color: #25244a;
}

.more-drawer-link-mobile-only {
    display: none;
}

.more-drawer-story-list {
    display: grid;
    gap: 8px;
    margin: 2px 0 4px;
}

.more-drawer-story-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 250, 246, 0.9);
    border: 1px solid rgba(85, 46, 30, 0.08);
    text-decoration: none;
    display: grid;
    gap: 4px;
}

.more-drawer-story-card strong,
.more-drawer-story-card span {
    margin: 0;
}

.more-drawer-story-card strong {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.25;
}

.more-drawer-story-card span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.more-drawer-story-card:hover,
.more-drawer-story-card:focus-visible {
    border-color: rgba(255, 97, 47, 0.18);
    background: rgba(255, 255, 255, 0.96);
}

.nav-theme-toggle-desktop {
    display: inline-grid;
    place-items: center;
}

.topbar-overlay-backdrop {
    background: rgba(29, 36, 68, 0.14);
}

@media (max-width: 960px) and (min-width: 641px) {
    .app-topbar {
        grid-template-columns: auto auto minmax(180px, 1fr) auto !important;
        gap: 12px;
        padding: 12px 14px;
    }

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

    .app-nav {
        gap: 8px;
    }

    .app-nav-link,
    .app-nav-link-more {
        padding: 10px 13px;
        font-size: 0.9rem;
    }

    .topbar-publish-btn {
        min-height: 42px;
        padding-inline: 14px;
        font-size: 0.92rem;
    }
}

@media (max-width: 640px) {
    .app-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 14px;
        top: 8px;
    }

    .search-page .app-topbar,
    .inbox-page .app-topbar,
    .menu-page .app-topbar,
    .story-page .app-topbar {
        display: flex !important;
    }

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

    .app-topbar-title,
    .app-topbar-search,
    .app-topbar-actions,
    .app-nav-link-feed {
        display: none !important;
    }

    .topbar-publish-btn,
    .nav-theme-toggle-desktop,
    .profile-drawer,
    .notification-drawer {
        display: none !important;
    }

    .notification-drawer-mobile {
        display: block !important;
    }

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

    .app-nav {
        display: flex !important;
        justify-content: flex-end;
        gap: 8px;
        overflow: visible;
        padding-top: 0;
    }

    .app-nav-link,
    .app-nav-link-more {
        min-height: 40px;
        padding: 9px 13px;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .more-drawer-menu {
        left: auto;
        right: 0;
        min-width: 200px;
    }

    .more-drawer-link-mobile-only {
        display: inline-flex;
    }

    .mobile-bottom-nav {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

html[data-theme="dark"] body.auth-page,
html[data-theme="dark"] body.creator-page,
html[data-theme="dark"] body.reader-page {
    background:
        radial-gradient(circle at top left, rgba(74, 96, 189, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(18, 192, 137, 0.08), transparent 24%),
        linear-gradient(180deg, #0f1424 0%, #13192b 100%) !important;
    color: #eef2ff !important;
}

html[data-theme="dark"] .app-topbar,
html[data-theme="dark"] .announcement-bar,
html[data-theme="dark"] .discover-welcome,
html[data-theme="dark"] .editor-panel,
html[data-theme="dark"] .editor-sidecard,
html[data-theme="dark"] .profile-hero,
html[data-theme="dark"] .home-banner,
html[data-theme="dark"] .story-section,
html[data-theme="dark"] .profile-drawer-menu,
html[data-theme="dark"] .notification-drawer-menu,
html[data-theme="dark"] .more-drawer-menu,
html[data-theme="dark"] .connections-overlay-panel {
    background: rgba(18, 24, 41, 0.92) !important;
    border-color: rgba(154, 170, 225, 0.14) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24) !important;
    color: #eef2ff !important;
}

html[data-theme="dark"] .app-topbar-title,
html[data-theme="dark"] .story-section h2,
html[data-theme="dark"] .discover-welcome h2,
html[data-theme="dark"] .profile-hero h2,
html[data-theme="dark"] .profile-drawer-name,
html[data-theme="dark"] .story-card h3,
html[data-theme="dark"] .story-card p,
html[data-theme="dark"] .profile-about,
html[data-theme="dark"] .panel-kicker {
    color: #f6f8ff !important;
}

html[data-theme="dark"] .app-nav-link,
html[data-theme="dark"] .app-nav-link-more,
html[data-theme="dark"] .profile-drawer-link,
html[data-theme="dark"] .more-drawer-link,
html[data-theme="dark"] .nav-theme-toggle-inline,
html[data-theme="dark"] .profile-drawer-handle,
html[data-theme="dark"] .switch-copy,
html[data-theme="dark"] .terms-help {
    color: #d6def7 !important;
}

html[data-theme="dark"] .app-nav-link:hover,
html[data-theme="dark"] .app-nav-link:focus-visible,
html[data-theme="dark"] .app-nav-link-more:hover,
html[data-theme="dark"] .app-nav-link-more:focus-visible,
html[data-theme="dark"] .profile-drawer-link:hover,
html[data-theme="dark"] .profile-drawer-link:focus-visible,
html[data-theme="dark"] .more-drawer-link:hover,
html[data-theme="dark"] .more-drawer-link:focus-visible,
html[data-theme="dark"] .nav-theme-toggle-inline:hover,
html[data-theme="dark"] .nav-theme-toggle-inline:focus-visible {
    background: rgba(154, 170, 225, 0.12) !important;
    color: #fff !important;
}

html[data-theme="dark"] .app-nav-link.is-active,
html[data-theme="dark"] .app-nav-link-more.is-active,
html[data-theme="dark"] .more-drawer[open] .app-nav-link-more {
    background: #f5f7ff !important;
    color: #1b2137 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .app-topbar-logo,
html[data-theme="dark"] .topbar-icon-link,
html[data-theme="dark"] .profile-drawer-trigger,
html[data-theme="dark"] .app-topbar-search-field input {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(154, 170, 225, 0.14) !important;
    color: #eef2ff !important;
}

html[data-theme="dark"] .app-topbar-search-field input::placeholder {
    color: #93a2cf !important;
}

html[data-theme="dark"] .app-topbar-search-field input:focus {
    border-color: rgba(162, 183, 255, 0.42) !important;
    box-shadow: 0 0 0 4px rgba(113, 132, 208, 0.16) !important;
}

html[data-theme="dark"] .mobile-bottom-nav,
html[data-theme="dark"] .creator-page .mobile-bottom-nav {
    background: rgba(12, 17, 29, 0.96) !important;
    border-top-color: rgba(154, 170, 225, 0.12) !important;
    box-shadow: 0 -16px 30px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .mobile-tab,
html[data-theme="dark"] .creator-page .mobile-tab {
    color: #93a2cf !important;
}

html[data-theme="dark"] .mobile-tab.is-active,
html[data-theme="dark"] .creator-page .mobile-tab.is-active {
    color: #fff !important;
}

html[data-theme="dark"] .topbar-overlay-backdrop {
    background: rgba(4, 8, 17, 0.44) !important;
}

/* Home banner redesign */
.home-announcement-strip {
    grid-template-columns: 1fr;
    gap: 16px;
}

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

.home-announcement-card {
    border-radius: 18px;
    border: 1px solid rgba(92, 146, 197, 0.18);
    background: #eaf6ff;
    box-shadow: 0 18px 34px rgba(70, 111, 148, 0.12);
}

.home-announcement-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-announcement-card-link:hover,
.home-announcement-card-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(70, 111, 148, 0.16);
    border-color: rgba(92, 146, 197, 0.28);
}

.home-announcement-media {
    position: relative;
    overflow: hidden;
    min-height: 102px;
    border-radius: inherit;
}

.home-announcement-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 44%, rgba(22, 60, 99, 0.14) 100%);
    pointer-events: none;
}

.home-announcement-image {
    width: 100%;
    max-height: none;
    min-height: 102px;
    aspect-ratio: 21 / 5;
    object-fit: cover;
    object-position: center;
}

.home-announcement-actions {
    position: absolute;
    top: 50%;
    right: 14px;
    bottom: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    padding: 0;
    background: transparent;
    transform: translateY(-50%);
}

.announcement-cta-btn {
    min-height: 54px;
    padding: 0 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffc533, #ffb300);
    color: #1f1807;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 30px rgba(255, 179, 0, 0.28);
}

.announcement-cta-btn:hover,
.announcement-cta-btn:focus-visible {
    box-shadow: 0 18px 34px rgba(255, 179, 0, 0.32);
    filter: brightness(1.02);
}

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

@media (max-width: 960px) {
    .home-announcement-media {
        min-height: 112px;
    }

    .home-announcement-image {
        min-height: 112px;
        aspect-ratio: 18 / 4;
    }

    .announcement-cta-btn {
        min-height: 48px;
        padding-inline: 18px;
        border-radius: 16px;
        font-size: 0.96rem;
    }
}

@media (max-width: 640px) {
    .home-page .home-announcement-strip,
    .home-page .home-announcement-carousel {
        margin-bottom: 0;
    }

    .home-page .home-announcement-card {
        border-radius: 16px;
    }

    .home-page .home-announcement-media {
        min-height: 84px;
    }

    .home-page .home-announcement-image {
        min-height: 84px;
        aspect-ratio: 11 / 4;
    }
}

@media (max-width: 420px) {
    .home-page .home-announcement-media {
        min-height: 72px;
    }

    .home-page .home-announcement-image {
        min-height: 72px;
        aspect-ratio: 10 / 4;
    }

    .home-page .announcement-cta-btn {
        min-height: 36px;
        padding-inline: 12px;
        border-radius: 12px;
        font-size: 0.8rem;
    }
}

html[data-theme="dark"] .home-announcement-card {
    border-color: rgba(131, 174, 255, 0.18) !important;
    background: #12243a !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] .home-announcement-media::after {
    background:
        linear-gradient(90deg, rgba(14, 23, 39, 0.02) 0%, rgba(14, 23, 39, 0.04) 44%, rgba(4, 10, 18, 0.22) 100%);
}

/* White UI refresh */
html:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-strong: #f7f8fa;
    --surface: rgba(255, 255, 255, 0.98);
    --surface-strong: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --line: rgba(15, 23, 42, 0.08);
    --shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) body,
html:not([data-theme="dark"]) body.creator-page,
html:not([data-theme="dark"]) body.reader-page,
html:not([data-theme="dark"]) body.landing-page,
html:not([data-theme="dark"]) body.home-page,
html:not([data-theme="dark"]) body.admin-page,
html:not([data-theme="dark"]) body.auth-page,
html:not([data-theme="dark"]) body.splash-page,
html:not([data-theme="dark"]) body.legal-doc-page {
    background: #ffffff !important;
    color: var(--text) !important;
}

html:not([data-theme="dark"]) .glow-left,
html:not([data-theme="dark"]) .glow-right {
    background: rgba(255, 255, 255, 0.78) !important;
}

html:not([data-theme="dark"]) .app-topbar,
html:not([data-theme="dark"]) .announcement-bar,
html:not([data-theme="dark"]) .discover-welcome,
html:not([data-theme="dark"]) .editor-panel,
html:not([data-theme="dark"]) .editor-sidecard,
html:not([data-theme="dark"]) .profile-hero,
html:not([data-theme="dark"]) .home-banner,
html:not([data-theme="dark"]) .story-section,
html:not([data-theme="dark"]) .story-card,
html:not([data-theme="dark"]) .story-comment-card,
html:not([data-theme="dark"]) .reader-chapter-link,
html:not([data-theme="dark"]) .creator-portal,
html:not([data-theme="dark"]) .creator-editor-card,
html:not([data-theme="dark"]) .creator-stat-card,
html:not([data-theme="dark"]) .creator-story-card,
html:not([data-theme="dark"]) .creator-compact-story,
html:not([data-theme="dark"]) .chapter-card,
html:not([data-theme="dark"]) .story-empty-card,
html:not([data-theme="dark"]) .secondary-action-btn,
html:not([data-theme="dark"]) .admin-sidebar-card,
html:not([data-theme="dark"]) .admin-panel-card,
html:not([data-theme="dark"]) .admin-table-card,
html:not([data-theme="dark"]) .admin-hero-stat-card,
html:not([data-theme="dark"]) .admin-admin-chip,
html:not([data-theme="dark"]) .admin-header-meta span,
html:not([data-theme="dark"]) .admin-sidebar-list-item,
html:not([data-theme="dark"]) .admin-mini-card,
html:not([data-theme="dark"]) .admin-inline-form select,
html:not([data-theme="dark"]) .admin-score-input,
html:not([data-theme="dark"]) .story-library-btn,
html:not([data-theme="dark"]) .profile-drawer-menu,
html:not([data-theme="dark"]) .notification-panel,
html:not([data-theme="dark"]) .notification-mini-card,
html:not([data-theme="dark"]) .notification-drawer-menu,
html:not([data-theme="dark"]) .more-drawer-menu,
html:not([data-theme="dark"]) .connections-overlay-panel,
html:not([data-theme="dark"]) .site-footer-brand,
html:not([data-theme="dark"]) .landing-topbar,
html:not([data-theme="dark"]) .landing-hero-copy,
html:not([data-theme="dark"]) .landing-hero-panel,
html:not([data-theme="dark"]) .landing-showcase-section,
html:not([data-theme="dark"]) .landing-feature-card,
html:not([data-theme="dark"]) .landing-empty-card,
html:not([data-theme="dark"]) .splash-card,
html:not([data-theme="dark"]) .auth-panel,
html:not([data-theme="dark"]) .auth-hero,
html:not([data-theme="dark"]) .legal-doc-shell.auth-panel,
html:not([data-theme="dark"]) .home-announcement-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06) !important;
    color: var(--text) !important;
    backdrop-filter: none !important;
}

html:not([data-theme="dark"]) .admin-hero-card,
html:not([data-theme="dark"]) .creator-page .story-empty-card,
html:not([data-theme="dark"]) .landing-hero-copy,
html:not([data-theme="dark"]) .landing-hero-panel,
html:not([data-theme="dark"]) .auth-hero {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)) !important;
}

html:not([data-theme="dark"]) .auth-hero::after {
    background: radial-gradient(circle, rgba(255, 204, 120, 0.18), transparent 68%) !important;
}

html:not([data-theme="dark"]) .auth-hero,
html:not([data-theme="dark"]) .auth-hero h1,
html:not([data-theme="dark"]) .auth-panel h2,
html:not([data-theme="dark"]) .splash-card h1 {
    color: var(--text) !important;
}

html:not([data-theme="dark"]) .auth-hero .eyebrow,
html:not([data-theme="dark"]) .auth-hero .auth-copy,
html:not([data-theme="dark"]) .auth-hero .hero-feature p,
html:not([data-theme="dark"]) .auth-hero .hero-quote p,
html:not([data-theme="dark"]) .switch-copy,
html:not([data-theme="dark"]) .site-footer-copy,
html:not([data-theme="dark"]) .creator-page-copy,
html:not([data-theme="dark"]) .creator-greeting,
html:not([data-theme="dark"]) .creator-stat-card span,
html:not([data-theme="dark"]) .creator-story-copy p,
html:not([data-theme="dark"]) .chapter-card-copy,
html:not([data-theme="dark"]) .story-empty-card p {
    color: var(--muted) !important;
}

html:not([data-theme="dark"]) .hero-feature,
html:not([data-theme="dark"]) .hero-quote {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
}

html:not([data-theme="dark"]) .hero-feature span {
    background: rgba(255, 179, 0, 0.1) !important;
    color: var(--brand-deep) !important;
}

html:not([data-theme="dark"]) .app-nav-link,
html:not([data-theme="dark"]) .app-nav-link-more,
html:not([data-theme="dark"]) .profile-drawer-link,
html:not([data-theme="dark"]) .more-drawer-link,
html:not([data-theme="dark"]) .mobile-tab {
    color: #475467 !important;
}

html:not([data-theme="dark"]) .app-nav-link:hover,
html:not([data-theme="dark"]) .app-nav-link:focus-visible,
html:not([data-theme="dark"]) .app-nav-link-more:hover,
html:not([data-theme="dark"]) .app-nav-link-more:focus-visible,
html:not([data-theme="dark"]) .profile-drawer-link:hover,
html:not([data-theme="dark"]) .profile-drawer-link:focus-visible,
html:not([data-theme="dark"]) .more-drawer-link:hover,
html:not([data-theme="dark"]) .more-drawer-link:focus-visible,
html:not([data-theme="dark"]) .mobile-tab:hover,
html:not([data-theme="dark"]) .mobile-tab:focus-visible {
    background: rgba(255, 179, 0, 0.08) !important;
    color: var(--brand-deep) !important;
}

html:not([data-theme="dark"]) .panel-kicker,
html:not([data-theme="dark"]) .section-status,
html:not([data-theme="dark"]) .story-empty-badge,
html:not([data-theme="dark"]) .story-card-kicker,
html:not([data-theme="dark"]) .story-detail-tags span,
html:not([data-theme="dark"]) .story-overview-tags span,
html:not([data-theme="dark"]) .creator-story-type,
html:not([data-theme="dark"]) .creator-story-tags span,
html:not([data-theme="dark"]) .notification-count-pill,
html:not([data-theme="dark"]) .profile-tab-count,
html:not([data-theme="dark"]) .announcement-label,
html:not([data-theme="dark"]) .admin-field-note,
html:not([data-theme="dark"]) .discover-chips span,
html:not([data-theme="dark"]) .story-meta-row span,
html:not([data-theme="dark"]) .tag-chip {
    background: rgba(255, 179, 0, 0.08) !important;
    border-color: rgba(255, 179, 0, 0.16) !important;
    color: #b45309 !important;
}

html:not([data-theme="dark"]) .topbar-icon-link,
html:not([data-theme="dark"]) .profile-drawer-trigger,
html:not([data-theme="dark"]) .story-carousel-btn,
html:not([data-theme="dark"]) .topbar-icon-link.is-active,
html:not([data-theme="dark"]) .topbar-icon-link:hover,
html:not([data-theme="dark"]) .topbar-icon-link:focus-visible,
html:not([data-theme="dark"]) .profile-drawer-trigger:hover,
html:not([data-theme="dark"]) .profile-drawer-trigger:focus-visible,
html:not([data-theme="dark"]) .profile-drawer[open] .profile-drawer-trigger,
html:not([data-theme="dark"]) .notification-drawer[open] .topbar-icon-link {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
    color: var(--text) !important;
}

html:not([data-theme="dark"]) .story-card-link:hover .story-card,
html:not([data-theme="dark"]) .story-card-link:focus-visible .story-card,
html:not([data-theme="dark"]) .story-grid-covers .story-card-link:hover .story-card,
html:not([data-theme="dark"]) .story-grid-covers .story-card-link:focus-visible .story-card {
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.09) !important;
    border-color: rgba(255, 179, 0, 0.18) !important;
}

html:not([data-theme="dark"]) .story-cover {
    background: linear-gradient(180deg, #fcfcfd 0%, #f2f4f7 100%) !important;
}

html:not([data-theme="dark"]) .home-announcement-card {
    border-radius: 18px;
}

html:not([data-theme="dark"]) .home-announcement-media::after {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.06) 44%, rgba(15, 23, 42, 0.06) 100%) !important;
}

html:not([data-theme="dark"]) .home-announcement-actions {
    background: transparent !important;
}

html:not([data-theme="dark"]) .app-topbar-search-field input,
html:not([data-theme="dark"]) .search-page-field input,
html:not([data-theme="dark"]) .auth-form input,
html:not([data-theme="dark"]) .story-editor-form textarea,
html:not([data-theme="dark"]) .story-editor-form select,
html:not([data-theme="dark"]) .story-editor-form input[type="file"],
html:not([data-theme="dark"]) .story-comment-form textarea,
html:not([data-theme="dark"]) .menu-form textarea,
html:not([data-theme="dark"]) .novel-builder textarea,
html:not([data-theme="dark"]) .novel-builder select,
html:not([data-theme="dark"]) .conversation-textarea,
html:not([data-theme="dark"]) .admin-inline-form input,
html:not([data-theme="dark"]) .admin-inline-form select,
html:not([data-theme="dark"]) .admin-score-input {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}

html:not([data-theme="dark"]) .app-topbar-search-field input::placeholder,
html:not([data-theme="dark"]) .search-page-field input::placeholder,
html:not([data-theme="dark"]) .auth-form input::placeholder,
html:not([data-theme="dark"]) .story-editor-form textarea::placeholder,
html:not([data-theme="dark"]) .story-comment-form textarea::placeholder,
html:not([data-theme="dark"]) .menu-form textarea::placeholder,
html:not([data-theme="dark"]) .novel-builder textarea::placeholder,
html:not([data-theme="dark"]) .conversation-textarea::placeholder {
    color: #98a2b3 !important;
}

html:not([data-theme="dark"]) .app-topbar-search-field input:focus,
html:not([data-theme="dark"]) .search-page-field input:focus,
html:not([data-theme="dark"]) .auth-form input:focus,
html:not([data-theme="dark"]) .story-editor-form textarea:focus,
html:not([data-theme="dark"]) .story-comment-form textarea:focus,
html:not([data-theme="dark"]) .menu-form textarea:focus,
html:not([data-theme="dark"]) .novel-builder textarea:focus,
html:not([data-theme="dark"]) .conversation-textarea:focus,
html:not([data-theme="dark"]) .admin-inline-form input:focus,
html:not([data-theme="dark"]) .admin-inline-form select:focus,
html:not([data-theme="dark"]) .admin-score-input:focus {
    border-color: rgba(255, 179, 0, 0.32) !important;
    box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.12) !important;
}

html:not([data-theme="dark"]) .mobile-bottom-nav,
html:not([data-theme="dark"]) .creator-page .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.98) !important;
    border-top-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Reader mobile consistency */
:root {
    --reader-vh: 100dvh;
}

.reader-page {
    overflow-x: clip;
}

.reader-actions {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    width: min(calc(100% - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), 500px);
}

@media (max-width: 820px) {
    .reader-shell {
        width: calc(100% - 16px);
        padding:
            18px
            max(10px, env(safe-area-inset-right, 0px))
            calc(132px + env(safe-area-inset-bottom, 0px))
            max(10px, env(safe-area-inset-left, 0px));
    }

    .reader-paywall-shell {
        width: 100%;
        padding: 6px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    }

    .reader-paywall-hero {
        padding-bottom: 30px;
    }

    .reader-paywall-meta {
        gap: 8px 12px;
    }

    .reader-paywall-author {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }

    .reader-paywall-card {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 58px 20px 22px;
    }

    .reader-paywall-sidecard {
        justify-items: flex-start;
        text-align: left;
    }

    .reader-paywall-main {
        justify-items: stretch;
        text-align: left;
    }

    .reader-paywall-main h2,
    .reader-paywall-main > p {
        max-width: none;
    }

    .reader-paywall-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .reader-paywall-form,
    .reader-paywall-actions > a {
        width: 100%;
        max-width: none;
    }

    .reader-paywall-btn {
        min-height: 76px;
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .reader-paywall-btn-price,
    .reader-paywall-btn-copy {
        min-height: 76px;
    }

    .reader-paywall-notes {
        justify-content: flex-start;
    }

    .reader-chapter-content {
        margin-top: 20px;
        gap: 26px;
    }

    .affinity-chapter-block {
        gap: 14px;
    }

    .affinity-chapter-body {
        gap: 18px;
    }

    .reader-actions {
        width: calc(100% - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        padding: 10px;
        border-radius: 18px;
    }
}

@media (max-width: 640px) {
    .reader-paywall-hero {
        padding: 4px 0 28px;
    }

    .reader-paywall-hero h1 {
        font-size: clamp(1.55rem, 7.8vw, 2.15rem);
    }

    .reader-paywall-lock {
        gap: 10px;
        margin: 0 auto -18px;
    }

    .reader-paywall-lock-icon {
        width: 42px;
        height: 42px;
    }

    .reader-paywall-card {
        padding: 54px 16px 18px;
        gap: 18px;
        border-radius: 22px;
    }

    .reader-paywall-sidecard {
        gap: 10px;
    }

    .reader-paywall-main h2 {
        font-size: clamp(1.35rem, 7vw, 1.9rem);
    }

    .reader-paywall-main > p,
    .reader-paywall-balance,
    .reader-paywall-notes {
        font-size: 0.92rem;
    }

    .reader-paywall-btn-copy {
        padding: 0 14px;
        font-size: 0.96rem;
    }

    .reader-chapter-header h1 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .reader-chapter-content p {
        font-size: 1rem;
        line-height: 1.88;
    }

    .affinity-chapter-head h2 {
        font-size: clamp(1.3rem, 6.4vw, 1.75rem);
    }

    .story-read-modal {
        align-items: end;
        padding:
            12px
            max(10px, env(safe-area-inset-right, 0px))
            max(12px, env(safe-area-inset-bottom, 0px))
            max(10px, env(safe-area-inset-left, 0px));
    }

    .story-read-modal-dialog {
        width: 100%;
        max-width: none;
        max-height: min(82vh, calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)));
        padding: 18px 16px 16px;
        border-radius: 24px 24px 18px 18px;
        gap: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .story-read-modal-kicker {
        font-size: 0.72rem;
        letter-spacing: 0.12em;
    }

    .story-read-modal-dialog h2 {
        font-size: clamp(1.6rem, 8vw, 2.15rem);
        line-height: 0.96;
    }

    .story-read-modal-copy {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .story-read-modal-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .story-read-choice {
        min-height: 0;
        padding: 16px;
        border-radius: 18px;
        gap: 10px;
    }

    .story-read-choice::after {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        border-width: 3px;
        box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.04);
    }

    .story-read-choice-title {
        font-size: 1.12rem;
        line-height: 1.15;
    }

    .story-read-choice-copy {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .story-read-modal-actions {
        position: sticky;
        bottom: 0;
        padding-top: 6px;
        background: linear-gradient(180deg, rgba(19, 19, 21, 0), rgba(19, 19, 21, 0.96) 28%);
    }

    .story-read-cancel,
    .story-read-confirm {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
        min-height: 50px;
    }
}

@media (max-width: 1180px) {
    .reader-shell {
        padding: 24px 20px 220px;
    }

    .reader-main-column {
        width: 100%;
    }

    .reader-utility-rail {
        left: 50%;
        top: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
        width: min(calc(100% - 24px), 560px);
        padding: 8px;
        border-radius: 22px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        transform: translateX(-50%);
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    .reader-utility-rail.is-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(calc(100% + 28px));
    }

    .reader-side-panel {
        top: auto;
        right: 12px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
        left: 12px;
        width: auto;
        max-height: min(72vh, calc(var(--reader-vh, 100vh) - 118px));
        transform: translateY(24px);
    }

    .reader-side-panel.is-open {
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .reader-story-hero {
        gap: 12px;
        margin-bottom: 26px;
    }

    .reader-story-hero-cover {
        width: min(100%, 172px);
        border-radius: 14px;
    }

    .reader-story-hero h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
    }

    .affinity-chapter-block {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .affinity-chapter-head h2 {
        font-size: clamp(1.28rem, 6vw, 1.7rem);
    }

    .affinity-chapter-body {
        gap: 18px;
    }

    .reader-highlight-preview {
        flex-direction: column;
    }

    .reader-utility-btn span {
        font-size: 0.62rem;
    }

    .reader-side-panel {
        padding: 18px 16px;
        border-radius: 24px;
    }
}
