/* UI mock shared styles — static examples only */
:root {
    --bg: #f5f6f9;
    --surface: #ffffff;
    --surface-2: #eef1f6;
    --border: #e2e6ef;
    --text: #16181f;
    --muted: #5f6675;
    --accent: #1f53f0;
    --accent-strong: #1741c7;
    --accent-grad-end: #5b86ff;
    --accent-soft: #e9eeff;
    --paid: #2d6a4f;
    --paid-soft: #e8f5ee;
    --danger: #b42318;
    --danger-soft: #fdeceb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(20, 24, 35, 0.06), 0 4px 12px rgba(20, 24, 35, 0.04);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html[data-theme="dark"] body {
    --bg: #0f1117;
    --surface: #171a22;
    --surface-2: #20242e;
    --border: #2e333f;
    --text: #eef1f6;
    --muted: #a4abba;
    --accent: #6b93ff;
    --accent-strong: #8aaaff;
    --accent-grad-end: #3f6bf0;
    --accent-soft: #172150;
    --paid: #57b58b;
    --paid-soft: #173226;
    --danger: #f1655a;
    --danger-soft: #3a1a17;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
}
/* Reader (explore, publications) vs account home vs creator studio */
body.area-reader {
    --bg: #f5f6f9;
    --surface-2: #eef1f6;
    --border: #e2e6ef;
}
body.area-home {
    --bg: #e8f2eb;
    --surface-2: #dcebe0;
    --border: #c8ddd0;
}
body.area-studio {
    --bg: #e9eef3;
    --surface-2: #dfe6ee;
    --border: #cfd8e3;
}
body.area-admin {
    --bg: #ece6f3;
    --surface-2: #e2d9ed;
    --border: #cfc4de;
}
html[data-theme="dark"] body.area-reader,
html[data-theme="dark"] body.area-home,
html[data-theme="dark"] body.area-studio,
html[data-theme="dark"] body.area-admin {
    --bg: #0f1117;
    --surface-2: #20242e;
    --border: #2e333f;
}
html[data-theme="dark"] body.area-home .site-header,
html[data-theme="dark"] body.area-studio .site-header,
html[data-theme="dark"] body.area-admin .site-header,
html[data-theme="dark"] body.area-studio .site-footer,
html[data-theme="dark"] body.area-admin .site-footer {
    background: var(--surface);
}
body.area-home .site-header {
    background: #f2f8f4;
}
body.area-studio .site-header {
    background: #f3f6f9;
}
body.area-studio .site-footer {
    background: #f3f6f9;
    border-top-color: var(--border);
}
body.area-admin .site-header {
    background: #f4eff9;
}
body.area-admin .site-footer {
    background: #f4eff9;
    border-top-color: var(--border);
}
body.area-admin .admin-banner {
    background: #4a1d6b;
    color: #e9d5ff;
}
body.area-admin .sidebar-panel {
    border-color: rgba(74, 29, 107, 0.22);
}
.admin-shell {
    --studio-nav-width: 220px;
    padding: 1rem 0 3rem;
    min-height: 70vh;
}
.admin-shell.is-nav-collapsed {
    --studio-nav-width: 52px;
}
.admin-layout {
    display: grid;
    grid-template-columns: var(--studio-nav-width) 1fr;
    gap: 1.5rem;
    align-items: start;
    transition: grid-template-columns 0.2s ease;
}
.admin-main {
    min-width: 0;
}
.admin-sidebar-title-icon {
    margin-right: 0.35rem;
    opacity: 0.85;
}
.admin-sidebar-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.admin-panel-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.admin-panel-card h2,
.admin-panel-card h3 {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}
.admin-panel-card h3 {
    font-size: 0.9rem;
}
.admin-form-grid {
    display: grid;
    gap: 0.75rem;
    max-width: 480px;
}
.admin-form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.admin-form-field {
    display: block;
}
.admin-form-field span,
.admin-form-field > label:first-child {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.admin-form-input,
.admin-form-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: var(--surface);
    color: var(--text);
}
.admin-form-input:focus,
.admin-form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.admin-form-input--narrow {
    width: auto;
    max-width: 6rem;
}
.muted {
    color: var(--muted);
}
/* Components showcase (admin/components) */
.cmp-demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.cmp-code {
    margin: 0;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    overflow-x: auto;
    color: var(--text);
}
.cmp-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre;
}
/* Admin 2FA verification (standalone, no shell) */
.admin-verify {
    padding: 3rem 0;
    max-width: 420px;
}
.admin-verify-title {
    margin: 0 0 0.35rem;
}
.admin-verify-card {
    padding: 1.5rem;
    margin-top: 1rem;
}
.admin-verify-form {
    margin-top: 1rem;
}
.admin-verify-code {
    letter-spacing: 0.2em;
}
.admin-verify-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}
.admin-form-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.35rem 0 0.75rem;
}
.admin-form-msg {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.admin-form-msg.is-success {
    color: var(--paid);
}
.admin-form-msg.is-error {
    color: #b42318;
}
.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.admin-section-head h2 {
    font-size: 1rem;
    margin: 0;
}
.admin-table-wrap {
    margin-top: 0;
}
.admin-table-wrap .data {
    width: 100%;
}
.admin-list-rows {
    padding: 0 1rem;
}
.admin-list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.admin-list-row:last-child {
    border-bottom: none;
}
.admin-list-row-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.admin-list-row-body {
    flex: 1;
    min-width: 0;
}
.admin-list-row-actions {
    flex-shrink: 0;
}
.admin-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.9rem;
    margin: 0;
}
.admin-dl dt {
    color: var(--muted);
}
@media (max-width: 720px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-shell.is-nav-collapsed {
        --studio-nav-width: 220px;
    }
}

/* ── Shared list toolbar helpers (used with .studio-list-toolbar) ── */
.studio-list-toolbar-spacer {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.studio-list-toolbar-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.admin-section-head-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Admin tabs ───────────────────────────────────────────────── */
.admin-tabs {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.admin-tab {
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.6rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.admin-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px 6px 0 0;
}
.admin-tab-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}
.admin-tab-panel[hidden] { display: none; }

/* ── Loading / empty / error states ───────────────────────────── */
.app-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}
.app-state--error { color: #b42318; }
.app-state-icon { font-size: 1.5rem; opacity: 0.7; }
.app-state-cell { text-align: center; }
.app-state--empty { flex-direction: column; }
.app-spinner {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: app-spin 0.7s linear infinite;
    flex-shrink: 0;
}
.admin-skeleton {
    display: block;
    height: 0.85rem;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: app-skeleton 1.4s ease infinite;
}
@keyframes app-spin { to { transform: rotate(360deg); } }
@keyframes app-skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
    .app-spinner, .admin-skeleton { animation: none; }
}

/* ── Toast notifications ──────────────────────────────────────── */
.app-toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(22rem, calc(100vw - 2rem));
}
.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--muted);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    color: var(--text);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.app-toast.is-visible { opacity: 1; transform: translateY(0); }
.app-toast.is-leaving { opacity: 0; transform: translateY(8px); }
.app-toast--success { border-left-color: var(--paid); }
.app-toast--success .app-toast-icon { color: var(--paid); }
.app-toast--error { border-left-color: #b42318; }
.app-toast--error .app-toast-icon { color: #b42318; }
.app-toast--info .app-toast-icon { color: var(--accent); }
.app-toast-icon { margin-top: 0.1rem; flex-shrink: 0; }
.app-toast-msg { flex: 1; min-width: 0; line-height: 1.4; }
.app-toast-close {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
    flex-shrink: 0;
}
.app-toast-close:hover { color: var(--text); }

/* ── Confirm modal ────────────────────────────────────────────── */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 17, 23, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.app-modal-overlay.is-visible { opacity: 1; }
.app-modal-overlay.is-leaving { opacity: 0; }
.app-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    width: 100%;
    max-width: 26rem;
    transform: translateY(8px);
    transition: transform 0.2s ease;
}
.app-modal-overlay.is-visible .app-modal { transform: translateY(0); }
.app-modal--lg { max-width: 40rem; }
.app-modal-title { font-size: 1.05rem; margin: 0 0 0.5rem; }
.app-modal-body { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.25rem; line-height: 1.5; }
.app-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Generic content modal (app.modal) with header + close button */
.app-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.app-modal-head .app-modal-title { margin: 0; }
.app-modal-x {
    flex-shrink: 0;
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    padding: 0 0.15rem;
    transition: color 0.15s ease;
}
.app-modal-x:hover { color: var(--text); }
.app-modal-content { max-height: 70vh; overflow-y: auto; }
/* Standard stacked form inside a modal */
.app-modal-form { display: grid; gap: 0.85rem; }
.app-modal-form .admin-form-field { display: grid; gap: 0.3rem; }
.app-modal-form .app-modal-actions { margin-top: 0.35rem; }

/* Tooltip indicator (shared; was inline in admin/settings) */
.setting-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    margin-left: 0.35rem;
    position: relative;
    vertical-align: middle;
}
.setting-info::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: 150%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 240px;
    text-align: left;
    z-index: 60;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}
.setting-info::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 150%;
    transform: translateX(-50%) translateY(98%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}
.setting-info:hover::after,
.setting-info:focus::after,
.setting-info:hover::before,
.setting-info:focus::before {
    opacity: 1;
    visibility: visible;
}
body.area-home .account-sidebar {
    border-color: rgba(45, 106, 79, 0.22);
}
body.area-studio .studio-sidebar {
    border-color: rgba(31, 83, 240, 0.2);
}
.mock-banner {
    background: #1a2332;
    color: #8b9cb3;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.35rem 1rem;
    letter-spacing: 0.04em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 0;
}
.site-logo:hover,
.site-logo:focus-visible {
    text-decoration: none;
}
.site-logo-img {
    display: block;
    width: auto;
    height: auto;
    aspect-ratio: 864 / 479;
    object-fit: contain;
}
/* Swap logo art for dark mode so the dark "Creator/.net" text stays legible */
.site-logo-img--dark {
    display: none;
}
html[data-theme="dark"] .site-logo-img--light {
    display: none;
}
html[data-theme="dark"] .site-logo-img--dark {
    display: block;
}
.site-logo--header .site-logo-img {
    max-height: 44px;
    max-width: min(240px, 55vw);
}
.site-logo--guest .site-logo-img {
    max-height: 56px;
    max-width: min(280px, 85vw);
}
.site-logo--footer {
    margin-bottom: 0.35rem;
}
.site-logo--footer .site-logo-img {
    max-height: 32px;
    max-width: min(180px, 45vw);
}
.guest-logo-wrap {
    margin: 0 0 1.5rem;
    text-align: center;
}
.nav-links { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.nav-links { align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); font-weight: 600; }
.nav-logout-form { margin: 0; display: inline; }
.nav-logout-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
}
.nav-logout-btn:hover { color: var(--text); text-decoration: underline; }
.nav-account-menu {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    margin-left: auto;
}
.nav-account-menu-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem 0.35rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    max-width: min(280px, 48vw);
}
.nav-account-menu-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
}
.nav-account-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-account-menu-toggle:hover,
.nav-account-menu.is-open .nav-account-menu-toggle {
    background: var(--surface-2);
    color: var(--text);
}
.nav-account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.55rem 0.35rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    max-width: min(240px, 42vw);
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
}
.nav-account-menu-trigger:hover,
.nav-account-menu.is-open .nav-account-menu-trigger {
    background: var(--surface-2);
    border-color: var(--accent);
}
.nav-account-menu-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-radius: 8px;
    flex-shrink: 0;
}
.nav-account-menu-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}
.nav-account-contact-alert {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.55rem;
    text-decoration: none;
    border: 2px solid var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.nav-account-contact-alert:hover {
    color: #fff;
    text-decoration: none;
    filter: brightness(1.08);
}
.nav-account-menu-meta {
    flex: 1;
    min-width: 0;
}
.nav-account-menu-name {
    display: block;
    font-size: 0.85rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-account-menu-handle {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.nav-account-menu-handle--link {
    text-decoration: none;
    cursor: pointer;
}
a.nav-account-menu-handle--link:hover,
a.nav-account-menu-handle--link:focus-visible {
    color: var(--text);
    text-decoration: underline;
}
.nav-account-menu-meta .account-profile-badge {
    margin-top: 0;
    font-size: 0.58rem;
    padding: 0.1rem 0.35rem;
}
.nav-account-menu-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
}
.nav-account-message-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.nav-account-message-pill:hover {
    text-decoration: none;
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}
.nav-account-message-pill[hidden] {
    display: none !important;
}
.nav-account-menu-muted {
    font-style: italic;
}
.nav-account-menu-chevron {
    flex-shrink: 0;
    font-size: 0.65rem;
    color: var(--muted);
    transition: transform 0.15s ease;
}
.nav-account-menu.is-open .nav-account-menu-chevron {
    transform: rotate(180deg);
}
.nav-account-menu-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: min(520px, 92vw);
    max-width: min(560px, 92vw);
    z-index: 30;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 12px 32px rgba(26, 26, 24, 0.1);
    padding: 0.35rem 0;
}
.nav-account-menu-panel[hidden] {
    display: none;
}
.nav-account-menu-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.nav-account-menu-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.25rem 0;
}
.nav-account-menu-col + .nav-account-menu-col {
    border-left: 1px solid var(--border);
}
.nav-account-menu-links {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0;
}
.nav-account-menu-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text);
    text-decoration: none;
}
.nav-account-menu-link:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.nav-account-menu-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.nav-account-menu-link i {
    width: 1rem;
    text-align: center;
    opacity: 0.85;
    font-size: 0.85rem;
}
.nav-account-menu-tag {
    margin-left: auto;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--muted);
}
.nav-account-menu-count {
    margin-left: auto;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    background: var(--accent-soft);
    color: var(--accent);
}
.nav-account-menu-section {
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.35rem;
}
.nav-account-menu-section-title {
    margin: 0;
    padding: 0.35rem 0.85rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.nav-account-menu-pub-list {
    display: flex;
    flex-direction: column;
}
.nav-account-menu-pub-list--scroll {
    max-height: 7.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.nav-account-menu-pub-link {
    min-width: 0;
}
.nav-account-menu-pub-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.nav-account-menu-pub-avatar--image {
    background: var(--surface-2);
}
.nav-account-menu-pub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nav-account-menu-pub-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-account-menu-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
}
.nav-account-menu-footer {
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}
.nav-account-menu-logout-form {
    margin: 0;
}
.nav-account-menu-logout {
    display: block;
    width: 100%;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-account-menu-logout:hover {
    background: var(--surface-2);
    color: var(--text);
}
@media (max-width: 640px) {
    .nav-account-menu-meta .account-profile-badge,
    .nav-account-menu-handle,
    .nav-account-menu-badges {
        display: none;
    }
    .nav-account-menu-bar {
        max-width: none;
        padding-right: 0.35rem;
    }
    .nav-account-menu-panel {
        min-width: 260px;
        max-width: min(320px, 92vw);
    }
    .nav-account-menu-columns {
        grid-template-columns: 1fr;
    }
    .nav-account-menu-col + .nav-account-menu-col {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: #b42318; color: #fff; }
.btn-danger:hover { filter: brightness(1.05); text-decoration: none; }
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.badge-free { background: var(--surface-2); color: var(--muted); }
.badge-paid { background: var(--paid-soft); color: var(--paid); }
.badge-bonus { background: #ede9fe; color: #5b21b6; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.stat-card { padding: 1.25rem; }
.stat-card .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; margin-top: 0.25rem; }
.feed-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-grad-end) 100%);
    flex-shrink: 0;
}
.feed-thumb.audio { border-radius: 12px; }
.feed-meta { flex: 1; min-width: 0; }
.feed-meta h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.feed-meta p { font-size: 0.875rem; color: var(--muted); }
.paywall-box {
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}
.player-bar {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.player-bar .play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.player-bar .progress {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.player-bar .progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.15s linear;
}
.episode-page {
    padding: 2rem 0;
    max-width: 760px;
}
.episode-header {
    margin-bottom: 1.25rem;
}
.episode-header__show {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.25rem;
}
.episode-header__show:hover .episode-header__show-name {
    color: var(--accent);
}
.episode-header__show-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.episode-header__show-logo--placeholder {
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
}
.episode-header__show-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.episode-header__show-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.episode-header__show-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.episode-header__main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.episode-header__artwork {
    width: 140px;
    height: 140px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.episode-header__artwork--placeholder {
    width: 140px;
    height: 140px;
}
.episode-header__body {
    flex: 1;
    min-width: 0;
}
.episode-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.episode-header__title {
    font-size: 1.65rem;
    line-height: 1.25;
    margin: 0 0 0.35rem;
}
.episode-header__subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}
.episode-header__summary {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0.75rem 0 0;
}
.episode-page__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
}
.episode-page__actions .listen-on-links {
    margin: 0;
}
.episode-page__no-audio {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--muted);
}
.episode-page__show-notes {
    margin-top: 2rem;
}
.episode-page__section-title {
    font-size: 1.15rem;
    margin: 0 0 1rem;
}
.episode-page__transcript {
    margin-top: 1.5rem;
}
.episode-page__transcript summary {
    cursor: pointer;
    font-weight: 600;
}
.episode-page__transcript-body {
    margin-top: 0.75rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--muted);
}
.episode-player {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin: 0 0 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.episode-player__info {
    padding-bottom: 0.15rem;
    border-bottom: 1px solid var(--border);
}
.episode-player__show {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.2rem;
}
.episode-player__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.35;
}
.episode-player__duration {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.25rem 0 0;
}
.episode-player__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.episode-player__track {
    flex: 1;
    min-width: 0;
}
.episode-player__resume {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.35rem;
}
.episode-player__progress {
    cursor: pointer;
}
.episode-player__times {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}
.episode-player__time--total {
    text-align: right;
}
.episode-player__audio {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 560px) {
    .episode-header__main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .episode-header__artwork,
    .episode-header__artwork--placeholder {
        width: 120px;
        height: 120px;
    }
    .episode-header__badges {
        justify-content: center;
    }
    .episode-header__title {
        font-size: 1.4rem;
    }
    .content-meta {
        justify-content: center;
    }
}
.pub-hero {
    padding: 2.5rem 0;
    text-align: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.pub-avatar {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    margin: 0 auto 1rem;
}
.pub-hero h1 { font-size: 1.75rem; margin-bottom: 0.35rem; }
.pub-hero .tagline { color: var(--muted); margin-bottom: 0.5rem; }
.pub-hero .pub-schedule-note { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.pub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}
.pub-hero-badge { background: var(--paid); color: #fff; }

/* Explore & search */
.explore-page {
    padding-bottom: 2.5rem;
}
.explore-hero {
    padding: 2rem 0 1.25rem;
    text-align: center;
}
.explore-hero--compact {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
}
.explore-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}
.explore-lead {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 36rem;
    margin: 0 auto;
}
.explore-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}
.explore-page .explore-toolbar {
    position: sticky;
    top: 3.25rem;
    z-index: 30;
    background: var(--surface);
    box-shadow: 0 1px 0 var(--border);
}
.explore-search-prompt {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.account-danger-zone {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 2px solid #fecaca;
}
.explore-mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1 1 100%;
}
.explore-mode-pill {
    position: relative;
    cursor: pointer;
}
.explore-mode-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.explore-mode-pill span {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--surface);
}
.explore-mode-pill:hover span {
    border-color: var(--accent);
}
.explore-mode-pill.is-active span,
.explore-mode-pill input:checked + span {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border-color: var(--accent);
    color: var(--accent);
}
.explore-toolbar-search {
    position: relative;
    flex: 1 1 14rem;
    min-width: 12rem;
}
.explore-toolbar-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.85rem;
    pointer-events: none;
}
.explore-toolbar-input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font: inherit;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.explore-toolbar-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
    background: var(--surface);
}
.explore-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.explore-filter-pill {
    position: relative;
    cursor: pointer;
}
.explore-filter-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.explore-filter-pill span {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.explore-filter-pill:hover span {
    color: var(--text);
    border-color: var(--border);
}
.explore-filter-pill.is-active span,
.explore-filter-pill input:checked + span {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.explore-toolbar-submit {
    flex-shrink: 0;
}
.explore-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}
.explore-your-shows {
    background: color-mix(in srgb, var(--accent) 6%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
    border-radius: var(--radius);
    padding: 1.15rem 1.15rem 1.25rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
}
.explore-your-shows-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.explore-your-shows-head .explore-section-title {
    margin-bottom: 0;
}
.explore-your-shows-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.explore-your-shows-link:hover {
    text-decoration: underline;
}
.explore-pub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.explore-pub-grid--your-shows {
    gap: 0.85rem;
}
@media (max-width: 960px) {
    .explore-pub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .explore-pub-grid {
        grid-template-columns: 1fr;
    }
    .explore-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .explore-toolbar-submit {
        width: 100%;
    }
}
.explore-pub-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.05rem;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.explore-pub-card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: 0 6px 20px rgba(26, 26, 24, 0.08);
    transform: translateY(-1px);
}
.explore-pub-card-main {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.explore-pub-card-main:hover {
    text-decoration: none;
    color: inherit;
}
.explore-pub-latest {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
    line-height: 1.45;
}
.explore-pub-latest a {
    color: var(--accent);
    font-weight: 500;
}
.explore-pub-latest a:hover {
    text-decoration: underline;
}
.explore-pub-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.explore-pub-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.explore-pub-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.explore-profile-avatar {
    border-radius: 50%;
}
.explore-pub-card-ident {
    min-width: 0;
}
.explore-pub-name {
    display: block;
    font-size: 0.98rem;
    line-height: 1.25;
    margin-bottom: 0.1rem;
}
.explore-pub-slug {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.explore-pub-tagline {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.explore-pub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
}
.pub-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.pub-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    line-height: 1.3;
}
.pub-pill--type.pub-pill--audio {
    background: #e8f0fe;
    color: #1a4f8b;
}
.pub-pill--type.pub-pill--writing {
    background: #f3e8ff;
    color: #6b21a8;
}
.pub-pill--type.pub-pill--mixed {
    background: #fef3eb;
    color: #9a3412;
}
.pub-pill--type.pub-pill--default {
    background: var(--surface-2);
    color: var(--muted);
}
.pub-pill--paid {
    background: var(--paid-soft);
    color: var(--paid);
}
.pub-pill--status.pub-pill--live {
    background: var(--paid);
    color: #fff;
}
.pub-pill--status.pub-pill--draft {
    background: var(--surface-2);
    color: var(--muted);
}
.pub-pill--role {
    background: var(--surface-2);
    color: var(--text);
}
.pub-pill--role-owner {
    background: var(--accent-soft);
    color: var(--accent);
}
.pub-pill--following {
    background: #e0f2fe;
    color: #0369a1;
}
.pub-pill--subscribed {
    background: #ede9fe;
    color: #5b21b6;
}
.profile-pills {
    margin-top: 0.15rem;
}
.profile-pill--hub {
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent) 18%, var(--surface)));
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.profile-pill--public {
    background: var(--paid);
    color: #fff;
}
.profile-pill--private {
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
}
.profile-pill--needs-handle {
    background: #fef3c7;
    color: #92400e;
}
.profile-pill--layout-builder {
    background: #ede9fe;
    color: #5b21b6;
}
.profile-pill--layout-simple {
    background: #e0f2fe;
    color: #0369a1;
}
.profile-pill--feature {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}
.profile-pill--feature-contact {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    color: var(--accent);
}
.profile-pill--feature-events {
    border-color: #c4b5fd;
    color: #6d28d9;
}
.profile-pill--feature-merch {
    border-color: #fdba74;
    color: #c2410c;
}
.pub-list-avatar--profile {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.pub-list-slug-missing {
    font-size: 0.82rem;
    color: var(--muted);
}
.pub-list-stat--messages.pub-list-stat--unread .pub-list-stat-value,
.pub-list-stat--messages.pub-list-stat--unread .pub-list-stat-label {
    color: var(--accent);
    font-weight: 700;
}
.contact-widget__form-panel {
    transition: min-height 0.2s ease;
}
.contact-widget__success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 12rem;
    padding: 1.25rem 0.5rem;
    color: var(--muted);
}
.contact-widget__success-icon {
    font-size: 1.75rem;
    color: var(--paid, #16a34a);
    margin-bottom: 0.65rem;
}
.contact-widget__success-state strong {
    color: var(--text);
    font-weight: 600;
}
.explore-pub-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    line-height: 1.3;
}
.explore-pub-badge--type.explore-pub-badge--audio {
    background: #e8f0fe;
    color: #1a4f8b;
}
.explore-pub-badge--type.explore-pub-badge--writing {
    background: #f3e8ff;
    color: #6b21a8;
}
.explore-pub-badge--type.explore-pub-badge--mixed {
    background: #fef3eb;
    color: #9a3412;
}
.explore-pub-badge--type.explore-pub-badge--default {
    background: var(--surface-2);
    color: var(--muted);
}
.explore-pub-badge--paid {
    background: var(--paid-soft);
    color: var(--paid);
}
.explore-pub-badge--following {
    background: #e0f2fe;
    color: #0369a1;
}
.explore-pub-badge--subscribed {
    background: #ede9fe;
    color: #5b21b6;
}
.explore-content-results {
    margin-bottom: 1.75rem;
}
.explore-content-results--secondary {
    margin-bottom: 1.5rem;
}
.explore-content-mode-hint {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}
.explore-content-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.explore-content-hit {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.explore-content-hit:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.explore-content-hit-title {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.3;
    font-weight: 600;
}
.explore-content-hit-title a {
    color: inherit;
    text-decoration: none;
}
.explore-content-hit-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.explore-content-hit-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}
.explore-content-hit-pub {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}
.explore-content-hit-pub a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.explore-content-hit-pub a:hover {
    text-decoration: underline;
}
.explore-content-hit-date {
    color: var(--muted);
    font-weight: normal;
}
.explore-content-hit-type {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    background: var(--surface-2);
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
}
.explore-content-hit-body {
    min-width: 0;
    flex: 1;
}
.explore-empty {
    padding: 2rem 1.5rem;
    text-align: center;
}
.explore-empty-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.explore-empty-text {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.explore-publications {
    margin-bottom: 1rem;
}
.explore-search-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}
.explore-search-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.explore-search-footer a:hover {
    text-decoration: underline;
}
.explore-page--search .explore-toolbar {
    margin-bottom: 1.25rem;
}
.explore-lead--query strong {
    color: var(--text);
}
.explore-search-summary {
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.explore-search-summary strong {
    color: var(--text);
}

/* Explore tabs: icons + live search affordances */
.explore-mode-pill span i {
    margin-right: 0.3rem;
    font-size: 0.82em;
    opacity: 0.85;
}
.explore-mode-pill.is-active span i,
.explore-mode-pill input:checked + span i {
    opacity: 1;
}
.explore-results {
    transition: opacity 0.15s ease;
}
.explore-results.is-loading {
    opacity: 0.5;
    pointer-events: none;
}
.explore-toolbar-spinner {
    display: none;
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: explore-spin 0.6s linear infinite;
    pointer-events: none;
}
.explore-toolbar.is-searching .explore-toolbar-spinner {
    display: block;
}
@keyframes explore-spin {
    to { transform: rotate(360deg); }
}

/* Content hit: leading thumbnail + colored type chip */
.explore-content-thumb {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 1rem;
    overflow: hidden;
}
.explore-content-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.explore-content-hit-type {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}
.explore-content-hit-type--episode {
    color: #1a4f8b;
    background: #e8f0fe;
}
.explore-content-hit-type--post {
    color: #6b21a8;
    background: #f3e8ff;
}

/* Publication list (account home + studio publications) */
.pub-list-shell {
    padding: 1rem 1.15rem 1.15rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.pub-list-shell--profile {
    margin-bottom: 1rem;
}

.pub-list-shell__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin-bottom: 0.85rem;
}

.pub-list-shell__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.pub-list-shell__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
}

.pub-list-shell__create {
    flex-shrink: 0;
}

.pub-list-body {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pub-list-row {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pub-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main actions"
        "stats stats";
    gap: 0.75rem 0.85rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(26, 26, 24, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub-list-card:hover {
    border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}

.pub-list-card--profile {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    background: color-mix(in srgb, var(--accent-soft, var(--surface-2)) 55%, var(--surface));
}

.pub-list-card__main {
    grid-area: main;
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}

.pub-list-card__main:hover {
    color: inherit;
    text-decoration: none;
}

.pub-list-card__main:hover .pub-list-name {
    color: var(--accent);
}

.pub-list-card__stats {
    grid-area: stats;
    min-width: 0;
}

.pub-list-card__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pub-list-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    flex-shrink: 0;
}

.pub-list-avatar--profile {
    width: 3.75rem;
    height: 3.75rem;
}

.pub-list-avatar--image {
    background: var(--surface-2);
}

.pub-list-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-list-avatar__initial {
    line-height: 1;
}

.pub-list-primary-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pub-list-name {
    font-size: 1rem;
    line-height: 1.25;
    transition: color 0.15s ease;
}

.pub-list-tagline {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.35;
}

.pub-list-url-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.pub-list-slug {
    font-size: 0.78rem;
    color: var(--muted);
    background: var(--surface-2);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

.pub-list-slug-missing {
    font-size: 0.78rem;
    color: var(--muted);
}

.pub-list-stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pub-list-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.76rem;
    line-height: 1.2;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.pub-list-chip--static {
    cursor: default;
}

.pub-list-chip:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    text-decoration: none;
}

.pub-list-chip--static:hover {
    color: inherit;
    border-color: var(--border);
}

.pub-list-chip--accent {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: color-mix(in srgb, var(--accent-soft, var(--surface-2)) 70%, var(--surface-2));
}

.pub-list-chip--accent .pub-list-chip__value,
.pub-list-chip--accent .pub-list-chip__icon {
    color: var(--accent);
}

.pub-list-chip__icon {
    color: var(--muted);
    font-size: 0.72rem;
}

.pub-list-chip__value {
    font-weight: 700;
}

.pub-list-chip__label {
    color: var(--muted);
}

.pub-list-menu {
    position: relative;
}

.pub-list-menu__trigger {
    width: 2rem;
    min-width: 2rem;
    padding-left: 0;
    padding-right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    list-style: none;
}

.pub-list-menu__trigger::-webkit-details-marker {
    display: none;
}

.pub-list-menu__panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 20;
    min-width: 11rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow, 0 8px 24px rgba(26, 26, 24, 0.12));
}

.pub-list-menu__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: none;
    border-radius: 7px;
    background: none;
    text-align: left;
    font: inherit;
    font-size: 0.84rem;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.pub-list-menu__item:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.pub-list-menu__item--danger {
    color: var(--danger, #b91c1c);
}

.pub-list-menu__item--danger:hover {
    background: color-mix(in srgb, var(--danger, #b91c1c) 8%, var(--surface-2));
    color: var(--danger, #b91c1c);
}

/* Legacy aliases kept for scripts/tests */
.pub-list-card,
.pub-list--studio {
    overflow: visible;
}

.pub-list-row-head {
    display: none;
}

@media (min-width: 901px) {
    .pub-list-card {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
        grid-template-areas: "main stats actions";
        align-items: center;
        gap: 1rem 1.25rem;
    }

    .pub-list-card__main {
        grid-template-columns: 3.75rem minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .pub-list-card__actions {
        width: 100%;
        justify-content: stretch;
    }

    .pub-list-card__actions .btn-primary {
        flex: 1;
    }

    .pub-list-stat-chips {
        gap: 0.35rem;
    }

    .pub-list-chip__label {
        display: none;
    }

    .pub-list-chip {
        padding-inline: 0.45rem;
    }
}

@media (max-width: 520px) {
    .pub-list-shell {
        padding-inline: 0.85rem;
    }

    .pub-list-card {
        padding: 0.75rem;
    }
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
}
.tabs a {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th, table.data td {
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.data th { background: var(--surface-2); font-weight: 600; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
.studio-shell {
    --studio-nav-width: 220px;
    padding: 1rem 0 3rem;
    min-height: 70vh;
}
.studio-shell.is-nav-collapsed {
    --studio-nav-width: 52px;
}
.studio-context-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}
.studio-context-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.studio-context-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}
.studio-context-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
}
.studio-context-title {
    font-size: 1.05rem;
    font-weight: 700;
}
.studio-context-title-hidden {
    display: none;
}
.studio-context-select {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.35rem 2rem 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    max-width: min(320px, 100%);
    font-family: inherit;
}
.studio-context-select-hidden {
    display: none !important;
}
.studio-context-switching .studio-context-kicker {
    align-self: center;
}
.studio-quill-wrap .ql-editor {
    min-height: 140px;
}
.studio-context-meta {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
}
.studio-context-meta:hover {
    color: var(--accent);
}
.studio-context-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.studio-layout {
    display: grid;
    grid-template-columns: var(--studio-nav-width) 1fr;
    gap: 1.5rem;
    align-items: start;
    transition: grid-template-columns 0.2s ease;
}
.studio-layout--full {
    grid-template-columns: 1fr;
}
@media (max-width: 720px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
    .studio-shell.is-nav-collapsed {
        --studio-nav-width: 220px;
    }
}
.sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.sidebar-panel h4 { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.studio-sidebar-title-icon { margin-right: 0.35rem; opacity: 0.85; }
.studio-pub-user {
    margin-bottom: 0;
}
.studio-sidebar-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.studio-pub-menu {
    position: relative;
    z-index: 6;
}
.studio-pub-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.5rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.studio-pub-menu-trigger:hover,
.studio-pub-menu.is-open .studio-pub-menu-trigger {
    background: var(--surface);
    border-color: var(--accent);
}
.studio-pub-menu-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 8px;
}
.studio-pub-menu-meta {
    flex: 1;
    min-width: 0;
}
.studio-pub-menu-meta .account-user-name {
    font-size: 0.88rem;
}
.studio-pub-menu-meta .account-user-handle {
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}
.studio-pub-menu-meta .account-profile-badge {
    margin-top: 0.25rem;
}
.studio-pub-menu-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.15s ease;
}
.studio-pub-menu.is-open .studio-pub-menu-chevron {
    transform: rotate(180deg);
}
.studio-pub-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    bottom: auto;
    z-index: 30;
    padding: 0.5rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.studio-pub-menu-panel[hidden] {
    display: none;
}
.studio-pub-header {
    margin-bottom: 1rem;
    position: relative;
    z-index: 5;
    overflow: visible;
}
.studio-nav-collapse-item {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.studio-nav-collapse-icon--expand {
    display: none;
}
.studio-shell.is-nav-collapsed .studio-nav-collapse-icon--collapse,
.admin-shell.is-nav-collapsed .studio-nav-collapse-icon--collapse {
    display: none;
}
.studio-shell.is-nav-collapsed .studio-nav-collapse-icon--expand,
.admin-shell.is-nav-collapsed .studio-nav-collapse-icon--expand {
    display: inline;
}
.studio-pub-menu--header,
.studio-pub-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.studio-pub-bar-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
}
.studio-profile-bar {
    margin-bottom: 0.75rem;
}
.studio-pub-identity {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.studio-pub-bar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}
.studio-pub-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
}
.studio-pub-bar-link--back {
    align-self: flex-end;
}
.studio-pub-bar-link--end {
    align-self: flex-end;
}
.studio-pub-bar-link--back i {
    font-size: 0.75rem;
    opacity: 0.85;
}
.studio-pub-bar-link:hover {
    color: var(--accent);
    text-decoration: none;
}
.studio-pub-switch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.studio-pub-switch-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
}
.studio-pub-switch-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.studio-pub-switch-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.studio-pub-switch-option:hover {
    background: var(--surface);
    border-color: var(--accent);
}
.studio-pub-switch-option.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.studio-pub-switch-option-name {
    min-width: 0;
}
.studio-pub-switch-option-check {
    flex-shrink: 0;
    font-size: 0.85rem;
}
.studio-pub-menu--header .studio-pub-menu-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}
.studio-pub-menu--header .studio-pub-menu-meta .account-user-name {
    font-size: 1.05rem;
    font-weight: 700;
}
.studio-pub-name-kicker {
    font-weight: 600;
    color: var(--muted);
}
.studio-pub-menu--header .studio-pub-menu-meta .account-user-handle {
    font-size: 0.82rem;
}
.studio-shell.is-nav-collapsed .studio-sidebar,
.admin-shell.is-nav-collapsed .admin-sidebar {
    padding: 0.75rem 0.4rem;
}
.studio-shell.is-nav-collapsed .studio-nav-link,
.admin-shell.is-nav-collapsed .studio-nav-link {
    justify-content: center;
    padding: 0.5rem 0.35rem;
}
.studio-shell.is-nav-collapsed .studio-nav-link-main,
.admin-shell.is-nav-collapsed .studio-nav-link-main {
    justify-content: center;
    gap: 0;
}
.studio-shell.is-nav-collapsed .studio-nav-link-main > span:not(.studio-nav-icon),
.admin-shell.is-nav-collapsed .studio-nav-link-main > span:not(.studio-nav-icon) {
    display: none;
}
.studio-shell.is-nav-collapsed .studio-nav-count,
.admin-shell.is-nav-collapsed .studio-nav-count {
    display: none;
}
.studio-shell.is-nav-collapsed .studio-sidebar-footer,
.admin-shell.is-nav-collapsed .admin-sidebar-footer {
    border-top: none;
    padding-top: 0;
    margin-top: 0.25rem;
}
.admin-nav-group-label,
.studio-nav-group-label {
    display: block;
    margin: 0.75rem 0.75rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.admin-shell.is-nav-collapsed .admin-nav-group-label,
.studio-shell.is-nav-collapsed .studio-nav-group-label {
    overflow: hidden;
    height: 1px;
    margin: 0.5rem 0.4rem;
    padding: 0;
    text-indent: -999px;
    border-top: 1px solid var(--border);
}
.studio-pub-menu-switch {
    padding: 0.35rem 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
}
.studio-pub-menu-switch-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.studio-pub-menu-select {
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 2rem 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
}
.studio-pub-menu-link {
    display: block;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
}
.studio-pub-menu-link:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
}
.account-dashboard-section {
    margin-bottom: 1.75rem;
}
.account-dashboard-section:last-child {
    margin-bottom: 0;
}
.account-dashboard-section-header {
    margin-bottom: 0.85rem;
}
.account-dashboard-section-header--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.account-dashboard-section-title {
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.account-dashboard-section-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
    max-width: 42rem;
}
.dashboard-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-quick-link:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.dashboard-quick-link-icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.9;
}
.dashboard-quick-link-text {
    flex: 1;
    min-width: 0;
}
.dashboard-quick-link-text strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.3;
}
.dashboard-quick-link-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
    line-height: 1.35;
}
.dashboard-quick-link-count {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    background: var(--surface-2);
    color: var(--muted);
}
.dashboard-quick-link-count.is-zero {
    display: none;
}
.studio-dashboard-stats .stat-card {
    padding: 0.85rem 1rem;
}
.studio-dashboard-stats .label {
    font-size: 0.75rem;
}
.studio-dashboard-stats .value {
    font-size: 1.35rem;
}
.studio-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.studio-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.studio-nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}
.studio-nav-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.studio-nav-link-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.studio-nav-icon {
    width: 1.05rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.9;
}
.studio-nav-link.is-active .studio-nav-icon {
    opacity: 1;
}
.studio-nav-count {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    background: var(--surface-2);
    color: var(--muted);
}
.studio-nav-link.is-active .studio-nav-count {
    background: rgba(31, 83, 240, 0.15);
    color: var(--accent);
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.studio-list {
    margin-bottom: 1.5rem;
}
.studio-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.65rem;
}
.studio-list-search-wrap {
    position: relative;
    flex: 1 1 12rem;
    min-width: 10rem;
    max-width: 20rem;
}
.studio-list-search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--muted);
    pointer-events: none;
}
.studio-list-search {
    width: 100%;
    padding: 0.45rem 0.65rem 0.45rem 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: var(--surface);
}
.studio-list-filter {
    padding: 0.45rem 1.75rem 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
}
.studio-list-summary {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: var(--muted);
    min-height: 1.2rem;
}
.studio-list-table-wrap {
    overflow: hidden;
}
.studio-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
}
.studio-list-title-cell strong {
    display: block;
    font-size: 0.92rem;
}
.studio-list-slug {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.studio-list-date,
.studio-list-ppv {
    font-size: 0.85rem;
    color: var(--muted);
    white-space: nowrap;
}
.studio-list-actions {
    white-space: nowrap;
    text-align: right;
}
.studio-list-actions .btn { vertical-align: middle; }
.studio-list-title-btn {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
.studio-list-title-btn strong { display: block; font-size: 0.92rem; }
.studio-list-title-btn:hover strong { text-decoration: underline; }
.studio-row-menu-btn { padding-left: 0.5rem; padding-right: 0.5rem; }
.studio-row-menu {
    position: fixed;
    z-index: 1000;
    min-width: 168px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    padding: 0.35rem;
}
.studio-row-menu[hidden] { display: none; }
.studio-row-menu button,
.studio-row-menu a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 0.5rem 0.6rem;
    border-radius: 7px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.studio-row-menu button:hover,
.studio-row-menu a:hover { background: var(--surface-2); }
.studio-row-menu i { width: 1rem; text-align: center; color: var(--muted); }
.studio-row-menu .danger,
.studio-row-menu .danger i { color: #b42318; }
.studio-row-menu .menu-sep { height: 1px; background: var(--border); margin: 0.3rem 0.2rem; }
.studio-list-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    background: var(--surface-2);
    color: var(--muted);
}
.studio-list-badge--draft { background: #f0eeea; color: #6b6560; }
.studio-list-badge--scheduled { background: #eef4ff; color: #1d4ed8; }
.studio-list-badge--published { background: var(--paid-soft); color: var(--paid); }
.studio-list-badge--archived { background: #f3f4f6; color: #6b7280; }
.studio-list-badge--vis-free { background: var(--surface-2); color: var(--muted); }
.studio-list-badge--vis-paid,
.studio-list-badge--vis-paid_preview,
.studio-list-badge--vis-members_only { background: var(--accent-soft); color: var(--accent); }
.studio-list-badge--audio { background: var(--paid-soft); color: var(--paid); }
.studio-list-badge--warn { background: #fdf1e3; color: #b45309; }
.studio-list-badge.status-toggle {
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter 0.12s ease, box-shadow 0.12s ease;
}
.studio-list-badge.status-toggle::after {
    content: "\21C6";
    font-size: 0.7em;
    margin-left: 0.3rem;
    opacity: 0.6;
}
.studio-list-badge.status-toggle:hover { filter: brightness(0.95); box-shadow: 0 0 0 2px var(--border); }
.studio-list-badge.status-toggle:disabled { cursor: default; opacity: 0.6; }
.studio-list-badge.status-toggle:disabled::after { content: none; }

.profile-visibility-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.85rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
}
.profile-visibility-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.profile-visibility-switch__track {
    width: 2.5rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--border);
    position: relative;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.profile-visibility-switch__track::after {
    content: "";
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease;
}
.profile-visibility-switch input:checked + .profile-visibility-switch__track {
    background: var(--paid);
}
.profile-visibility-switch input:checked + .profile-visibility-switch__track::after {
    transform: translateX(1.15rem);
}
.profile-visibility-switch input:disabled + .profile-visibility-switch__track {
    opacity: 0.55;
    cursor: not-allowed;
}
.profile-visibility-switch.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.studio-list-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.85rem;
}
.studio-list-page-label {
    font-size: 0.85rem;
    color: var(--muted);
}
@media (max-width: 900px) {
    .studio-list-actions .btn {
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }
}
.studio-nav-hint {
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.25rem 0;
    line-height: 1.45;
}
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    padding: 1.5rem 0 3rem;
}
@media (max-width: 900px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
}
.section-title { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 2rem 0 1rem; }
.pw-shell__chrome { margin-bottom: 0.5rem; }
.pw-shell__label { display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0.15rem 0.55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.pw-shell__scope { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: normal; }
.pw-shell__alert { padding: 0.65rem 0.85rem; border-radius: 8px; font-size: 0.85rem; margin-bottom: 0.65rem; line-height: 1.45; }
.pw-shell__alert--error { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); }
.pw-shell__alert--empty { background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--text); }
.mock-label { font-size: 0.7rem; color: #fff; background: #1a2332; padding: 0.15rem 0.5rem; border-radius: 4px; margin-left: 0.5rem; vertical-align: middle; }

/* Reader account area */
.account-shell {
    padding: 1.5rem 0 3rem;
    min-height: 60vh;
}
.account-shell-inner {
    max-width: 900px;
}
.account-sidebar {
    padding: 1.25rem;
    position: sticky;
    top: 4.5rem;
}
.account-user {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}
.account-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.account-avatar--image {
    background: var(--surface-2);
}
.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.account-user-meta { min-width: 0; }
.account-user-name {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-user-handle {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-user-handle:hover { text-decoration: underline; }
.account-user-handle--muted {
    color: var(--muted);
    font-weight: 500;
}
.account-user-email,
.account-user-phone {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-profile-badge {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.account-profile-badge.is-public {
    background: var(--paid-soft);
    color: var(--paid);
}
.account-profile-badge.is-private {
    background: var(--surface-2);
    color: var(--muted);
}
.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.account-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.account-nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}
.account-nav-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}
.account-nav-link-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}
.account-nav-icon {
    width: 1.05rem;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.9;
}
.account-nav-link.is-active .account-nav-icon {
    opacity: 1;
}
.account-nav-count {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    background: var(--surface-2);
    color: var(--muted);
}
.account-nav-link.is-active .account-nav-count {
    background: rgba(31, 83, 240, 0.15);
    color: var(--accent);
}
.account-nav-tag {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--muted);
}
.account-nav-link.is-active .account-nav-tag {
    background: rgba(31, 83, 240, 0.12);
    color: var(--accent);
}
.account-sidebar-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.account-sidebar-footer .account-nav-link {
    font-size: 0.85rem;
    font-weight: 400;
}
.account-user-menu {
    position: relative;
    margin-top: 0.35rem;
}
.account-user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.5rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.account-user-menu-trigger:hover,
.account-user-menu.is-open .account-user-menu-trigger {
    background: var(--surface);
    border-color: var(--accent);
}
.account-user-menu-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 8px;
}
.account-user-menu-meta {
    flex: 1;
    min-width: 0;
}
.account-user-menu-meta .account-user-name {
    font-size: 0.88rem;
}
.account-user-menu-meta .account-user-handle {
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}
.account-user-menu-meta .account-user-handle--muted {
    font-style: italic;
}
.account-user-menu-meta .account-profile-badge {
    margin-top: 0.25rem;
}
.account-user-menu-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.15s ease;
}
.account-user-menu.is-open .account-user-menu-chevron {
    transform: rotate(180deg);
}
.account-user-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 20;
    padding: 0.35rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.account-user-menu-panel[hidden] {
    display: none;
}
.account-user-menu-link,
.account-user-menu-logout {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.account-user-menu-link:hover,
.account-user-menu-logout:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.account-user-menu-logout-form {
    margin: 0;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}
.account-user-menu-logout {
    color: var(--muted);
}
.account-user-menu-logout:hover {
    color: var(--text);
}
.account-main { min-width: 0; }
.account-page-header {
    margin-bottom: 1.25rem;
}
.account-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.account-page-subtitle {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 42rem;
}
.profile-settings-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.profile-settings-toolbar__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
}
.profile-settings-toolbar__links strong { font-size: 0.9rem; }
.profile-settings-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}
.profile-settings-toolbar__url,
.profile-settings-toolbar__hint {
    font-size: 0.85rem;
    color: var(--muted);
}
.profile-settings-toolbar__url-link {
    font-size: 0.85rem;
    word-break: break-all;
}
.profile-settings-section { margin-bottom: 0; }
.profile-settings-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}
.profile-settings-section-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin: -0.35rem 0 1rem;
}
.profile-settings-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}
.profile-settings-dl {
    display: grid;
    gap: 1rem;
    margin: 0;
}
.profile-settings-dl > div {
    display: grid;
    gap: 0.25rem;
}
@media (min-width: 640px) {
    .profile-settings-dl > div {
        grid-template-columns: 11rem 1fr;
        gap: 1rem;
        align-items: start;
    }
}
.profile-settings-dl dt {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}
.profile-settings-dl dd {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}
.profile-settings-muted { color: var(--muted); }
.profile-settings-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-settings-header {
    max-width: 100%;
    width: 280px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.profile-settings-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.profile-settings-tags li {
    font-size: 0.85rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.profile-settings-pub-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.profile-settings-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.stat-card-paid .label { color: var(--paid); }
.stat-card-paid .value { color: var(--paid); }

/* Admin page header with optional actions */
.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-page-header-text { min-width: 0; }
.admin-page-header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

/* Admin dashboard */
.admin-stat-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
    .admin-stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .admin-stat-grid { grid-template-columns: 1fr; }
}
.admin-stat-trend {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--muted);
    min-height: 1rem;
}
.admin-attention-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
}
.admin-attention-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--danger, #c0392b);
    border-radius: 8px;
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-attention-item:hover {
    box-shadow: var(--shadow);
    text-decoration: none;
}
.admin-attention-item > i {
    color: var(--danger, #c0392b);
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}
.admin-attention-label {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
}
.admin-attention-count {
    flex-shrink: 0;
    min-width: 1.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    background: var(--danger, #c0392b);
    color: #fff;
}
.admin-attention-clear {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--paid);
    font-size: 0.9rem;
}
.admin-attention-clear i {
    font-size: 1.05rem;
}
.admin-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.admin-feed-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}
.admin-feed-item:last-child {
    border-bottom: none;
}
.admin-feed-main {
    min-width: 0;
    flex: 1;
}
.admin-feed-main strong {
    font-size: 0.88rem;
    font-weight: 600;
}
.admin-feed-main .badge {
    margin-left: 0.4rem;
}
.admin-feed-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-feed-meta {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}
.admin-integration {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: var(--surface-2);
}
.admin-integration-head {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.admin-integration-head i {
    color: var(--accent);
}
.admin-integration-link {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.82rem;
}
.admin-lookup-result {
    margin-top: 1rem;
    font-size: 0.8rem;
    background: var(--surface-2);
    padding: 1rem;
    border-radius: 8px;
    overflow: auto;
    max-height: 280px;
}
.account-reader-overview {
    padding: 0.35rem 0;
    overflow: hidden;
}
.account-reader-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}
.account-reader-link:last-child {
    border-bottom: none;
}
.account-reader-link:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.account-reader-link-main {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.account-reader-link-icon {
    width: 1.05rem;
    text-align: center;
    flex-shrink: 0;
    color: var(--muted);
}
.account-reader-link:hover .account-reader-link-icon {
    color: var(--accent);
}
.account-reader-link-paid:hover .account-reader-link-icon {
    color: var(--paid);
}
.account-reader-link-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.account-reader-link-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}
.account-reader-link-hint {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}
.account-reader-link-count {
    flex-shrink: 0;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    background: var(--surface-2);
    color: var(--muted);
}
.account-reader-link-paid .account-reader-link-count {
    background: var(--paid-soft);
    color: var(--paid);
}
.account-pub-audience {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.account-pub-audience a {
    color: var(--muted);
    text-decoration: none;
}
.account-pub-audience a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.account-pubs-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.account-pubs-title {
    font-size: 1rem;
    margin: 0;
}
.account-pubs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.account-pub-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 88px 88px minmax(0, 1.4fr);
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(26, 26, 24, 0.04);
}
.account-pub-row-head {
    padding: 0 1rem 0.35rem;
    background: none;
    border: none;
    box-shadow: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.account-pub-col-main {
    min-width: 0;
}
.account-pub-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.account-pub-name {
    font-size: 0.95rem;
    line-height: 1.3;
}
.account-pub-status {
    font-size: 0.65rem;
    padding: 0.12rem 0.4rem;
}
.account-pub-status-live {
    background: var(--paid);
    color: #fff;
}
.account-pub-tagline {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.25rem;
    line-height: 1.35;
}
.account-pub-col-stat {
    text-align: center;
}
.account-pub-stat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-decoration: none;
    color: inherit;
    padding: 0.25rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.account-pub-stat-link:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.account-pub-stat-count {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}
.account-pub-stat-label {
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: lowercase;
}
.account-pub-col-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}
@media (max-width: 760px) {
    .account-pub-row-head {
        display: none;
    }
    .account-pub-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .account-pub-col-stat {
        text-align: left;
    }
    .account-pub-stat-link {
        flex-direction: row;
        align-items: baseline;
        gap: 0.35rem;
        justify-content: flex-start;
    }
    .account-pub-stat-count {
        font-size: 1rem;
    }
    .account-pub-col-actions {
        justify-content: flex-start;
    }
}
.account-quick-card {
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.account-quick-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(31, 83, 240, 0.12);
    text-decoration: none;
}
.account-quick-card-paid:hover { border-color: var(--paid); box-shadow: 0 4px 16px rgba(45, 106, 79, 0.12); }
.account-quick-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}
.account-quick-card h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.account-quick-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.account-panel { overflow: hidden; }
.account-panel .feed-item:last-child { border-bottom: none; }
.account-feed-item:hover { background: var(--surface-2); }
.account-loading,
.account-empty-cell {
    padding: 2rem 1.25rem !important;
    text-align: center;
    color: var(--muted);
}
.account-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--muted);
}
.account-empty strong { color: var(--text); display: block; margin-bottom: 0.35rem; }
.account-subs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.account-sub-card { padding: 1.25rem; }
.account-sub-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.account-sub-head h3 { font-size: 1.05rem; }
.account-sub-head h3 a { color: var(--text); text-decoration: none; }
.account-sub-head h3 a:hover { color: var(--accent); }
.account-sub-tier { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.25rem; }
.account-sub-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.75rem; }
.account-sub-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0.75rem 0 0.35rem;
}
.account-rss-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.account-rss-input {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-2);
    font-family: ui-monospace, monospace;
}
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

/* Header user menu */
.user-menu {
    position: relative;
}
.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.user-menu-trigger:hover,
.user-menu.is-open .user-menu-trigger {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(31, 83, 240, 0.12);
}
.user-menu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-grad-end));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-menu-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-chevron {
    font-size: 0.65rem;
    color: var(--muted);
    transition: transform 0.15s;
}
.user-menu.is-open .user-menu-chevron {
    transform: rotate(180deg);
}
.user-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(26, 26, 24, 0.12);
    z-index: 50;
    overflow: hidden;
}
.user-menu-panel[hidden] {
    display: none;
}
.user-menu-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.user-menu-header strong {
    font-size: 0.9rem;
}
.user-menu-header span {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.user-menu-section:last-of-type {
    border-bottom: none;
}
.user-menu-section-label {
    display: block;
    padding: 0.35rem 1rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.user-menu-panel a,
.user-menu-logout {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
}
.user-menu-panel a:hover,
.user-menu-logout:hover {
    background: var(--surface-2);
    text-decoration: none;
}
.user-menu-footer {
    padding: 0.35rem 0;
    background: var(--surface-2);
}
.user-menu-logout {
    color: var(--accent);
    font-weight: 600;
}
@media (max-width: 600px) {
    .user-menu-name { display: none; }
    .user-menu-trigger { padding: 0.35rem; }
}

/* Info / help page */
.info-page .info-lead {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}
.info-section-title {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
}
.info-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.info-badge-ok { background: var(--paid-soft); color: var(--paid); }
.info-badge-partial { background: var(--accent-soft); color: var(--accent); }
.info-badge-planned { background: var(--surface-2); color: var(--muted); }
.info-journey-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.info-journey-audience {
    font-size: 0.75rem;
    color: var(--muted);
}
.info-steps {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.55;
}
.info-steps li { margin-bottom: 0.35rem; }
.info-notes {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border-radius: 8px;
    margin: 0;
}
.info-links {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}
.info-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.info-faq-item {
    overflow: hidden;
}
.info-faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    list-style: none;
}
.info-faq-item summary::-webkit-details-marker { display: none; }
.info-faq-item summary::after {
    content: '+';
    float: right;
    color: var(--muted);
    font-weight: 400;
}
.info-faq-item[open] summary::after { content: '−'; }
.info-faq-body {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    border-top: 1px solid var(--border);
}
.info-faq-body p { margin: 0.75rem 0 0; }
.info-faq-body p:first-child { margin-top: 0.75rem; }
.info-faq-body ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }

.studio-modal {
    margin: auto;
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 440px;
    width: calc(100% - 2rem);
    background: var(--surface, #fff);
    color: inherit;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.studio-modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.studio-modal h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}
.studio-modal label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.studio-modal input,
.studio-modal select {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}
.studio-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}
.media-picker-item {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0;
    background: var(--surface);
    cursor: pointer;
    aspect-ratio: 1;
    overflow: hidden;
}
.media-picker-item:hover,
.media-picker-item:focus {
    border-color: var(--accent);
    outline: none;
}
.media-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}
.media-library-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}
.media-library-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.media-library-card .meta {
    padding: 0.5rem;
    font-size: 0.75rem;
}
.media-dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: var(--surface-2);
    transition: border-color 0.15s ease, background 0.15s ease;
    cursor: pointer;
}
.media-dropzone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.media-dropzone__icon {
    font-size: 1.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.media-dropzone__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
}
.media-dropzone__hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.media-scope-badge {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
}

/* Events calendar */
.events-calendar-head,
.events-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}
.events-calendar-head span {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
    padding: 0.25rem 0;
}
.events-cal-day,
.events-cal-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.events-cal-day.has-event {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--accent);
}
button.events-cal-day {
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
}
button.events-cal-day.has-event {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
button.events-cal-day:hover {
    border-color: var(--accent);
}
.public-event-row:hover {
    background: var(--surface-2);
}

/* Public comments */
.comments-section {
    padding: 1.25rem;
    margin-top: 2rem;
}
.comments-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
}
.comments-list {
    margin-bottom: 1rem;
}
.comments-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}
.comments-item:last-child {
    border-bottom: none;
}
.comments-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}
.comments-author {
    font-size: 0.92rem;
}
.comments-when {
    font-size: 0.78rem;
    color: var(--muted);
}
.comments-body {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
}
.comments-empty {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}
.comments-form {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
.comments-field {
    display: block;
    margin-bottom: 0.85rem;
}
.comments-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.comments-input,
.comments-textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: var(--surface);
    color: var(--text);
}
.comments-input::placeholder,
.comments-textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}
.comments-textarea {
    resize: vertical;
    min-height: 5rem;
}
.comments-msg {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--muted);
}
.comments-msg.is-success {
    color: var(--paid);
}
.comments-msg.is-error {
    color: #b42318;
}

.nav-account-menu-trigger-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    background: var(--accent);
    color: #fff;
    pointer-events: none;
}
.dashboard-quick-link-count.has-unread {
    background: var(--accent-soft);
    color: var(--accent);
}
.messages-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.messages-tab {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.messages-tab.is-active {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    color: var(--accent);
    font-weight: 600;
}
.messages-list-kind {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}
.messages-thread-kind {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.messages-page {
    margin-top: 0.5rem;
}
@media (max-width: 720px) {
    .messages-page--split .messages-layout {
        grid-template-columns: 1fr;
    }
    .messages-page--split .messages-list-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 42vh;
        overflow-y: auto;
    }
    .messages-page--split .messages-thread-panel {
        min-height: 280px;
    }
}
.messages-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    min-height: 420px;
    overflow: hidden;
}
.messages-list-panel {
    border-right: 1px solid var(--border);
    padding: 1rem;
}
.messages-compose-form {
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.messages-compose-form .comments-input,
.messages-compose-form .comments-select,
.messages-compose-form .comments-textarea {
    width: 100%;
    margin-bottom: 0.5rem;
}
.comments-select {
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    font: inherit;
}
.comments-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.messages-list-tagline {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.1rem;
}
.messages-thread-meta {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.fan-mail-contact-tagline {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.fan-mail-shows-panel {
    padding: 1rem 1.25rem;
}
.fan-mail-shows-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fan-mail-show-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}
.fan-mail-show-row:last-child {
    border-bottom: none;
}
.fan-mail-show-row.is-unread .fan-mail-show-name {
    font-weight: 700;
}
.fan-mail-show-main {
    flex: 1;
    min-width: 12rem;
}
.fan-mail-show-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}
.fan-mail-show-tagline,
.fan-mail-show-preview {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.2rem;
}
.fan-mail-show-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.messages-panel-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}
.messages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.messages-list-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.35rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
.messages-list-item:hover {
    background: var(--surface-2);
}
.messages-list-item.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.messages-list-item.is-unread strong {
    color: var(--accent);
}
.messages-list-preview {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.messages-thread-panel {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}
.messages-thread-empty {
    margin: auto;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
}
.messages-thread-head {
    padding: 1rem 1rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.messages-thread-title {
    margin: 0;
    font-size: 1rem;
}
.messages-thread-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.messages-bubble {
    max-width: 85%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: var(--surface-2);
}
.messages-bubble.is-mine {
    align-self: flex-end;
    background: var(--accent-soft);
}
.messages-bubble strong {
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
}
.messages-bubble p {
    margin: 0;
    white-space: pre-wrap;
}
.messages-bubble time {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--muted);
}
.messages-reply-form {
    border-top: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.messages-empty {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}
.fan-mail-contact {
    padding: 1.25rem;
}
.fan-mail-contact-form {
    border-top: none;
    padding-top: 0;
}
.fan-mail-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}
.fan-mail-contact-intro .fan-mail-open-btn {
    margin-top: 0.5rem;
}
.fan-mail-contact--compose {
    margin: 0 0 1rem;
}
.fan-mail-contact--compose.is-open {
    animation: fan-mail-slide-in 0.2s ease;
}
@keyframes fan-mail-slide-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Share bar (publication pages) */
.share-bar {
    margin: 1rem 0 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    background: var(--surface-2);
    overflow: hidden;
}
.share-bar-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.share-bar-toggle:hover {
    background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
}
.share-bar-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}
.share-bar-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.share-bar-chevron {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--muted);
    transition: transform 0.15s ease;
}
.share-bar.is-open .share-bar-chevron {
    transform: rotate(180deg);
}
.share-bar-panel {
    padding: 0.75rem 1rem 0.85rem;
    border-top: 1px solid var(--border);
}
.share-bar-panel .share-bar-actions {
    padding-top: 0;
}
.share-bar-panel[hidden] {
    display: none;
}
.share-bar-info-wrap {
    position: relative;
    display: inline-flex;
}
.share-bar-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    cursor: help;
}
.share-bar-info-wrap:hover .share-bar-tooltip,
.share-bar-info-wrap:focus-within .share-bar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.share-bar-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.45rem);
    transform: translate(-50%, 4px);
    width: max-content;
    max-width: 240px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: var(--text);
    color: var(--surface);
    font-size: 0.75rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 5;
}
.share-bar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.share-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.share-bar-btn:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    background: var(--accent-soft);
    color: var(--text);
}
.share-bar-btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.share-bar-btn--primary:hover {
    background: color-mix(in srgb, var(--accent) 88%, #000);
    color: #fff;
}
.share-bar-url {
    margin: 0.55rem 0 0;
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 560px) {
    .share-bar-btn-label { display: none; }
}

.email-alerts-modes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.email-alerts-mode {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    cursor: pointer;
}
.email-alerts-pubs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.email-alerts-pub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.email-alerts-pub-slug {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}
.email-alerts-pub-select {
    min-width: 8rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}
@media (max-width: 768px) {
    .messages-layout {
        grid-template-columns: 1fr;
    }
    .messages-list-panel {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        max-height: 220px;
        overflow-y: auto;
    }
}

/* Auth pages (login / register) */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}
.auth-sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}
.auth-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin: 0.4rem 0 0;
}
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.oauth-btn:hover {
    background: var(--surface-2);
    border-color: var(--muted);
    text-decoration: none;
}
.oauth-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 1rem 0;
    gap: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 1.25rem;
}
.seg--sm {
    max-width: 260px;
    margin-bottom: 0.85rem;
}
.seg-btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.5rem 0.6rem;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.seg-btn:hover {
    color: var(--text);
}
.seg-btn.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.auth-field {
    margin-bottom: 1rem;
}
.auth-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
}
.auth-input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
}
.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.auth-submit {
    width: 100%;
}
.auth-help {
    margin-top: 0.85rem;
    font-size: 0.9rem;
}
.auth-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    min-height: 1.2em;
}
.auth-msg--error {
    color: #b91c1c;
}
.auth-msg--success {
    color: var(--paid);
    margin-bottom: 1rem;
}
.auth-foot {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

/* Admin publications: readers chips + upgrades manager modal */
.pub-readers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.pub-readers .badge {
    font-weight: 500;
}
.pub-upgrades-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: 220px;
}
.admin-upgrade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}
.admin-upgrade-row:last-child {
    border-bottom: 0;
}
.admin-upgrade-label {
    font-weight: 600;
    font-size: 0.9rem;
}
.admin-upgrade-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.admin-row-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 190px;
    padding: 8px;
}
.admin-row-menu .btn {
    justify-content: flex-start;
    text-align: left;
}

/* Admin queue status page */
.queue-autorefresh-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
}
.queue-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.queue-banner-text {
    flex: 1;
    min-width: 12rem;
}
.queue-banner-meta {
    margin-left: auto;
    white-space: nowrap;
}
.queue-health-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    white-space: nowrap;
}
.stat-card-danger {
    border-color: var(--danger);
    background: var(--danger-soft);
}
.stat-card-danger .value {
    color: var(--danger);
}

/* Legal / policy / help static pages */
body.area-legal {
    --bg: #e8ebf2;
    --surface-2: #f3f5f9;
}
html[data-theme="dark"] body.area-legal {
    --bg: #0f1117;
    --surface-2: #1a1e28;
}
.legal-page {
    padding: 2rem 0 3.5rem;
}
.legal-page__inner {
    max-width: 46rem;
}
.legal-page__hero {
    text-align: center;
    margin-bottom: 1.75rem;
}
.legal-page__badge {
    display: inline-block;
    margin: 0 0 0.65rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
}
.legal-page__hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}
.legal-page__lead {
    margin: 0 auto;
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--muted);
}
.legal-page__meta {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.legal-page__article {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow);
    padding: clamp(1.35rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem);
}
html[data-theme="dark"] .legal-page__article {
    background: var(--surface);
}
.legal-page__body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}
.legal-page__body > section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}
.legal-page__body > section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.legal-page__body h2 {
    margin: 0 0 0.6rem;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.legal-page__body h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.legal-page__body p {
    margin: 0 0 0.85rem;
    color: var(--muted);
}
.legal-page__body p:last-child {
    margin-bottom: 0;
}
.legal-page__body ul,
.legal-page__body ol {
    margin: 0 0 0.85rem;
    padding-left: 1.35rem;
    color: var(--muted);
}
.legal-page__body li {
    margin-bottom: 0.45rem;
}
.legal-page__body li strong {
    color: var(--text);
    font-weight: 600;
}
.legal-page__body a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}
.legal-page__body a:hover {
    text-decoration: underline;
}
.legal-page__body code {
    font-size: 0.88em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text);
}
.legal-page__footer {
    margin-top: 2rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border);
}
.legal-page__related {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 500;
}
.legal-page__related a {
    color: var(--accent);
    text-decoration: none;
}
.legal-page__related a:hover {
    text-decoration: underline;
}
.legal-help-block {
    margin-bottom: 1.25rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.legal-help-block:last-child {
    margin-bottom: 0;
}
.legal-help-block h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.legal-help-block ul {
    margin: 0;
    padding-left: 1.25rem;
}
.legal-dmca-form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}
.legal-dmca-form input,
.legal-dmca-form textarea {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--text);
}
html[data-theme="dark"] .legal-dmca-form input,
html[data-theme="dark"] .legal-dmca-form textarea {
    background: var(--surface-2);
}
.legal-dmca-form textarea {
    resize: vertical;
    min-height: 5rem;
}
.legal-dmca-form input:focus,
.legal-dmca-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.legal-page__notice {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    color: var(--muted);
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
}
html[data-theme="dark"] .legal-page__notice {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
