:root {
    color-scheme: dark;
    --font-sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --bg: #000000;
    --bg-elevated: #000000;
    --surface: #090909;
    --surface-2: #111111;
    --surface-3: #1a1a1a;
    --surface-soft: rgba(17, 17, 17, 0.72);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f7f7f7;
    --muted: #9a9a9a;
    --muted-strong: #d6d6d6;
    --accent: #e91d35;
    --accent-2: #ff4358;
    --accent-3: #ff7a8a;
    --accent-soft: rgba(233, 29, 53, 0.16);
    --success: #54d299;
    --danger: #ff7676;
    --warning: #ffc85e;
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.24);
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.16);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --content-width: 100%;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #eef3f9;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #edf2f8;
    --surface-soft: rgba(255, 255, 255, 0.8);
    --line: rgba(21, 42, 66, 0.1);
    --line-strong: rgba(21, 42, 66, 0.18);
    --text: #102132;
    --muted: #5d6f83;
    --muted-strong: #304255;
    --accent: #d91f35;
    --accent-2: #f04457;
    --accent-3: #fb7185;
    --accent-soft: rgba(217, 31, 53, 0.1);
    --success: #1f9a5d;
    --danger: #d84d57;
    --warning: #c08d10;
    --shadow-lg: 0 28px 80px rgba(35, 63, 92, 0.16);
    --shadow-md: 0 16px 40px rgba(35, 63, 92, 0.12);
    --shadow-sm: 0 10px 24px rgba(35, 63, 92, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    transition:
        background-color 220ms ease,
        color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
    overflow-x: hidden;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at top left, rgba(19, 125, 159, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(239, 108, 67, 0.08), transparent 26%),
        linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 28%, var(--bg) 100%);
}

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

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

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

button {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(233, 29, 53, 0.32);
}

.page-shell {
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    width: calc(100% - 28px);
    margin: 18px auto 0;
    padding: 16px 22px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow-sm);
    transition:
        width 260ms cubic-bezier(0.22, 1, 0.36, 1),
        padding 260ms cubic-bezier(0.22, 1, 0.36, 1),
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.sidebar-head {
    display: contents;
    transition:
        padding 240ms ease,
        border-color 180ms ease;
}

.brand-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
        gap 220ms ease,
        justify-content 220ms ease;
}

.brand-orb {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 40% 32%, #ffffff 0 18%, transparent 19%),
        linear-gradient(180deg, var(--accent-2), #bb4222);
    box-shadow: 0 0 0 4px rgba(233, 29, 53, 0.18);
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(159, 115, 255, 0.35);
    border-radius: 15px;
    object-fit: cover;
    object-position: center 34%;
    background: #000;
    box-shadow:
        0 0 0 5px rgba(115, 103, 255, 0.08),
        0 14px 30px rgba(115, 103, 255, 0.22);
}

.brand-text {
    white-space: nowrap;
}

.sidebar-toggle {
    min-width: 0;
    display: none;
    transition:
        padding 220ms ease,
        border-radius 220ms ease,
        background-color 180ms ease,
        color 180ms ease;
}

.sidebar-toggle-icon,
.nav-icon {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.sidebar-toggle-icon {
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-toggle-icon svg,
.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-label,
.sidebar-toggle-label {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
    transition:
        max-width 240ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 160ms ease,
        transform 220ms ease;
}

.brand-text {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    transition:
        max-width 240ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 160ms ease,
        transform 220ms ease;
}

.sidebar-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.sidebar-nav a,
.admin-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease,
        border-color 180ms ease,
        gap 220ms ease,
        padding 240ms cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 220ms ease;
}

.sidebar-nav a:hover,
.admin-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.sidebar-nav a.active,
.admin-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: 0 10px 24px rgba(233, 29, 53, 0.24);
}

html[data-theme="light"] .sidebar-nav a.active,
html[data-theme="light"] .admin-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #ff4358);
}

.sidebar-foot {
    display: flex;
    justify-content: flex-end;
}

.sidebar-search {
    width: 100%;
}

.main-shell {
    width: calc(100% - 28px);
    margin: 20px auto 48px;
    transition:
        margin 260ms cubic-bezier(0.22, 1, 0.36, 1),
        width 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 981px) {
    .sidebar {
        position: fixed;
        top: 20px;
        left: 18px;
        bottom: 20px;
        width: 232px;
        margin: 0;
        padding: 18px;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 14px;
        border-radius: 30px;
    }

    .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 6px 4px 18px;
        border-bottom: 1px solid var(--line);
    }

    .brand-mini {
        flex: 1 1 auto;
        min-width: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        width: 48px;
        min-height: 48px;
        padding: 0;
        border-radius: 16px;
    }

    .sidebar-nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
    }

    .sidebar-nav a {
        justify-content: flex-start;
        min-height: 48px;
        padding-inline: 16px;
        border-radius: 18px;
    }

    .sidebar-foot {
        margin-top: auto;
        justify-content: stretch;
    }

    .main-shell {
        width: auto;
        margin: 20px 14px 48px 268px;
    }

    html[data-sidebar="collapsed"] .sidebar {
        width: 88px;
        padding: 18px 12px;
        overflow: hidden;
    }

    html[data-sidebar="collapsed"] .sidebar-head {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding-inline: 0;
    }

    html[data-sidebar="collapsed"] .brand-mini {
        justify-content: center;
        flex: 0 0 auto;
    }

    html[data-sidebar="collapsed"] .brand-text,
    html[data-sidebar="collapsed"] .nav-label,
    html[data-sidebar="collapsed"] .sidebar-toggle-label {
        max-width: 0;
        opacity: 0;
        transform: translateX(-8px);
        pointer-events: none;
    }

    html[data-sidebar="collapsed"] .sidebar-nav a,
    html[data-sidebar="collapsed"] .sidebar-search,
    html[data-sidebar="collapsed"] .sidebar-toggle {
        justify-content: center;
        gap: 0;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 48px;
        padding-inline: 0;
        margin-inline: auto;
    }

    html[data-sidebar="collapsed"] .sidebar-nav a {
        border-radius: 18px;
    }

html[data-sidebar="collapsed"] .sidebar-toggle-icon {
    transform: rotate(180deg);
}

html[data-sidebar="collapsed"] .brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 18px;
}

html[data-sidebar="collapsed"] .main-shell {
    margin-left: 124px;
}
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 4px 0;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.8rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1;
    text-transform: none;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.topbar-brand img {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid rgba(159, 115, 255, 0.34);
    border-radius: 16px;
    object-fit: cover;
    object-position: center 34%;
    background: #000;
    box-shadow:
        0 0 0 5px rgba(115, 103, 255, 0.07),
        0 14px 30px rgba(115, 103, 255, 0.18);
}

.topbar-brand span {
    background: linear-gradient(90deg, #fff 0%, #d9d3ff 48%, #8b6dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.topbar-title {
    margin: 0;
    max-width: 600px;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.4vw, 2.45rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: 0;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.flash {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: opacity 180ms ease, transform 180ms ease;
}

.flash.success {
    border-color: rgba(84, 210, 153, 0.28);
    background: linear-gradient(180deg, rgba(84, 210, 153, 0.14), rgba(84, 210, 153, 0.08)), var(--surface);
}

.flash.error {
    border-color: rgba(255, 118, 118, 0.28);
    background: linear-gradient(180deg, rgba(255, 118, 118, 0.14), rgba(255, 118, 118, 0.08)), var(--surface);
}

.content-shell {
    display: grid;
    gap: 28px;
    padding-top: 24px;
}

.section-block.home-sections {
    padding: 0;
    overflow: hidden;
    background: #000000;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-subsection {
    padding: 34px 24px 42px;
}

.home-subsection + .home-subsection {
    border-top: 0;
}

.home-subsection.filter-strip-home {
    display: none;
}

html[data-theme="light"] .section-block.home-sections {
    background: #050505;
}

html[data-theme="light"] .home-subsection + .home-subsection {
    border-top-color: rgba(21, 42, 66, 0.08);
}

.home-sections .filter-strip,
.home-sections .vip-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.home-sections .split-layout-showcase {
    display: block;
}

.home-sections .vip-panel-featured {
    display: none;
}

.home-sections .filter-strip {
    padding: 28px;
}

.home-sections .section-head {
    align-items: center;
    margin-bottom: 22px;
}

.home-sections .section-copy .eyebrow {
    display: none;
}

.home-sections .section-head h3 {
    position: relative;
    padding-left: 24px;
    color: #ffffff;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.home-sections .section-head h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 30px;
    border-radius: 999px;
    background: #ff1f32;
    transform: translateY(-50%);
    box-shadow: 0 0 16px rgba(255, 31, 50, 0.42);
}

.home-sections .section-link {
    min-height: auto;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, 0.36);
    background: transparent;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-sections .section-link::after {
    content: "›";
    margin-left: 8px;
    font-size: 1.25rem;
    line-height: 1;
}

.home-sections .section-link:hover {
    color: #ffffff;
    transform: none;
    background: transparent;
}

.primary-button,
.ghost-button,
.danger-button,
.search-button,
.section-link,
.vip-pill,
.user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: 0 14px 26px rgba(233, 29, 53, 0.24);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(233, 29, 53, 0.3);
}

.ghost-button,
.search-button,
.section-link,
.user-pill,
.theme-toggle {
    color: var(--text);
    background: var(--surface);
    border-color: var(--line);
}

.ghost-button:hover,
.search-button:hover,
.section-link:hover,
.user-pill:hover,
.theme-toggle:hover {
    transform: translateY(-1px);
    background: var(--surface-2);
    border-color: var(--line-strong);
}

.danger-button {
    color: #fff;
    background: linear-gradient(135deg, var(--danger), #ff8f8f);
    box-shadow: 0 12px 24px rgba(255, 118, 118, 0.2);
}

.danger-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(255, 118, 118, 0.24);
}

.primary-button.small,
.ghost-button.small,
.danger-button.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
}

.wide {
    width: 100%;
}

.theme-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent-soft);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.vip-pill {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: 0 12px 24px rgba(233, 29, 53, 0.22);
}

.vip-pill.is-live {
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: 0 12px 24px rgba(233, 29, 53, 0.22);
}

.avatar-chip,
.avatar-large {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
}

.avatar-chip {
    width: 40px;
    height: 40px;
    border-radius: 14px;
}

.avatar-large {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    font-size: 2rem;
    box-shadow: var(--shadow-sm);
}

.floating-share {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 25;
    width: 68px;
    height: 68px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #08111a;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: var(--shadow-md);
}

.section-block,
.profile-card,
.admin-panel,
.detail-hero,
.hero-cover-card,
.manga-card,
.chapter-card,
.vip-panel,
.plan-card,
.request-card,
.payment-app-card,
.search-panel,
.reader-top,
.reader-bottom {
    background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 84%, var(--surface-2)) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.section-block,
.profile-card,
.admin-panel {
    padding: 26px;
}

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

.section-head h2,
.section-head h3 {
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

.section-head h2 {
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}

.section-head h3 {
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
}

.section-head.centered {
    justify-content: center;
    text-align: center;
}

.section-copy {
    max-width: 700px;
}

.muted,
.section-copy .muted,
.catalog-summary,
.mini-row p,
.manga-card p,
.chapter-card p,
.vip-row p,
.hero-description,
.detail-description,
.small-copy,
.payment-row span,
.detail-fact span {
    color: var(--muted);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: min(76vh, 760px);
    padding: clamp(30px, 5vw, 54px);
    border-radius: 36px;
    border: 1px solid var(--line);
    background:
        linear-gradient(115deg, rgba(8, 17, 26, 0.92) 0%, rgba(8, 17, 26, 0.72) 48%, rgba(8, 17, 26, 0.3) 100%),
        linear-gradient(135deg, rgba(233, 29, 53, 0.18), rgba(255, 67, 88, 0.14)),
        center/cover no-repeat;
    box-shadow: var(--shadow-lg);
}

html[data-theme="light"] .hero {
    background:
        linear-gradient(115deg, rgba(245, 248, 252, 0.92) 0%, rgba(245, 248, 252, 0.78) 48%, rgba(245, 248, 252, 0.36) 100%),
        linear-gradient(135deg, rgba(19, 125, 159, 0.12), rgba(239, 108, 67, 0.12)),
        center/cover no-repeat;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(255, 67, 88, 0.14), transparent 30%);
    pointer-events: none;
}

.hero-carousel {
    padding: 0 0 120px;
    background: #090d12;
}

.hero-slider {
    position: relative;
    min-height: min(76vh, 760px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide-media {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.02);
}

.hero-slide .hero-grid {
    position: relative;
    z-index: 2;
    min-height: min(76vh, 760px);
    padding: clamp(30px, 5vw, 54px);
}

.hero-carousel .hero-backdrop {
    z-index: 1;
    background:
        linear-gradient(115deg, rgba(3, 7, 12, 0.92) 0%, rgba(3, 7, 12, 0.76) 46%, rgba(3, 7, 12, 0.34) 100%),
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255, 67, 88, 0.12), transparent 28%);
}

.hero-thumb-row {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    padding-right: 6px;
}

.hero-thumb {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    min-width: 64px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        width 220ms ease;
}

.hero-thumb:hover {
    transform: translateY(-1px);
}

.hero-thumb.is-active {
    width: 92px;
}

.hero-thumb-bar {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.hero-thumb.is-active .hero-thumb-bar {
    background: linear-gradient(135deg, var(--accent), #ff4358);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 20px rgba(233, 29, 53, 0.3);
}

html[data-theme="light"] .hero-thumb-bar {
    background: rgba(16, 33, 50, 0.18);
}

html[data-theme="light"] .hero-thumb.is-active .hero-thumb-bar {
    background: linear-gradient(135deg, var(--accent), #68b9d2);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    align-items: end;
    gap: 36px;
    min-height: 100%;
}

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

.hero-copy {
    max-width: 760px;
}

.hero-badge-row,
.card-meta,
.hero-cover-meta,
.detail-meta-strip,
.profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badge,
.tag,
.profile-id-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.hero-badge {
    color: #08111a;
    background: linear-gradient(135deg, var(--accent), #9cf7f0);
    border: none;
}

.hero-badge-muted,
.profile-id-badge,
.tag,
.status-badge {
    color: var(--muted-strong);
}

.tag.vip,
.plan-badge,
.status-badge.pending {
    color: #08111a;
    border: none;
    background: linear-gradient(135deg, var(--warning), #ffd979);
}

.tag.read {
    color: #062015;
    border: none;
    background: linear-gradient(135deg, #53e2a1, #9ef5c8);
}

.status-badge.approved {
    color: #08111a;
    border: none;
    background: linear-gradient(135deg, var(--success), #86efb7);
}

.status-badge.rejected,
.status-badge.cancelled {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #d55769, #f07f8d);
}

.vip-badge-live {
    color: #08111a;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), #9cf7f0);
}

.hero h2,
.detail-copy h2,
.catalog-head h2,
.profile-main-card h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.2vw, 4.25rem);
    line-height: 0.94;
    letter-spacing: -0.06em;
}

.catalog-head h2,
.detail-copy h2,
.profile-main-card h2 {
    font-size: clamp(1.7rem, 3.8vw, 3rem);
}

.hero-description {
    max-width: 620px;
    margin: 22px 0 0;
    font-size: 0.98rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-stat-list,
.profile-stats,
.stat-grid,
.detail-facts {
    display: grid;
    gap: 14px;
}

.hero-stat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px;
}

.hero-stat,
.profile-stats > div,
.stat-card,
.detail-fact {
    padding: 16px 18px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface-2) 86%, transparent);
    border: 1px solid var(--line);
}

.hero-stat strong,
.profile-stats strong,
.stat-card strong,
.detail-fact strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.hero-spotlight {
    display: flex;
    justify-content: flex-end;
}

.hero-cover-card {
    width: min(100%, 340px);
    padding: 16px;
}

.hero-cover-card img,
.detail-cover,
.manga-card > a img,
.chapter-card img,
.vip-row img,
.mini-row img,
.reader-page img {
    width: 100%;
    object-fit: cover;
}

.hero-cover-card img {
    aspect-ratio: 3 / 4.1;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.hero-cover-card h3,
.manga-card h4,
.vip-row h4,
.chapter-card h4,
.payment-app-card h4 {
    margin: 0;
}

.hero-cover-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.filter-strip,
.catalog-filter,
.search-inline {
    display: grid;
    gap: 14px;
}

.filter-strip {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    padding: 24px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    box-shadow: var(--shadow-sm);
}

.search-inline {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(160px, 0.5fr)) auto;
}

.catalog-filter {
    grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(150px, 0.46fr)) auto;
}

.search-inline-home {
    align-self: end;
}

label {
    display: grid;
    gap: 10px;
}

label > span {
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    color: var(--text);
    background: color-mix(in srgb, var(--surface-2) 84%, transparent);
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

textarea {
    min-height: 132px;
    padding-top: 14px;
    padding-bottom: 14px;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

select {
    appearance: none;
    padding-right: 46px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 23px) calc(50% - 3px),
        calc(100% - 17px) calc(50% - 3px);
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(233, 29, 53, 0.6);
    box-shadow: 0 0 0 4px rgba(233, 29, 53, 0.14);
}

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

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 24px;
}

.inline-check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

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

.split-layout-showcase {
    align-items: start;
}

.section-block-showcase {
    padding: 28px;
}

.manga-grid,
.chapter-grid,
.payment-app-grid {
    display: grid;
    gap: 18px;
}

.manga-grid-spotlight {
    grid-template-columns: repeat(auto-fill, minmax(210px, 210px));
    justify-content: flex-start;
}

.manga-grid.compact,
.catalog-results {
    grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
    justify-content: flex-start;
}

.chapter-grid-featured {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.home-sections .chapter-grid,
.home-sections .manga-grid,
.home-sections .manga-grid.compact,
.home-sections .manga-grid-spotlight,
.home-sections .chapter-grid-featured {
    display: flex;
    grid-template-columns: none;
    gap: clamp(18px, 2.2vw, 34px);
    overflow-x: auto;
    overflow-y: visible;
    padding: 0 0 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.home-sections .chapter-grid::-webkit-scrollbar,
.home-sections .manga-grid::-webkit-scrollbar {
    display: none;
}

.manga-card,
.chapter-card,
.vip-row {
    overflow: hidden;
}

.home-sections .manga-card,
.home-sections .manga-card.compact,
.home-sections .chapter-card {
    position: relative;
    flex: 0 0 clamp(150px, 13vw, 218px);
    width: clamp(150px, 13vw, 218px);
    min-width: clamp(150px, 13vw, 218px);
    display: block;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: start;
}

.manga-card img {
    aspect-ratio: 3 / 4.1;
}

.home-sections .manga-card > a,
.home-sections .chapter-card {
    display: block;
}

.home-sections .manga-card > a img,
.home-sections .chapter-card img,
.home-sections .manga-card.compact img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
    transition: transform 180ms ease, filter 180ms ease;
}

.home-sections .manga-card:hover > a img,
.home-sections .chapter-card:hover img {
    filter: brightness(1.08);
    transform: translateY(-4px);
}

.manga-card.compact img {
    aspect-ratio: 3 / 4;
}

.manga-card-body {
    display: grid;
    gap: 12px;
    padding: 16px 16px 18px;
}

.home-sections .manga-card-body,
.home-sections .chapter-card > div {
    display: grid;
    gap: 5px;
    padding: 10px 0 0;
}

.manga-card h4 a,
.chapter-card h4,
.vip-row h4 {
    font-size: 0.98rem;
    line-height: 1.3;
}

.home-sections .manga-card h4 a,
.home-sections .chapter-card h4 {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.03em;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-transform: uppercase;
}

.manga-card p,
.chapter-card p,
.vip-row p {
    margin: 0;
    line-height: 1.6;
}

.home-sections .manga-card p,
.home-sections .chapter-card p {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-sections .card-meta {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
    justify-content: space-between;
    pointer-events: none;
}

.home-sections .card-meta .tag,
.home-sections .chapter-card .tag {
    min-height: 24px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #e91d35;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 18px rgba(233, 29, 53, 0.25);
}

.home-sections .card-meta span:not(.tag) {
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    color: #0c0c0c;
    background: rgba(255, 200, 94, 0.92);
    font-size: 0.68rem;
    font-weight: 900;
}

.home-sections .chapter-card .tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.chapter-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
}

.chapter-card img {
    height: 146px;
    border-radius: 18px;
}

.vip-panel {
    padding: 24px;
}

.vip-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface-2) 84%, transparent);
    border: 1px solid var(--line);
}

.vip-row + .vip-row {
    margin-top: 14px;
}

.vip-row img {
    height: 110px;
    border-radius: 18px;
}

.empty-state {
    padding: 34px;
    text-align: center;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line-strong);
    background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}

.empty-state h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.catalog-shell {
    padding: 28px;
}

.catalog-head {
    align-items: end;
}

.catalog-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.profile-main-card {
    padding: 30px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-head h2 {
    margin-bottom: 8px;
}

.profile-head p {
    margin: 0;
}

.profile-meta {
    margin-top: 14px;
}

.profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px;
}

.profile-feature-list {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.profile-feature-item {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.profile-feature-item strong,
.profile-feature-item span {
    display: block;
}

.profile-feature-item span {
    margin-top: 6px;
    color: var(--muted);
}

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

.mini-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.mini-row img {
    width: 62px;
    height: 84px;
    border-radius: 14px;
}

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

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.admin-dashboard-shell {
    padding: 28px;
}

.admin-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 24px;
}

.stat-card-accent {
    position: relative;
    overflow: hidden;
}

.stat-card-accent::after {
    content: "";
    position: absolute;
    inset: auto -18px -34px auto;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(233, 29, 53, 0.28), transparent 70%);
}

.stat-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
}

.table-shell {
    overflow-x: auto;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

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

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

.data-table thead th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.data-table tbody tr:hover {
    background: color-mix(in srgb, var(--surface-2) 84%, transparent);
}

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

.auth-shell {
    display: grid;
    min-height: min(760px, 78vh);
    overflow: hidden;
    border-radius: 36px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.auth-shell-split {
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 420px);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.auth-showcase {
    position: relative;
    padding: clamp(28px, 5vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 24px;
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255, 67, 88, 0.12), transparent 28%),
        linear-gradient(160deg, color-mix(in srgb, var(--surface-3) 72%, var(--surface)) 0%, var(--surface) 100%);
}

.auth-showcase-register {
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(255, 67, 88, 0.12), transparent 28%),
        linear-gradient(160deg, color-mix(in srgb, var(--surface-3) 72%, var(--surface)) 0%, var(--surface) 100%);
}

.auth-showcase h2 {
    margin: 0;
    max-width: 520px;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.8vw, 3.7rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

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

.auth-benefit {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .auth-benefit {
    background: rgba(255, 255, 255, 0.55);
}

.auth-card {
    padding: clamp(26px, 4vw, 40px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.auth-form-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.muted-link {
    color: var(--accent);
    font-weight: 700;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.detail-banner {
    min-height: 260px;
    background:
        linear-gradient(180deg, rgba(8, 17, 26, 0.05), rgba(8, 17, 26, 0.8)),
        center/cover no-repeat;
}

.detail-grid {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    padding: 0 28px 28px;
    margin-top: -110px;
}

.detail-cover {
    aspect-ratio: 3 / 4.2;
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
}

.detail-copy {
    display: grid;
    align-content: end;
    gap: 16px;
}

.detail-description {
    margin: 0;
    max-width: 800px;
    line-height: 1.8;
}

.detail-meta-strip {
    gap: 12px;
}

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

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

.chapter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

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

.chapter-row.is-read {
    border-color: rgba(83, 226, 161, 0.22);
    background:
        linear-gradient(90deg, rgba(83, 226, 161, 0.1), transparent 34%),
        color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.row-end {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--muted);
}

.reader-shell {
    width: min(100%, 980px);
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.reader-top,
.reader-bottom {
    padding: 22px 24px;
}

.reader-top h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3.2vw, 2.2rem);
}

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

.reader-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.reader-flow {
    display: grid;
    gap: 0;
}

.reader-page {
    margin: 0;
}

.reader-page img {
    max-width: min(100%, 900px);
    margin: 0 auto;
    border-radius: 0;
}

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

.plan-card {
    position: relative;
    padding: 26px;
    display: grid;
    gap: 18px;
}

.plan-card.popular {
    border-color: rgba(233, 29, 53, 0.34);
    box-shadow: 0 20px 40px rgba(233, 29, 53, 0.16);
}

.plan-card h3 {
    margin: 0;
    font-size: 1.22rem;
}

.plan-card > strong {
    font-size: clamp(1.8rem, 3.2vw, 2.55rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.plan-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--muted-strong);
}

.plan-badge {
    position: absolute;
    top: 18px;
    right: 18px;
}

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

.request-actions,
.payment-action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-layout {
    align-items: stretch;
}

.payment-sheet {
    display: grid;
    gap: 14px;
}

.payment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.payment-row strong {
    text-align: right;
}

.payment-countdown-row {
    border-color: rgba(255, 186, 73, 0.24) !important;
    background: rgba(255, 186, 73, 0.08) !important;
}

.payment-countdown-row strong {
    color: #ffba49 !important;
}

html[data-theme="light"] .payment-countdown-row {
    border-color: rgba(184, 116, 12, 0.2) !important;
    background: rgba(255, 186, 73, 0.16) !important;
}

.payment-qr-box {
    display: grid;
    place-items: center;
    min-height: 100%;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.1), transparent 35%),
        color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.payment-qr-box img {
    width: min(100%, 360px);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 20px;
    background: #ffffff;
    padding: 14px;
}

.payment-info-card {
    display: grid;
    gap: 18px;
}

.payment-app-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 16px;
}

.payment-app-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    text-align: center;
}

.payment-app-card img {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    object-fit: contain;
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(3, 10, 18, 0.7);
    backdrop-filter: blur(18px);
}

.search-panel {
    position: relative;
    width: min(100%, 720px);
    padding: 28px;
}

.search-panel h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: clamp(1.45rem, 3.2vw, 2.35rem);
    letter-spacing: -0.04em;
}

.search-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    color: var(--text);
    background: var(--surface-2);
}

.search-form-large {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 22px;
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
    color: var(--muted-strong);
}

.tag-link:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.copied {
    border-color: transparent !important;
    color: #08111a !important;
    background: linear-gradient(135deg, var(--accent), #9cf7f0) !important;
}

.small-copy {
    font-size: 0.92rem;
    line-height: 1.7;
}

.request-card h3,
.payment-info-card p,
.payment-info-card .flash {
    margin: 0;
}

.request-card.pending {
    border-color: rgba(255, 200, 94, 0.2);
}

.payment-app-card .ghost-button {
    width: 100%;
}

.vip-modal-panel {
    width: min(100%, 620px);
}

@media (max-width: 1180px) {
    .hero-grid,
    .profile-hero,
    .split-layout,
    .auth-shell-split,
    .detail-grid,
    .filter-strip,
    .payment-layout {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        margin-top: -80px;
    }

    .detail-cover {
        max-width: 320px;
    }

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

@media (max-width: 980px) {
    .sidebar {
        grid-template-columns: 1fr;
        border-radius: 30px;
        text-align: center;
    }

    .sidebar-nav,
    .sidebar-foot {
        justify-content: center;
    }

    .topbar,
    .reader-top,
    .request-card {
        flex-direction: column;
        align-items: stretch;
    }

    .search-inline,
    .catalog-filter,
    .search-form-large {
        grid-template-columns: 1fr;
    }

    .hero-stat-list,
    .profile-stats,
    .detail-facts,
    .admin-stats,
    .plan-grid {
        grid-template-columns: 1fr;
    }

    .hero-thumb-row {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .hero-thumb {
        width: 56px;
        min-width: 56px;
    }

    .chapter-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .sidebar,
    .main-shell {
        width: calc(100% - 18px);
    }

    .section-block,
    .profile-card,
    .admin-panel,
    .search-panel,
    .topbar,
    .reader-top,
    .reader-bottom {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero,
    .auth-showcase,
    .auth-card {
        padding: 22px;
    }

    .hero-carousel {
        padding-bottom: 108px;
    }

    .hero-slider,
    .hero-slide .hero-grid {
        min-height: 680px;
    }

    .catalog-shell,
    .admin-dashboard-shell,
    .section-block-showcase {
        padding: 22px;
    }

    .hero h2,
    .catalog-head h2,
    .profile-main-card h2,
    .detail-copy h2 {
        font-size: clamp(1.75rem, 8vw, 2.45rem);
    }

    .manga-grid-spotlight {
        grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    }

    .manga-grid.compact,
    .catalog-results {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    }

    .manga-card,
    .plan-card,
    .request-card,
    .hero-cover-card,
    .search-panel {
        border-radius: 22px;
    }

    .hero-thumb {
        width: 48px;
        min-width: 48px;
        height: 16px;
    }

    .hero-thumb.is-active {
        width: 68px;
    }

    .hero-thumb-bar {
        height: 5px;
    }

    .floating-share {
        width: 58px;
        height: 58px;
        right: 16px;
        bottom: 16px;
        border-radius: 20px;
    }
}

/* Homepage poster rows: final override to keep the screenshot-like section style. */
.content-shell > .home-sections {
    margin-top: 0;
    padding: 8px 0 44px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
}

.content-shell > .home-sections .home-subsection {
    padding: 28px 12px 34px !important;
}

.content-shell > .home-sections .home-subsection.filter-strip-home {
    display: none !important;
}

.content-shell > .home-sections .section-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 0 0 22px !important;
}

.content-shell > .home-sections .section-copy .eyebrow {
    display: none !important;
}

.content-shell > .home-sections .section-head h3 {
    position: relative !important;
    margin: 0 !important;
    padding-left: 24px !important;
    color: #fff !important;
    font-size: clamp(1.35rem, 2.1vw, 1.9rem) !important;
    font-weight: 950 !important;
    font-style: italic !important;
    letter-spacing: -0.05em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

.content-shell > .home-sections .section-head h3::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 5px !important;
    height: 30px !important;
    border-radius: 999px !important;
    background: #ff1f32 !important;
    transform: translateY(-50%) !important;
}

.content-shell > .home-sections .section-link {
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    color: rgba(255, 255, 255, 0.34) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
}

.content-shell > .home-sections .chapter-grid,
.content-shell > .home-sections .manga-grid,
.content-shell > .home-sections .manga-grid.compact,
.content-shell > .home-sections .manga-grid-spotlight,
.content-shell > .home-sections .chapter-grid-featured {
    display: flex !important;
    grid-template-columns: none !important;
    gap: clamp(18px, 2vw, 32px) !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 0 0 10px !important;
    scrollbar-width: none !important;
}

.content-shell > .home-sections .chapter-grid::-webkit-scrollbar,
.content-shell > .home-sections .manga-grid::-webkit-scrollbar {
    display: none !important;
}

.content-shell > .home-sections .manga-card,
.content-shell > .home-sections .manga-card.compact,
.content-shell > .home-sections .chapter-card {
    position: relative !important;
    flex: 0 0 clamp(150px, 13vw, 220px) !important;
    width: clamp(150px, 13vw, 220px) !important;
    min-width: clamp(150px, 13vw, 220px) !important;
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.content-shell > .home-sections .manga-card > a,
.content-shell > .home-sections .chapter-card {
    display: block !important;
}

.content-shell > .home-sections .manga-card > a img,
.content-shell > .home-sections .manga-card.compact img,
.content-shell > .home-sections .chapter-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45) !important;
}

.content-shell > .home-sections .manga-card-body,
.content-shell > .home-sections .chapter-card > div {
    display: grid !important;
    gap: 5px !important;
    padding: 10px 0 0 !important;
}

.content-shell > .home-sections .manga-card h4 a,
.content-shell > .home-sections .chapter-card h4 {
    display: -webkit-box !important;
    overflow: hidden !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 950 !important;
    font-style: italic !important;
    letter-spacing: -0.04em !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    line-clamp: 2 !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.content-shell > .home-sections .manga-card p,
.content-shell > .home-sections .chapter-card p {
    overflow: hidden !important;
    color: rgba(255, 255, 255, 0.46) !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.35 !important;
    text-overflow: ellipsis !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.content-shell > .home-sections .card-meta {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 2 !important;
    display: flex !important;
    justify-content: space-between !important;
}

.content-shell > .home-sections .card-meta .tag,
.content-shell > .home-sections .chapter-card .tag {
    min-height: 24px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: #e91d35 !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
}

.content-shell > .home-sections .card-meta span:not(.tag) {
    min-height: 24px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    color: #080808 !important;
    background: rgba(255, 200, 94, 0.92) !important;
    font-size: 0.68rem !important;
    font-weight: 950 !important;
}

.content-shell > .home-sections .chapter-card .tag {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 2 !important;
}

/* Light mode polish: keep the poster-row layout, but give it a clean light palette. */
html[data-theme="light"] .hero-carousel {
    border-color: rgba(20, 38, 58, 0.1) !important;
    background: #f6f8fb !important;
    box-shadow: 0 24px 70px rgba(31, 53, 78, 0.12) !important;
}

html[data-theme="light"] .hero-carousel .hero-slide-media {
    opacity: 0.92;
    filter: saturate(1.08) contrast(1.04);
}

html[data-theme="light"] .hero-carousel .hero-backdrop {
    background:
        linear-gradient(115deg, rgba(246, 248, 251, 0.76) 0%, rgba(246, 248, 251, 0.42) 48%, rgba(246, 248, 251, 0.1) 100%),
        radial-gradient(circle at top right, rgba(19, 125, 159, 0.16), transparent 32%),
        radial-gradient(circle at bottom left, rgba(239, 108, 67, 0.14), transparent 30%) !important;
}

html[data-theme="light"] .hero-carousel h2,
html[data-theme="light"] .hero-carousel .hero-cover-card h3 {
    color: #0d1b2a !important;
}

html[data-theme="light"] .hero-carousel .hero-description,
html[data-theme="light"] .hero-carousel .hero-cover-card p {
    color: #53687d !important;
}

html[data-theme="light"] .content-shell > .home-sections {
    background: #f3f6fa !important;
    color: #0d1b2a !important;
}

html[data-theme="light"] .content-shell > .home-sections .section-head h3 {
    color: #101923 !important;
}

html[data-theme="light"] .content-shell > .home-sections .section-head h3::before {
    background: #e91d35 !important;
    box-shadow: 0 0 0 5px rgba(233, 29, 53, 0.08) !important;
}

html[data-theme="light"] .content-shell > .home-sections .section-link {
    color: rgba(16, 25, 35, 0.45) !important;
}

html[data-theme="light"] .content-shell > .home-sections .section-link:hover {
    color: #101923 !important;
}

html[data-theme="light"] .content-shell > .home-sections .manga-card > a img,
html[data-theme="light"] .content-shell > .home-sections .manga-card.compact img,
html[data-theme="light"] .content-shell > .home-sections .chapter-card img {
    box-shadow: 0 18px 32px rgba(24, 42, 62, 0.18) !important;
}

html[data-theme="light"] .content-shell > .home-sections .manga-card h4 a,
html[data-theme="light"] .content-shell > .home-sections .chapter-card h4 {
    color: #0d1b2a !important;
}

html[data-theme="light"] .content-shell > .home-sections .manga-card p,
html[data-theme="light"] .content-shell > .home-sections .chapter-card p {
    color: rgba(13, 27, 42, 0.58) !important;
}

html[data-theme="light"] .content-shell > .home-sections .card-meta .tag,
html[data-theme="light"] .content-shell > .home-sections .chapter-card .tag {
    color: #ffffff !important;
    background: #e91d35 !important;
}

/* Hero slider cleanup: stable cinematic banner for both dark and light themes. */
.hero.hero-carousel {
    min-height: clamp(430px, 58vh, 620px) !important;
    padding: 0 0 82px !important;
    border-radius: 30px !important;
    background: #05070a !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36) !important;
    isolation: isolate;
}

.hero.hero-carousel .hero-slider {
    min-height: clamp(430px, 58vh, 620px) !important;
}

.hero.hero-carousel .hero-slide {
    overflow: hidden;
}

.hero.hero-carousel .hero-slide-media {
    opacity: 0.78 !important;
    filter: saturate(1.12) contrast(1.05) brightness(0.86) !important;
    transform: scale(1.01) !important;
    background-position: center right !important;
}

.hero.hero-carousel .hero-backdrop,
html[data-theme="light"] .hero.hero-carousel .hero-backdrop {
    background:
        linear-gradient(90deg, rgba(3, 6, 10, 0.95) 0%, rgba(3, 6, 10, 0.82) 38%, rgba(3, 6, 10, 0.34) 70%, rgba(3, 6, 10, 0.12) 100%),
        linear-gradient(0deg, rgba(3, 6, 10, 0.72) 0%, rgba(3, 6, 10, 0.05) 42%, rgba(3, 6, 10, 0.62) 100%) !important;
}

.hero.hero-carousel .hero-slide .hero-grid {
    min-height: clamp(430px, 58vh, 620px) !important;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 300px) !important;
    align-items: center !important;
    gap: clamp(24px, 4vw, 56px) !important;
    padding: clamp(30px, 5vw, 62px) !important;
}

.hero.hero-carousel .hero-copy {
    max-width: 660px !important;
}

.hero.hero-carousel h2,
html[data-theme="light"] .hero.hero-carousel h2 {
    max-width: 680px;
    color: #ffffff !important;
    font-size: clamp(2.3rem, 5vw, 5.5rem) !important;
    line-height: 0.9 !important;
    text-shadow: 0 18px 44px rgba(0, 0, 0, 0.48) !important;
}

.hero.hero-carousel .hero-description,
html[data-theme="light"] .hero.hero-carousel .hero-description {
    display: -webkit-box;
    overflow: hidden;
    max-width: 560px !important;
    color: rgba(255, 255, 255, 0.74) !important;
    font-size: 0.95rem !important;
    line-height: 1.65 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.hero.hero-carousel .hero-badge {
    color: #08111a !important;
    background: #ffffff !important;
    box-shadow: 0 10px 26px rgba(255, 255, 255, 0.16) !important;
}

.hero.hero-carousel .hero-badge-muted {
    color: rgba(255, 255, 255, 0.86) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(14px);
}

.hero.hero-carousel .hero-actions {
    margin-top: 24px !important;
}

.hero.hero-carousel .hero-actions .ghost-button {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.hero.hero-carousel .hero-stat-list {
    max-width: 560px;
    margin-top: 24px !important;
    gap: 10px !important;
}

.hero.hero-carousel .hero-stat {
    padding: 13px 14px !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px);
}

.hero.hero-carousel .hero-stat strong {
    color: #ffffff !important;
}

.hero.hero-carousel .hero-stat span {
    color: rgba(255, 255, 255, 0.62) !important;
}

.hero.hero-carousel .hero-spotlight {
    justify-content: flex-end !important;
}

.hero.hero-carousel .hero-cover-card {
    width: min(100%, 285px) !important;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46) !important;
    backdrop-filter: blur(18px);
}

.hero.hero-carousel .hero-cover-card img {
    aspect-ratio: 2 / 3 !important;
    border-radius: 18px !important;
}

.hero.hero-carousel .hero-cover-card h3,
html[data-theme="light"] .hero.hero-carousel .hero-cover-card h3 {
    color: #ffffff !important;
    font-size: 1rem !important;
}

.hero.hero-carousel .hero-cover-card p,
html[data-theme="light"] .hero.hero-carousel .hero-cover-card p,
.hero.hero-carousel .hero-cover-meta span:not(.tag) {
    color: rgba(255, 255, 255, 0.66) !important;
}

.hero.hero-carousel .hero-thumb-row {
    left: 50% !important;
    right: auto !important;
    bottom: 26px !important;
    width: min(520px, calc(100% - 48px)) !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, 0.34) !important;
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.hero.hero-carousel .hero-thumb {
    width: 52px !important;
    min-width: 52px !important;
    height: 14px !important;
}

.hero.hero-carousel .hero-thumb.is-active {
    width: 86px !important;
}

.hero.hero-carousel .hero-thumb-bar {
    height: 5px !important;
    background: rgba(255, 255, 255, 0.26) !important;
}

.hero.hero-carousel .hero-thumb.is-active .hero-thumb-bar {
    background: #ffffff !important;
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.34) !important;
}

@media (max-width: 980px) {
    .hero.hero-carousel,
    .hero.hero-carousel .hero-slider,
    .hero.hero-carousel .hero-slide .hero-grid {
        min-height: 620px !important;
    }

    .hero.hero-carousel .hero-slide .hero-grid {
        grid-template-columns: 1fr !important;
        align-content: center !important;
        padding: 30px 22px 132px !important;
    }

    .hero.hero-carousel .hero-spotlight,
    .hero.hero-carousel .hero-stat-list {
        display: none !important;
    }

    .hero.hero-carousel h2 {
        font-size: clamp(2.2rem, 13vw, 4rem) !important;
    }
}

/* Admin redesign: align the control area with the homepage poster-row language. */
.section-block.admin-shell {
    padding: clamp(20px, 3vw, 34px) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 15% 0%, rgba(233, 29, 53, 0.1), transparent 28%),
        linear-gradient(180deg, #050505 0%, #000000 100%) !important;
    box-shadow: none !important;
}

.admin-shell .admin-nav {
    position: sticky;
    top: 20px;
    z-index: 12;
    display: flex;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 34px !important;
    padding: 8px !important;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 999px !important;
    background: rgba(12, 12, 12, 0.86) !important;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34) !important;
    backdrop-filter: blur(18px);
    scrollbar-width: none;
}

.admin-shell .admin-nav::-webkit-scrollbar {
    display: none;
}

.admin-shell .admin-nav a {
    min-height: 42px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: rgba(255, 255, 255, 0.58) !important;
    background: transparent !important;
    font-size: 0.78rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    white-space: nowrap;
}

.admin-shell .admin-nav a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.admin-shell .admin-nav a.active {
    color: #ffffff !important;
    background: #e91d35 !important;
    box-shadow: 0 12px 28px rgba(233, 29, 53, 0.28) !important;
}

.admin-shell > .section-head,
.admin-shell .admin-panel > .section-head {
    align-items: center !important;
    margin-bottom: 24px !important;
}

.admin-shell .section-head h2,
.admin-shell .section-head h3 {
    position: relative;
    padding-left: 24px;
    color: #ffffff !important;
    font-weight: 950 !important;
    font-style: italic;
    letter-spacing: -0.05em !important;
    text-transform: uppercase;
}

.admin-shell .section-head h2 {
    font-size: clamp(1.75rem, 3vw, 3.2rem) !important;
}

.admin-shell .section-head h3 {
    font-size: clamp(1.2rem, 2vw, 1.75rem) !important;
}

.admin-shell .section-head h2::before,
.admin-shell .section-head h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 30px;
    border-radius: 999px;
    background: #ff1f32;
    box-shadow: 0 0 18px rgba(255, 31, 50, 0.42);
    transform: translateY(-50%);
}

.admin-shell .eyebrow {
    color: rgba(255, 255, 255, 0.42) !important;
}

.admin-shell .muted,
.admin-shell .mini-row p,
.admin-shell .data-table .muted,
.admin-shell .stat-label {
    color: rgba(255, 255, 255, 0.48) !important;
}

.admin-shell .admin-panel,
.admin-shell .table-shell,
.admin-shell .stat-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #090909 !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32) !important;
}

.admin-shell .admin-panel {
    padding: clamp(20px, 2.4vw, 30px) !important;
}

.admin-shell .admin-stats {
    gap: 16px !important;
}

.admin-shell .stat-card {
    overflow: hidden;
    min-height: 150px;
}

.admin-shell .stat-card::after {
    background: radial-gradient(circle, rgba(233, 29, 53, 0.28), transparent 70%) !important;
}

.admin-shell .stat-card strong {
    color: #ffffff !important;
    font-size: clamp(2rem, 3vw, 3.35rem) !important;
    letter-spacing: -0.08em;
}

.admin-shell .stat-card span:last-child {
    color: rgba(255, 255, 255, 0.58) !important;
    font-weight: 800;
}

.admin-shell .stack-list {
    gap: 12px !important;
}

.admin-shell .mini-row {
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.admin-shell .mini-row:hover {
    border-color: rgba(233, 29, 53, 0.26) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    transform: translateY(-2px);
}

.admin-shell .mini-row img {
    width: 58px !important;
    height: 78px !important;
    border-radius: 12px !important;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.admin-shell .mini-row strong,
.admin-shell .data-table strong {
    color: #ffffff !important;
}

.admin-shell .stack-form {
    gap: 14px !important;
}

.admin-shell label > span {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-shell input[type="text"],
.admin-shell input[type="number"],
.admin-shell input[type="date"],
.admin-shell input[type="file"],
.admin-shell select,
.admin-shell textarea {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder {
    color: rgba(255, 255, 255, 0.32) !important;
}

.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
    border-color: rgba(233, 29, 53, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(233, 29, 53, 0.14) !important;
}

.admin-shell .inline-check {
    width: fit-content;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.045);
}

.admin-shell .primary-button {
    color: #ffffff !important;
    background: #e91d35 !important;
    box-shadow: 0 14px 34px rgba(233, 29, 53, 0.26) !important;
}

.admin-shell .ghost-button {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

.admin-shell .danger-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #aa1626, #f43f5e) !important;
}

.admin-shell .section-link {
    min-height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    color: rgba(255, 255, 255, 0.34) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
}

.admin-shell .table-shell {
    overflow: hidden !important;
}

.admin-shell .data-table {
    min-width: 860px;
}

.admin-shell .data-table th,
.admin-shell .data-table td {
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

.admin-shell .data-table thead th {
    color: rgba(255, 255, 255, 0.42) !important;
    background: rgba(255, 255, 255, 0.035);
}

.admin-shell .data-table tbody tr {
    transition: background-color 160ms ease;
}

.admin-shell .data-table tbody tr:hover {
    background: rgba(233, 29, 53, 0.08) !important;
}

html[data-theme="light"] .section-block.admin-shell {
    background:
        radial-gradient(circle at 15% 0%, rgba(233, 29, 53, 0.09), transparent 28%),
        linear-gradient(180deg, #f4f6fa 0%, #eef2f7 100%) !important;
}

html[data-theme="light"] .admin-shell .section-head h2,
html[data-theme="light"] .admin-shell .section-head h3,
html[data-theme="light"] .admin-shell .mini-row strong,
html[data-theme="light"] .admin-shell .data-table strong,
html[data-theme="light"] .admin-shell .stat-card strong {
    color: #101923 !important;
}

html[data-theme="light"] .admin-shell .admin-panel,
html[data-theme="light"] .admin-shell .table-shell,
html[data-theme="light"] .admin-shell .stat-card {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .admin-shell .admin-nav {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.82) !important;
}

html[data-theme="light"] .admin-shell .admin-nav a {
    color: rgba(16, 25, 35, 0.56) !important;
}

html[data-theme="light"] .admin-shell .admin-nav a.active {
    color: #ffffff !important;
}

html[data-theme="light"] .admin-shell input[type="text"],
html[data-theme="light"] .admin-shell input[type="number"],
html[data-theme="light"] .admin-shell input[type="date"],
html[data-theme="light"] .admin-shell input[type="file"],
html[data-theme="light"] .admin-shell select,
html[data-theme="light"] .admin-shell textarea,
html[data-theme="light"] .admin-shell .mini-row,
html[data-theme="light"] .admin-shell .inline-check {
    border-color: rgba(16, 25, 35, 0.08) !important;
    color: #101923 !important;
    background: rgba(255, 255, 255, 0.68) !important;
}

.admin-revenue-shell {
    display: grid;
    gap: 24px;
}

.revenue-filter,
.admin-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.admin-filter-bar {
    margin-bottom: 18px;
}

.admin-filter-wide {
    grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(140px, 0.8fr)) auto;
}

.revenue-filter label,
.admin-filter-bar label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

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

.admin-filter-actions .primary-button,
.admin-filter-actions .ghost-button {
    min-height: 44px;
    white-space: nowrap;
}

.revenue-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin-bottom: 0 !important;
}

.revenue-layout {
    align-items: start;
}

.revenue-plan-row,
.revenue-payment-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.revenue-plan-row > div,
.revenue-payment-row > div {
    min-width: 0;
}

.revenue-plan-row strong,
.revenue-plan-row p,
.revenue-payment-row strong,
.revenue-payment-row p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.revenue-table-panel {
    overflow: hidden;
}

.revenue-table-panel .profile-id-badge,
.revenue-plan-row .profile-id-badge,
.revenue-payment-row .profile-id-badge {
    color: #080808 !important;
    background: linear-gradient(135deg, #ff6b7a, #e91d35) !important;
    border: 0 !important;
}

html[data-theme="light"] .revenue-filter,
html[data-theme="light"] .admin-filter-bar {
    border-color: rgba(16, 25, 35, 0.08);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1);
}

@media (max-width: 980px) {
    .revenue-filter,
    .admin-filter-bar,
    .revenue-stats {
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .admin-filter-actions {
        width: 100%;
    }
}

/* Global page redesign: make catalog, profile, VIP, auth, detail and reader match the new home/admin language. */
.content-shell > .section-block:not(.home-sections):not(.admin-shell),
.profile-hero,
.auth-shell,
.detail-hero,
.reader-shell {
    border: 0 !important;
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(233, 29, 53, 0.1), transparent 28%),
        linear-gradient(180deg, #050505 0%, #000000 100%) !important;
    box-shadow: none !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell),
.auth-shell,
.detail-hero {
    padding: clamp(22px, 3vw, 36px) !important;
}

.profile-hero,
.reader-shell {
    padding: 0 !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head,
.profile-card .section-head,
.auth-shell .section-head,
.detail-hero .section-head,
.reader-top,
.reader-bottom {
    align-items: center !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3,
.profile-card h2,
.profile-card h3,
.auth-shell h2,
.detail-copy h2,
.reader-top h2 {
    position: relative;
    color: #ffffff !important;
    font-weight: 950 !important;
    font-style: italic;
    letter-spacing: -0.05em !important;
    text-transform: uppercase;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3,
.profile-card .section-head h3,
.reader-top h2 {
    padding-left: 24px;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2::before,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3::before,
.profile-card .section-head h3::before,
.reader-top h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 30px;
    border-radius: 999px;
    background: #ff1f32;
    box-shadow: 0 0 18px rgba(255, 31, 50, 0.42);
    transform: translateY(-50%);
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .eyebrow,
.profile-hero .eyebrow,
.auth-shell .eyebrow,
.detail-hero .eyebrow,
.reader-shell .eyebrow {
    color: rgba(255, 255, 255, 0.42) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .muted,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) p,
.profile-card p,
.auth-shell p,
.detail-description,
.reader-shell p,
.chapter-row p,
.payment-row span {
    color: rgba(255, 255, 255, 0.58) !important;
}

.profile-card,
.auth-card,
.auth-showcase,
.plan-card,
.request-card,
.payment-app-card,
.search-panel,
.reader-top,
.reader-bottom,
.detail-fact,
.profile-stats > div,
.profile-feature-item,
.chapter-row,
.payment-info-card,
.payment-qr-box {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #090909 !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32) !important;
}

.profile-card,
.auth-card,
.auth-showcase,
.plan-card,
.request-card,
.payment-info-card {
    padding: clamp(22px, 2.7vw, 34px) !important;
}

.profile-head h2,
.auth-shell h2,
.detail-copy h2 {
    font-size: clamp(2rem, 4.4vw, 4.6rem) !important;
    line-height: 0.9 !important;
}

.profile-stats strong,
.detail-fact strong,
.payment-row strong,
.plan-card > strong,
.profile-feature-item strong,
.chapter-row strong,
.request-card strong,
.auth-benefit strong {
    color: #ffffff !important;
}

.profile-id-badge,
.status-badge,
.tag,
.hero-badge {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.profile-feature-item,
.auth-benefit,
.chapter-row {
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.profile-feature-item:hover,
.auth-benefit:hover,
.chapter-row:hover {
    border-color: rgba(233, 29, 53, 0.26) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    transform: translateY(-2px);
}

.catalog-shell .catalog-filter,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .catalog-filter,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .search-inline {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="text"],
.content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="email"],
.content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="password"],
.content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="number"],
.content-shell > .section-block:not(.home-sections):not(.admin-shell) select,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) textarea,
.auth-shell input[type="text"],
.auth-shell input[type="email"],
.auth-shell input[type="password"] {
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) input:focus,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) select:focus,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) textarea:focus,
.auth-shell input:focus {
    border-color: rgba(233, 29, 53, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(233, 29, 53, 0.14) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) label > span,
.auth-shell label > span {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .primary-button,
.auth-shell .primary-button,
.detail-hero .primary-button,
.reader-shell .primary-button {
    color: #ffffff !important;
    background: #e91d35 !important;
    box-shadow: 0 14px 34px rgba(233, 29, 53, 0.26) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .ghost-button,
.auth-shell .ghost-button,
.detail-hero .ghost-button,
.reader-shell .ghost-button {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-grid,
.profile-card .manga-grid,
.detail-hero + .section-block .manga-grid {
    gap: clamp(18px, 2vw, 32px) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card > a img,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card.compact img {
    aspect-ratio: 2 / 3 !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45) !important;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card h4 a,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card h4 {
    color: #ffffff !important;
    font-weight: 950 !important;
    font-style: italic;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card p {
    color: rgba(255, 255, 255, 0.46) !important;
}

.detail-hero {
    overflow: hidden;
}

.detail-banner {
    opacity: 0.44 !important;
    filter: saturate(1.08) contrast(1.04) brightness(0.72);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3, 6, 10, 0.94), rgba(3, 6, 10, 0.64) 52%, rgba(3, 6, 10, 0.18)),
        linear-gradient(0deg, rgba(3, 6, 10, 0.8), transparent 42%);
}

.detail-grid {
    position: relative;
    z-index: 2;
}

.detail-cover {
    border-radius: 18px !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5) !important;
}

.plan-card.popular {
    border-color: rgba(233, 29, 53, 0.5) !important;
    box-shadow:
        0 0 0 1px rgba(233, 29, 53, 0.22),
        0 24px 70px rgba(233, 29, 53, 0.16) !important;
}

.plan-badge,
.tag.vip,
.vip-badge-live {
    color: #080808 !important;
    background: linear-gradient(135deg, #ffd166, #ffb703) !important;
}

.request-card.pending {
    border-color: rgba(255, 209, 102, 0.24) !important;
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.1), rgba(255, 255, 255, 0.025)),
        #090909 !important;
}

.payment-qr-box {
    display: grid;
    place-items: center;
}

.payment-qr-box img {
    border-radius: 20px !important;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.reader-shell {
    display: grid;
    gap: 0 !important;
}

.reader-top,
.reader-bottom {
    position: sticky;
    z-index: 10;
    margin: 0 !important;
    border-radius: 0 !important;
    background: rgba(8, 8, 8, 0.92) !important;
    backdrop-filter: blur(18px);
}

.reader-top {
    top: 0;
}

.reader-bottom {
    bottom: 0;
}

.reader-flow {
    background: #000000 !important;
}

.reader-page {
    margin: 0 auto !important;
}

.reader-page img {
    border-radius: 0 !important;
}

html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell),
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .auth-shell,
html[data-theme="light"] .detail-hero,
html[data-theme="light"] .reader-shell {
    background:
        radial-gradient(circle at 10% 0%, rgba(233, 29, 53, 0.08), transparent 28%),
        linear-gradient(180deg, #f4f6fa 0%, #eef2f7 100%) !important;
}

html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3,
html[data-theme="light"] .profile-card h2,
html[data-theme="light"] .profile-card h3,
html[data-theme="light"] .auth-shell h2,
html[data-theme="light"] .detail-copy h2,
html[data-theme="light"] .reader-top h2,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card h4 a {
    color: #101923 !important;
}

html[data-theme="light"] .profile-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-showcase,
html[data-theme="light"] .plan-card,
html[data-theme="light"] .request-card,
html[data-theme="light"] .payment-app-card,
html[data-theme="light"] .search-panel,
html[data-theme="light"] .detail-fact,
html[data-theme="light"] .profile-stats > div,
html[data-theme="light"] .profile-feature-item,
html[data-theme="light"] .chapter-row,
html[data-theme="light"] .payment-info-card,
html[data-theme="light"] .payment-qr-box {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="text"],
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="email"],
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="password"],
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) input[type="number"],
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) select,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) textarea,
html[data-theme="light"] .auth-shell input[type="text"],
html[data-theme="light"] .auth-shell input[type="email"],
html[data-theme="light"] .auth-shell input[type="password"] {
    border-color: rgba(16, 25, 35, 0.08) !important;
    color: #101923 !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

/* Keep VIP request status pills compact inside tables and history rows. */
.status-badge {
    white-space: nowrap;
}

.admin-shell .data-table .status-badge,
.admin-shell .mini-row .status-badge,
.request-card .status-badge,
.vip-history-panel .status-badge,
.profile-card .mini-row .status-badge {
    flex: 0 0 auto !important;
    max-width: 132px !important;
    min-height: 26px !important;
    padding: 0 9px !important;
    overflow: hidden !important;
    font-size: 0.64rem !important;
    line-height: 1 !important;
    letter-spacing: 0.07em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.admin-shell .data-table td:nth-child(4),
.admin-shell .data-table td:nth-child(5) {
    width: 132px;
    white-space: nowrap;
}

.admin-shell .data-table td:last-child {
    width: 190px;
}

.admin-shell .mini-row .status-badge,
.profile-card .mini-row .status-badge {
    justify-self: end;
}

.profile-card .mini-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.profile-card .mini-row:has(img) {
    grid-template-columns: auto minmax(0, 1fr) !important;
}

.profile-card .mini-row:has(.status-badge) {
    grid-template-columns: minmax(0, 1fr) 112px !important;
}

.profile-card .mini-row:has(.status-badge) > div {
    min-width: 0;
}

.profile-card .mini-row:has(.status-badge) strong,
.profile-card .mini-row:has(.status-badge) p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-card .mini-row .status-badge {
    width: 112px !important;
    max-width: 112px !important;
}

.profile-vip-history-section .vip-history-row {
    grid-template-columns: minmax(0, 1fr) 108px !important;
    align-items: center !important;
}

.profile-vip-history-section .vip-history-row > div {
    min-width: 0;
}

.profile-vip-history-section .vip-history-row strong,
.profile-vip-history-section .vip-history-row p {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.profile-vip-history-section .vip-history-status {
    justify-self: end !important;
    width: 108px !important;
    max-width: 108px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    overflow: hidden !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.05em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Final light-mode cleanup after the dark redesign overrides. */
html[data-theme="light"] .admin-shell .eyebrow,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .eyebrow,
html[data-theme="light"] .profile-hero .eyebrow,
html[data-theme="light"] .auth-shell .eyebrow,
html[data-theme="light"] .detail-hero .eyebrow,
html[data-theme="light"] .reader-shell .eyebrow {
    color: #d91f35 !important;
}

html[data-theme="light"] .admin-shell .muted,
html[data-theme="light"] .admin-shell .mini-row p,
html[data-theme="light"] .admin-shell .data-table .muted,
html[data-theme="light"] .admin-shell .stat-label,
html[data-theme="light"] .admin-shell .stat-card span:last-child,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .muted,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) p,
html[data-theme="light"] .profile-card p,
html[data-theme="light"] .auth-shell p,
html[data-theme="light"] .detail-description,
html[data-theme="light"] .detail-meta-strip span:not(.tag),
html[data-theme="light"] .chapter-row p,
html[data-theme="light"] .chapter-row .row-end,
html[data-theme="light"] .payment-row span,
html[data-theme="light"] .reader-shell p,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .manga-card p {
    color: #5f7082 !important;
}

html[data-theme="light"] .admin-shell label > span,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) label > span,
html[data-theme="light"] .auth-shell label > span {
    color: #304255 !important;
}

html[data-theme="light"] .admin-shell .ghost-button,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) .ghost-button,
html[data-theme="light"] .auth-shell .ghost-button,
html[data-theme="light"] .detail-hero .ghost-button,
html[data-theme="light"] .reader-shell .ghost-button {
    color: #101923 !important;
    border-color: rgba(16, 25, 35, 0.12) !important;
    background: rgba(16, 25, 35, 0.06) !important;
}

html[data-theme="light"] .admin-shell .data-table thead th {
    color: rgba(16, 25, 35, 0.52) !important;
    background: rgba(16, 25, 35, 0.035) !important;
}

html[data-theme="light"] .admin-shell .data-table th,
html[data-theme="light"] .admin-shell .data-table td {
    border-bottom-color: rgba(16, 25, 35, 0.08) !important;
}

html[data-theme="light"] .admin-shell .data-table tbody tr:hover {
    background: rgba(233, 29, 53, 0.06) !important;
}

html[data-theme="light"] .admin-shell input::placeholder,
html[data-theme="light"] .admin-shell textarea::placeholder,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) input::placeholder,
html[data-theme="light"] .content-shell > .section-block:not(.home-sections):not(.admin-shell) textarea::placeholder,
html[data-theme="light"] .auth-shell input::placeholder {
    color: rgba(16, 25, 35, 0.38) !important;
}

html[data-theme="light"] .profile-stats strong,
html[data-theme="light"] .detail-fact strong,
html[data-theme="light"] .payment-row strong,
html[data-theme="light"] .plan-card > strong,
html[data-theme="light"] .profile-feature-item strong,
html[data-theme="light"] .chapter-row strong,
html[data-theme="light"] .request-card strong,
html[data-theme="light"] .auth-benefit strong,
html[data-theme="light"] .payment-app-card h4,
html[data-theme="light"] .mini-row strong {
    color: #101923 !important;
}

html[data-theme="light"] .detail-hero::after {
    background:
        linear-gradient(90deg, rgba(244, 246, 250, 0.96), rgba(244, 246, 250, 0.74) 55%, rgba(244, 246, 250, 0.26)),
        linear-gradient(0deg, rgba(244, 246, 250, 0.9), transparent 46%) !important;
}

html[data-theme="light"] .detail-banner {
    opacity: 0.32 !important;
    filter: saturate(0.95) contrast(0.96) brightness(1.05) !important;
}

html[data-theme="light"] .request-card.pending {
    border-color: rgba(192, 141, 16, 0.18) !important;
    background:
        linear-gradient(180deg, rgba(255, 209, 102, 0.18), rgba(255, 255, 255, 0.72)),
        #ffffff !important;
}

html[data-theme="light"] .reader-top,
html[data-theme="light"] .reader-bottom {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 16px 38px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .reader-flow {
    background: #eef2f7 !important;
}

html[data-theme="light"] .search-panel h2,
html[data-theme="light"] .payment-sheet strong {
    color: #101923 !important;
}

/* Sidebar/menu palette: match the black + red redesign used across the site. */
.sidebar {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background:
        radial-gradient(circle at top left, rgba(233, 29, 53, 0.12), transparent 34%),
        rgba(8, 8, 8, 0.92) !important;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34) !important;
}

.sidebar-head {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.brand-orb {
    background:
        radial-gradient(circle at 40% 32%, #ffffff 0 18%, transparent 19%),
        linear-gradient(180deg, #ff4358, #b80f21) !important;
    box-shadow: 0 0 0 5px rgba(233, 29, 53, 0.18), 0 0 24px rgba(233, 29, 53, 0.3) !important;
}

.brand-text {
    color: #ffffff !important;
}

.sidebar-nav a,
.sidebar-search,
.sidebar-toggle {
    color: rgba(255, 255, 255, 0.58) !important;
    border-color: transparent !important;
    background: transparent !important;
}

.sidebar-nav a:hover,
.sidebar-search:hover,
.sidebar-toggle:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.sidebar-nav a.active {
    color: #ffffff !important;
    background: #e91d35 !important;
    box-shadow: 0 14px 34px rgba(233, 29, 53, 0.28) !important;
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a.active .nav-label {
    color: #ffffff !important;
}

.sidebar-search {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

.sidebar-toggle {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

html[data-theme="light"] .sidebar {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background:
        radial-gradient(circle at top left, rgba(233, 29, 53, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 18px 48px rgba(24, 42, 62, 0.12) !important;
}

html[data-theme="light"] .sidebar-head {
    border-bottom-color: rgba(16, 25, 35, 0.08) !important;
}

html[data-theme="light"] .brand-text {
    color: #101923 !important;
}

html[data-theme="light"] .brand-logo {
    border-color: rgba(115, 103, 255, 0.22) !important;
    box-shadow:
        0 0 0 5px rgba(115, 103, 255, 0.06),
        0 12px 28px rgba(24, 42, 62, 0.12) !important;
}

html[data-theme="light"] .topbar-brand {
    color: #101923 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .topbar-brand span {
    background: linear-gradient(90deg, #101923 0%, #4b4a72 52%, #6f5cff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

html[data-theme="light"] .topbar-brand img {
    border-color: rgba(115, 103, 255, 0.22) !important;
    box-shadow:
        0 0 0 5px rgba(115, 103, 255, 0.055),
        0 12px 28px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .sidebar-nav a,
html[data-theme="light"] .sidebar-search,
html[data-theme="light"] .sidebar-toggle {
    color: rgba(16, 25, 35, 0.58) !important;
    background: transparent !important;
}

html[data-theme="light"] .sidebar-nav a:hover,
html[data-theme="light"] .sidebar-search:hover,
html[data-theme="light"] .sidebar-toggle:hover {
    color: #101923 !important;
    background: rgba(16, 25, 35, 0.06) !important;
}

html[data-theme="light"] .sidebar-nav a.active {
    color: #ffffff !important;
    background: #e91d35 !important;
    box-shadow: 0 14px 34px rgba(233, 29, 53, 0.24) !important;
}

html[data-theme="light"] .sidebar-search,
html[data-theme="light"] .sidebar-toggle {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(16, 25, 35, 0.045) !important;
}

/* Topbar action pills: make Search, theme, VIP, Profile and Logout share one palette. */
.topbar-actions .search-button,
.topbar-actions .theme-toggle,
.topbar-actions .vip-pill,
.topbar-actions .user-pill,
.topbar-actions .ghost-button {
    color: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(16px);
}

.topbar-actions .search-button:hover,
.topbar-actions .theme-toggle:hover,
.topbar-actions .vip-pill:hover,
.topbar-actions .user-pill:hover,
.topbar-actions .ghost-button:hover {
    color: #ffffff !important;
    border-color: rgba(233, 29, 53, 0.28) !important;
    background: rgba(233, 29, 53, 0.14) !important;
}

.topbar-actions .vip-pill.is-live,
.topbar-actions .vip-pill {
    color: rgba(255, 255, 255, 0.78) !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.topbar-actions .theme-toggle-icon {
    color: #ffffff !important;
    background: rgba(233, 29, 53, 0.2) !important;
}

.topbar-actions .avatar-chip {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}

html[data-theme="light"] .topbar-actions .search-button,
html[data-theme="light"] .topbar-actions .theme-toggle,
html[data-theme="light"] .topbar-actions .vip-pill,
html[data-theme="light"] .topbar-actions .user-pill,
html[data-theme="light"] .topbar-actions .ghost-button {
    color: rgba(16, 25, 35, 0.72) !important;
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 14px 34px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .topbar-actions .search-button:hover,
html[data-theme="light"] .topbar-actions .theme-toggle:hover,
html[data-theme="light"] .topbar-actions .vip-pill:hover,
html[data-theme="light"] .topbar-actions .user-pill:hover,
html[data-theme="light"] .topbar-actions .ghost-button:hover {
    color: #101923 !important;
    border-color: rgba(233, 29, 53, 0.22) !important;
    background: rgba(233, 29, 53, 0.08) !important;
}

html[data-theme="light"] .topbar-actions .vip-pill.is-live,
html[data-theme="light"] .topbar-actions .vip-pill {
    color: rgba(16, 25, 35, 0.72) !important;
    background: rgba(255, 255, 255, 0.76) !important;
}

html[data-theme="light"] .topbar-actions .theme-toggle-icon {
    color: #ffffff !important;
    background: #e91d35 !important;
}

/* Live search results in the search modal. */
.search-live-meta {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-live-results {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px !important;
    max-height: min(48vh, 430px);
    overflow-y: auto;
    padding-right: 4px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.055);
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.search-result-card:hover {
    color: #ffffff;
    border-color: rgba(233, 29, 53, 0.28);
    background: rgba(233, 29, 53, 0.14);
    transform: translateY(-2px);
}

.search-result-card[hidden] {
    display: none !important;
}

.search-result-card img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.search-result-card span {
    min-width: 0;
}

.search-result-card strong,
.search-result-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-card strong {
    font-size: 0.92rem;
    font-weight: 900;
}

.search-result-card small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.74rem;
}

.search-empty {
    grid-column: 1 / -1;
    padding: 22px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.search-empty strong,
.search-empty span {
    display: block;
}

.search-empty span {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.44);
}

html[data-theme="light"] .search-live-meta {
    color: rgba(16, 25, 35, 0.5);
}

html[data-theme="light"] .search-result-card {
    color: #101923;
    border-color: rgba(16, 25, 35, 0.08);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 32px rgba(24, 42, 62, 0.08);
}

html[data-theme="light"] .search-result-card:hover {
    color: #101923;
    border-color: rgba(233, 29, 53, 0.22);
    background: rgba(233, 29, 53, 0.08);
}

html[data-theme="light"] .search-result-card small,
html[data-theme="light"] .search-empty span {
    color: rgba(16, 25, 35, 0.5);
}

html[data-theme="light"] .search-empty {
    border-color: rgba(16, 25, 35, 0.14);
    color: rgba(16, 25, 35, 0.72);
}

/* Native dropdown menus: keep catalog/status/access options readable in dark mode. */
select {
    color-scheme: dark;
    cursor: pointer;
    background:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)) !important;
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 17px) calc(50% - 3px),
        0 0 !important;
    background-size:
        7px 7px,
        7px 7px,
        100% 100% !important;
    background-repeat: no-repeat !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 12px 30px rgba(0, 0, 0, 0.14);
}

select option,
select optgroup {
    color: #ffffff;
    background: #090909;
    font-weight: 800;
}

select option:checked {
    color: #ffffff;
    background: #e91d35;
}

select option:hover {
    color: #ffffff;
    background: #151515;
}

.catalog-filter select,
.search-inline select {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="light"] select {
    color-scheme: light;
    background:
        linear-gradient(45deg, transparent 50%, rgba(16, 25, 35, 0.7) 50%),
        linear-gradient(135deg, rgba(16, 25, 35, 0.7) 50%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.68)) !important;
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 17px) calc(50% - 3px),
        0 0 !important;
    background-size:
        7px 7px,
        7px 7px,
        100% 100% !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 12px 28px rgba(24, 42, 62, 0.08);
}

html[data-theme="light"] select option,
html[data-theme="light"] select optgroup {
    color: #101923;
    background: #ffffff;
}

html[data-theme="light"] select option:checked {
    color: #ffffff;
    background: #e91d35;
}

html[data-theme="light"] select option:hover {
    color: #101923;
    background: #f1f4f8;
}

html[data-theme="light"] .catalog-filter select,
html[data-theme="light"] .search-inline select {
    color: #101923 !important;
    background-color: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(16, 25, 35, 0.1) !important;
}

/* Friendly custom dropdowns for catalog/search filters. */
.native-select-hidden {
    display: none !important;
}

.custom-select {
    position: relative;
    min-width: 0;
    width: 100%;
    z-index: 1;
}

.custom-select.is-open {
    z-index: 90;
}

.custom-select-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 0 46px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.038)),
        rgba(8, 8, 8, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 30px rgba(0, 0, 0, 0.16);
    font-weight: 850;
    text-align: left;
}

.custom-select-button::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.68;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 160ms ease, opacity 160ms ease;
}

.custom-select.is-open .custom-select-button {
    border-color: rgba(233, 29, 53, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 4px rgba(233, 29, 53, 0.13),
        0 18px 38px rgba(0, 0, 0, 0.24);
}

.custom-select.is-open .custom-select-button::after {
    opacity: 1;
    transform: translateY(-35%) rotate(225deg);
}

.custom-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(233, 29, 53, 0.16), transparent 40%),
        rgba(7, 7, 7, 0.96);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top;
    transition:
        opacity 150ms ease,
        transform 150ms ease;
    backdrop-filter: blur(18px);
}

.custom-select.is-open .custom-select-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
}

.custom-select-option:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.custom-select-option.is-selected {
    color: #ffffff;
    background: #e91d35;
    box-shadow: 0 10px 24px rgba(233, 29, 53, 0.22);
}

.custom-select-option.is-selected::after {
    content: "";
    width: 8px;
    height: 13px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

html[data-theme="light"] .custom-select-button {
    color: #101923;
    border-color: rgba(16, 25, 35, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
        #ffffff;
    box-shadow: 0 12px 28px rgba(24, 42, 62, 0.08);
}

html[data-theme="light"] .custom-select-menu {
    border-color: rgba(16, 25, 35, 0.1);
    background:
        radial-gradient(circle at top left, rgba(233, 29, 53, 0.08), transparent 40%),
        rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 54px rgba(24, 42, 62, 0.16);
}

html[data-theme="light"] .custom-select-option {
    color: rgba(16, 25, 35, 0.72);
}

html[data-theme="light"] .custom-select-option:hover {
    color: #101923;
    background: rgba(16, 25, 35, 0.06);
}

html[data-theme="light"] .custom-select-option.is-selected {
    color: #ffffff;
    background: #e91d35;
}

/* Final design audit: remove leftover blue/orange accents and unify shared components. */
::selection {
    background: rgba(233, 29, 53, 0.32) !important;
}

.primary-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #e91d35, #ff4358) !important;
    box-shadow: 0 14px 34px rgba(233, 29, 53, 0.26) !important;
}

.primary-button:hover {
    box-shadow: 0 18px 42px rgba(233, 29, 53, 0.32) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(233, 29, 53, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(233, 29, 53, 0.14) !important;
}

.floating-share {
    color: #ffffff !important;
    background:
        radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.28), transparent 20%),
        linear-gradient(135deg, #e91d35, #ff6b7a) !important;
    box-shadow: 0 18px 46px rgba(233, 29, 53, 0.3) !important;
}

.theme-toggle-icon,
.hero-badge,
.vip-badge-live {
    background: rgba(233, 29, 53, 0.16) !important;
}

.hero-badge {
    color: #ffffff !important;
    border: 1px solid rgba(233, 29, 53, 0.26) !important;
}

.profile-id-badge:not(.vip-badge-live),
.tag:not(.vip),
.status-badge:not(.approved):not(.pending):not(.rejected):not(.cancelled) {
    color: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.065) !important;
}

.flash {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #090909 !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24) !important;
}

.flash.success {
    border-color: rgba(84, 210, 153, 0.28) !important;
}

.flash.error {
    border-color: rgba(233, 29, 53, 0.34) !important;
}

.auth-showcase,
.auth-card,
.search-panel,
.table-shell,
.empty-state,
.payment-app-card,
.request-card,
.plan-card {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.revenue-table-panel .profile-id-badge,
.revenue-plan-row .profile-id-badge,
.revenue-payment-row .profile-id-badge {
    color: #ffffff !important;
    background: linear-gradient(135deg, #e91d35, #ff4358) !important;
    box-shadow: 0 10px 24px rgba(233, 29, 53, 0.22) !important;
}

html[data-theme="light"] .profile-id-badge:not(.vip-badge-live),
html[data-theme="light"] .tag:not(.vip),
html[data-theme="light"] .status-badge:not(.approved):not(.pending):not(.rejected):not(.cancelled) {
    color: rgba(16, 25, 35, 0.74) !important;
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.76) !important;
}

html[data-theme="light"] .flash,
html[data-theme="light"] .auth-showcase,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .search-panel,
html[data-theme="light"] .table-shell,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .payment-app-card,
html[data-theme="light"] .request-card,
html[data-theme="light"] .plan-card {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .theme-toggle-icon,
html[data-theme="light"] .hero-badge,
html[data-theme="light"] .vip-badge-live {
    color: #ffffff !important;
    background: #e91d35 !important;
}

/* Reader final fix: keep controls out of the manga pages and normalize page width. */
.reader-shell {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
    gap: 0 !important;
    overflow: visible !important;
}

.reader-top,
.reader-bottom {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: 100% !important;
}

.reader-bottom {
    justify-content: center !important;
}

.reader-flow {
    display: grid !important;
    justify-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    background: #000000 !important;
}

.reader-page {
    width: min(100%, 920px) !important;
    max-width: 920px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    line-height: 0 !important;
    background: #000000 !important;
}

.reader-page img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}

@media (max-width: 720px) {
    .reader-top,
    .reader-bottom {
        align-items: flex-start !important;
        flex-direction: column !important;
        padding: 16px !important;
    }

    .reader-actions {
        width: 100%;
    }
}

/* Reader polish: cinematic chapter header, clean page canvas, stronger bottom navigation. */
.reader-shell.reader-shell-polished {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    padding: 0 0 42px !important;
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 31, 50, 0.13), transparent 36%),
        linear-gradient(180deg, #030303 0%, #000 42%, #030303 100%) !important;
}

.reader-shell-polished .reader-progress-track {
    height: 7px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    overflow: hidden !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45) !important;
}

.reader-shell-polished .reader-progress-bar {
    background: linear-gradient(90deg, #ff1f32, #ff7a3d, #ffd166) !important;
    box-shadow: 0 0 28px rgba(255, 71, 87, 0.6) !important;
}

.reader-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    min-height: clamp(210px, 26vw, 330px);
    margin: 18px 0 18px;
    padding: clamp(24px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    background: #0a0a0a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.reader-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--reader-backdrop);
    background-size: cover;
    background-position: center;
    opacity: 0.34;
    filter: blur(2px) saturate(1.15);
    transform: scale(1.03);
}

.reader-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--reader-accent) 34%, transparent), transparent 34%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.72) 48%, rgba(0, 0, 0, 0.38) 100%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
}

.reader-hero-copy {
    min-width: 0;
}

.reader-back-link {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.reader-back-link:hover {
    color: #fff;
}

.reader-hero h2 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.8rem);
    font-weight: 950;
    font-style: italic;
    letter-spacing: -0.08em;
    line-height: 0.92;
    text-transform: uppercase;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
}

.reader-hero .eyebrow {
    margin-bottom: 10px;
    color: #ff6370 !important;
}

.reader-meta-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.reader-meta-strip span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    font-size: 0.82rem;
    font-weight: 850;
}

.reader-shell.reader-shell-polished {
    padding-bottom: 150px !important;
}

.reader-shell-polished .reader-hero {
    display: none !important;
}

.reader-mobile-topbar {
    position: sticky;
    top: 14px;
    z-index: 38;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    width: min(980px, calc(100% - 24px));
    margin: 12px auto 18px;
    pointer-events: auto;
}

.reader-mobile-square,
.reader-mobile-vip {
    display: inline-grid;
    place-items: center;
    min-width: 58px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(18, 22, 35, 0.94), rgba(8, 10, 18, 0.86));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 950;
    line-height: 1;
}

.reader-mobile-alert {
    color: #ff2b67;
    border-color: rgba(255, 43, 103, 0.22);
    font-size: 1.42rem;
}

.reader-mobile-vip {
    min-width: 78px;
    border: 0;
    color: #1a1200;
    background: linear-gradient(135deg, #ffc73b, #ff8a00);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.reader-mobile-title-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    min-height: 66px;
    padding: 11px 14px 11px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background:
        radial-gradient(circle at left, rgba(255, 31, 50, 0.13), transparent 34%),
        rgba(8, 10, 18, 0.9);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
}

.reader-mobile-title-card strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.04rem;
    font-weight: 950;
    font-style: italic;
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.reader-mobile-title-card div > span {
    display: block;
    margin-top: 4px;
    color: #ff9f1a;
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.reader-mobile-arrows {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.reader-mobile-arrows a,
.reader-mobile-arrows span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 1.62rem;
    font-weight: 950;
}

.reader-mobile-arrows span {
    opacity: 0.28;
}

.reader-mobile-dock {
    position: fixed;
    left: 50%;
    bottom: calc(26px + env(safe-area-inset-bottom));
    z-index: 45;
    display: grid;
    grid-template-columns: minmax(88px, 0.72fr) 58px 58px minmax(180px, 1.35fr) minmax(130px, 1fr);
    align-items: center;
    gap: 10px;
    width: min(920px, calc(100vw - 168px));
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 28px;
    background:
        radial-gradient(circle at right, rgba(255, 141, 0, 0.15), transparent 36%),
        rgba(8, 10, 18, 0.92);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    transform: translateX(-50%);
}

.reader-dock-button,
.reader-dock-icon-button,
.reader-dock-next {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.reader-dock-button {
    display: grid;
    place-items: center;
    gap: 2px;
    height: 66px;
    border-radius: 20px;
}

.reader-dock-button > span {
    font-size: 1.9rem;
    font-weight: 950;
    line-height: 0.8;
}

.reader-dock-button strong {
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reader-dock-icon-button {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 19px;
    font-size: 1.22rem;
    font-weight: 900;
    cursor: pointer;
}

button.reader-dock-icon-button {
    appearance: none;
    font-family: inherit;
}

.reader-dock-progress {
    min-width: 0;
    display: grid;
    gap: 9px;
    padding-inline: 8px;
}

.reader-dock-progress > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.reader-dock-progress strong {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-style: italic;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.reader-dock-progress span {
    color: #ffb11f;
    font-size: 0.8rem;
    font-weight: 950;
    white-space: nowrap;
}

.reader-dock-progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.reader-dock-progress-track span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9f1a, #ff3d4f);
    box-shadow: 0 0 20px rgba(255, 159, 26, 0.52);
    transform: scaleX(0);
    transform-origin: left center;
}

.reader-dock-next {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 72px;
    padding: 11px 10px 11px 18px;
    border: 0;
    border-radius: 22px;
    color: #201200;
    background: linear-gradient(135deg, #ffc12d, #ff8a00);
    box-shadow: 0 18px 34px rgba(255, 140, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.reader-dock-next span {
    color: #7d3b00;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.06em;
}

.reader-dock-next strong {
    font-size: 0.8rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.reader-dock-next b {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    font-size: 1.78rem;
    line-height: 1;
}

.reader-dock-button.is-disabled,
.reader-dock-next.is-disabled {
    opacity: 0.42;
    pointer-events: none;
    filter: grayscale(0.5);
}

.reader-hero-actions {
    justify-content: flex-end;
    max-width: 360px;
}

.reader-shell-polished .reader-actions a {
    border-radius: 999px !important;
}

.reader-shell-polished .reader-actions {
    align-items: center;
}

.reader-nav-button {
    position: relative;
    isolation: isolate;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 48px !important;
    padding: 9px 18px 9px 10px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)) !important;
    color: #fff !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(16px);
    font-size: 0.86rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.02em !important;
    text-decoration: none !important;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease !important;
}

.reader-nav-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.26), transparent 34%);
    transition: opacity 180ms ease;
}

.reader-nav-button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 99, 112, 0.44) !important;
    box-shadow: 0 22px 46px rgba(255, 31, 50, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.reader-nav-button:hover::before {
    opacity: 1;
}

.reader-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1;
}

.reader-nav-prev {
    padding-inline: 10px 18px !important;
}

.reader-nav-next {
    padding-inline: 20px 10px !important;
    border-color: rgba(255, 31, 50, 0.38) !important;
    background:
        radial-gradient(circle at left top, rgba(255, 255, 255, 0.26), transparent 32%),
        linear-gradient(135deg, #ff1f32, #ff6b3d) !important;
    box-shadow: 0 18px 42px rgba(255, 31, 50, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.reader-nav-next .reader-nav-icon {
    color: #ff2a38;
    background: #fff;
}

.reader-nav-detail .reader-nav-icon {
    font-size: 0.98rem;
}

.reader-nav-prev:hover .reader-nav-icon {
    transform: translateX(-2px);
}

.reader-nav-next:hover .reader-nav-icon {
    transform: translateX(2px);
}

.reader-nav-icon {
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.reader-shell-polished .reader-flow {
    position: relative;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 16%, transparent 84%, rgba(255, 255, 255, 0.025)),
        #000 !important;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45) !important;
}

.reader-shell-polished .reader-page {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    background: #000 !important;
}

.reader-shell-polished .reader-page img {
    filter: contrast(1.02) saturate(1.02);
}

.reader-bottom-polished {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 18px;
    padding: 22px 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    background:
        radial-gradient(circle at right, rgba(255, 31, 50, 0.13), transparent 34%),
        rgba(255, 255, 255, 0.035);
}

.reader-shell-polished .reader-bottom-polished {
    display: none !important;
}

.reader-finish-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.reader-finish-copy span {
    color: #ff6370;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.reader-finish-copy strong {
    color: #fff;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    font-weight: 950;
    letter-spacing: -0.03em;
}

html[data-theme="light"] .reader-shell.reader-shell-polished {
    background:
        radial-gradient(circle at 50% -10%, rgba(233, 29, 53, 0.1), transparent 36%),
        linear-gradient(180deg, #f7f8fb 0%, #ffffff 44%, #f4f7fb 100%) !important;
}

html[data-theme="light"] .reader-hero {
    border-color: rgba(16, 25, 35, 0.08);
    box-shadow: 0 30px 80px rgba(24, 42, 62, 0.14);
}

html[data-theme="light"] .reader-hero::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(233, 29, 53, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(16, 25, 35, 0.88) 0%, rgba(16, 25, 35, 0.56) 52%, rgba(16, 25, 35, 0.28) 100%);
}

html[data-theme="light"] .reader-shell-polished .reader-flow {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background:
        linear-gradient(90deg, rgba(16, 25, 35, 0.035), transparent 16%, transparent 84%, rgba(16, 25, 35, 0.035)),
        #f5f7fa !important;
    box-shadow: 0 28px 90px rgba(24, 42, 62, 0.14) !important;
}

html[data-theme="light"] .reader-bottom-polished {
    border-color: rgba(16, 25, 35, 0.08);
    background:
        radial-gradient(circle at right, rgba(233, 29, 53, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1);
}

html[data-theme="light"] .reader-finish-copy strong {
    color: #101923;
}

html[data-theme="light"] .reader-nav-button {
    border-color: rgba(16, 25, 35, 0.1) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 252, 0.72)) !important;
    color: #101923 !important;
    box-shadow: 0 16px 34px rgba(24, 42, 62, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="light"] .reader-nav-button:hover {
    border-color: rgba(233, 29, 53, 0.28) !important;
    box-shadow: 0 22px 46px rgba(233, 29, 53, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] .reader-nav-icon {
    color: #101923;
    background: rgba(16, 25, 35, 0.06);
}

html[data-theme="light"] .reader-nav-next {
    color: #fff !important;
    background:
        radial-gradient(circle at left top, rgba(255, 255, 255, 0.26), transparent 32%),
        linear-gradient(135deg, #e91d35, #ff6b3d) !important;
    box-shadow: 0 18px 42px rgba(233, 29, 53, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

html[data-theme="light"] .reader-nav-next .reader-nav-icon {
    color: #e91d35;
    background: #fff;
}

@media (max-width: 860px) {
    .reader-shell.reader-shell-polished {
        padding-bottom: 148px !important;
    }

    .reader-mobile-topbar {
        position: sticky;
        top: 10px;
        z-index: 38;
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 10px;
        margin: 10px 10px 12px;
        pointer-events: auto;
    }

    .reader-mobile-square,
    .reader-mobile-vip {
        display: inline-grid;
        place-items: center;
        min-width: 52px;
        height: 52px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 18px;
        color: #fff;
        background:
            linear-gradient(135deg, rgba(18, 22, 35, 0.94), rgba(8, 10, 18, 0.86));
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(18px);
        text-decoration: none;
        font-size: 1.65rem;
        font-weight: 950;
        line-height: 1;
    }

    .reader-mobile-alert {
        color: #ff2b67;
        border-color: rgba(255, 43, 103, 0.22);
        font-size: 1.35rem;
    }

    .reader-mobile-vip {
        min-width: 72px;
        border: 0;
        color: #1a1200;
        background: linear-gradient(135deg, #ffc73b, #ff8a00);
        font-size: 0.86rem;
        letter-spacing: 0.04em;
    }

    .reader-mobile-title-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        min-width: 0;
        min-height: 60px;
        padding: 10px 12px 10px 18px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 22px;
        background:
            radial-gradient(circle at left, rgba(255, 31, 50, 0.13), transparent 34%),
            rgba(8, 10, 18, 0.9);
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(22px);
    }

    .reader-mobile-title-card strong {
        display: block;
        overflow: hidden;
        color: #fff;
        font-size: 0.96rem;
        font-weight: 950;
        font-style: italic;
        letter-spacing: -0.04em;
        line-height: 1.05;
        text-overflow: ellipsis;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .reader-mobile-title-card div > span {
        display: block;
        margin-top: 4px;
        color: #ff9f1a;
        font-size: 0.72rem;
        font-weight: 950;
        letter-spacing: 0.08em;
    }

    .reader-mobile-arrows {
        display: flex;
        align-items: center;
        gap: 5px;
        padding-left: 12px;
        border-left: 1px solid rgba(255, 255, 255, 0.09);
    }

    .reader-mobile-arrows a,
    .reader-mobile-arrows span {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        color: rgba(255, 255, 255, 0.82);
        text-decoration: none;
        font-size: 1.5rem;
        font-weight: 950;
    }

    .reader-mobile-arrows span {
        opacity: 0.28;
    }

    .reader-hero {
        display: none;
    }

    .reader-hero-actions {
        justify-content: flex-start;
        max-width: none;
    }

    .reader-bottom-polished {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .reader-shell-polished .reader-actions {
        width: 100%;
    }

    .reader-nav-button {
        flex: 1 1 150px;
    }

    .reader-mobile-dock {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(96px + env(safe-area-inset-bottom));
        z-index: 45;
        display: grid;
        grid-template-columns: minmax(64px, 0.72fr) 52px 52px minmax(118px, 1.35fr) minmax(96px, 1fr);
        align-items: center;
        gap: 8px;
        max-width: 760px;
        width: auto;
        margin-inline: auto;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 26px;
        background:
            radial-gradient(circle at right, rgba(255, 141, 0, 0.15), transparent 36%),
            rgba(8, 10, 18, 0.92);
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(24px);
        transform: none;
    }

    .reader-dock-button,
    .reader-dock-icon-button,
    .reader-dock-next {
        min-width: 0;
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #fff;
        background: rgba(255, 255, 255, 0.055);
        text-decoration: none;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .reader-dock-button {
        display: grid;
        place-items: center;
        gap: 2px;
        height: 62px;
        border-radius: 18px;
    }

    .reader-dock-button > span {
        font-size: 1.75rem;
        font-weight: 950;
        line-height: 0.8;
    }

    .reader-dock-button strong {
        font-size: 0.63rem;
        font-weight: 950;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .reader-dock-icon-button {
        display: inline-grid;
        place-items: center;
        width: 52px;
        height: 52px;
        border-radius: 17px;
        font-size: 1.18rem;
        font-weight: 900;
        cursor: pointer;
    }

    button.reader-dock-icon-button {
        appearance: none;
        font-family: inherit;
    }

    .reader-dock-progress {
        min-width: 0;
        display: grid;
        gap: 8px;
        padding-inline: 6px;
    }

    .reader-dock-progress > div:first-child {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
    }

    .reader-dock-progress strong {
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.84rem;
        font-style: italic;
        letter-spacing: 0.08em;
        white-space: nowrap;
    }

    .reader-dock-progress span {
        color: #ffb11f;
        font-size: 0.78rem;
        font-weight: 950;
        white-space: nowrap;
    }

    .reader-dock-progress-track {
        height: 7px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
    }

    .reader-dock-progress-track span {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #ff9f1a, #ff3d4f);
        box-shadow: 0 0 20px rgba(255, 159, 26, 0.52);
        transform: scaleX(0);
        transform-origin: left center;
    }

    .reader-dock-next {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 32px;
        grid-template-rows: auto auto;
        align-items: center;
        min-height: 68px;
        padding: 10px 9px 10px 16px;
        border: 0;
        border-radius: 20px;
        color: #201200;
        background: linear-gradient(135deg, #ffc12d, #ff8a00);
        box-shadow: 0 18px 34px rgba(255, 140, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    }

    .reader-dock-next span {
        color: #7d3b00;
        font-size: 0.68rem;
        font-weight: 950;
        letter-spacing: 0.06em;
    }

    .reader-dock-next strong {
        font-size: 0.78rem;
        font-weight: 950;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .reader-dock-next b {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: inline-grid;
        place-items: center;
        width: 32px;
        height: 32px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.35);
        font-size: 1.65rem;
        line-height: 1;
    }

    .reader-dock-button.is-disabled,
    .reader-dock-next.is-disabled {
        opacity: 0.42;
        pointer-events: none;
        filter: grayscale(0.5);
    }

    .reader-bottom-polished {
        display: none !important;
    }
}

@media (max-width: 560px) {
    .reader-shell.reader-shell-polished {
        padding-bottom: 24px !important;
    }

    .reader-hero {
        margin-top: 10px;
        padding: 22px 16px;
        border-radius: 22px;
    }

    .reader-meta-strip span {
        min-height: 30px;
        padding: 7px 10px;
        font-size: 0.74rem;
    }

    .reader-shell-polished .reader-flow {
        border-inline: 0 !important;
        border-radius: 0 !important;
        margin-inline: calc(var(--content-padding, 0px) * -1);
    }

    .reader-bottom-polished {
        border-radius: 22px;
        padding: 18px 16px !important;
    }

    .reader-nav-button {
        min-height: 46px !important;
        padding-block: 8px !important;
        font-size: 0.8rem !important;
    }

    .reader-nav-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .reader-mobile-topbar {
        grid-template-columns: 46px minmax(0, 1fr) auto auto;
        gap: 7px;
        margin-inline: 6px;
    }

    .reader-mobile-square,
    .reader-mobile-vip {
        min-width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .reader-mobile-vip {
        min-width: 58px;
        font-size: 0.76rem;
    }

    .reader-mobile-title-card {
        min-height: 54px;
        padding: 9px 9px 9px 14px;
        border-radius: 18px;
    }

    .reader-mobile-arrows a,
    .reader-mobile-arrows span {
        width: 28px;
        height: 28px;
        font-size: 1.25rem;
    }

    .reader-mobile-dock {
        left: 8px;
        right: 8px;
        bottom: calc(88px + env(safe-area-inset-bottom));
        grid-template-columns: 58px 44px 44px minmax(74px, 1fr) 86px;
        gap: 6px;
        width: auto;
        padding: 9px;
        border-radius: 22px;
        transform: none;
    }

    .reader-dock-button {
        height: 54px;
        border-radius: 16px;
    }

    .reader-dock-button strong {
        font-size: 0.55rem;
    }

    .reader-dock-icon-button {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .reader-dock-progress strong {
        font-size: 0.72rem;
    }

    .reader-dock-progress span {
        font-size: 0.68rem;
    }

    .reader-dock-next {
        min-height: 58px;
        padding: 9px 7px 9px 12px;
        border-radius: 17px;
    }

    .reader-dock-next strong {
        font-size: 0.64rem;
    }

    .reader-dock-next span {
        font-size: 0.58rem;
    }

    .reader-dock-next b {
        width: 28px;
        height: 28px;
        font-size: 1.35rem;
    }
}

/* Admin users: compact VIP day picker. */
.vip-grant-form {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.vip-grant-form label {
    display: grid;
    gap: 4px;
    width: 88px;
}

.vip-grant-form label > span {
    font-size: 0.58rem !important;
    line-height: 1;
}

.vip-grant-form input[type="number"] {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.admin-shell .table-shell {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.admin-users-table {
    min-width: 980px !important;
}

.admin-users-table th:last-child,
.admin-users-table td:last-child {
    min-width: 320px;
    width: 320px;
}

.admin-users-table .table-actions {
    align-items: end;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 7px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
}

.admin-users-table .table-actions form {
    flex: 0 0 auto;
}

.admin-users-table .vip-grant-form {
    flex-wrap: nowrap;
}

.admin-vip-plans-shell {
    display: grid;
    gap: 24px;
}

.vip-plan-editor {
    display: grid;
    gap: 18px;
}

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

.vip-plan-admin-card {
    display: grid;
    align-content: start;
    gap: 16px;
}

.vip-plan-admin-card label {
    display: grid;
    gap: 8px;
}

.vip-plan-fields {
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
    gap: 12px;
}

.vip-plan-admin-card textarea {
    min-height: 142px;
    resize: vertical;
}

.vip-plan-switches,
.vip-plan-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vip-plan-actions {
    justify-content: flex-end;
}

@media (max-width: 980px) {
    .vip-plan-form-grid {
        grid-template-columns: 1fr;
    }

    .vip-plan-actions {
        justify-content: stretch;
    }

    .vip-plan-actions .primary-button,
    .vip-plan-actions .ghost-button {
        flex: 1 1 180px;
    }
}

@media (max-width: 560px) {
    .vip-plan-fields {
        grid-template-columns: 1fr;
    }
}

.admin-users-table .vip-grant-form label {
    width: 74px;
}

.admin-users-table .ghost-button.small,
.admin-users-table .danger-button.small {
    padding-inline: 10px;
    white-space: nowrap;
}

.chapter-access-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Home polish pack: ranking, continue reading, daily highlight, animated genre chips, VIP sparkle, reader progress. */
.top-ranking-strip,
.continue-reading-shelf,
.genre-chip-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.top-ranking-strip::-webkit-scrollbar,
.continue-reading-shelf::-webkit-scrollbar,
.genre-chip-row::-webkit-scrollbar {
    display: none;
}

.ranking-chip,
.continue-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025)),
        #090909;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.ranking-chip-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #0a0a0a;
    font-weight: 950;
    background: linear-gradient(135deg, #ffd166, #ff9f1c);
    box-shadow: 0 8px 24px rgba(255, 182, 65, 0.26);
}

.ranking-chip img,
.continue-card img {
    width: 62px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

.ranking-chip-copy,
.continue-card-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.ranking-chip-copy strong,
.continue-card-copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-chip-copy small,
.continue-card-copy p,
.continue-card-copy span {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.74rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.daily-highlight-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 320px);
    gap: clamp(22px, 3vw, 42px);
    align-items: center;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        #090909;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.daily-highlight-copy {
    display: grid;
    gap: 16px;
}

.daily-highlight-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.9rem);
    font-weight: 950;
    font-style: italic;
    letter-spacing: -0.06em;
    line-height: 0.9;
    text-transform: uppercase;
}

.daily-highlight-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.daily-highlight-meta span:not(.tag) {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
}

.daily-highlight-media {
    justify-self: end;
}

.daily-highlight-media img {
    width: min(100%, 300px);
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.44);
}

.genre-chip {
    position: relative;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.055);
    display: inline-flex;
    align-items: center;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    overflow: hidden;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.genre-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.18), transparent 72%);
    transform: translateX(-135%);
    transition: transform 420ms ease;
}

.genre-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(233, 29, 53, 0.36);
    background: rgba(233, 29, 53, 0.12);
}

.genre-chip:hover::after {
    transform: translateX(135%);
}

.tag.vip,
.vip-row .tag.vip,
.vip-badge-live,
.vip-pill.is-live {
    position: relative;
    overflow: hidden;
}

.tag.vip::after,
.vip-row .tag.vip::after,
.vip-badge-live::after,
.vip-pill.is-live::after {
    content: "";
    position: absolute;
    inset: -20% auto -20% -40%;
    width: 42%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-180%) rotate(16deg);
    animation: vipSparkle 3.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vipSparkle {
    0%, 76%, 100% {
        transform: translateX(-180%) rotate(16deg);
        opacity: 0;
    }

    18%, 42% {
        transform: translateX(420%) rotate(16deg);
        opacity: 1;
    }
}

.reader-progress-track {
    position: sticky;
    top: 0;
    z-index: 25;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.reader-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b7a, #e91d35);
    box-shadow: 0 0 18px rgba(233, 29, 53, 0.42);
    transform: scaleX(0);
    transform-origin: left center;
}

html[data-theme="light"] .ranking-chip,
html[data-theme="light"] .continue-card,
html[data-theme="light"] .daily-highlight-card {
    border-color: rgba(16, 25, 35, 0.08);
    background:
        radial-gradient(circle at top right, rgba(233, 29, 53, 0.08), transparent 34%),
        rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1);
}

html[data-theme="light"] .ranking-chip-copy strong,
html[data-theme="light"] .continue-card-copy strong,
html[data-theme="light"] .daily-highlight-card h3 {
    color: #101923;
}

html[data-theme="light"] .ranking-chip-copy small,
html[data-theme="light"] .continue-card-copy p,
html[data-theme="light"] .continue-card-copy span,
html[data-theme="light"] .daily-highlight-meta span:not(.tag),
html[data-theme="light"] .genre-chip {
    color: #5f7082;
}

html[data-theme="light"] .genre-chip {
    border-color: rgba(16, 25, 35, 0.08);
    background: rgba(16, 25, 35, 0.04);
}

.content-shell > .home-sections .latest-manga-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(320px, 1fr)) !important;
    column-gap: clamp(28px, 4vw, 64px) !important;
    row-gap: 0 !important;
}

.content-shell > .home-sections .latest-manga-row {
    display: grid !important;
    grid-template-columns: 76px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 16px !important;
    min-width: 0 !important;
    padding: 15px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 58%),
        rgba(255, 255, 255, 0.008) !important;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease !important;
}

.content-shell > .home-sections .latest-manga-row:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(255, 31, 50, 0.22) !important;
    background:
        radial-gradient(circle at left top, rgba(255, 31, 50, 0.12), transparent 42%),
        rgba(255, 255, 255, 0.026) !important;
}

.latest-manga-cover {
    display: block;
    width: 76px;
    height: 102px;
    overflow: hidden;
    border-radius: 11px;
    background: #111;
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.42);
}

.latest-manga-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.latest-manga-copy {
    min-width: 0;
    padding-top: 2px;
}

.latest-manga-copy h4 {
    margin: 0 0 10px;
    font-size: clamp(0.98rem, 1.1vw, 1.16rem);
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.15;
}

.latest-manga-copy h4 a {
    color: #fff;
    text-decoration: none;
}

.latest-chapter-lines {
    display: grid;
    gap: 8px;
}

.latest-chapter-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    color: #8ba0bb;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 800;
}

.latest-chapter-line span {
    min-width: 0;
}

.latest-chapter-line time {
    color: #52617a;
    font-weight: 750;
    white-space: nowrap;
}

.latest-chapter-line:hover span,
.latest-chapter-line:hover time {
    color: #ff6370;
}

.latest-chapter-empty {
    color: #66748a;
    font-size: 0.86rem;
    font-weight: 800;
}

html[data-theme="light"] .content-shell > .home-sections .latest-manga-row {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(245, 249, 252, 0.48)),
        rgba(255, 255, 255, 0.68) !important;
}

html[data-theme="light"] .content-shell > .home-sections .latest-manga-row:hover {
    border-color: rgba(233, 29, 53, 0.22) !important;
    background:
        radial-gradient(circle at left top, rgba(233, 29, 53, 0.1), transparent 42%),
        rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] .latest-manga-copy h4 a {
    color: #101923;
}

html[data-theme="light"] .latest-chapter-line {
    color: #516780;
}

html[data-theme="light"] .latest-chapter-line time,
html[data-theme="light"] .latest-chapter-empty {
    color: #738298;
}

.content-shell > .home-sections .home-subsection.account-security-alert {
    margin: 4px 12px 18px !important;
    padding: 18px 22px !important;
    border: 1px solid rgba(255, 84, 100, 0.28) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(circle at right top, rgba(255, 82, 96, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 28, 48, 0.12), rgba(10, 15, 23, 0.92)) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.account-security-alert > div {
    max-width: 900px;
}

.account-security-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #ff6d79;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-security-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff1f32;
    box-shadow: 0 0 0 6px rgba(255, 31, 50, 0.12);
}

.account-security-alert strong {
    display: block;
    color: #fff;
    font-size: clamp(1rem, 1.4vw, 1.35rem);
    font-weight: 950;
    letter-spacing: -0.02em;
}

.account-security-alert p {
    max-width: 760px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.55;
}

html[data-theme="light"] .content-shell > .home-sections .home-subsection.account-security-alert {
    border-color: rgba(222, 42, 58, 0.2) !important;
    background:
        radial-gradient(circle at right top, rgba(255, 92, 110, 0.16), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 241, 0.9)) !important;
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.12) !important;
}

html[data-theme="light"] .account-security-alert strong {
    color: #141820;
}

html[data-theme="light"] .account-security-alert p {
    color: #5f7082;
}

@media (max-width: 900px) {
    .content-shell > .home-sections .latest-manga-list {
        grid-template-columns: 1fr !important;
    }

    .daily-highlight-card {
        grid-template-columns: 1fr;
    }

    .daily-highlight-media {
        justify-self: start;
    }
}

/* Mobile app-like navigation: move the main menu to a bottom dock. */
@media (max-width: 980px) {
    .page-shell {
        padding-bottom: 112px;
    }

    .sidebar {
        position: fixed !important;
        top: auto !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        width: auto !important;
        margin: 0 !important;
        padding: 10px 12px !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        border-radius: 28px !important;
        background:
            radial-gradient(circle at top left, rgba(233, 29, 53, 0.12), transparent 34%),
            rgba(8, 8, 8, 0.92) !important;
        box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34) !important;
        backdrop-filter: blur(18px);
        z-index: 90;
    }

    .sidebar-head,
    .sidebar-toggle {
        display: none !important;
    }

    .sidebar-nav {
        display: flex !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 0 2px 0 0 !important;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex: 0 0 72px !important;
        min-width: 72px !important;
        width: 72px !important;
        min-height: 64px !important;
        padding: 10px 8px !important;
        border-radius: 18px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .sidebar-foot {
        display: flex !important;
        justify-content: flex-end !important;
        margin: 0 !important;
    }

    .sidebar-search {
        flex: 0 0 58px !important;
        min-width: 58px !important;
        width: 58px !important;
        padding: 0 !important;
    }

    .sidebar-search .nav-label {
        display: none !important;
    }

    .nav-label {
        display: block !important;
        max-width: none !important;
        opacity: 1 !important;
        transform: none !important;
        font-size: 0.62rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.02em !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .nav-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .main-shell {
        width: calc(100% - 20px) !important;
        margin: 14px auto 0 !important;
    }

    .topbar {
        padding-top: 6px !important;
    }

    .topbar-actions {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        padding-bottom: 2px !important;
        scrollbar-width: none;
    }

    .topbar-actions::-webkit-scrollbar {
        display: none;
    }

    .topbar-actions > * {
        flex: 0 0 auto;
    }

    .topbar-actions .search-button,
    .topbar-actions .theme-toggle,
    .topbar-actions .vip-pill,
    .topbar-actions .user-pill,
    .topbar-actions .ghost-button,
    .topbar-actions .primary-button {
        min-height: 42px !important;
        padding-inline: 14px !important;
        font-size: 0.86rem !important;
        white-space: nowrap !important;
    }

    .content-shell {
        gap: 22px !important;
        padding-top: 16px !important;
    }

    .floating-share {
        right: 16px !important;
        bottom: 96px !important;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding-bottom: 106px;
    }

    .sidebar {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        padding: 8px 10px !important;
        border-radius: 24px !important;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex-basis: 66px !important;
        min-width: 66px !important;
    }

    .nav-label {
        font-size: 0.58rem !important;
    }

    .main-shell {
        width: calc(100% - 14px) !important;
    }
}

@media (max-width: 980px) {
    html,
    body {
        overflow-x: hidden;
    }

    .page-shell,
    .main-shell,
    .content-shell,
    .content-shell > *,
    .section-block,
    .home-subsection,
    .split-layout,
    .catalog-shell,
    .reader-shell,
    .detail-hero,
    .profile-hero {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .topbar {
        gap: 14px !important;
    }

    .topbar-actions {
        width: 100% !important;
        padding-inline: 0 !important;
    }

    .topbar-actions .user-pill {
        min-width: 0 !important;
    }

    .topbar-actions .user-pill span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 132px;
    }

    .section-block,
    .catalog-shell,
    .admin-dashboard-shell,
    .section-block-showcase,
    .profile-card,
    .admin-panel,
    .search-panel,
    .detail-hero,
    .reader-shell {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .home-subsection {
        padding: 24px 16px 30px !important;
    }

    .hero,
    .hero.hero-carousel,
    .auth-showcase,
    .auth-card {
        padding: 20px !important;
    }

    .hero.hero-carousel .hero-slide .hero-grid {
        padding: 24px 18px 124px !important;
    }

    .manga-grid-spotlight,
    .manga-grid.compact,
    .catalog-results {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    .content-shell > .home-sections .manga-card,
    .content-shell > .home-sections .manga-card.compact,
    .content-shell > .home-sections .chapter-card {
        flex: 0 0 146px !important;
        width: 146px !important;
        min-width: 146px !important;
    }

    .continue-reading-shelf,
    .top-ranking-strip,
    .chapter-grid,
    .genre-manga-row {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .continue-reading-shelf::-webkit-scrollbar,
    .top-ranking-strip::-webkit-scrollbar,
    .chapter-grid::-webkit-scrollbar,
    .genre-manga-row::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 560px) {
    .sidebar {
        left: 6px !important;
        right: 6px !important;
        bottom: 6px !important;
        padding: 8px !important;
        gap: 8px !important;
        border-radius: 22px !important;
    }

    .sidebar-nav {
        gap: 6px !important;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex: 0 0 60px !important;
        min-width: 60px !important;
        width: 60px !important;
        min-height: 58px !important;
        padding: 8px 6px !important;
    }

    .sidebar-search {
        flex-basis: 52px !important;
        min-width: 52px !important;
        width: 52px !important;
    }

    .nav-label {
        font-size: 0.54rem !important;
    }

    .main-shell {
        width: calc(100% - 10px) !important;
        margin-top: 10px !important;
    }

    .topbar-actions .search-button,
    .topbar-actions .theme-toggle,
    .topbar-actions .vip-pill,
    .topbar-actions .user-pill,
    .topbar-actions .ghost-button,
    .topbar-actions .primary-button {
        min-height: 40px !important;
        padding-inline: 12px !important;
        font-size: 0.8rem !important;
    }

    .topbar-actions .user-pill span:last-child {
        display: none;
    }

    .hero h2,
    .catalog-head h2,
    .profile-main-card h2,
    .detail-copy h2,
    .hero.hero-carousel h2 {
        font-size: clamp(1.5rem, 8.2vw, 2.2rem) !important;
        line-height: 0.98 !important;
    }

    .hero-description,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) p,
    .reader-shell p {
        font-size: 0.92rem !important;
    }

    .floating-share {
        width: 52px !important;
        height: 52px !important;
        right: 12px !important;
        bottom: 88px !important;
        border-radius: 18px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 420px) {
    .page-shell {
        padding-bottom: 98px !important;
    }

    .home-subsection {
        padding: 22px 12px 28px !important;
    }

    .section-block,
    .catalog-shell,
    .admin-dashboard-shell,
    .section-block-showcase,
    .profile-card,
    .admin-panel,
    .search-panel,
    .detail-hero,
    .reader-shell {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .manga-grid-spotlight,
    .manga-grid.compact,
    .catalog-results {
        gap: 12px !important;
    }

    .content-shell > .home-sections .manga-card,
    .content-shell > .home-sections .manga-card.compact,
    .content-shell > .home-sections .chapter-card {
        flex: 0 0 132px !important;
        width: 132px !important;
        min-width: 132px !important;
    }
}

@media (max-width: 980px) {
    body.reader-page-active .sidebar {
        display: none !important;
    }

    body.reader-page-active .page-shell {
        padding-bottom: 0 !important;
    }

    body.reader-page-active .main-shell {
        width: calc(100% - 12px) !important;
    }

    body.reader-page-active .reader-mobile-dock {
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }

    body.reader-page-active .floating-share {
        display: none !important;
    }
}

@media (max-width: 560px) {
    body.reader-page-active .reader-mobile-dock {
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    }
}

.reader-shell-polished .reader-progress-track,
.reader-mobile-topbar,
.reader-mobile-dock {
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease !important;
}

body.reader-controls-hidden .reader-shell-polished .reader-progress-track,
body.reader-controls-hidden .reader-mobile-topbar,
body.reader-controls-hidden .reader-mobile-dock {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

body.reader-controls-hidden .reader-shell-polished .reader-progress-track {
    transform: translateY(-8px) !important;
}

body.reader-controls-hidden .reader-mobile-topbar {
    transform: translateY(-14px) scale(0.98) !important;
}

body.reader-controls-hidden .reader-mobile-dock {
    transform: translateX(-50%) translateY(18px) !important;
}

@media (max-width: 860px) {
    body.reader-controls-hidden .reader-mobile-dock {
        transform: translateY(18px) !important;
    }
}

.reader-shell-polished .reader-progress-bar {
    background: linear-gradient(90deg, #ff1f32, #6d5dfc, #37e6ff) !important;
    box-shadow: 0 0 28px rgba(55, 230, 255, 0.48) !important;
}

.reader-mobile-vip {
    color: #03131d !important;
    background: linear-gradient(135deg, #67f1ff, #7367ff) !important;
    box-shadow: 0 18px 36px rgba(65, 205, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

.reader-mobile-title-card div > span,
.reader-dock-progress span {
    color: #67f1ff !important;
}

.reader-mobile-dock {
    grid-template-columns: minmax(88px, 0.75fr) 58px minmax(180px, 1.35fr) minmax(130px, 1fr) !important;
    background:
        radial-gradient(circle at right, rgba(103, 241, 255, 0.16), transparent 36%),
        rgba(8, 10, 18, 0.92) !important;
}

.reader-dock-progress-track span {
    background: linear-gradient(90deg, #67f1ff, #7367ff, #ff3d6e) !important;
    box-shadow: 0 0 20px rgba(103, 241, 255, 0.5) !important;
}

.reader-dock-next {
    color: #fff !important;
    background:
        radial-gradient(circle at left top, rgba(255, 255, 255, 0.26), transparent 34%),
        linear-gradient(135deg, #37e6ff, #7367ff 58%, #ff3d6e) !important;
    box-shadow: 0 18px 34px rgba(83, 111, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

.reader-dock-next span {
    color: rgba(255, 255, 255, 0.72) !important;
}

.reader-dock-next b {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18) !important;
}

@media (max-width: 860px) {
    .reader-mobile-dock {
        grid-template-columns: minmax(64px, 0.72fr) 52px minmax(118px, 1.35fr) minmax(96px, 1fr) !important;
    }
}

@media (max-width: 560px) {
    .reader-mobile-dock {
        grid-template-columns: 58px 44px minmax(74px, 1fr) 86px !important;
    }
}

.brand-mini {
    text-decoration: none !important;
}

.brand-logo {
    overflow: hidden !important;
}

@media (max-width: 980px) {
    .brand-logo {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
        border-radius: 13px !important;
    }

    .topbar-brand {
        gap: 9px !important;
        font-size: 1.12rem !important;
    }

    .topbar-brand img {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
        border-radius: 14px !important;
    }

    .brand-text {
        letter-spacing: 0.04em !important;
    }
}

@media (max-width: 560px) {
    .topbar-brand span {
        display: none !important;
    }

    .topbar {
        gap: 12px !important;
    }
}

body.reader-page-active .topbar-brand {
    display: none !important;
}

.notification-menu {
    position: relative;
    flex: 0 0 auto;
}

.notification-menu[open] {
    z-index: 120;
}

.notification-menu summary {
    list-style: none;
}

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

.notification-bell {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #fff;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2), transparent 24%),
        radial-gradient(circle at 72% 72%, rgba(255, 61, 110, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(103, 241, 255, 0.18), rgba(115, 103, 255, 0.18)),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        0 0 0 5px rgba(103, 241, 255, 0.045),
        0 14px 30px rgba(115, 103, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.notification-bell:hover,
.notification-menu[open] .notification-bell {
    transform: translateY(-1px);
    border-color: rgba(103, 241, 255, 0.26);
    box-shadow:
        0 0 0 6px rgba(103, 241, 255, 0.07),
        0 18px 40px rgba(115, 103, 255, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.notification-bell-art {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 29px;
    height: 29px;
}

.notification-bell-art::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 4px;
    width: 7px;
    height: 7px;
    border: 2px solid #0a0a0a;
    border-radius: 999px;
    background: #67f1ff;
    box-shadow: 0 0 14px rgba(103, 241, 255, 0.8);
}

.notification-bell-art svg {
    width: 100%;
    height: 100%;
    color: #f8fbff;
    filter: drop-shadow(0 0 10px rgba(103, 241, 255, 0.3));
}

.notification-bell-art svg .bell-glow {
    fill: rgba(103, 241, 255, 0.12);
}

.notification-bell b {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 6px;
    border: 2px solid #080808;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ff3d6e, #7367ff);
    font-size: 0.68rem;
    font-weight: 950;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(103, 241, 255, 0.12), transparent 36%),
        rgba(8, 10, 18, 0.96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(22px);
}

.notification-dropdown > strong {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 950;
}

.notification-dropdown a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.045);
}

.notification-dropdown a:hover {
    background: rgba(255, 255, 255, 0.09);
}

.notification-dropdown img {
    width: 48px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.notification-dropdown em {
    display: block;
    overflow: hidden;
    color: #fff;
    font-style: normal;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dropdown small,
.notification-dropdown p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 800;
}

.notification-empty-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 128px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 30%, rgba(115, 103, 255, 0.22), transparent 34%),
        radial-gradient(circle at 22% 78%, rgba(103, 241, 255, 0.12), transparent 30%),
        #050507;
}

.notification-empty-art::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(103, 241, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 42px rgba(115, 103, 255, 0.16);
}

.notification-empty-art img {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    object-fit: cover;
    object-position: center 34%;
    opacity: 0.86;
    filter: saturate(1.08) contrast(1.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 0 30px rgba(115, 103, 255, 0.2);
}

.weekly-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.weekly-leaderboard-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 108px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 24px;
    color: inherit;
    text-decoration: none;
    background:
        radial-gradient(circle at right, rgba(115, 103, 255, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.035);
}

.weekly-leaderboard-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103, 241, 255, 0.22);
}

.weekly-rank {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #061018;
    background: linear-gradient(135deg, #67f1ff, #7367ff);
    font-weight: 950;
}

.weekly-leaderboard-card img {
    width: 70px;
    height: 90px;
    border-radius: 16px;
    object-fit: cover;
}

.weekly-copy strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.12;
}

.weekly-copy small {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
    font-weight: 850;
}

.chapter-comments {
    width: min(100%, 980px);
    margin: 20px auto 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(115, 103, 255, 0.11), transparent 36%),
        rgba(255, 255, 255, 0.035);
}

.chapter-comment-form {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.chapter-comment-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 96px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.32);
    font: inherit;
}

.chapter-comment-list {
    display: grid;
    gap: 12px;
}

.chapter-comment,
.comment-login-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

.comment-login-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-bottom: 16px;
}

.chapter-comment header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.chapter-comment strong {
    color: #fff;
    font-weight: 950;
}

.chapter-comment time {
    color: rgba(255, 255, 255, 0.44);
    font-size: 0.76rem;
    font-weight: 800;
}

.chapter-comment p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.72) !important;
}

html[data-theme="light"] .notification-dropdown,
html[data-theme="light"] .chapter-comments {
    border-color: rgba(16, 25, 35, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(24, 42, 62, 0.12);
}

html[data-theme="light"] .notification-dropdown > strong,
html[data-theme="light"] .notification-dropdown em,
html[data-theme="light"] .weekly-copy strong,
html[data-theme="light"] .chapter-comment strong {
    color: #101923;
}

html[data-theme="light"] .notification-dropdown small,
html[data-theme="light"] .notification-dropdown p,
html[data-theme="light"] .weekly-copy small,
html[data-theme="light"] .chapter-comment time {
    color: rgba(16, 25, 35, 0.56);
}

html[data-theme="light"] .notification-bell {
    color: #101923;
    border-color: rgba(16, 25, 35, 0.08);
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8), transparent 24%),
        linear-gradient(135deg, rgba(103, 241, 255, 0.18), rgba(115, 103, 255, 0.12)),
        rgba(255, 255, 255, 0.92);
    box-shadow:
        0 0 0 5px rgba(115, 103, 255, 0.045),
        0 12px 26px rgba(24, 42, 62, 0.1);
}

html[data-theme="light"] .notification-bell-art::after {
    border-color: #fff;
}

html[data-theme="light"] .notification-empty-art {
    border-color: rgba(16, 25, 35, 0.08);
    background:
        radial-gradient(circle at 50% 30%, rgba(115, 103, 255, 0.16), transparent 34%),
        #f7f8fc;
}

html[data-theme="light"] .chapter-comment-form textarea {
    color: #101923;
    background: rgba(16, 25, 35, 0.04);
    border-color: rgba(16, 25, 35, 0.08);
}

html[data-theme="light"] .chapter-comment p {
    color: rgba(16, 25, 35, 0.72) !important;
}

@media (max-width: 560px) {
    .notification-dropdown {
        left: -58px;
    }

    .weekly-leaderboard-card {
        grid-template-columns: 36px 58px minmax(0, 1fr);
        padding: 12px;
    }

    .weekly-rank {
        width: 36px;
        height: 36px;
        border-radius: 13px;
    }

    .weekly-leaderboard-card img {
        width: 58px;
        height: 76px;
    }

    .chapter-comments {
        padding: 16px;
        border-radius: 22px;
    }

.comment-login-card {
    grid-template-columns: 1fr;
}

@media (max-width: 760px) {
    .notification-menu {
        display: none !important;
    }

    body.notification-open .notification-menu {
        display: none !important;
    }

    body.notification-open .topbar {
        z-index: 360 !important;
    }

    body.notification-open .sidebar,
    body.notification-open .floating-share {
        z-index: 80 !important;
    }

    .notification-menu {
        position: static !important;
    }

    .notification-menu[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 340;
        background:
            radial-gradient(circle at 50% 0%, rgba(115, 103, 255, 0.18), transparent 42%),
            rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(8px);
    }

    .notification-menu[open] .notification-bell {
        position: relative;
        z-index: 362;
    }

    .notification-menu[open] .notification-dropdown {
        position: fixed !important;
        top: calc(68px + env(safe-area-inset-top)) !important;
        left: 10px !important;
        right: 10px !important;
        z-index: 361 !important;
        width: auto !important;
        max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px !important;
        border-radius: 24px !important;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56) !important;
    }

    .notification-dropdown a {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        padding: 9px !important;
        border-radius: 16px !important;
    }

    .notification-dropdown img {
        width: 44px !important;
        height: 56px !important;
    }

    .notification-dropdown em {
        white-space: normal !important;
        line-height: 1.2;
    }
}
}

.form-side-link {
    justify-self: end;
    margin-top: -4px;
    color: #67f1ff;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.form-side-link:hover {
    color: #fff;
    text-decoration: underline;
}

html[data-theme="light"] .form-side-link {
    color: #5d52f2;
}

/* Title accent: soft comet marker instead of a hard vertical bar. */
.home-sections .section-head h3,
.content-shell > .home-sections .section-head h3,
.admin-shell .section-head h2,
.admin-shell .section-head h3,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3,
.profile-card .section-head h3,
.reader-top h2 {
    padding-left: 42px !important;
}

.home-sections .section-head h3::before,
.content-shell > .home-sections .section-head h3::before,
.admin-shell .section-head h2::before,
.admin-shell .section-head h3::before,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2::before,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3::before,
.profile-card .section-head h3::before,
.reader-top h2::before {
    left: 0 !important;
    width: 28px !important;
    height: 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background:
        radial-gradient(circle at 16% 50%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
        linear-gradient(90deg, #67f1ff 0%, #7367ff 56%, #ff3d6e 100%) !important;
    box-shadow:
        0 0 0 6px rgba(103, 241, 255, 0.055),
        0 0 24px rgba(103, 241, 255, 0.28),
        0 0 34px rgba(255, 61, 110, 0.18) !important;
    transform: translateY(-50%) !important;
}

.home-sections .section-head h3::after,
.content-shell > .home-sections .section-head h3::after,
.admin-shell .section-head h2::after,
.admin-shell .section-head h3::after,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2::after,
.content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3::after,
.profile-card .section-head h3::after,
.reader-top h2::after {
    content: "" !important;
    position: absolute !important;
    left: 32px !important;
    top: 50% !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: rgba(103, 241, 255, 0.78) !important;
    box-shadow: 0 0 14px rgba(103, 241, 255, 0.58) !important;
    transform: translateY(-50%) !important;
}

/* Mobile resolution polish: keep every page inside the viewport and make controls thumb-friendly. */
@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body {
        min-width: 320px;
    }

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

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    .page-shell {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
    }

    .main-shell {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 8px 8px 0 !important;
        box-sizing: border-box;
    }

    .topbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: center !important;
        gap: 8px !important;
        width: 100%;
        min-width: 0;
        padding: 8px 0 0 !important;
    }

    .topbar-brand {
        width: max-content;
        max-width: 100%;
        gap: 9px !important;
    }

    .topbar-brand img {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
        border-radius: 13px !important;
    }

    .topbar-brand span {
        max-width: calc(100vw - 82px);
        overflow: hidden;
        font-size: clamp(1rem, 5.8vw, 1.34rem);
        text-overflow: ellipsis;
    }

    .topbar-actions {
        display: flex !important;
        width: 100% !important;
        max-width: 100%;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        margin: 0 !important;
        padding: 2px 2px 9px !important;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-actions > *,
    .topbar-actions form {
        flex: 0 0 auto !important;
        margin: 0;
        scroll-snap-align: start;
    }

    .topbar-actions .search-button,
    .topbar-actions .theme-toggle,
    .topbar-actions .vip-pill,
    .topbar-actions .user-pill,
    .topbar-actions .ghost-button,
    .topbar-actions .primary-button {
        min-height: 38px !important;
        height: 38px !important;
        padding-inline: 12px !important;
        border-radius: 999px !important;
        font-size: 0.76rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .topbar-actions .avatar-chip {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
        font-size: 0.8rem !important;
    }

    .topbar-actions .user-pill span:last-child {
        max-width: 96px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-actions .theme-toggle span[data-theme-label] {
        max-width: 74px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-bell {
        width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
    }

    .notification-bell-art {
        width: 24px !important;
        height: 24px !important;
    }

    .notification-dropdown {
        position: fixed !important;
        top: 64px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-height: min(70vh, 520px);
        overflow-y: auto;
        border-radius: 22px !important;
    }

    .content-shell {
        gap: 16px !important;
        padding-top: 10px !important;
    }

    .section-block,
    .catalog-shell,
    .admin-dashboard-shell,
    .section-block-showcase,
    .profile-card,
    .admin-panel,
    .search-panel,
    .detail-hero,
    .reader-shell,
    .auth-shell,
    .profile-hero {
        width: 100%;
        max-width: 100%;
        padding-left: 14px !important;
        padding-right: 14px !important;
        border-radius: 22px !important;
        box-sizing: border-box;
    }

    .home-subsection {
        padding: 20px 12px 24px !important;
        border-radius: 22px !important;
    }

    .section-head,
    .section-head-rich,
    .profile-head,
    .catalog-head {
        gap: 10px !important;
        align-items: flex-start !important;
    }

    .section-head > div,
    .section-head-rich > div,
    .profile-head > div,
    .catalog-head > div {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .section-head-rich,
    .profile-head,
    .catalog-head {
        flex-direction: column !important;
    }

    .section-head.centered {
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .section-head.centered h2,
    .section-head.centered h3,
    .section-head.centered .muted {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .section-link {
        min-height: 36px;
        align-self: flex-start;
    }

    .filter-strip {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
        gap: 14px !important;
    }

    .search-inline,
    .catalog-filter,
    .admin-filter-bar {
        grid-template-columns: 1fr !important;
    }

    .custom-select-options {
        max-height: 46vh;
    }

    .admin-filter-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .profile-hero,
    .split-layout,
    .auth-shell-split,
    .detail-grid,
    .payment-layout,
    .admin-dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .plan-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .plan-card {
        min-width: 0 !important;
        padding: 22px !important;
        overflow: hidden;
    }

    .plan-card h3 {
        padding-right: 0 !important;
        font-size: 1.08rem !important;
    }

    .plan-card > strong {
        font-size: clamp(1.8rem, 10vw, 2.2rem) !important;
    }

    .plan-badge {
        position: static !important;
        justify-self: start;
        width: max-content;
        max-width: 100%;
        min-height: 28px !important;
        margin-bottom: 2px;
        padding-inline: 10px !important;
        overflow: hidden;
        font-size: 0.66rem !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .manga-grid-spotlight,
    .manga-grid.compact,
    .catalog-results {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        justify-content: stretch !important;
    }

    .catalog-results .manga-card,
    .manga-grid-spotlight .manga-card,
    .manga-grid.compact .manga-card {
        min-width: 0 !important;
    }

    .manga-card-body {
        padding: 12px !important;
    }

    .home-sections .manga-card,
    .home-sections .manga-card.compact,
    .home-sections .chapter-card,
    .content-shell > .home-sections .manga-card,
    .content-shell > .home-sections .manga-card.compact,
    .content-shell > .home-sections .chapter-card {
        flex: 0 0 138px !important;
        width: 138px !important;
        min-width: 138px !important;
    }

    .home-sections .manga-card-body,
    .home-sections .chapter-card > div {
        padding-top: 8px !important;
    }

    .home-sections .manga-card h4 a,
    .home-sections .chapter-card h4 {
        font-size: 0.78rem !important;
        line-height: 1.18 !important;
    }

    .home-sections .manga-card p,
    .home-sections .chapter-card p {
        font-size: 0.68rem !important;
    }

    .content-shell > .home-sections .latest-manga-list {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .content-shell > .home-sections .latest-manga-row {
        grid-template-columns: 58px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 12px 8px !important;
        border-radius: 14px !important;
    }

    .latest-manga-cover {
        width: 58px !important;
        height: 80px !important;
        border-radius: 10px !important;
    }

    .latest-manga-copy h4 {
        margin-bottom: 8px !important;
        font-size: 0.92rem !important;
    }

    .latest-chapter-line {
        gap: 8px !important;
        font-size: 0.76rem !important;
    }

    .weekly-leaderboard-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .weekly-leaderboard-card {
        grid-template-columns: 34px 56px minmax(0, 1fr) !important;
        gap: 10px !important;
        min-height: 86px !important;
        padding: 10px !important;
        border-radius: 18px !important;
    }

    .weekly-rank {
        width: 34px !important;
        height: 34px !important;
        border-radius: 12px !important;
        font-size: 0.8rem !important;
    }

    .weekly-leaderboard-card img {
        width: 56px !important;
        height: 74px !important;
        border-radius: 12px !important;
    }

    .weekly-copy strong {
        font-size: 0.88rem !important;
    }

    .ranking-chip,
    .continue-card {
        min-width: min(78vw, 300px) !important;
        grid-template-columns: 54px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
        border-radius: 18px !important;
    }

    .ranking-chip-number {
        display: none !important;
    }

    .ranking-chip img,
    .continue-card img {
        width: 54px !important;
        height: 72px !important;
        border-radius: 12px !important;
    }

    .table-shell {
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 680px;
    }

    .table-actions,
    .admin-users-table .table-actions {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
    }

    .profile-vip-history-section .vip-history-row,
    .revenue-payment-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .profile-vip-history-section .vip-history-status,
    .status-badge {
        width: max-content !important;
        max-width: 100% !important;
        justify-self: start !important;
        padding-inline: 14px !important;
    }

    .sidebar {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        padding: 7px !important;
        gap: 7px !important;
        border-radius: 22px !important;
        overflow: hidden !important;
    }

    .sidebar-nav {
        max-width: 100%;
        gap: 6px !important;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex: 0 0 56px !important;
        min-width: 56px !important;
        width: 56px !important;
        min-height: 54px !important;
        padding: 7px 4px !important;
        border-radius: 16px !important;
    }

    .sidebar-foot {
        min-width: 48px;
    }

    .sidebar-search {
        flex-basis: 48px !important;
        min-width: 48px !important;
        width: 48px !important;
    }

    .nav-icon {
        width: 19px !important;
        height: 19px !important;
    }

    .nav-label {
        font-size: 0.5rem !important;
        letter-spacing: 0 !important;
    }
}

@media (max-width: 430px) {
    .main-shell {
        padding-inline: 6px !important;
    }

    .topbar-brand img {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }

    .topbar-brand span {
        max-width: calc(100vw - 72px);
        font-size: clamp(0.96rem, 6vw, 1.18rem);
    }

    .topbar-actions {
        gap: 6px !important;
        padding-bottom: 7px !important;
    }

    .topbar-actions .search-button,
    .topbar-actions .theme-toggle,
    .topbar-actions .vip-pill,
    .topbar-actions .user-pill,
    .topbar-actions .ghost-button,
    .topbar-actions .primary-button {
        min-height: 36px !important;
        height: 36px !important;
        padding-inline: 10px !important;
        font-size: 0.7rem !important;
    }

    .topbar-actions .user-pill span:last-child {
        max-width: 72px !important;
    }

    .home-subsection,
    .section-block,
    .catalog-shell,
    .admin-dashboard-shell,
    .section-block-showcase,
    .profile-card,
    .admin-panel,
    .search-panel,
    .detail-hero,
    .reader-shell,
    .auth-shell,
    .profile-hero {
        padding-left: 11px !important;
        padding-right: 11px !important;
    }

    .manga-grid-spotlight,
    .manga-grid.compact,
    .catalog-results {
        gap: 10px !important;
    }

    .home-sections .manga-card,
    .home-sections .manga-card.compact,
    .home-sections .chapter-card,
    .content-shell > .home-sections .manga-card,
    .content-shell > .home-sections .manga-card.compact,
    .content-shell > .home-sections .chapter-card {
        flex-basis: 126px !important;
        width: 126px !important;
        min-width: 126px !important;
    }

    .content-shell > .home-sections .latest-manga-row {
        grid-template-columns: 54px minmax(0, 1fr) !important;
    }

    .latest-manga-cover {
        width: 54px !important;
        height: 74px !important;
    }

    .latest-chapter-line {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .latest-chapter-line time {
        display: none;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex-basis: 52px !important;
        min-width: 52px !important;
        width: 52px !important;
        min-height: 52px !important;
    }

    .sidebar-search {
        flex-basis: 44px !important;
        min-width: 44px !important;
        width: 44px !important;
    }

    .nav-label {
        font-size: 0.48rem !important;
    }
}

@media (max-width: 360px) {
    .topbar-actions .user-pill span:last-child,
    .topbar-actions .theme-toggle span[data-theme-label] {
        display: none !important;
    }

    .profile-stats,
    .manga-grid-spotlight,
    .manga-grid.compact,
    .catalog-results {
        grid-template-columns: 1fr !important;
    }

    .sidebar-nav a,
    .sidebar-search {
        flex-basis: 48px !important;
        min-width: 48px !important;
        width: 48px !important;
    }
}

/* Final mobile pass: turn the top controls into a compact app header and stop text clipping. */
@media (max-width: 760px) {
    .main-shell {
        padding-inline: 10px !important;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 70;
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        align-items: center !important;
        justify-content: stretch !important;
        gap: 10px !important;
        min-height: 62px;
        margin: -8px -10px 2px !important;
        padding: calc(8px + env(safe-area-inset-top)) 10px 8px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.72)),
            var(--bg);
        backdrop-filter: blur(18px);
    }

    html[data-theme="light"] .topbar {
        border-bottom-color: rgba(16, 25, 35, 0.08);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
            var(--bg);
    }

    .topbar-brand {
        flex: 0 0 auto;
        grid-column: 1;
        justify-self: start;
        width: 42px !important;
        max-width: 42px !important;
    }

    .topbar-brand span {
        display: none !important;
    }

    .topbar-brand img {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
        border-radius: 15px !important;
    }

    .topbar-actions {
        grid-column: 2;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 !important;
        scrollbar-width: none;
    }

    .topbar-actions::-webkit-scrollbar {
        display: none;
    }

    .topbar-actions .search-button,
    .topbar-actions .theme-toggle {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        overflow: hidden;
        font-size: 0 !important;
        border-radius: 16px !important;
    }

    .topbar-actions .search-button::before {
        content: "⌕";
        font-size: 1.28rem;
        font-weight: 950;
        line-height: 1;
    }

    .topbar-actions .theme-toggle::before {
        content: "◐";
        font-size: 1.12rem;
        font-weight: 950;
        line-height: 1;
    }

    .topbar-actions .theme-toggle span[data-theme-label] {
        display: none !important;
    }

    .notification-bell {
        border-radius: 16px !important;
    }

    .topbar-actions .vip-pill {
        min-width: 54px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding-inline: 12px !important;
        border-radius: 16px !important;
        font-size: 0.72rem !important;
        font-weight: 950 !important;
    }

    .topbar-actions .user-pill {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 !important;
        border-radius: 16px !important;
    }

    .topbar-actions .user-pill span:last-child {
        display: none !important;
    }

    .topbar-actions .avatar-chip {
        width: 32px !important;
        height: 32px !important;
        flex-basis: 32px !important;
    }

    .topbar-actions form .ghost-button,
    .topbar-actions > .ghost-button,
    .topbar-actions > .primary-button {
        height: 42px !important;
        min-height: 42px !important;
        padding-inline: 13px !important;
        border-radius: 16px !important;
        font-size: 0.74rem !important;
        font-weight: 900 !important;
    }

    .content-shell > .home-sections .home-subsection.account-security-alert {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 16px !important;
        padding: 16px !important;
        overflow: hidden;
    }

    .account-security-alert > div,
    .account-security-alert strong,
    .account-security-alert p {
        width: 100%;
        max-width: 100% !important;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .account-security-kicker {
        gap: 7px;
        margin-bottom: 10px;
        font-size: 0.66rem !important;
        letter-spacing: 0.14em !important;
    }

    .account-security-alert strong {
        font-size: clamp(0.98rem, 4.8vw, 1.16rem) !important;
        line-height: 1.18 !important;
    }

    .account-security-alert p {
        font-size: 0.86rem !important;
        line-height: 1.5 !important;
    }

    .home-sections .section-head h3,
    .content-shell > .home-sections .section-head h3,
    .admin-shell .section-head h2,
    .admin-shell .section-head h3,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3,
    .profile-card .section-head h3,
    .reader-top h2 {
        padding-left: 34px !important;
        font-size: clamp(1.08rem, 6vw, 1.48rem) !important;
        letter-spacing: -0.045em !important;
        line-height: 1.02 !important;
    }

    .home-sections .section-head h3::before,
    .content-shell > .home-sections .section-head h3::before,
    .admin-shell .section-head h2::before,
    .admin-shell .section-head h3::before,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2::before,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3::before,
    .profile-card .section-head h3::before,
    .reader-top h2::before {
        width: 22px !important;
        height: 8px !important;
        box-shadow:
            0 0 0 4px rgba(103, 241, 255, 0.055),
            0 0 18px rgba(103, 241, 255, 0.2) !important;
    }

    .home-sections .section-head h3::after,
    .content-shell > .home-sections .section-head h3::after,
    .admin-shell .section-head h2::after,
    .admin-shell .section-head h3::after,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h2::after,
    .content-shell > .section-block:not(.home-sections):not(.admin-shell) .section-head h3::after,
    .profile-card .section-head h3::after,
    .reader-top h2::after {
        left: 26px !important;
    }

    .section-copy {
        min-width: 0;
    }

    .section-copy .eyebrow {
        margin-bottom: 6px !important;
        font-size: 0.62rem !important;
        letter-spacing: 0.14em !important;
    }

    .section-copy .muted {
        font-size: 0.84rem !important;
    }

    .weekly-leaderboard-card,
    .ranking-chip,
    .continue-card,
    .content-shell > .home-sections .latest-manga-row {
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
            #08090d !important;
    }

    .sidebar {
        background:
            radial-gradient(circle at 18% 8%, rgba(103, 241, 255, 0.12), transparent 32%),
            rgba(7, 8, 13, 0.94) !important;
        box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.46) !important;
    }

    .sidebar-nav a,
    .sidebar-search {
        background: transparent !important;
        border-color: transparent !important;
    }

    .sidebar-nav a.active {
        background: linear-gradient(135deg, #ff3d6e, #7367ff) !important;
        box-shadow: 0 10px 24px rgba(115, 103, 255, 0.26) !important;
    }

    html[data-theme="light"] .sidebar {
        background:
            radial-gradient(circle at 18% 8%, rgba(103, 241, 255, 0.12), transparent 32%),
            rgba(255, 255, 255, 0.94) !important;
        box-shadow: 0 -12px 38px rgba(24, 42, 62, 0.14) !important;
    }
}

@media (max-width: 430px) {
    .main-shell {
        padding-inline: 8px !important;
    }

    .topbar {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        margin-inline: -8px !important;
        padding-inline: 8px !important;
    }

    .topbar-brand {
        width: 38px !important;
        max-width: 38px !important;
    }

    .topbar-actions {
        gap: 5px !important;
    }

    .topbar-brand img,
    .topbar-actions .search-button,
    .topbar-actions .theme-toggle,
    .notification-bell,
    .topbar-actions .user-pill {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        border-radius: 14px !important;
    }

    .topbar-brand img {
        flex-basis: 38px !important;
    }

    .notification-bell-art {
        width: 22px !important;
        height: 22px !important;
    }

    .topbar-actions .vip-pill,
    .topbar-actions form .ghost-button,
    .topbar-actions > .ghost-button,
    .topbar-actions > .primary-button {
        height: 38px !important;
        min-height: 38px !important;
        padding-inline: 10px !important;
        border-radius: 14px !important;
        font-size: 0.68rem !important;
    }

    .content-shell > .home-sections .home-subsection.account-security-alert {
        padding: 14px !important;
    }

    .home-subsection {
        padding-block: 18px 22px !important;
    }
}

/* Abyss showcase redesign for ranking, continue reading and latest chapter sections. */
.top-ranking-subsection,
.continue-reading-subsection,
.latest-chapters-subsection {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.top-ranking-subsection::before,
.continue-reading-subsection::before,
.latest-chapters-subsection::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 0%, rgba(103, 241, 255, 0.13), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(115, 103, 255, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 54%);
}

.top-ranking-strip,
.continue-reading-shelf {
    gap: 18px !important;
    padding: 4px 4px 14px !important;
    scroll-padding-inline: 4px;
}

.ranking-chip {
    --rank-accent: #67f1ff;
    min-width: 308px !important;
    min-height: 138px;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 14px !important;
    overflow: hidden;
    border-color: rgba(103, 241, 255, 0.14) !important;
    border-radius: 28px !important;
    background:
        linear-gradient(120deg, rgba(103, 241, 255, 0.09), transparent 36%),
        radial-gradient(circle at 95% 0%, rgba(115, 103, 255, 0.18), transparent 38%),
        #07080d !important;
    box-shadow:
        0 22px 54px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.075) !important;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ranking-chip:nth-child(1) {
    --rank-accent: #ff3d6e;
}

.ranking-chip:nth-child(2) {
    --rank-accent: #8b6dff;
}

.ranking-chip:nth-child(3) {
    --rank-accent: #67f1ff;
}

.ranking-chip:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: color-mix(in srgb, var(--rank-accent) 48%, transparent) !important;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.44),
        0 0 42px color-mix(in srgb, var(--rank-accent) 18%, transparent) !important;
}

.ranking-chip::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--rank-accent), transparent);
    opacity: 0.9;
}

.ranking-chip-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    width: 42px !important;
    height: 42px !important;
    border-radius: 16px !important;
    color: #05060a !important;
    background: linear-gradient(135deg, #ffffff, var(--rank-accent)) !important;
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--rank-accent) 12%, transparent),
        0 14px 26px rgba(0, 0, 0, 0.28) !important;
}

.ranking-chip img {
    width: 94px !important;
    height: 126px !important;
    flex: 0 0 94px;
    border-radius: 20px !important;
    transform: rotate(-2deg);
    box-shadow:
        0 22px 38px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.ranking-chip-copy {
    align-content: center;
    gap: 9px !important;
    padding-right: 8px;
}

.ranking-chip-copy strong {
    font-size: 1.02rem !important;
    line-height: 1.12 !important;
    white-space: normal !important;
}

.ranking-chip-copy small {
    width: max-content;
    max-width: 100%;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding-inline: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72) !important;
    background: rgba(255, 255, 255, 0.055);
}

.continue-reading-subsection {
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 61, 110, 0.09), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
        #06070b !important;
}

.continue-card {
    min-width: 360px !important;
    min-height: 166px;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 14px !important;
    overflow: hidden;
    border-radius: 30px !important;
    border-color: rgba(255, 61, 110, 0.14) !important;
    background:
        radial-gradient(circle at 94% 8%, rgba(255, 61, 110, 0.2), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        #08090d !important;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.continue-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 61, 110, 0.34) !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), 0 0 42px rgba(255, 61, 110, 0.12) !important;
}

.continue-card::before {
    content: "";
    position: absolute;
    left: 128px;
    right: 18px;
    bottom: 18px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
}

.continue-card::after {
    content: "";
    position: absolute;
    left: 128px;
    bottom: 18px;
    width: 38%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff3d6e, #8b6dff, #67f1ff);
    box-shadow: 0 0 18px rgba(255, 61, 110, 0.3);
}

.continue-card img {
    width: 96px !important;
    height: 138px !important;
    flex: 0 0 96px;
    border-radius: 22px !important;
    object-fit: cover;
    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.52),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.continue-card-copy {
    align-content: center;
    gap: 8px !important;
    padding-bottom: 20px;
}

.continue-card-copy strong {
    font-size: 1.05rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
}

.continue-card-copy p {
    white-space: normal !important;
}

.continue-card-copy span {
    width: max-content;
    max-width: 100%;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding-inline: 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.68) !important;
    background: rgba(255, 255, 255, 0.06);
}

.latest-chapters-subsection {
    padding-bottom: 34px !important;
}

.content-shell > .home-sections .latest-chapters-subsection .latest-manga-list {
    grid-template-columns: repeat(2, minmax(300px, 1fr)) !important;
    gap: 16px !important;
}

.content-shell > .home-sections .latest-chapters-subsection .latest-manga-row {
    position: relative;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 15px !important;
    min-height: 132px;
    padding: 14px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(103, 241, 255, 0.1), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.012)),
        #07080d !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.content-shell > .home-sections .latest-chapters-subsection .latest-manga-row::after {
    content: "";
    position: absolute;
    inset: auto 16px 0 112px;
    height: 1px;
    background: linear-gradient(90deg, rgba(103, 241, 255, 0.42), transparent);
}

.content-shell > .home-sections .latest-chapters-subsection .latest-manga-row:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(103, 241, 255, 0.24) !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(103, 241, 255, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
        #090b12 !important;
}

.latest-chapters-subsection .latest-manga-cover {
    width: 82px !important;
    height: 112px !important;
    border-radius: 18px !important;
    box-shadow:
        0 20px 34px rgba(0, 0, 0, 0.44),
        0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.latest-chapters-subsection .latest-manga-copy {
    align-self: center;
    padding-top: 0 !important;
}

.latest-chapters-subsection .latest-manga-copy h4 {
    margin-bottom: 11px !important;
    font-size: 1rem !important;
    line-height: 1.15 !important;
}

.latest-chapters-subsection .latest-chapter-lines {
    gap: 7px !important;
}

.latest-chapters-subsection .latest-chapter-line {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.8rem !important;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.latest-chapters-subsection .latest-chapter-line:hover {
    transform: translateX(3px);
    background: rgba(103, 241, 255, 0.1);
}

.latest-chapters-subsection .latest-chapter-line span {
    color: rgba(255, 255, 255, 0.78);
}

.latest-chapters-subsection .latest-chapter-line time {
    color: rgba(103, 241, 255, 0.52) !important;
}

html[data-theme="light"] .top-ranking-subsection::before,
html[data-theme="light"] .continue-reading-subsection::before,
html[data-theme="light"] .latest-chapters-subsection::before {
    background:
        radial-gradient(circle at 15% 0%, rgba(103, 241, 255, 0.14), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(115, 103, 255, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 54%);
}

html[data-theme="light"] .ranking-chip,
html[data-theme="light"] .continue-card,
html[data-theme="light"] .content-shell > .home-sections .latest-chapters-subsection .latest-manga-row {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background:
        radial-gradient(circle at top right, rgba(115, 103, 255, 0.1), transparent 36%),
        rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 18px 44px rgba(24, 42, 62, 0.1) !important;
}

html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line {
    background: rgba(16, 25, 35, 0.045);
}

html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line span {
    color: rgba(16, 25, 35, 0.78);
}

html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line time {
    color: rgba(91, 86, 230, 0.62) !important;
}

@media (max-width: 760px) {
    .top-ranking-strip,
    .continue-reading-shelf {
        gap: 12px !important;
        margin-inline: -2px;
    }

    .ranking-chip {
        min-width: min(84vw, 330px) !important;
        min-height: 126px;
        border-radius: 24px !important;
    }

    .ranking-chip img {
        width: 82px !important;
        height: 112px !important;
        flex-basis: 82px;
    }

    .ranking-chip-copy strong,
    .continue-card-copy strong {
        font-size: 0.94rem !important;
    }

    .continue-card {
        min-width: min(88vw, 350px) !important;
        min-height: 150px;
        border-radius: 24px !important;
    }

    .continue-card img {
        width: 82px !important;
        height: 122px !important;
        flex-basis: 82px;
        border-radius: 18px !important;
    }

    .continue-card::before,
    .continue-card::after {
        left: 112px;
        right: 16px;
    }

    .content-shell > .home-sections .latest-chapters-subsection .latest-manga-list {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .content-shell > .home-sections .latest-chapters-subsection .latest-manga-row {
        grid-template-columns: 62px minmax(0, 1fr) !important;
        min-height: 104px;
        padding: 11px !important;
        border-radius: 20px !important;
    }

    .latest-chapters-subsection .latest-manga-cover {
        width: 62px !important;
        height: 84px !important;
        border-radius: 14px !important;
    }

    .latest-chapters-subsection .latest-manga-copy h4 {
        margin-bottom: 8px !important;
        font-size: 0.9rem !important;
    }

    .latest-chapters-subsection .latest-chapter-line {
        min-height: 26px;
        font-size: 0.74rem !important;
    }
}

/* Light-mode safety pass for the newest showcase cards. Keep these late in the file. */
html[data-theme="light"] .top-ranking-subsection,
html[data-theme="light"] .continue-reading-subsection,
html[data-theme="light"] .latest-chapters-subsection {
    background:
        radial-gradient(circle at 12% 0%, rgba(103, 241, 255, 0.12), transparent 34%),
        radial-gradient(circle at 88% 10%, rgba(115, 103, 255, 0.08), transparent 36%),
        rgba(255, 255, 255, 0.86) !important;
}

html[data-theme="light"] .weekly-leaderboard-card,
html[data-theme="light"] .ranking-chip,
html[data-theme="light"] .continue-card,
html[data-theme="light"] .content-shell > .home-sections .latest-chapters-subsection .latest-manga-row {
    border-color: rgba(16, 25, 35, 0.08) !important;
    background:
        radial-gradient(circle at top right, rgba(115, 103, 255, 0.09), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.8)) !important;
    box-shadow:
        0 18px 44px rgba(24, 42, 62, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.84) !important;
}

html[data-theme="light"] .weekly-copy strong,
html[data-theme="light"] .ranking-chip-copy strong,
html[data-theme="light"] .continue-card-copy strong,
html[data-theme="light"] .latest-chapters-subsection .latest-manga-copy h4 a {
    color: #101923 !important;
}

html[data-theme="light"] .weekly-copy small,
html[data-theme="light"] .ranking-chip-copy small,
html[data-theme="light"] .continue-card-copy p,
html[data-theme="light"] .continue-card-copy span,
html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line span,
html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line time {
    color: rgba(16, 25, 35, 0.62) !important;
}

html[data-theme="light"] .ranking-chip-copy small,
html[data-theme="light"] .continue-card-copy span,
html[data-theme="light"] .latest-chapters-subsection .latest-chapter-line {
    border-color: rgba(16, 25, 35, 0.07) !important;
    background: rgba(16, 25, 35, 0.045) !important;
}

html[data-theme="light"] .continue-card::before {
    background: rgba(16, 25, 35, 0.09) !important;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .topbar {
    color: #101923;
}
