:root {
    --bg: #07070b;
    --bg-soft: #101018;
    --panel: rgba(17, 17, 26, 0.9);
    --panel-strong: rgba(15, 15, 22, 0.96);
    --text: #f5f7fb;
    --muted: #afb3c7;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --red: #d61f4a;
    --violet: #6d39d1;
    --violet-soft: rgba(109, 57, 209, 0.18);
    --green: #20c997;
    --amber: #f59f00;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    --drawer-width: 296px;
    --drawer-collapsed: 92px;
    --header-height: 84px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(214, 31, 74, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(109, 57, 209, 0.1), transparent 20%),
        linear-gradient(180deg, #050507 0%, #020203 58%, #010102 100%);
    color: var(--text);
    min-height: 100vh;
    max-width: 100%;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

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

svg,
video,
canvas,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

.hidden {
    display: none !important;
}

.container {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    min-width: 0;
}

.app-shell {
    min-height: 100vh;
    max-width: 100%;
    overflow-x: clip;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 7, 0.56);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 48;
}

.sidebar-drawer {
    position: fixed;
    top: 16px;
    left: 16px;
    width: var(--drawer-width);
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
    padding: 14px;
    background: rgba(8, 8, 13, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transform: translateX(0);
    transition: width 0.28s ease, transform 0.28s ease, background 0.28s ease, opacity 0.28s ease;
    z-index: 52;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    will-change: transform;
    display: none;
}

.drawer-inner {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 22px;
    height: 100%;
}

.drawer-brand {
    padding: 10px 10px 4px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: min(100%, 34rem);
}

.brand-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-lockup-sidebar {
    max-width: 100%;
}

.brand-title {
    display: block;
    max-width: 100%;
    font-size: clamp(1rem, 0.95rem + 0.9vw, 1.65rem);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-accent {
    color: #d93045;
}

.brand-subtitle {
    display: block;
    max-width: 100%;
    color: var(--muted);
    font-size: clamp(0.68rem, 0.64rem + 0.28vw, 0.9rem);
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.drawer-group-label {
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.drawer-nav {
    display: grid;
    gap: 8px;
}

.drawer-link {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    color: var(--muted);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.drawer-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.drawer-link.is-active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(214, 31, 74, 0.18), rgba(109, 57, 209, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.drawer-icon-svg {
    color: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.drawer-icon-svg svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.drawer-link:hover .drawer-icon-svg,
.drawer-link:focus-visible .drawer-icon-svg {
    transform: scale(1.05);
    opacity: 1;
}

.drawer-link.is-active .drawer-icon-svg {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.drawer-status-card {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(214, 31, 74, 0.1), rgba(109, 57, 209, 0.12)),
        rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.drawer-status-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.main-shell {
    min-height: 100vh;
    padding-left: 0;
    min-width: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 16px 20px 0;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: var(--header-height);
    padding: 16px 20px;
    border-radius: 22px;
    background: rgba(9, 9, 14, 0.84);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.app-header-left,
.app-header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.app-header-left {
    flex: 1 1 auto;
}

.desktop-topnav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex-wrap: wrap;
}

.desktop-topnav-link {
    color: var(--muted);
    font-size: 0.98rem;
    transition: color 0.2s ease;
}

.public-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
}

.public-header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.public-brand-wrap {
    display: flex;
    justify-content: center;
    min-width: 0;
    justify-self: center;
}

.public-header .brand-lockup {
    justify-content: center;
    text-align: center;
}

.public-header .brand-copy {
    justify-items: center;
}

.public-header-meta,
.public-topnav {
    justify-content: flex-end;
}

.public-header-meta {
    justify-self: end;
}

.desktop-topnav-link:hover,
.desktop-topnav-link.is-active {
    color: var(--text);
}

.menu-toggle {
    display: none;
    position: relative;
    z-index: 56;
    flex: 0 0 46px;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 17, 26, 0.88);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--line-strong);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.page-label,
.user-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.page-label {
    color: var(--muted);
}

.user-chip {
    font-weight: 600;
}

.page-shell {
    padding: 24px 20px 72px;
    min-width: 0;
}

body.sidebar-collapsed .brand-title,
body.sidebar-collapsed .brand-subtitle,
body.sidebar-collapsed .drawer-group-label,
body.sidebar-collapsed .drawer-label,
body.sidebar-collapsed .drawer-status-card p,
body.sidebar-collapsed .drawer-status-card .button {
    opacity: 0;
    visibility: hidden;
}

body.sidebar-collapsed .sidebar-drawer {
    width: var(--drawer-collapsed);
}

body.sidebar-collapsed .drawer-link {
    grid-template-columns: 1fr;
    justify-items: center;
}

body.sidebar-collapsed .drawer-brand,
body.sidebar-collapsed .drawer-group-label {
    padding-left: 0;
    padding-right: 0;
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.empty-state {
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin-bottom: 12px;
}

.empty-state p {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-panel,
.content-grid,
.auth-shell,
.row-stack {
    margin-bottom: 24px;
}

.account-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.7fr);
    gap: 22px;
    min-height: 240px;
    align-items: end;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        radial-gradient(circle at top right, rgba(214, 31, 74, 0.16), transparent 36%),
        rgba(10, 10, 14, 0.92);
}

.account-hero-copy {
    max-width: 60rem;
    display: grid;
    gap: 14px;
}

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

.account-dashboard-shell {
    display: grid;
    gap: 22px;
    padding-bottom: 44px;
}

.account-hero-aside {
    display: grid;
    gap: 14px;
}

.account-hero-stat {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-hero-stat span {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-hero-stat strong {
    font-size: 1.15rem;
}

.account-subnav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    top: 88px;
    z-index: 12;
    padding: 14px;
    backdrop-filter: blur(16px);
}

.account-subnav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.account-subnav-link:hover,
.account-subnav-link:focus-visible,
.account-subnav-link.is-active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.account-summary-card {
    display: grid;
    gap: 14px;
}

.account-summary-card h2 {
    margin-bottom: 0;
}

.account-summary-card-inbox {
    border-color: rgba(246, 53, 110, 0.14);
}

.account-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.account-section-shell {
    display: grid;
    gap: 18px;
}

.account-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.account-section-heading h2 {
    margin-bottom: 8px;
}

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

.account-panel-card {
    display: grid;
    gap: 14px;
}

.account-panel-card h2 {
    margin-bottom: 0;
}

.account-detail-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.account-detail-list div {
    display: grid;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.account-detail-list div:first-child {
    padding-top: 0;
    border-top: 0;
}

.account-detail-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-detail-list dd {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

.account-library-shell {
    margin-bottom: 0;
}

.account-library-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.account-library-header h2 {
    margin-bottom: 8px;
}

.account-library-switches {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-library-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.account-library-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    min-height: 1.7rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.82rem;
}

.account-library-chip:hover,
.account-library-chip.is-active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

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

.saved-library-card {
    display: grid;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.saved-library-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
}

.saved-library-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-library-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(214, 31, 74, 0.14), rgba(109, 57, 209, 0.14));
    color: #f5f7fb;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.saved-library-copy {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.saved-library-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.saved-library-copy h3 {
    margin-bottom: 0;
}

.saved-library-copy p {
    margin-bottom: 0;
    color: var(--muted);
}

.saved-library-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.saved-list-remove {
    padding-inline: 14px;
    color: var(--muted);
}

.saved-list-remove:hover {
    color: var(--text);
}

.saved-library-empty {
    display: grid;
    gap: 10px;
    justify-items: start;
    text-align: left;
}

.saved-library-empty h3,
.saved-library-empty p {
    margin-bottom: 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: #ff8aa8;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

.muted {
    color: var(--muted);
}

.subtle-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d5d9eb;
    margin-bottom: 16px;
}

.button-row,
.split-heading,
.library-actions,
.preview-footer,
.story-byline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 11px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.button-primary {
    background: linear-gradient(135deg, var(--red), var(--violet));
    color: #fff;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--text);
}

.button-small {
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--text);
}

.button-danger {
    background: rgba(214, 31, 74, 0.18);
    border-color: rgba(214, 31, 74, 0.4);
}

body.story-delete-modal-open {
    overflow: hidden;
}

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

.story-delete-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 7, 0.72);
    backdrop-filter: blur(10px);
}

.story-delete-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    display: grid;
    gap: 16px;
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(17, 17, 26, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    color: #22242c;
}

.story-delete-modal__icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(214, 31, 74, 0.12);
    border: 1px solid rgba(214, 31, 74, 0.22);
    color: #c41f47;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.story-delete-modal__eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a5670;
}

.story-delete-modal__dialog h2 {
    margin: -6px 0 0;
    color: #161821;
}

.story-delete-modal__message {
    margin: 0;
    color: #535764;
    line-height: 1.65;
}

.story-delete-modal__message strong {
    color: #20222d;
}

.story-delete-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.story-delete-modal__actions .button {
    flex: 1 1 180px;
}

.story-delete-modal__actions .button-secondary {
    background: #f6f7fb;
    border-color: #e3e7ee;
    color: #22242c;
}

.story-delete-modal__actions .button-danger {
    background: linear-gradient(135deg, #c91f49, #92223d);
    border-color: transparent;
    color: #ffffff;
}

.story-danger-zone {
    display: grid;
    gap: 14px;
}

.story-danger-zone .muted {
    max-width: 52rem;
}

.story-danger-form {
    flex-wrap: wrap;
}

.button-disabled {
    opacity: 0.62;
    pointer-events: none;
    cursor: not-allowed;
}

.story-card-static {
    display: block;
}

.studio-shell,
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.studio-shell.studio-shell-no-context {
    grid-template-columns: minmax(0, 1fr);
}

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

.workspace-hub-hero {
    align-items: center;
}

.workspace-hub-hero > div,
.workspace-summary-card,
.workspace-quick-card,
.library-card-copy {
    min-width: 0;
}

.workspace-hub-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
}

.workspace-hub-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.workspace-hub-nav a:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.workspace-mobile-menu {
    display: none;
    gap: 10px;
    padding: 16px;
}

.workspace-mobile-menu-label {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
}

.workspace-mobile-menu select {
    width: 100%;
}

.workspace-hub-section,
.workspace-section-stack {
    display: grid;
    gap: 20px;
}

.workspace-summary-grid,
.workspace-quick-grid,
.workspace-placement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.workspace-summary-card,
.workspace-quick-card,
.workspace-placement-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.workspace-summary-card strong,
.workspace-quick-card h3,
.workspace-placement-card strong {
    font-size: 1.08rem;
    line-height: 1.3;
}

.workspace-placement-list {
    display: grid;
    gap: 10px;
}

.workspace-placement-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.workspace-placement-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.page-context-panel {
    position: sticky;
    top: calc(var(--header-height) + 26px);
    height: fit-content;
}

.page-context-inner {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(10, 10, 16, 0.68);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.page-context-links {
    display: grid;
    gap: 10px;
}

.page-context-links a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.page-context-links a:hover {
    color: var(--text);
}

.pagination-shell {
    display: grid;
    gap: 14px;
    justify-items: center;
    margin-top: 8px;
}

.pagination-desktop,
.pagination-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-mobile {
    display: none;
}

.pagination-link,
.pagination-gap,
.pagination-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pagination-link:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.pagination-link.is-current {
    color: var(--text);
    border-color: rgba(214, 31, 74, 0.28);
    background: rgba(214, 31, 74, 0.14);
}

.pagination-link.is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

.pagination-gap {
    border-color: transparent;
    background: transparent;
    padding: 0 4px;
}

.stats-grid,
.card-grid,
.story-list-grid,
.two-panel-grid {
    display: grid;
    gap: 18px;
}

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

.story-list-grid,
.two-panel-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.workspace-library-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stat-card {
    min-width: 0;
}

.story-card,
.story-view-panel,
.stack-list,
.preview-stack {
    display: grid;
    gap: 14px;
}

.story-meta,
.tag-row,
.support-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-pill,
.badge,
.mini-badge,
.hero-chip,
.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    border: 1px solid var(--line);
}

.badge-draft {
    background: rgba(255, 255, 255, 0.05);
}

.badge-published {
    background: rgba(32, 201, 151, 0.16);
    border-color: rgba(32, 201, 151, 0.36);
}

.badge-scheduled {
    background: rgba(245, 159, 0, 0.16);
    border-color: rgba(245, 159, 0, 0.36);
}

.badge-premium,
.mini-badge {
    background: rgba(109, 57, 209, 0.12);
    border-color: rgba(109, 57, 209, 0.22);
    color: #e8e2fb;
}

.badge-featured,
.mini-badge-accent,
.hero-chip {
    background: rgba(214, 31, 74, 0.16);
    border-color: rgba(214, 31, 74, 0.3);
}

.mini-badge-muted {
    opacity: 0.6;
}

.type-pill,
.tag-chip {
    background: var(--violet-soft);
}

.stack-form,
.form-grid,
.filter-grid,
.tip-grid,
.media-forms,
.ad-config-card {
    display: grid;
    gap: 16px;
}

.monetization-hero,
.monetization-section {
    display: grid;
    gap: 22px;
}

.monetization-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.monetization-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
}

.monetization-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.monetization-nav a:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
}

.monetization-tags {
    margin-top: 8px;
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

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

.field-label {
    display: inline-block;
    margin-bottom: 10px;
}

.genre-filter-shell,
.genre-filter-panel {
    display: grid;
    gap: 18px;
}

.genre-filter-shell {
    position: relative;
    overflow: visible;
    padding: 14px 16px;
    background: rgba(12, 12, 18, 0.68);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 20;
    isolation: isolate;
}

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

.genre-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.genre-filter-heading {
    display: grid;
    gap: 6px;
    max-width: 38rem;
}

.genre-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
}

.catalog-header-search-form {
    flex: 0 1 320px;
    width: min(100%, 320px);
    margin-left: auto;
}

.catalog-header-search-shell {
    justify-content: flex-end;
}

.catalog-header-search-shell.is-open {
    flex: 1 1 320px;
}

.catalog-search-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
    overflow: visible;
}

.catalog-search-shell.is-open {
    flex: 1 1 280px;
}

.catalog-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 11px;
    white-space: nowrap;
    flex: 0 0 40px;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.catalog-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 15px;
    height: 15px;
    opacity: 0.88;
}

.catalog-search-icon::before,
.catalog-search-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.catalog-search-icon::before {
    width: 9px;
    height: 9px;
    top: 0;
    left: 0;
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.catalog-search-icon::after {
    width: 6px;
    height: 1.7px;
    right: 0;
    bottom: 1px;
    background: currentColor;
    border-radius: 999px;
    transform: rotate(45deg);
    transform-origin: center;
}

.catalog-search-trigger-label {
    display: none;
}

.catalog-search-field,
.genre-panel-search {
    position: relative;
    display: block;
    min-width: 0;
}

.catalog-search-field {
    width: 0;
    flex: 0 1 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: width 0.22s ease, flex-basis 0.22s ease, opacity 0.18s ease;
    min-width: 0;
}

.catalog-search-shell.is-open .catalog-search-field {
    width: min(100%, 280px);
    flex: 1 1 260px;
    opacity: 1;
    pointer-events: auto;
}

.catalog-search-field input,
.genre-panel-search input {
    width: 100%;
    min-height: 40px;
    padding: 10px 13px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text);
    box-shadow: none;
}

.catalog-search-field input::placeholder,
.genre-panel-search input::placeholder {
    color: rgba(175, 179, 199, 0.72);
}

.catalog-search-field input:focus,
.genre-panel-search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.genre-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 11px 9px 14px;
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.genre-filter-toggle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
}

.genre-filter-clear-button {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 14px;
}

.genre-filter-backdrop {
    display: none;
}

.genre-filter-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.genre-filter-panel-head h3 {
    margin: 0;
}

.genre-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.genre-filter-close:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
}

body.is-ready .genre-filter-panel {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    width: min(560px, 100%);
    padding: 18px;
    border-radius: 20px;
    background: rgba(11, 11, 17, 0.94);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 90;
}

body.is-ready .genre-filter-shell.is-open .genre-filter-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.genre-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.genre-option:hover,
.genre-option.is-selected {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.065);
}

.genre-option.is-hidden {
    display: none;
}

.genre-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.selected-genre-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.045);
    color: #d9dceb;
    font-size: 0.82rem;
}

.genre-chip-active {
    background: rgba(109, 57, 209, 0.14);
    border-color: rgba(109, 57, 209, 0.24);
}

.search-chip {
    background: rgba(214, 31, 74, 0.08);
    border-color: rgba(214, 31, 74, 0.18);
}

.genre-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

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

.filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

.stack-form label,
.filter-grid label,
.upload-inline-form label {
    display: grid;
    gap: 8px;
}

.checkbox-row,
.switch-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

.switch-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

input,
select,
textarea {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.035));
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    -webkit-tap-highlight-color: transparent;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(17, 17, 24, 0.96);
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(245, 247, 255, 0.88) 50%),
        linear-gradient(135deg, rgba(245, 247, 255, 0.88) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 1px),
        calc(100% - 12px) calc(50% - 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
    color-scheme: dark;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
    color: rgba(205, 212, 235, 0.46);
}

select option,
select optgroup {
    background: #111118;
    color: #f4f6ff;
}

select option:checked,
select option:hover,
select option:focus {
    background: #1b1b28;
    color: #ffffff;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(126, 60, 232, 0.42);
    box-shadow:
        0 0 0 1px rgba(126, 60, 232, 0.22),
        0 0 0 4px rgba(126, 60, 232, 0.08);
}

select::-ms-expand {
    display: none;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(255, 255, 255, 0.11);
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    color: rgba(226, 231, 245, 0.62);
    background: rgba(255, 255, 255, 0.025);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #8e67ff;
    background: #12121a;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    padding: 0;
    flex: 0 0 auto;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow:
        0 0 0 1px rgba(126, 60, 232, 0.24),
        0 0 0 4px rgba(126, 60, 232, 0.08);
}

input[type="file"] {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.035);
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.notice {
    border-radius: 14px;
    padding: 13px 15px;
}

.notice.success {
    background: rgba(32, 201, 151, 0.14);
    border: 1px solid rgba(32, 201, 151, 0.32);
}

.notice.error {
    background: rgba(214, 31, 74, 0.14);
    border: 1px solid rgba(214, 31, 74, 0.32);
}

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

.data-table th,
.data-table td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table-actions {
    display: grid;
    gap: 10px;
}

.rich-editor-shell {
    display: grid;
    gap: 14px;
}

.rich-editor-modern-note {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rich-editor-topbar,
.rich-editor-toolbar,
.asset-insert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.rich-editor-toolbar {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.editor-tool {
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.editor-tool:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line-strong);
}

.rich-editor-canvas {
    min-height: 420px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(8, 8, 12, 0.9);
    color: var(--text);
    line-height: 1.8;
    overflow: auto;
}

.rich-editor-canvas:focus {
    outline: none;
    border-color: rgba(109, 57, 209, 0.24);
    box-shadow: 0 0 0 1px rgba(109, 57, 209, 0.18);
}

.rich-editor-canvas:empty::before {
    content: attr(data-placeholder);
    color: rgba(175, 179, 199, 0.66);
}

.rich-editor-textarea {
    min-height: 520px;
    resize: vertical;
}

.rich-editor-shell .tox-tinymce {
    border-radius: 20px !important;
    border: 1px solid var(--line) !important;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.rich-editor-shell .tox .tox-editor-header,
.rich-editor-shell .tox .tox-toolbar,
.rich-editor-shell .tox .tox-toolbar__primary,
.rich-editor-shell .tox .tox-menubar {
    background: #171821 !important;
}

.rich-editor-shell .tox .tox-edit-area__iframe {
    background: #101018 !important;
}

.quill-editor-surface {
    padding: 0;
}

.rich-editor-shell .ql-toolbar.ql-snow,
.rich-editor-shell .ql-container.ql-snow {
    border-color: var(--line);
}

.rich-editor-shell .ql-toolbar.ql-snow {
    border-radius: 20px 20px 0 0;
    background: #171821;
}

.rich-editor-shell .ql-container.ql-snow {
    min-height: 520px;
    border-radius: 0 0 20px 20px;
    background: rgba(8, 8, 12, 0.9);
    color: var(--text);
    font-size: 1rem;
}

.rich-editor-shell .ql-editor {
    min-height: 520px;
    line-height: 1.8;
    color: var(--text);
}

.rich-editor-shell .ql-editor.ql-blank::before {
    color: rgba(175, 179, 199, 0.66);
    font-style: normal;
}

.rich-editor-shell .ql-snow .ql-stroke {
    stroke: #cfd4ea;
}

.rich-editor-shell .ql-snow .ql-fill {
    fill: #cfd4ea;
}

.rich-editor-shell .ql-snow .ql-picker {
    color: #eef2ff;
}

.rich-editor-shell .ql-snow .ql-picker-label {
    border-color: rgba(255, 255, 255, 0.12);
    color: #eef2ff;
}

.rich-editor-shell .ql-snow .ql-picker.ql-expanded .ql-picker-label {
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.rich-editor-shell .ql-snow .ql-picker-options {
    background: #171821;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: var(--shadow);
}

.rich-editor-shell .ql-snow .ql-picker-item {
    color: #d8def2;
}

.rich-editor-shell .ql-snow .ql-picker-item:hover,
.rich-editor-shell .ql-snow .ql-picker-item.ql-selected {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.story-writer-launch-panel {
    gap: 16px;
}

body.writer-app-active .sidebar-overlay,
body.writer-app-active .sidebar-drawer,
body.writer-app-active .app-header,
body.writer-app-active .site-footer {
    display: none !important;
}

body.writer-app-active .main-shell,
body.writer-app-active .page-shell.main-content {
    padding: 0;
}

body.writer-app-active .main-shell {
    min-height: 100vh;
}

body.writer-app-active .writer-studio-shell {
    min-height: 100vh;
    padding: 0;
    gap: 0;
}

.writer-launch-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.writer-launch-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.writer-launch-card h4 {
    margin: 0 0 8px;
}

.writer-launch-card p {
    margin: 0;
}

.writer-studio-shell {
    display: grid;
    gap: 18px;
}

.writer-studio-topbar,
.writer-studio-header,
.writer-document-frame,
.writer-mobile-actions,
.writer-side-card {
    min-width: 0;
}

.writer-studio-topbar {
    display: grid;
    gap: 16px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.writer-studio-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.writer-studio-layout {
    display: grid;
    gap: 18px;
}

.writer-studio-main,
.writer-studio-side,
.writer-studio-form {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.writer-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.writer-title-field input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: clamp(1.9rem, 1.5rem + 1.6vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #f8f9ff;
}

.writer-title-field input:focus {
    box-shadow: none;
    border: 0;
}

.writer-studio-toolbar {
    display: grid;
    gap: 10px;
}

.writer-studio-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.writer-document-frame {
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.writer-document-frame .ql-toolbar.ql-snow,
.writer-document-frame .ql-container.ql-snow {
    border: 0;
}

.writer-document-frame .ql-toolbar.ql-snow {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #171821;
    border-bottom: 1px solid var(--line);
}

.writer-document-frame .ql-container.ql-snow {
    height: min(72vh, 980px);
    background: linear-gradient(180deg, rgba(8, 8, 12, 0.98), rgba(11, 11, 17, 0.98));
}

.writer-document-frame .ql-editor {
    width: min(100%, 820px);
    min-height: calc(min(72vh, 980px) - 60px);
    margin: 0 auto;
    padding: 30px 22px 90px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #f4f6ff;
}

.writer-document-frame .ql-editor p,
.writer-document-frame .ql-editor ul,
.writer-document-frame .ql-editor ol,
.writer-document-frame .ql-editor blockquote,
.writer-document-frame .ql-editor figure,
.writer-document-frame .ql-editor pre {
    margin-bottom: 1.15em;
}

.writer-document-frame .ql-editor h2,
.writer-document-frame .ql-editor h3,
.writer-document-frame .ql-editor h4 {
    line-height: 1.18;
    margin: 1.3em 0 0.6em;
}

.writer-document-frame .ql-editor h2 {
    font-size: clamp(1.8rem, 1.55rem + 0.8vw, 2.35rem);
}

.writer-document-frame .ql-editor h3 {
    font-size: clamp(1.35rem, 1.18rem + 0.4vw, 1.75rem);
}

.writer-document-frame .ql-editor h4 {
    font-size: clamp(1.1rem, 1.02rem + 0.2vw, 1.3rem);
}

.writer-document-frame .ql-editor.ql-blank::before {
    left: 22px;
    right: 22px;
    color: rgba(175, 179, 199, 0.66);
    font-style: normal;
}

.writer-side-card {
    display: grid;
    gap: 14px;
}

.writer-side-stack,
.writer-art-stack {
    display: grid;
    gap: 12px;
}

.writer-side-stat {
    display: grid;
    gap: 4px;
}

.writer-art-preview {
    display: grid;
    place-items: center;
    min-height: 120px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.writer-art-preview-banner {
    min-height: 150px;
}

.writer-art-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.writer-assets-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.writer-assets-summary::-webkit-details-marker {
    display: none;
}

.writer-save-button {
    width: 100%;
}

body.article-writer-app,
body.article-writer-app .main-shell,
body.article-writer-app .page-shell.main-content {
    background: #f1f3f4;
}

body.article-writer-app .article-docs-shell {
    min-height: 100vh;
    background: #f5f5f5;
    color: #222222;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .notice.success,
body.article-writer-app .notice.error {
    width: min(100% - 32px, 1200px);
    margin: 12px auto 0;
}

body.article-writer-app .article-docs-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 18px 7px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

body.article-writer-app .article-docs-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.article-writer-app .article-docs-topbar-title {
    justify-self: center;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
    white-space: nowrap;
}

body.article-writer-app .article-docs-topbar-spacer {
    min-width: 0;
}

body.article-writer-app .article-docs-brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

body.article-writer-app .article-docs-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

body.article-writer-app .article-docs-title-field input {
    border: none;
    outline: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #222222;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    min-width: 180px;
    max-width: 320px;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-docs-title-field input:focus {
    background: transparent;
}

body.article-writer-app .article-docs-status-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 0;
    font-size: 11px;
    color: #8a8a8a;
}

body.article-writer-app .article-docs-status-row .story-badge,
body.article-writer-app .article-docs-status-row .badge,
body.article-writer-app .article-docs-status-row .status-badge {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #444444;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

body.article-writer-app .article-docs-status-row .muted,
body.article-writer-app [data-writer-save-state] {
    color: #a0a0a0;
}

body.article-writer-app .article-docs-menu {
    position: relative;
    z-index: 30;
    overflow: visible;
}

body.article-writer-app .article-docs-menu summary {
    list-style: none;
    cursor: pointer;
    min-height: 32px;
    padding: 0 10px 0 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #333333;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-docs-menu summary::-webkit-details-marker {
    display: none;
}

body.article-writer-app .article-docs-menu summary::after {
    content: '';
}

body.article-writer-app .article-docs-menu[open] summary {
    background: transparent;
    border-color: transparent;
}

body.article-writer-app .article-docs-menu-sheet {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: auto;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 4px 0;
    border-radius: 0;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    box-shadow: none;
    display: grid;
    gap: 0;
    z-index: 40;
}

body.article-writer-app .article-docs-menu.is-floating .article-docs-menu-sheet {
    position: fixed;
    top: var(--article-menu-top, 88px);
    left: var(--article-menu-left, 12px);
    right: auto;
    z-index: 9999;
}

body.article-writer-app .article-docs-menubar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: visible;
    isolation: isolate;
    padding: 0 18px;
    min-height: 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    color: #333333;
}

body.article-writer-app .article-docs-menubar-item {
    min-height: 32px;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    cursor: default;
    font-size: 12px;
}

body.article-writer-app .article-docs-menubar-item:hover {
    background: transparent;
}

body.article-writer-app .article-docs-menu-action {
    width: 100%;
    min-height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-docs-menu-action:hover {
    background: #f7f7f7;
}

body.article-writer-app .article-docs-menu-action-primary {
    background: transparent;
    color: #333333;
}

body.article-writer-app .article-writer-form {
    display: grid;
    gap: 0;
}

body.article-writer-app .article-writer-insertbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    position: relative;
    z-index: 1;
    min-height: 32px;
}

.article-toolbar-label {
    font-size: 11px;
    color: #777777;
    margin-right: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.article-toolbar-chip {
    min-width: 0;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #333333;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
}

.article-toolbar-chip:hover,
.article-toolbar-chip:focus-visible {
    background: transparent;
    color: #222222;
    text-decoration: none;
    outline: none;
}

body.article-writer-app .article-docs-workspace {
    overflow: auto;
    padding: 28px 16px 40px;
}

body.article-writer-app .article-docs-page-wrap {
    display: flex;
    justify-content: center;
}

body.article-writer-app .article-document-frame {
    width: min(100%, 980px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 42px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-formats {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #e5e5e5;
    min-height: 42px;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-formats:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow button,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-label {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 0;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #444444;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label {
    width: auto;
    min-width: 124px;
    padding: 0 20px 0 0;
    justify-content: flex-start;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label {
    min-width: 96px;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow button:hover,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow button:focus,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-label:hover,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
    background: #fafafa;
    border-color: transparent;
    color: #222222;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-stroke {
    stroke: #444444;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-fill {
    fill: #444444;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker {
    color: #444444;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-label::before,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-item::before {
    color: inherit;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-options {
    padding: 4px 0;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-item {
    min-height: 26px;
    padding: 4px 12px;
    color: #333333;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-item.ql-selected,
body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker-item:hover {
    background: #f7f7f7;
    color: #222222;
}

body.article-writer-app .article-document-frame .ql-toolbar.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
    position: absolute;
    right: 0;
}

body.article-writer-app .article-document-frame .ql-container.ql-snow {
    height: auto;
    min-height: 70vh;
    border: 0;
    background: transparent;
    overflow: visible;
}

body.article-writer-app .article-document-frame .ql-editor {
    width: min(100%, 850px);
    min-height: 1100px;
    margin: 0 auto 24px;
    padding: 72px 80px;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14), 0 6px 24px rgba(0, 0, 0, 0.08);
    color: #202124;
    font-size: 16px;
    line-height: 1.7;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-document-frame .ql-editor.ql-blank::before {
    left: 80px;
    right: 80px;
    color: #9aa0a6;
    font-style: normal;
}

body.article-writer-app .article-document-frame .ql-editor:focus {
    border-color: #c7d7fe;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14), 0 0 0 3px rgba(26, 115, 232, 0.08);
}

body.article-writer-app .article-document-frame .ql-editor h1,
body.article-writer-app .article-document-frame .ql-editor h2,
body.article-writer-app .article-document-frame .ql-editor h3,
body.article-writer-app .article-document-frame .ql-editor h4 {
    color: #202124;
    font-family: Arial, Helvetica, sans-serif;
}

body.article-writer-app .article-document-frame .ql-editor a {
    color: #1a73e8;
}

body.article-writer-app .article-document-frame .ql-editor blockquote {
    background: #f8f9fa;
    border-left-color: #1a73e8;
    color: #3c4043;
}

body.article-writer-app .article-docs-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid #dadce0;
    color: #5f6368;
    font-size: 13px;
    flex-wrap: wrap;
}

body.article-writer-app .article-docs-footer-left,
body.article-writer-app .article-docs-footer-right {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

body.article-writer-app .article-docs-assets-toggle {
    position: relative;
}

body.article-writer-app .article-docs-assets-toggle summary {
    list-style: none;
    cursor: pointer;
}

body.article-writer-app .article-docs-assets-toggle summary::-webkit-details-marker {
    display: none;
}

body.article-writer-app .article-docs-assets-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(420px, calc(100vw - 32px));
    max-height: 60vh;
    overflow: auto;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dadce0;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.article-public-page .public-main-shell {
    background:
        radial-gradient(circle at top, rgba(214, 31, 74, 0.1), transparent 26%),
        linear-gradient(180deg, #09090f 0%, #0f1017 18%, #11131b 100%);
}

.article-page-shell {
    display: grid;
    gap: 0;
}

.article-hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
}

.article-hero-media,
.article-hero-overlay {
    position: absolute;
    inset: 0;
}

.article-hero-media {
    background:
        radial-gradient(circle at top right, rgba(214, 31, 74, 0.3), transparent 36%),
        linear-gradient(160deg, rgba(13, 14, 22, 0.84), rgba(13, 14, 22, 0.52));
    background-size: cover;
    background-position: center;
    filter: saturate(0.95) contrast(1.05);
}

.article-hero-overlay {
    background:
        linear-gradient(180deg, rgba(8, 8, 12, 0.35), rgba(8, 8, 12, 0.92)),
        linear-gradient(120deg, rgba(8, 8, 12, 0.84), rgba(8, 8, 12, 0.14));
}

.article-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    min-height: 78vh;
    padding-top: 120px;
    padding-bottom: 64px;
}

.article-hero-copy {
    width: min(100%, 820px);
    display: grid;
    gap: 18px;
}

.article-meta-row,
.article-author-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: rgba(236, 238, 246, 0.82);
}

.article-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(97, 57, 167, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.article-meta-separator {
    opacity: 0.48;
}

.article-title {
    margin: 0;
    max-width: 13ch;
    font-size: clamp(2.8rem, 5.6vw, 5.6rem);
    line-height: 0.94;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.article-dek {
    margin: 0;
    max-width: 36rem;
    font-size: clamp(1.06rem, 1rem + 0.35vw, 1.34rem);
    line-height: 1.74;
    color: rgba(236, 238, 246, 0.88);
}

.article-layout-shell {
    margin-top: -72px;
    position: relative;
    z-index: 2;
    padding-bottom: 56px;
}

.article-ads-ribbon {
    position: relative;
    z-index: 3;
    margin-top: -26px;
    margin-bottom: 18px;
}

.article-ads-ribbon .ad-slot {
    width: min(100%, 860px);
    margin: 0 auto;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.article-layout.article-layout-no-rail {
    grid-template-columns: minmax(0, 1fr);
}

.article-rail {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.article-rail-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 12, 19, 0.84);
    backdrop-filter: blur(20px);
}

.article-rail .ad-slot {
    margin-top: 18px;
}

.article-rail-meta {
    display: grid;
    gap: 6px;
    color: rgba(236, 238, 246, 0.74);
}

.article-body {
    min-width: 0;
}

.article-layout.article-layout-no-rail .article-body {
    width: 100%;
}

.article-body-inner {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 64px 72px 86px;
    border-radius: 28px;
    background: rgba(14, 15, 23, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
}

.article-body-bottom-ad {
    width: min(100%, 860px);
    margin: 20px auto 0;
}

.article-inline-ad-slot {
    margin: 34px 0 40px;
}

.article-inline-ad-slot .ad-slot {
    margin: 0;
}

.article-inline-ad-slot .ad-slot-inner {
    width: 100%;
}

.article-public-page .article-body-inner.story-content {
    font-size: 1.12rem;
    line-height: 1.95;
    color: #eff1f7;
}

.article-public-page .article-body-inner.story-content h2 {
    font-size: clamp(1.95rem, 1.74rem + 0.8vw, 2.6rem);
}

.article-public-page .article-body-inner.story-content h3 {
    font-size: clamp(1.45rem, 1.3rem + 0.45vw, 1.9rem);
}

@media (max-width: 1100px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-rail {
        position: static;
    }

    .article-ads-ribbon .ad-slot,
    .article-body-bottom-ad {
        width: 100%;
    }

    .article-inline-ad-slot {
        margin: 28px 0 34px;
    }
}

@media (max-width: 800px) {
    body.article-writer-app .article-docs-topbar,
    body.article-writer-app .article-docs-menubar,
    body.article-writer-app .article-writer-insertbar,
    body.article-writer-app .article-docs-footer {
        padding-left: 10px;
        padding-right: 10px;
    }

    body.article-writer-app .article-docs-topbar {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    body.article-writer-app .article-docs-topbar-title,
    body.article-writer-app .article-docs-topbar-spacer {
        display: none;
    }

    body.article-writer-app .article-docs-menu-sheet {
        left: 0;
        right: auto;
    }

    body.article-writer-app .article-document-frame .ql-editor {
        width: 100%;
        min-height: 70vh;
        padding: 40px 22px;
    }

    body.article-writer-app .article-document-frame .ql-editor.ql-blank::before {
        left: 22px;
        right: 22px;
    }

    .article-hero {
        min-height: 62vh;
    }

    .article-hero-inner {
        min-height: 62vh;
        padding-top: 100px;
        padding-bottom: 42px;
    }

    .article-layout-shell {
        margin-top: -36px;
    }

    .article-ads-ribbon {
        margin-top: -12px;
        margin-bottom: 14px;
    }

    .article-body-inner {
        padding: 34px 20px 52px;
        border-radius: 22px;
    }
}

@media (min-width: 1101px) {
    .writer-studio-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .writer-studio-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
        align-items: start;
        padding: 0 18px 18px;
    }

    .writer-studio-side {
        position: sticky;
        top: calc(var(--header-height) + 20px);
    }
}

@media (max-width: 980px) {
    .writer-document-frame .ql-container.ql-snow {
        height: min(68vh, 760px);
    }
}

@media (max-width: 640px) {
    .writer-studio-topbar,
    .writer-studio-header,
    .writer-mobile-actions,
    .writer-side-card {
        padding: 18px;
    }

    .writer-status-row,
    .writer-studio-topbar-actions {
        align-items: flex-start;
    }

    .writer-studio-topbar-actions .button {
        width: 100%;
        justify-content: center;
    }

    .writer-document-frame .ql-toolbar.ql-snow {
        padding: 12px;
    }

    .writer-document-frame .ql-container.ql-snow {
        height: 62vh;
    }

    .writer-document-frame .ql-editor {
        min-height: calc(62vh - 56px);
        padding: 22px 16px 76px;
        font-size: 1rem;
    }

    .writer-studio-toolbar-group .button {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
    }

    body.writer-app-active .writer-studio-layout {
        padding: 0 0 18px;
    }
}

.editor-asset-drawer {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.editor-asset-drawer summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.editor-asset-drawer summary::-webkit-details-marker {
    display: none;
}

.editor-asset-library {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
}

.compact-media-forms {
    margin-top: 2px;
}

.inline-asset-library {
    margin-top: 0;
}

.media-manager-hidden {
    display: none;
}

.asset-insert-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.asset-insert-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.ad-config-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.reader-slot-list {
    display: grid;
    gap: 12px;
}

.reader-slot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.reader-slot-row strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 720px) {
    .reader-slot-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.code-textarea {
    min-height: 180px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.6;
}

.site-footer {
    padding: 0 24px 24px;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 24px;
    text-align: center;
    border-radius: 24px;
    background: rgba(9, 9, 14, 0.74);
    border: 1px solid var(--line);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
    width: 100%;
}

.footer-nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-nav-link:hover,
.footer-nav-link.is-active {
    color: #f3f4fa;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: rgba(228, 229, 241, 0.68);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #f3f4fa;
}

.breadcrumb-separator {
    opacity: 0.45;
}

.muted-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 1rem;
}

.compact-heading {
    margin-bottom: 1rem;
}

.compact-heading h3 {
    margin: 0.2rem 0 0;
}

.plugin-widget-card {
    width: min(100%, 42rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(16, 16, 24, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.plugin-widget-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.plugin-widget-card h3,
.plugin-widget-card p {
    margin: 0;
}

.plugin-admin-panel {
    min-width: 0;
}

.plugin-upload-panel {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.95fr);
    align-items: start;
}

.plugin-upload-copy {
    display: grid;
    gap: 10px;
}

.plugin-upload-copy h2,
.plugin-upload-copy p {
    margin: 0;
}

.plugin-upload-form {
    display: grid;
    gap: 16px;
}

.plugin-dropzone {
    position: relative;
    display: grid;
    gap: 18px;
    justify-items: start;
    min-height: 13rem;
    padding: 24px;
    border-radius: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at top right, rgba(255, 91, 123, 0.12), transparent 38%),
        rgba(8, 8, 14, 0.72);
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    overflow: hidden;
}

.plugin-dropzone:hover,
.plugin-dropzone.is-dragover {
    border-color: rgba(255, 255, 255, 0.3);
    background:
        radial-gradient(circle at top right, rgba(255, 91, 123, 0.18), transparent 42%),
        rgba(12, 12, 20, 0.82);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.plugin-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.plugin-dropzone-copy {
    display: grid;
    gap: 6px;
}

.plugin-dropzone-copy strong,
.plugin-dropzone-copy span {
    display: block;
}

.plugin-upload-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.toggle-field input {
    width: auto;
}

.navigation-placement-group {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.navigation-placement-head {
    margin-bottom: 0;
}

.navigation-sortable-list {
    display: grid;
    gap: 12px;
}

.navigation-sort-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: grab;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.navigation-sort-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.navigation-sort-item.is-dragging {
    opacity: 0.7;
    transform: scale(0.99);
    border-color: rgba(255, 91, 123, 0.3);
}

.navigation-sort-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.navigation-drag-handle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    cursor: grab;
}

.navigation-drag-handle:active {
    cursor: grabbing;
}

.story-content {
    line-height: 1.8;
    color: #e8eaf3;
}

.story-content > :first-child,
.rich-editor-canvas > :first-child {
    margin-top: 0;
}

.story-content > :last-child,
.rich-editor-canvas > :last-child {
    margin-bottom: 0;
}

.story-content h2,
.story-content h3,
.story-content h4,
.rich-editor-canvas h2,
.rich-editor-canvas h3,
.rich-editor-canvas h4 {
    line-height: 1.2;
    margin: 1.3em 0 0.6em;
}

.story-content h2,
.rich-editor-canvas h2 {
    font-size: clamp(1.7rem, 1.45rem + 0.8vw, 2.25rem);
}

.story-content h3,
.rich-editor-canvas h3 {
    font-size: clamp(1.35rem, 1.18rem + 0.5vw, 1.7rem);
}

.story-content h4,
.rich-editor-canvas h4 {
    font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem);
    letter-spacing: 0.02em;
}

.story-content p,
.story-content ul,
.story-content ol,
.story-content blockquote,
.story-content figure,
.story-content pre,
.rich-editor-canvas p,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas blockquote,
.rich-editor-canvas figure,
.rich-editor-canvas pre {
    margin: 0 0 1.15em;
}

.story-content ul,
.story-content ol,
.rich-editor-canvas ul,
.rich-editor-canvas ol {
    padding-left: 1.25rem;
}

.story-content blockquote,
.rich-editor-canvas blockquote {
    margin-left: 0;
    padding: 18px 20px;
    border-left: 3px solid rgba(214, 31, 74, 0.55);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: #f3dfe5;
}

.story-content hr,
.rich-editor-canvas hr {
    margin: 1.4em 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-content a {
    color: #f6a0b6;
}

.story-content img,
.rich-editor-canvas img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

.story-media,
.story-embed,
.story-content-card,
.story-gallery,
.rich-editor-canvas .story-media,
.rich-editor-canvas .story-embed,
.rich-editor-canvas .story-content-card,
.rich-editor-canvas .story-gallery {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 20px;
}

.story-media,
.story-content-card,
.rich-editor-canvas .story-media,
.rich-editor-canvas .story-content-card {
    padding: 14px;
}

.story-caption {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    text-align: center;
}

.story-embed iframe,
.story-embed video,
.story-media audio,
.story-media video,
.rich-editor-canvas iframe,
.rich-editor-canvas video,
.rich-editor-canvas audio {
    width: 100%;
    display: block;
    border: 0;
    border-radius: 16px;
}

.story-embed iframe,
.rich-editor-canvas iframe {
    min-height: 360px;
}

.story-content-card {
    padding: 18px 20px;
}

.story-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--text) !important;
    background: linear-gradient(135deg, rgba(214, 31, 74, 0.2), rgba(109, 57, 209, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.story-spacer {
    height: 18px;
}

.story-render-preview {
    display: grid;
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 24px;
}

.live-preview-panel {
    position: sticky;
    top: calc(var(--header-height) + 26px);
    align-self: start;
}

.hero-preview,
.hero-cinematic {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.story-hero {
    position: relative;
    min-height: 320px;
}

.hero-preview-media,
.hero-background,
.story-hero-art {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
}

.hero-preview::after,
.hero-cinematic::after,
.story-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 6, 10, 0.86), rgba(6, 6, 10, 0.42));
    pointer-events: none;
}

.hero-preview-copy,
.hero-content,
.story-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    padding: 28px;
}

.hero-placeholder,
.media-placeholder,
.row-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(135deg, rgba(214, 31, 74, 0.2), rgba(109, 57, 209, 0.22)),
        rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 18px;
}

.preview-footer,
.library-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.row-card-preview,
.row-story-card,
.library-card,
.list-card,
.ad-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.row-card-preview {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
}

.row-card-image,
.library-card-media,
.row-story-media {
    min-height: 150px;
    background: rgba(255, 255, 255, 0.03);
}

.row-card-image img,
.library-card-media img,
.row-story-media img,
.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.row-card-copy,
.library-card-copy {
    padding: 18px;
}

.library-card-copy {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.library-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
}

.library-card-copy-only {
    grid-template-columns: minmax(0, 1fr);
}

.library-card-copy > * {
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.library-card-copy .button-row {
    width: 100%;
    justify-content: flex-start;
}

.library-card-copy .inline-form {
    align-self: stretch;
}

.library-card-copy h3,
.row-story-copy h3,
.row-card-copy h4 {
    margin-bottom: 8px;
}

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

.media-manager {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.upload-inline-form {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.support-button {
    width: auto;
}

.hero-shell {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.hero-cinematic {
    min-height: 540px;
    padding: 0;
}

.hero-fullscreen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 0 32px;
    margin-left: 0;
    margin-right: 0;
}

.hero-cinematic-fullscreen {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    overflow: hidden;
    box-shadow: none;
    background: #06060a;
}

.hero-background,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-background {
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.04);
    animation: heroBackgroundDrift 16s ease-out both;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(5, 5, 8, 0.92), rgba(5, 5, 8, 0.46) 55%, rgba(5, 5, 8, 0.72)),
        linear-gradient(180deg, rgba(5, 5, 8, 0.08), rgba(5, 5, 8, 0.82)),
        radial-gradient(circle at center, transparent 42%, rgba(4, 4, 7, 0.24) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    min-height: 540px;
    align-content: end;
}

.hero-content-fullscreen {
    width: min(100% - 96px, 900px);
    min-height: 100vh;
    padding: 120px 48px 56px;
    align-content: end;
    animation: heroCopyFade 0.75s ease-out both;
}

.hero-content-fullscreen .breadcrumbs {
    margin-bottom: auto;
    padding-top: 4px;
}

.hero-content-fullscreen h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 5.6vw, 6rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
}

.hero-content-fullscreen > p {
    max-width: 58ch;
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.72;
    color: rgba(244, 244, 249, 0.86);
}

@keyframes heroBackgroundDrift {
    from {
        opacity: 0;
        transform: scale(1.08);
    }
    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

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

.row-stack {
    display: grid;
    gap: 28px;
}

.cinematic-row-stack {
    margin-bottom: 8px;
}

.cinematic-showcase {
    display: grid;
    gap: 18px;
    margin-bottom: 30px;
}

.release-carousel {
    position: relative;
    overflow: hidden;
    padding: 0;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(188, 26, 58, 0.12), transparent 28%),
        rgba(8, 8, 13, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.release-carousel-viewport {
    overflow: hidden;
}

.release-carousel-track {
    display: flex;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.release-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 100%;
    min-height: 540px;
    overflow: hidden;
}

.release-mobile-trigger {
    display: none;
}

.release-carousel-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.02);
}

.release-carousel-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(161, 18, 51, 0.16), transparent 38%),
        radial-gradient(circle at 78% 20%, rgba(255, 166, 60, 0.18), transparent 20%);
}

.release-carousel-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(92deg, rgba(4, 4, 7, 0.97) 0%, rgba(4, 4, 7, 0.84) 28%, rgba(4, 4, 7, 0.48) 64%, rgba(4, 4, 7, 0.8) 100%),
        linear-gradient(180deg, rgba(38, 11, 19, 0.2), rgba(5, 5, 8, 0.88));
}

.release-carousel-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 18px;
    min-height: 540px;
    max-width: 620px;
    padding: 40px;
}

.release-carousel-copy h3 {
    margin: 0;
    font-size: clamp(2.35rem, 4.8vw, 4.2rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.release-carousel-copy p {
    margin: 0;
    color: rgba(244, 244, 249, 0.84);
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    line-height: 1.7;
    max-width: 52ch;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.release-carousel .button {
    min-height: 44px;
    padding: 0.8rem 1.3rem;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.release-carousel .button-primary {
    background: rgba(248, 248, 252, 0.96);
    color: #09090e;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.release-carousel .button-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(248, 248, 252, 0.94);
    backdrop-filter: blur(10px);
}

.release-carousel-controls {
    position: absolute;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.release-carousel-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: rgba(248, 248, 252, 0.82);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.release-carousel-nav:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.release-carousel-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
}

.release-carousel-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: width 0.28s ease, background 0.28s ease, opacity 0.28s ease;
}

.release-carousel-dot.is-active {
    width: 42px;
    background: rgba(255, 255, 255, 0.92);
}

.release-mobile-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: end center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.release-mobile-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.release-mobile-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(4, 4, 10, 0.72);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.release-mobile-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(18, 19, 28, 0.98), rgba(10, 11, 18, 0.98)),
        rgba(12, 12, 18, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
    transform: translateY(18px);
    transition: transform 0.24s ease;
}

.release-mobile-modal.is-visible .release-mobile-dialog {
    transform: translateY(0);
}

.release-mobile-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-grid;
    place-items: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f6f7ff;
    cursor: pointer;
}

.release-mobile-copy {
    display: grid;
    gap: 10px;
    padding-right: 42px;
}

.release-mobile-copy h3 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.release-mobile-copy p:last-child {
    margin: 0;
    color: rgba(244, 244, 249, 0.84);
    font-size: 0.95rem;
    line-height: 1.6;
}

.release-mobile-cta {
    width: 100%;
    justify-content: center;
}

body.release-mobile-open {
    overflow: hidden;
}

.cinematic-banner {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    padding: 0;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(188, 26, 58, 0.14), transparent 28%),
        rgba(8, 8, 13, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.cinematic-banner-media,
.cinematic-support-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.02);
}

.cinematic-banner-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(161, 18, 51, 0.16), transparent 38%),
        radial-gradient(circle at 78% 20%, rgba(255, 166, 60, 0.18), transparent 20%);
}

.cinematic-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(92deg, rgba(4, 4, 7, 0.97) 0%, rgba(4, 4, 7, 0.84) 28%, rgba(4, 4, 7, 0.48) 64%, rgba(4, 4, 7, 0.8) 100%),
        linear-gradient(180deg, rgba(38, 11, 19, 0.2), rgba(5, 5, 8, 0.88));
}

.cinematic-banner-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 18px;
    min-height: 500px;
    max-width: 620px;
    padding: 40px;
}

.cinematic-banner-copy h3 {
    margin: 0;
    font-size: clamp(2.35rem, 4.8vw, 4.2rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.cinematic-banner-copy p {
    margin: 0;
    color: rgba(244, 244, 249, 0.84);
    font-size: clamp(0.98rem, 1.5vw, 1.1rem);
    line-height: 1.7;
    max-width: 52ch;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.cinematic-banner-actions {
    margin-top: 6px;
}

.cinematic-banner .button {
    min-height: 44px;
    padding: 0.8rem 1.3rem;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.cinematic-banner .button-primary {
    background: rgba(248, 248, 252, 0.96);
    color: #09090e;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.cinematic-banner .button-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(248, 248, 252, 0.94);
    backdrop-filter: blur(10px);
}

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

.cinematic-support-card {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 16, 0.92);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.cinematic-support-card a,
.cinematic-support-card .story-card-static {
    display: block;
    min-height: 250px;
}

.cinematic-support-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 6, 10, 0.12), rgba(6, 6, 10, 0.92));
}

.cinematic-support-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 10px;
    min-height: 250px;
    padding: 20px;
}

.cinematic-support-copy h3 {
    margin: 0;
    font-size: clamp(1.08rem, 1.6vw, 1.46rem);
    line-height: 1;
}

.cinematic-support-copy p {
    margin: 0;
    color: rgba(239, 239, 246, 0.78);
    font-size: 0.92rem;
    line-height: 1.55;
}

.cinematic-support-card:hover,
.cinematic-banner:hover {
    transform: translateY(-3px);
    transition: transform 0.26s ease, box-shadow 0.26s ease, filter 0.26s ease;
}

.cinematic-banner:hover .cinematic-banner-media,
.cinematic-support-card:hover .cinematic-support-media {
    transform: scale(1.05);
    transition: transform 0.45s ease;
}

.content-row {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.row-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 280px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.row-scroll::-webkit-scrollbar {
    height: 10px;
}

.row-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.row-story-card a {
    display: block;
}

.row-story-card,
.release-carousel-slide,
.cinematic-banner,
.story-hero {
    position: relative;
}

.saved-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.saved-actions-hero,
.saved-actions-carousel,
.saved-actions-banner,
.saved-actions-story-hero {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    display: grid;
    gap: 6px;
    justify-items: end;
}

.saved-actions-row-card,
.saved-actions-support-card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: grid;
    gap: 6px;
    justify-items: end;
}

.saved-action-button {
    display: inline-grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-width: 44px;
    min-height: 44px;
    padding: 5px 5px 4px;
    border-radius: 11px;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(18, 18, 24, 0.54);
    color: rgba(244, 244, 249, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.saved-action-button.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.saved-action-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.saved-action-button-my_list {
    background: rgba(132, 128, 119, 0.24);
    border-color: rgba(255, 255, 255, 0.1);
}

.saved-action-button-my_list:hover {
    background: rgba(150, 146, 138, 0.3);
}

.saved-action-button-view_later {
    background: rgba(18, 18, 24, 0.46);
}

.saved-action-button.is-saved {
    background: rgba(214, 31, 74, 0.12);
    border-color: rgba(214, 31, 74, 0.26);
    color: #fff2f5;
}

.saved-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 15px;
    height: 15px;
    line-height: 1;
    color: transparent;
}

.saved-action-button-my_list .saved-action-icon::before,
.saved-action-button-my_list .saved-action-icon::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 999px;
}

.saved-action-button-my_list .saved-action-icon {
    color: rgba(255, 255, 255, 0.96);
}

.saved-action-button-my_list .saved-action-icon::before {
    width: 13px;
    height: 1.5px;
    top: 7px;
    left: 1px;
}

.saved-action-button-my_list .saved-action-icon::after {
    width: 1.5px;
    height: 13px;
    top: 1px;
    left: 7px;
}

.saved-action-button-view_later .saved-action-icon {
    color: rgba(255, 255, 255, 0.88);
}

.saved-action-button-view_later .saved-action-icon::before,
.saved-action-button-view_later .saved-action-icon::after {
    content: "";
    position: absolute;
}

.saved-action-button-view_later .saved-action-icon::before {
    inset: 1px;
    border: 1.4px solid currentColor;
    border-radius: 50%;
}

.saved-action-button-view_later .saved-action-icon::after {
    width: 1.4px;
    height: 5px;
    top: 4px;
    left: 7px;
    background: currentColor;
    border-radius: 999px;
    box-shadow: 3px 2px 0 -0.2px currentColor;
    transform-origin: bottom center;
}

.saved-action-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.58rem;
    line-height: 1;
    letter-spacing: 0.01em;
}

.saved-actions-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    min-width: 180px;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(10, 10, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f5f7fb;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.saved-actions-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.row-story-media {
    aspect-ratio: 16 / 9;
}

.row-story-copy {
    display: grid;
    gap: 12px;
    padding: 18px;
    position: relative;
}

.row-story-copy .story-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 0;
    min-height: 34px;
    flex-wrap: wrap;
}

.row-story-heading {
    display: block;
    padding-right: 0;
    margin-top: 0;
}

.row-story-title-link {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.row-story-title-link:hover h3,
.row-story-title-link:focus-visible h3 {
    color: #ffffff;
}

.row-story-heading h3 {
    margin: 0;
}

.card-share-shell {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    margin-top: 0;
}

.cinematic-support-card .card-share-shell {
    right: 18px;
    bottom: 18px;
}

.card-share-shell .story-share-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(10, 10, 16, 0.68);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-share-shell-inline {
    position: static;
    margin-left: auto;
    justify-self: auto;
    align-self: center;
}

.ad-slot {
    margin: 20px 0 30px;
}

.ad-slot-inner {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.ad-card {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.ad-card-image {
    padding: 0;
}

.ad-copy {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.ad-label {
    color: #ff8aa8;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

.ad-card-promo {
    background:
        linear-gradient(135deg, rgba(214, 31, 74, 0.14), rgba(109, 57, 209, 0.16)),
        rgba(255, 255, 255, 0.03);
}

.ad-card-html,
.ad-card-code {
    padding: 18px;
    background: rgba(10, 10, 15, 0.9);
}

.ad-runtime-surface {
    width: 100%;
    overflow: visible;
}

.ad-runtime-surface > * {
    max-width: 100%;
}

.ad-runtime-surface iframe,
.ad-runtime-surface img,
.ad-runtime-surface ins,
.ad-runtime-surface div,
.ad-runtime-surface table {
    max-width: 100%;
}

.ad-slot-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.ad-slot-scroll > * {
    max-width: 100%;
}

.ad-slot-scroll iframe,
.ad-slot-scroll img,
.ad-slot-scroll ins,
.ad-slot-scroll div,
.ad-slot-scroll table {
    max-width: 100%;
}

.story-page-shell {
    display: grid;
    gap: 24px;
}

.auth-panel,
.membership-hero,
.membership-gate-card,
.membership-page,
.membership-cinematic-hero,
.membership-benefit-card,
.membership-faq-card,
.membership-final-cta {
    display: grid;
    gap: 16px;
}

.membership-hero {
    max-width: 860px;
    margin: 0 auto;
    justify-items: start;
}

.membership-meta {
    gap: 8px;
}

.membership-badge {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.membership-plan-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
}

.membership-plan-card,
.membership-status-card,
.membership-gate-card {
    max-width: 720px;
}

.membership-plan-card {
    display: grid;
    gap: 16px;
    min-height: 100%;
}

.membership-plan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.membership-status-card {
    max-width: 760px;
    margin: 0 auto;
}

.membership-gate-card {
    padding: 22px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.membership-page {
    gap: 28px;
}

.membership-cinematic-hero {
    position: relative;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 28px;
    min-height: 540px;
    padding: clamp(28px, 5vw, 52px);
    border-radius: 32px;
    background:
        radial-gradient(circle at 18% 20%, rgba(127, 86, 217, 0.20), transparent 42%),
        radial-gradient(circle at 82% 18%, rgba(183, 49, 85, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(5, 5, 9, 0.96), rgba(10, 10, 16, 0.9) 42%, rgba(20, 12, 26, 0.84));
    isolation: isolate;
}

.membership-cinematic-hero::before,
.membership-cinematic-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.membership-cinematic-hero::before {
    background: linear-gradient(90deg, rgba(6, 6, 10, 0.18), rgba(6, 6, 10, 0) 42%);
}

.membership-cinematic-hero::after {
    inset: auto -8% -28% 48%;
    height: 72%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(116, 86, 255, 0.18), transparent 62%);
    filter: blur(18px);
    animation: membershipDrift 14s ease-in-out infinite alternate;
}

.membership-cinematic-copy,
.membership-hero-aside,
.membership-status-showcase,
.membership-benefits-shell,
.membership-experience-grid,
.membership-plan-section,
.membership-faq-grid {
    position: relative;
    z-index: 1;
}

.membership-cinematic-copy {
    display: grid;
    align-content: center;
    gap: 18px;
    max-width: 760px;
}

.membership-cinematic-copy h1 {
    max-width: 9.5ch;
    margin: 0;
    font-size: clamp(2.7rem, 6.2vw, 5.6rem);
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.membership-lead {
    max-width: 58ch;
    margin: 0;
    font-size: clamp(1.02rem, 2.2vw, 1.24rem);
    line-height: 1.72;
    color: #f0f1f8;
}

.membership-support-copy,
.membership-section-copy,
.membership-plan-copy,
.membership-billing-copy {
    color: var(--muted);
    line-height: 1.7;
}

.membership-support-copy {
    max-width: 56ch;
    margin: 0;
}

.membership-hero-actions,
.membership-status-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.membership-hero-aside {
    display: grid;
    align-content: end;
    gap: 16px;
}

.membership-hero-float-card {
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

.membership-hero-float-card strong,
.membership-status-showcase h2,
.membership-experience-card h3,
.membership-faq-card h3,
.membership-final-cta h2,
.membership-benefit-card h3,
.membership-plan-card h3 {
    display: block;
    margin-bottom: 8px;
}

.membership-hero-float-card-soft {
    background: rgba(255, 255, 255, 0.035);
}

.membership-status-showcase,
.membership-final-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
}

.membership-status-showcase,
.membership-experience-card,
.membership-final-cta,
.membership-benefit-card,
.membership-faq-card,
.membership-plan-card {
    background: linear-gradient(180deg, rgba(19, 19, 26, 0.92), rgba(11, 11, 17, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.membership-benefits-shell,
.membership-plan-section {
    display: grid;
    gap: 18px;
}

.section-heading {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    letter-spacing: -0.03em;
}

.membership-benefit-grid,
.membership-faq-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.membership-benefit-card,
.membership-faq-card {
    min-height: 100%;
    padding: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.membership-benefit-card:hover,
.membership-faq-card:hover,
.membership-plan-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.membership-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f0c890;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
}

.membership-experience-band {
    padding: clamp(24px, 4vw, 36px);
}

.membership-experience-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 18px;
}

.membership-feature-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.membership-feature-list li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.65;
}

.membership-feature-list li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f1c992, #9d7eff);
    box-shadow: 0 0 0 6px rgba(157, 126, 255, 0.08);
}

.membership-plan-card {
    position: relative;
    padding: 24px;
    border-radius: 26px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.membership-plan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%);
    pointer-events: none;
}

.membership-plan-card-featured {
    border-color: rgba(241, 201, 146, 0.22);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.membership-plan-card-free {
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(16, 16, 22, 0.88), rgba(9, 9, 14, 0.98));
}

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

.membership-price-lockup {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.membership-price-lockup strong {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
}

.membership-price-lockup span {
    color: var(--muted);
}

.membership-badge-featured {
    color: #f4d4a3;
    border-color: rgba(244, 212, 163, 0.22);
}

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

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes membershipDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-2%, -3%, 0) scale(1.05);
    }
}

@media (max-width: 1024px) {
    .membership-cinematic-hero,
    .membership-experience-grid,
    .membership-status-showcase,
    .membership-final-cta {
        grid-template-columns: 1fr;
    }

    .membership-cinematic-hero {
        min-height: auto;
    }

    .membership-cinematic-copy h1 {
        max-width: 11ch;
    }
}

@media (max-width: 720px) {
    .membership-page {
        gap: 22px;
    }

    .membership-cinematic-hero,
    .membership-experience-band,
    .membership-plan-card,
    .membership-benefit-card,
    .membership-faq-card {
        padding: 22px;
        border-radius: 24px;
    }

    .membership-hero-actions,
    .membership-status-actions,
    .membership-plan-footer,
    .membership-plan-head {
        align-items: stretch;
    }

    .membership-hero-actions .button,
    .membership-status-actions .button,
    .membership-plan-footer .button {
        width: 100%;
        justify-content: center;
    }

    .membership-cinematic-copy h1 {
        max-width: none;
        font-size: clamp(2.3rem, 12vw, 3.8rem);
    }

    .membership-hero-aside {
        align-content: start;
    }

    .membership-benefit-grid,
    .membership-faq-grid {
        grid-template-columns: 1fr;
    }

    .pagination-desktop {
        display: none;
    }

    .pagination-mobile {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .membership-cinematic-hero::after,
    [data-reveal],
    .membership-benefit-card,
    .membership-faq-card,
    .membership-plan-card {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

.paypal-button-shell {
    min-height: 48px;
}

.story-hero {
    padding: 0;
    min-height: 420px;
    overflow: visible;
    isolation: isolate;
}

.story-hero-copy {
    justify-content: end;
    min-height: 420px;
}

.story-summary {
    max-width: 720px;
    font-size: 1.05rem;
    color: #e7e9f6;
}

.story-share-shell {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    margin-top: 12px;
    z-index: 5;
}

.reader-share-shell {
    margin-top: 0;
    margin-left: auto;
    align-self: center;
}

.story-share-toggle {
    display: inline-grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #f4f6ff;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.story-share-toggle:hover,
.story-share-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}

.story-share-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.story-share-icon {
    display: inline-grid;
    place-items: center;
}

.story-share-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.story-share-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 40;
    min-width: 13rem;
    max-width: min(18rem, calc(100vw - 2rem));
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(12, 12, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.story-share-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.story-share-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.story-share-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(5, 6, 10, 0.78);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    cursor: pointer;
}

.story-share-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 348px);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(18, 19, 28, 0.98), rgba(10, 11, 18, 0.98)),
        rgba(12, 12, 18, 0.98);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    transform: translateY(18px) scale(0.96);
    transition: transform 0.24s ease, opacity 0.24s ease;
    overflow-y: auto;
}

.story-share-modal.is-visible .story-share-dialog {
    transform: translateY(0) scale(1);
}

.story-share-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.story-share-kicker {
    margin: 0 0 6px;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(244, 246, 255, 0.58);
}

.story-share-dialog-header h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.05;
    color: #f8f9ff;
}

.story-share-close {
    display: inline-grid;
    place-items: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #f7f8ff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.story-share-close:hover,
.story-share-close:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.story-share-social {
    display: grid;
    grid-auto-flow: row;
    justify-items: center;
    align-content: center;
    gap: 12px;
    min-height: 100px;
    padding: 16px 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #f4f6ff;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.story-share-social > .story-share-social-icon {
    margin-inline: auto;
}

.story-share-social > span:last-child {
    display: block !important;
    width: 100%;
    margin: 0;
    text-align: center;
    line-height: 1.25;
}

.story-share-social:hover,
.story-share-social:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
}

.story-share-social-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(219, 40, 91, 0.2), rgba(109, 57, 209, 0.2));
    color: transparent;
    font-size: 0;
    font-weight: 700;
    overflow: hidden;
}

.story-share-social-icon::before {
    content: "";
    width: 20px;
    height: 20px;
    display: block;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.story-share-grid .story-share-social:nth-child(1) .story-share-social-icon {
    background: rgba(255, 255, 255, 0.08);
}

.story-share-grid .story-share-social:nth-child(1) .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 4h4.2l4.2 6 4.9-6H20l-6.3 7.6L20 20h-4.2l-4.5-6.4L6 20H4l6.3-7.7z'/%3E%3C/svg%3E");
}

.story-share-grid .story-share-social:nth-child(2) .story-share-social-icon {
    background: rgba(24, 119, 242, 0.18);
}

.story-share-grid .story-share-social:nth-child(2) .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231877F2' d='M13.5 20v-6.1h2.5l.4-3h-2.9V9c0-.9.3-1.5 1.6-1.5H16.5V5A18 18 0 0 0 14.4 5C12.3 5 11 6.3 11 8.5v2.4H8.8v3H11V20z'/%3E%3C/svg%3E");
}

.story-share-grid .story-share-social:nth-child(3) .story-share-social-icon {
    background: rgba(255, 87, 0, 0.18);
}

.story-share-grid .story-share-social:nth-child(3) .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='13.8' r='5.8' fill='none' stroke='%23FF5700' stroke-width='1.8'/%3E%3Ccircle cx='9.3' cy='13.1' r='1' fill='%23FF5700'/%3E%3Ccircle cx='14.7' cy='13.1' r='1' fill='%23FF5700'/%3E%3Cpath d='M9 16c.8.6 1.8.9 3 .9s2.2-.3 3-.9' fill='none' stroke='%23FF5700' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M14.8 8 15.5 4.7l3 .7' fill='none' stroke='%23FF5700' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='18.8' cy='6' r='1.1' fill='%23FF5700'/%3E%3C/svg%3E");
}

.story-share-grid .story-share-social:nth-child(4) .story-share-social-icon {
    background: rgba(39, 167, 231, 0.18);
}

.story-share-grid .story-share-social:nth-child(4) .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2327A7E7' d='M20 5 4.8 10.8c-1 .4-1 1.8.1 2.1l3.9 1.2 1.5 4.6c.3 1 1.6 1.2 2.2.4l2.2-2.7 3.8 2.8c.8.6 2 .2 2.2-.8L22 6.8C22.2 5.6 21 4.6 20 5Z'/%3E%3Cpath fill='white' d='m8.9 13.8 8-6.1-6.5 7.6-.2 2.7-1.3-4.2Z' opacity='.88'/%3E%3C/svg%3E");
}

.story-share-grid .story-share-social:nth-child(5) .story-share-social-icon {
    background: rgba(37, 211, 102, 0.18);
}

.story-share-grid .story-share-social:nth-child(5) .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2325D366' d='M12 4.3a7.6 7.6 0 0 0-6.6 11.2L5 19.7l4.3-1.1A7.6 7.6 0 1 0 12 4.3Z'/%3E%3Cpath fill='white' d='M9.5 8.7c-.2-.4-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.4-.2.3-.8.9-.8 2s1 2.3 1.1 2.5c.2.2 1.9 3 4.6 4.1 2.2 1 2.7.8 3.2.7.5-.1 1.5-.6 1.7-1.2.2-.6.2-1 .1-1.1-.1-.1-.4-.2-.9-.4-.5-.2-1.4-.7-1.6-.8-.2-.1-.4-.1-.5.2-.2.3-.6.8-.8.9-.2.2-.3.2-.6.1-.3-.1-1.2-.5-2.3-1.4-.8-.8-1.4-1.7-1.6-2-.2-.3 0-.4.1-.6l.4-.4.2-.5c.1-.2 0-.4 0-.5s-.5-1.6-.8-2.1Z'/%3E%3C/svg%3E");
}

.story-share-grid .story-share-social:nth-child(6) .story-share-social-icon,
.story-share-social.is-sms .story-share-social-icon {
    background: rgba(88, 101, 242, 0.18);
}

.story-share-grid .story-share-social:nth-child(6) .story-share-social-icon::before,
.story-share-social.is-sms .story-share-social-icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235865F2' d='M6.5 6.5h11A2.5 2.5 0 0 1 20 9v6a2.5 2.5 0 0 1-2.5 2.5h-6.2l-3.8 3v-3H6.5A2.5 2.5 0 0 1 4 15V9a2.5 2.5 0 0 1 2.5-2.5Z'/%3E%3Cpath fill='white' d='M8 10.2h8v1.4H8zm0 2.6h5.8v1.4H8z'/%3E%3C/svg%3E");
}

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

.reader-share-shell .story-share-panel {
    left: auto;
    right: 0;
}

body.share-modal-open {
    overflow: hidden;
}

.story-share-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 14px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: #f3f4fa;
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.story-share-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.story-share-feedback {
    padding: 2px 4px 0;
    font-size: 0.82rem;
    text-align: center;
    color: rgba(233, 236, 255, 0.72);
}

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 340px;
    gap: 24px;
    margin: 24px 0;
}

.story-main,
.story-side {
    display: grid;
    gap: 24px;
}

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

.filter-grid .button-row {
    justify-content: flex-start;
}

.list-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
}

@media (max-width: 1100px) {
    .editor-grid,
    .story-layout,
    .studio-shell,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .workspace-summary-grid,
    .workspace-quick-grid,
    .workspace-placement-grid {
        grid-template-columns: 1fr;
    }

    .live-preview-panel,
    .page-context-panel {
        position: static;
    }

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

@media (max-width: 980px) {
    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .genre-filter-shell {
        z-index: 1;
    }

    .sidebar-drawer {
        display: block;
        transform: translateX(calc(-100% - 24px));
        width: min(86vw, var(--drawer-width));
        top: calc(12px + var(--safe-top));
        left: calc(12px + var(--safe-left));
        height: calc(100vh - 24px);
        height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
    }

    body.sidebar-open .sidebar-drawer {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.sidebar-collapsed .sidebar-drawer {
        width: min(86vw, var(--drawer-width));
    }

    body.sidebar-collapsed .brand-title,
    body.sidebar-collapsed .brand-subtitle,
    body.sidebar-collapsed .drawer-group-label,
    body.sidebar-collapsed .drawer-label,
    body.sidebar-collapsed .drawer-status-card p,
    body.sidebar-collapsed .drawer-status-card .button {
        opacity: 1;
        visibility: visible;
    }

    body.sidebar-collapsed .drawer-link {
        grid-template-columns: 42px minmax(0, 1fr);
        justify-items: stretch;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .desktop-topnav {
        display: none;
    }
}

@media (max-width: 900px) {
    .toggle-grid,
    .tip-grid,
    .form-grid,
    .library-card,
    .row-card-preview,
    .two-panel-grid,
    .story-list-grid {
        grid-template-columns: 1fr;
    }

    .row-scroll {
        grid-auto-columns: minmax(220px, 74vw);
    }

    .cinematic-support-grid {
        grid-template-columns: 1fr;
    }

    .workspace-hub-nav {
        display: none;
    }

    .workspace-mobile-menu {
        display: grid;
    }

    .workspace-hub-hero .button-row,
    .workspace-quick-card .button-row,
    .story-list-grid .library-actions {
        width: 100%;
        justify-content: stretch;
    }

    .workspace-hub-hero .button-row > *,
    .workspace-quick-card .button-row > *,
    .story-list-grid .library-actions > * {
        flex: 1 1 calc(50% - 8px);
    }

    .story-list-grid .inline-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
    }

    .story-list-grid .inline-form select {
        min-width: 0;
    }

    .release-carousel-slide,
    .release-carousel-copy {
        min-height: 460px;
    }

    .hero-cinematic,
    .hero-content,
    .cinematic-banner,
    .cinematic-banner-copy {
        min-height: 440px;
    }

    .story-embed iframe,
    .rich-editor-canvas iframe {
        min-height: 240px;
    }

    .hero-fullscreen,
    .hero-cinematic-fullscreen,
    .hero-content-fullscreen {
        min-height: 88vh;
    }

    .hero-content-fullscreen {
        width: min(100% - 56px, 760px);
        padding: 104px 28px 40px;
    }

    body.is-ready .genre-filter-panel {
        width: min(100%, 620px);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1220px);
    }

    .app-header {
        padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 0 calc(12px + var(--safe-left));
    }

    .app-header-inner,
    .footer-inner,
    .button-row,
    .split-heading,
    .library-actions,
    .story-byline,
    .app-header-meta {
        align-items: flex-start;
    }

    .app-header-inner,
    .footer-inner {
        padding: 14px 16px;
    }

    .page-shell,
    .site-footer {
        padding-left: calc(12px + var(--safe-left));
        padding-right: calc(12px + var(--safe-right));
    }

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

    .workspace-hub-hero .button-row > *,
    .workspace-quick-card .button-row > *,
    .story-list-grid .library-actions > * {
        flex-basis: 100%;
    }

    .analytics-hub-actions > *,
    .analytics-article-actions > * {
        flex-basis: 100%;
    }

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

    .page-label {
        display: none;
    }

    .brand-lockup {
        max-width: min(100%, 16rem);
    }

    .brand-copy {
        gap: 2px;
    }

    .public-header-inner {
        position: relative;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
        padding-left: 64px;
        padding-right: 16px;
        min-width: 0;
    }

    .public-header-left {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 57;
    }

    .public-brand-wrap {
        width: 100%;
        justify-content: center;
        min-width: 0;
    }

    .public-header .brand-lockup,
    .public-header .brand-copy {
        justify-items: center;
        text-align: center;
    }

    .public-header-meta,
    .public-topnav {
        width: 100%;
        justify-content: center;
        display: none;
    }

    .release-carousel-copy,
    .cinematic-banner-copy {
        padding: 24px;
        max-width: 100%;
        min-width: 0;
    }

    .release-carousel-controls {
        left: 24px;
        right: 24px;
        justify-content: space-between;
    }

    .cinematic-banner-copy {
        padding: 24px;
        max-width: 100%;
    }

    .release-carousel-copy p,
    .cinematic-banner-copy p,
    .cinematic-support-copy p {
        font-size: 0.92rem;
    }

    .release-carousel .cinematic-banner-actions,
    .cinematic-banner .cinematic-banner-actions {
        display: none;
    }

    .release-mobile-trigger {
        position: absolute;
        inset: 0;
        z-index: 1;
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
        appearance: none;
        cursor: pointer;
    }

    .release-carousel-copy,
    .saved-actions-carousel,
    .release-carousel-controls {
        position: relative;
        z-index: 2;
    }

    .row-scroll {
        grid-auto-columns: minmax(0, calc(100vw - 40px));
        gap: 14px;
        padding-left: 2px;
        padding-right: 2px;
        scroll-padding-inline: 2px;
    }

    .row-story-card {
        min-width: 0;
    }

    .row-story-media {
        aspect-ratio: 4 / 3;
    }

    .row-story-copy {
        padding: 14px;
        gap: 8px;
    }

    .row-story-copy h3 {
        font-size: 1rem;
        line-height: 1.08;
    }

    .row-story-copy p {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .hero-fullscreen,
    .hero-cinematic-fullscreen,
    .hero-content-fullscreen {
        min-height: 78vh;
        min-height: 78svh;
    }

    .hero-content-fullscreen {
        width: calc(100% - 32px);
        padding: 92px 16px 28px;
        max-width: 100%;
    }

    .hero-content-fullscreen h1 {
        font-size: clamp(2.4rem, 9vw, 4rem);
        max-width: 10ch;
        overflow-wrap: anywhere;
    }

    .account-overview-grid {
        grid-template-columns: 1fr;
    }

    .account-library-header,
    .saved-library-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .saved-library-grid {
        grid-template-columns: 1fr;
    }

    .saved-actions-row-card,
    .saved-actions-support-card {
        top: 8px;
        right: 8px;
    }

    .saved-actions-hero,
    .saved-actions-carousel,
    .saved-actions-banner,
    .saved-actions-story-hero {
        top: 12px;
        right: 12px;
    }

    .saved-action-button {
        min-width: 36px;
        min-height: 36px;
        padding: 3px 3px 2px;
        border-radius: 10px;
    }

    .saved-action-icon {
        width: 13px;
        height: 13px;
    }

    .saved-action-button-my_list .saved-action-icon::before {
        width: 11px;
        top: 6px;
    }

    .saved-action-button-my_list .saved-action-icon::after {
        height: 11px;
        left: 6px;
    }

    .saved-action-button-view_later .saved-action-icon::after {
        height: 4px;
        top: 4px;
        left: 6px;
    }

    .saved-action-label {
        font-size: 0.5rem;
    }

    .genre-filter-bar,
    .genre-filter-controls {
        width: 100%;
    }

    .genre-filter-bar {
        flex-wrap: wrap;
    }

    .genre-filter-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .genre-filter-toggle,
    .genre-filter-clear-button {
        flex: 0 0 auto;
        justify-content: center;
    }

    .catalog-search-field {
        width: 0;
        min-width: 0;
    }

    .catalog-header-search-form,
    .catalog-header-search-shell,
    .catalog-header-search-shell.is-open {
        width: 100%;
        flex-basis: 100%;
    }

    .catalog-search-shell {
        flex-basis: 100%;
    }

    .catalog-search-shell.is-open .catalog-search-field {
        width: 100%;
        flex-basis: 100%;
    }

    body.genre-filter-open {
        overflow: hidden;
    }

    body.is-ready .genre-filter-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(5, 5, 9, 0.62);
        backdrop-filter: blur(6px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        z-index: 49;
    }

    body.is-ready .genre-filter-shell.is-open .genre-filter-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.is-ready .genre-filter-panel {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-height: min(72vh, 640px);
        padding: 18px 18px 22px;
        border-radius: 24px 24px 0 0;
        transform: translateY(24px);
        z-index: 50;
        overflow-y: auto;
    }

    body.is-ready .genre-filter-shell.is-open .genre-filter-panel {
        transform: translateY(0);
    }

    .genre-filter-panel-head,
    .genre-filter-actions {
        position: sticky;
        background: rgba(11, 11, 17, 0.96);
    }

    .genre-filter-panel-head {
        top: -18px;
        margin: -18px -18px 0;
        padding: 16px 18px 12px;
        border-bottom: 1px solid var(--line);
        z-index: 1;
    }

    .genre-filter-actions {
        bottom: -22px;
        margin: 0 -18px -22px;
        padding: 12px 18px 18px;
        border-top: 1px solid var(--line);
        justify-content: flex-end;
    }

    .genre-filter-actions .button {
        flex: 1 1 100%;
        justify-content: center;
    }

    .selected-genre-row {
        gap: 8px;
    }

.genre-chip {
        min-height: 30px;
        padding: 7px 12px;
        font-size: 0.84rem;
    }
}

.analytics-filter-panel {
    margin-bottom: 24px;
}

.analytics-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.analytics-filter-form label {
    display: grid;
    gap: 8px;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.analytics-kpi-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    align-content: start;
    overflow: hidden;
}

.analytics-kpi-card span {
    color: var(--muted);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.analytics-kpi-card strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: clamp(1rem, 1.45vw, 1.45rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
    overflow: hidden;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.analytics-stack {
    display: grid;
    gap: 22px;
}

.analytics-stack h3 {
    margin-bottom: 12px;
    font-size: 1rem;
}

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

.analytics-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.analytics-list-row span {
    min-width: 0;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.analytics-list-row strong {
    flex: 0 0 auto;
}

.analytics-list-row-conversion {
    align-items: flex-start;
}

.analytics-list-metrics {
    display: grid;
    gap: 4px;
    justify-items: end;
    text-align: right;
}

.analytics-list-metrics small {
    color: var(--muted);
    font-size: 0.8rem;
}

.analytics-hub-hero {
    margin-bottom: 20px;
}

.analytics-subnav {
    margin-bottom: 20px;
    padding-block: 12px;
}

.analytics-subnav a {
    min-height: 34px;
    padding: 7px 12px;
}

.analytics-subnav-secondary {
    margin-bottom: 18px;
}

.analytics-mobile-menu-secondary {
    margin-bottom: 18px;
}

.analytics-page-stack {
    display: grid;
    gap: 24px;
}

.analytics-anchor-section {
    scroll-margin-top: 110px;
}

.analytics-toolbar-stack {
    display: grid;
    gap: 16px;
}

.analytics-filter-form-extended {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.analytics-filter-note {
    margin: 0;
}

.analytics-section-heading {
    margin-bottom: 18px;
}

.analytics-section-note {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.analytics-section-note .muted {
    margin: 0;
    white-space: nowrap;
}

.analytics-hub-actions {
    align-items: stretch;
}

.analytics-hub-actions > * {
    flex: 0 0 auto;
}

.analytics-article-actions {
    justify-content: flex-end;
}

.analytics-article-meta-grid {
    margin-bottom: 24px;
}

.analytics-story-section-stack {
    display: grid;
    gap: 22px;
}

.analytics-story-anchor {
    scroll-margin-top: 140px;
}

.analytics-story-meta-grid {
    margin-bottom: 24px;
}

.quiz-shell {
    display: grid;
    gap: 22px;
}

.quiz-demographic-card,
.quiz-result-panel,
.quiz-question-panel {
    min-width: 0;
}

.quiz-demographic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.quiz-answer-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.quiz-answer-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}

.quiz-answer-card input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.quiz-result-flags {
    padding-left: 0;
}

.quiz-native-ad {
    display: grid;
}

.quiz-native-ad .ad-slot {
    margin: 0;
}

.quiz-native-ad .ad-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        rgba(10, 10, 16, 0.92);
}

.quiz-native-ad .ad-label {
    letter-spacing: 0.08em;
}

.quiz-comparison-card {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.quiz-comparison-card:first-child {
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 720px) {
    .analytics-filter-form {
        grid-template-columns: 1fr;
    }

    .analytics-kpi-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .analytics-hub-actions,
    .analytics-article-actions,
    .analytics-section-note {
        width: 100%;
        justify-content: stretch;
    }

    .analytics-hub-actions > *,
    .analytics-article-actions > * {
        flex: 1 1 calc(50% - 8px);
    }

    .analytics-section-note .muted {
        white-space: normal;
    }

    .quiz-demographic-grid {
        grid-template-columns: 1fr;
    }

    .plugin-widget-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .plugin-upload-panel {
        grid-template-columns: 1fr;
    }

    .story-share-panel {
        left: 0;
        right: auto;
        min-width: min(18rem, calc(100vw - 3rem));
        max-width: calc(100vw - 3rem);
    }
}

.notification-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(246, 53, 110, 0.95), rgba(126, 60, 232, 0.9));
    color: #fff;
    font-size: 0.74rem;
    line-height: 1;
    font-weight: 700;
}

.desktop-notification-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.contact-page-shell {
    display: grid;
    gap: 18px;
    padding-bottom: 40px;
}

.contact-hero-panel,
.contact-form-panel {
    overflow: hidden;
}

.contact-hero-panel {
    display: grid;
    gap: 14px;
    padding: clamp(22px, 3.4vw, 34px);
    background:
        radial-gradient(circle at top right, rgba(122, 32, 64, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(16, 16, 23, 0.98), rgba(10, 10, 15, 0.94));
}

.contact-hero-panel-application {
    background:
        radial-gradient(circle at top right, rgba(126, 60, 232, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(16, 16, 23, 0.98), rgba(10, 10, 15, 0.94));
}

.contact-hero-copy {
    max-width: 700px;
    display: grid;
    gap: 10px;
}

.contact-hero-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.contact-hero-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-form-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.contact-ticket-form,
.application-ticket-form {
    display: grid;
    gap: 18px;
}

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

.contact-request-select,
.contact-application-route-panel {
    max-width: 760px;
}

.contact-request-select {
    display: grid;
    gap: 8px;
}

.contact-request-select select {
    min-height: 52px;
}

.contact-application-route-panel {
    display: none;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(126, 60, 232, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.025);
}

.contact-application-route-panel.is-active {
    display: grid;
}

.contact-application-route-panel h3 {
    margin: 0;
    font-size: 1.05rem;
}

.contact-ticket-form label,
.application-ticket-form label {
    display: grid;
    gap: 8px;
}

.contact-dynamic-fields {
    display: none;
    gap: 16px;
    padding-top: 4px;
}

.contact-dynamic-fields.is-active {
    display: grid;
}

.contact-check-field {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.contact-check-field input {
    margin-top: 3px;
}

.contact-check-field-admin {
    padding: 12px 14px;
}

.contact-form-actions {
    padding-top: 8px;
}

.contact-form-actions.is-hidden {
    display: none;
}

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

.ticket-list-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
}

.ticket-list-card.is-unread {
    border-color: rgba(246, 53, 110, 0.22);
    box-shadow: inset 0 0 0 1px rgba(246, 53, 110, 0.08);
}

.quiz-builder-grid {
    align-items: start;
}

.quiz-builder-grid .panel {
    min-width: 0;
}

.quiz-inline-row,
.quiz-profile-card,
.quiz-question-card {
    display: grid;
    align-items: start;
    justify-content: stretch;
}

.quiz-inline-row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
}

.quiz-profile-card {
    grid-template-columns: minmax(220px, 1.35fr) minmax(150px, 0.85fr) minmax(110px, 0.5fr) minmax(150px, 0.7fr);
}

.quiz-profile-card textarea,
.quiz-question-card textarea {
    grid-column: 1 / -2;
    min-width: 0;
}

.quiz-inline-row input,
.quiz-profile-card input,
.quiz-profile-card select,
.quiz-profile-card textarea,
.quiz-question-card input,
.quiz-question-card textarea,
.quiz-option-grid input {
    min-width: 0;
}

.quiz-inline-row [data-remove-row],
.quiz-profile-card [data-remove-row] {
    align-self: stretch;
    min-height: 48px;
    white-space: nowrap;
}

.quiz-question-card {
    gap: 14px;
}

.quiz-question-card > input,
.quiz-question-card > textarea {
    width: 100%;
}

.quiz-option-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(96px, 0.4fr) minmax(0, 1.1fr);
    gap: 12px;
    align-items: center;
}

.quiz-option-grid input[type="number"] {
    text-align: center;
}

.quiz-question-card [data-remove-row] {
    justify-self: end;
    min-width: 120px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .quiz-inline-row,
    .quiz-profile-card,
    .quiz-option-grid {
        grid-template-columns: 1fr;
    }

    .quiz-profile-card textarea,
    .quiz-question-card textarea {
        grid-column: auto;
    }

    .quiz-inline-row [data-remove-row],
    .quiz-profile-card [data-remove-row],
    .quiz-question-card [data-remove-row] {
        justify-self: stretch;
    }
}

.ticket-list-main {
    display: grid;
    gap: 10px;
}

.ticket-list-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-list-main h3 {
    margin: 0;
}

.ticket-list-main h3 a {
    color: inherit;
    text-decoration: none;
}

.ticket-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
    gap: 22px;
}

.ticket-detail-main,
.ticket-detail-side {
    display: grid;
    gap: 18px;
}

.ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.ticket-meta-grid div {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-meta-grid dt {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticket-meta-grid dd {
    margin: 0;
    color: var(--text);
}

.ticket-meta-grid-detail dd {
    white-space: normal;
    overflow-wrap: anywhere;
}

.ticket-message-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-message-body {
    line-height: 1.7;
    color: var(--text-soft);
}

.ticket-thread-list {
    display: grid;
    gap: 14px;
}

.ticket-thread-item {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.ticket-thread-item-admin {
    border-color: rgba(126, 60, 232, 0.16);
    background: rgba(126, 60, 232, 0.08);
}

.ticket-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
}

.member-inbox-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.35fr);
    gap: 22px;
}

.member-inbox-list {
    display: grid;
    gap: 14px;
}

.member-inbox-item {
    display: grid;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.member-inbox-item.is-unread {
    border-color: rgba(246, 53, 110, 0.18);
    box-shadow: inset 0 0 0 1px rgba(246, 53, 110, 0.06);
}

.member-inbox-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.member-inbox-item-head strong {
    font-size: 0.98rem;
}

.member-inbox-item-head span {
    color: var(--muted);
    font-size: 0.8rem;
}

.member-inbox-thread {
    display: grid;
    gap: 16px;
}

.reader-body {
    background:
        radial-gradient(circle at top center, rgba(124, 34, 63, 0.16), transparent 24%),
        radial-gradient(circle at 50% 18%, rgba(88, 52, 151, 0.12), transparent 30%),
        linear-gradient(180deg, #06060a 0%, #090910 38%, #07070c 100%);
    color: #ebeef8;
    overflow-x: hidden;
}

.reader-shell {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 18px 20px 72px;
    display: grid;
    gap: 20px;
}

.reader-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 12px 0 0;
    background: linear-gradient(180deg, rgba(7, 7, 11, 0.82), rgba(7, 7, 11, 0.34), transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.reader-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: 32px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: #f1f2f7;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.reader-home-link:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
}

.reader-home-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

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

.reader-stage {
    position: relative;
    width: min(100%, 880px);
    margin: 0 auto;
}

.reader-stage-glow {
    position: absolute;
    inset: -18px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top, rgba(214, 31, 74, 0.12), transparent 36%),
        radial-gradient(circle at bottom right, rgba(109, 57, 209, 0.12), transparent 42%);
    filter: blur(14px);
    opacity: 0.9;
    pointer-events: none;
}

.reader-stage-panel {
    position: relative;
    display: grid;
    gap: 20px;
    padding: clamp(20px, 3vw, 30px);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
        rgba(10, 10, 15, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.reader-intro {
    display: grid;
    gap: 14px;
    width: min(100%, 720px);
    margin: 0 auto;
}

.reader-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.reader-summary {
    margin: 0;
    color: #cfd5e6;
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 58ch;
}

.reader-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 0.82rem;
}

.reader-meta-author {
    min-width: 0;
    flex: 1 1 auto;
}

.reader-content {
    width: min(100%, 690px);
    margin: 0 auto;
    padding: 0;
}

.reader-content.story-content p,
.reader-content.story-content ul,
.reader-content.story-content ol,
.reader-content.story-content blockquote,
.reader-content.story-content figure,
.reader-content.story-content pre {
    margin-bottom: 1.65rem;
}

.reader-content.story-content {
    font-size: clamp(1.02rem, 1rem + 0.3vw, 1.12rem);
    line-height: 1.96;
    color: #eff1f7;
    letter-spacing: 0.005em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.reader-content.story-content > * {
    max-width: 100%;
    min-width: 0;
}

.reader-content.story-content h2,
.reader-content.story-content h3,
.reader-content.story-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.reader-content.story-content h2 {
    font-size: clamp(1.7rem, 2vw, 2.35rem);
}

.reader-content.story-content h3 {
    font-size: clamp(1.35rem, 1.7vw, 1.9rem);
}

.reader-content.story-content img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    margin: 0 auto;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.3);
}

.reader-content.story-content a,
.reader-content.story-content figcaption,
.reader-content.story-content li,
.reader-content.story-content p {
    overflow-wrap: anywhere;
}

.reader-content.story-content pre,
.reader-content.story-content table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.reader-content.story-content table {
    display: block;
    width: 100%;
}

.reader-content.story-content iframe,
.reader-content.story-content video,
.reader-content.story-content audio {
    width: 100%;
    max-width: 100%;
    display: block;
}

.reader-content.story-content figure {
    display: grid;
    gap: 10px;
}

.reader-content.story-content figcaption {
    color: #b9bfd3;
    font-size: 0.84rem;
    text-align: center;
}

.reader-content.story-content blockquote {
    margin-left: 0;
    padding: 1rem 1.15rem;
    border-left: 3px solid rgba(214, 31, 74, 0.55);
    border-radius: 0 16px 16px 0;
    background: rgba(255, 255, 255, 0.025);
    color: #e7e9f2;
}

.reader-content.story-content ul,
.reader-content.story-content ol {
    padding-left: 1.35rem;
}

.reader-ad-page .reader-content.story-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44vh;
}

.reader-interstitial-card {
    width: min(100%, 34rem);
    margin: 0 auto;
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(214, 31, 74, 0.08), transparent 36%),
        radial-gradient(circle at bottom left, rgba(109, 57, 209, 0.09), transparent 34%),
        rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.reader-interstitial-copy {
    display: grid;
    gap: 10px;
    text-align: center;
}

.reader-interstitial-copy h2,
.reader-interstitial-copy p {
    margin-bottom: 0;
}

.reader-interstitial-copy p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.reader-interstitial-card .ad-slot {
    margin: 0;
}

.reader-interstitial-card .ad-slot-inner {
    display: grid;
}

.reader-interstitial-card .ad-card {
    width: 100%;
}

.reader-interstitial-card .ad-label {
    align-self: start;
}

.reader-ad-support-required.reader-ad-check-pending .reader-content.story-content,
.reader-ad-support-required.reader-ad-check-pending .reader-pager,
.reader-ad-support-required.reader-ad-check-pending .reader-afterword,
.reader-ad-support-required.reader-adblock-gated .reader-content.story-content,
.reader-ad-support-required.reader-adblock-gated .reader-pager,
.reader-ad-support-required.reader-adblock-gated .reader-afterword {
    display: none;
}

.reader-adblock-gate {
    width: min(100%, 760px);
    margin: 0 auto 18px;
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(214, 31, 74, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(109, 57, 209, 0.15), transparent 30%),
        rgba(255, 255, 255, 0.028);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

.reader-adblock-gate h2,
.reader-adblock-gate p {
    margin-bottom: 0;
}

.reader-adblock-note {
    color: var(--muted);
}

.reader-adblock-bait {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

.reader-gate,
.reader-empty {
    width: min(100%, 720px);
    margin: 0 auto;
    display: grid;
    gap: 14px;
    padding: 22px 24px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.reader-pager {
    width: min(100%, 690px);
    margin: 0 auto;
    padding-top: 8px;
}

.reader-pager-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.reader-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
}

.reader-page-chip,
.reader-page-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
    color: #c8cede;
    font-size: 0.76rem;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.reader-page-chip.is-active {
    color: #f4f5fb;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.reader-page-control:hover {
    color: #f4f5fb;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
}

.reader-page-control.is-primary {
    border-color: rgba(214, 31, 74, 0.16);
    background: linear-gradient(135deg, rgba(214, 31, 74, 0.1), rgba(109, 57, 209, 0.09));
}

.reader-page-control.is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

.reader-afterword {
    width: min(100%, 1160px);
    margin: 0 auto;
    padding-top: 18px;
    display: grid;
    gap: 20px;
}

.continue-reading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.continue-reading-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    padding: 14px;
}

.continue-reading-media {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    min-height: 100%;
}

.continue-reading-media img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
}

.continue-reading-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 170px;
    background: linear-gradient(135deg, rgba(214, 31, 74, 0.14), rgba(109, 57, 209, 0.14));
    color: #f5f7fb;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.continue-reading-copy {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.continue-reading-copy h3,
.continue-reading-copy p {
    margin-bottom: 0;
}

.continue-reading-copy p {
    color: var(--muted);
}

.continue-reading-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.continue-reading-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(214, 31, 74, 0.9), rgba(109, 57, 209, 0.9));
}

.continue-reading-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .account-hero-panel,
    .contact-form-grid,
    .ticket-detail-grid,
    .ticket-meta-grid,
    .member-inbox-grid,
    .account-overview-grid,
    .account-detail-grid {
        grid-template-columns: 1fr;
    }

    .ticket-list-card {
        grid-template-columns: 1fr;
    }

    .account-subnav {
        top: 74px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .account-subnav::-webkit-scrollbar {
        display: none;
    }

    .account-subnav-link {
        white-space: nowrap;
    }

    .account-section-heading,
    .account-library-header,
    .saved-library-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .reader-shell {
        padding-inline: 14px;
    }

    .reader-topbar {
        align-items: flex-start;
        flex-direction: row;
        padding: calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 2px calc(14px + env(safe-area-inset-left));
    }

    .reader-stage-panel {
        padding: 18px calc(16px + env(safe-area-inset-right)) 18px calc(16px + env(safe-area-inset-left));
        border-radius: 24px;
    }

    .reader-pager-rail {
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .reader-page-numbers {
        justify-content: center;
    }

    .continue-reading-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .reader-meta {
        flex-wrap: nowrap;
    }

    .reader-meta-author {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .reader-share-shell .story-share-panel {
        left: auto;
        right: 0;
    }

    .story-share-modal {
        padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
    }

    .story-share-dialog {
        width: min(100%, 360px);
        max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding: 18px;
        border-radius: 22px;
    }

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

@media (max-width: 640px) {
    html,
    .reader-body.reader-immersive-page {
        min-height: 100svh;
    }

    .reader-body.reader-immersive-page {
        overflow: hidden;
    }

    .reader-shell {
        width: 100%;
        padding: 8px 0 18px;
        gap: 16px;
    }

    .reader-body.reader-immersive-page .reader-shell {
        min-height: 100svh;
        grid-template-rows: auto 1fr;
    }

    .reader-topbar {
        padding: calc(8px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 2px calc(14px + env(safe-area-inset-left));
    }

    .reader-body.reader-immersive-page .reader-article {
        min-height: 0;
    }

    .reader-body.reader-immersive-page .reader-stage {
        width: 100%;
        min-height: 0;
    }

    .reader-stage-glow,
    .reader-body.reader-immersive-page .reader-stage-glow {
        display: none;
    }

    .reader-body.reader-immersive-page .reader-stage-panel {
        display: flex;
        flex-direction: column;
        min-height: calc(100svh - 56px);
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        box-shadow: none;
        background:
            linear-gradient(180deg, rgba(11, 11, 17, 0.98), rgba(8, 8, 13, 0.98)),
            rgba(10, 10, 15, 0.98);
    }

    .reader-body.reader-immersive-page .reader-intro {
        width: 100%;
        max-width: none;
    }

    .reader-body.reader-immersive-page .reader-content {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        min-height: 0;
    }

    .reader-body.reader-immersive-page .reader-pager {
        width: 100%;
        margin-top: auto;
        position: sticky;
        bottom: 0;
        z-index: 3;
        padding-top: 8px;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
        background: linear-gradient(180deg, rgba(8, 8, 13, 0), rgba(8, 8, 13, 0.96) 34%, rgba(8, 8, 13, 0.99) 100%);
    }

    .reader-home-link {
        min-height: 30px;
        width: 30px;
    }

    .reader-stage-glow {
        inset: -10px;
    }

    .reader-stage-panel {
        gap: 16px;
        padding: 16px calc(14px + env(safe-area-inset-right)) 16px calc(14px + env(safe-area-inset-left));
        border-radius: 22px;
    }

    .reader-intro {
        gap: 12px;
    }

    .reader-intro h1 {
        font-size: clamp(1.7rem, 9vw, 2.35rem);
        line-height: 1.02;
    }

    .reader-summary {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .reader-content {
        width: 100%;
    }

    .reader-content.story-content {
        font-size: 1rem;
        line-height: 1.9;
    }

    .reader-body.reader-device-mobile .reader-content.story-content p,
    .reader-body.reader-device-mobile .reader-content.story-content ul,
    .reader-body.reader-device-mobile .reader-content.story-content ol,
    .reader-body.reader-device-mobile .reader-content.story-content blockquote,
    .reader-body.reader-device-mobile .reader-content.story-content figure,
    .reader-body.reader-device-mobile .reader-content.story-content pre {
        margin-bottom: 1.25rem;
    }

    .reader-body.reader-device-mobile .reader-content.story-content h2,
    .reader-body.reader-device-mobile .reader-content.story-content h3,
    .reader-body.reader-device-mobile .reader-content.story-content h4 {
        margin-top: 1.9rem;
        margin-bottom: 0.8rem;
    }

    .reader-content.story-content img {
        border-radius: 14px;
    }

    .reader-ad-page .reader-content.story-content {
        min-height: calc(100svh - 220px);
    }

    .reader-interstitial-card {
        width: 100%;
        padding: 18px;
        border-radius: 20px;
    }

    .reader-interstitial-copy h2 {
        font-size: 1.25rem;
    }

    .reader-adblock-gate {
        padding: 18px;
        border-radius: 20px;
    }

    .reader-pager {
        width: 100%;
    }

    .reader-pager-rail {
        gap: 10px;
        padding: 0 calc(14px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding-top: 10px;
    }

    .reader-page-chip,
    .reader-page-control {
        min-height: 28px;
        padding: 0 9px;
        font-size: 0.72rem;
        border-radius: 10px;
    }

    .reader-page-numbers {
        flex: 0 0 auto;
    }

    .reader-page-control {
        min-width: 60px;
    }

    .continue-reading-grid {
        grid-template-columns: 1fr;
    }

    .continue-reading-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
    }

    .continue-reading-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
