:root {
    --site-bg: #f7f4ef;
    --site-panel: #ffffff;
    --site-panel-soft: #fbf8f3;
    --site-ink: #1f2430;
    --site-muted: #657085;
    --site-line: rgba(20, 27, 45, 0.08);
    --site-brand: #1565d8;
    --site-brand-strong: #0f4ca8;
    --site-dark: #111827;
    --site-dark-soft: #1b2434;
    --site-accent: #ffb020;
    --site-danger: #d64545;
    --site-success: #15803d;
    --site-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
    --site-radius: 18px;
    --site-shell: min(1280px, calc(100vw - 40px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--site-ink);
    background:
        radial-gradient(circle at top left, rgba(21, 101, 216, 0.08), transparent 24%),
        radial-gradient(circle at bottom right, rgba(255, 176, 32, 0.08), transparent 22%),
        var(--site-bg);
}

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

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

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

button {
    appearance: none;
}

.site-shell {
    width: var(--site-shell);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: rgba(17, 24, 39, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
    min-height: 74px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.site-brand strong {
    display: block;
    font-size: 17px;
}

.site-brand span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.site-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--site-brand), #6aa7ff);
    font-weight: 700;
    font-size: 18px;
}

.site-brand-logo-wrap {
    overflow: hidden;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.site-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-nav {
    display: flex;
    gap: 6px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    padding: 0;
    background: transparent;
    border: 0;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.78);
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
}

.site-nav a.is-active,
.site-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.site-utility {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.site-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    width: min(340px, 100%);
    flex: 0 1 340px;
}

.site-search-field,
.hero-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--site-line);
    border-radius: 16px;
    padding: 5px 10px 5px 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.site-search-prefix,
.hero-search-field span {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--site-muted);
    white-space: nowrap;
}

.site-search input,
.catalog-search input,
.stack-form input,
.stack-form textarea,
.stack-form select {
    width: 100%;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    color: var(--site-ink);
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.author-comic-card,
.author-guide-card,
.author-overview-card,
.author-empty-state,
.creator-sidebar-card,
.account-card,
.chapter-card,
.comic-card {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.site-search input,
.hero-search-field input {
    flex: 1 1 auto;
    width: auto;
    display: block;
    min-width: 0;
    max-width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 8px 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.hero-search-field input[type="search"]::-webkit-search-decoration,
.hero-search-field input[type="search"]::-webkit-search-cancel-button,
.hero-search-field input[type="search"]::-webkit-search-results-button,
.hero-search-field input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.site-search input:focus,
.hero-search-field input:focus {
    outline: none;
}

.site-search-button {
    min-height: 42px;
    min-width: 78px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--site-brand), #4a84e8);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: 0 14px 30px rgba(21, 101, 216, 0.28);
    cursor: pointer;
}

.site-search-button:hover {
    background: linear-gradient(135deg, var(--site-brand-strong), var(--site-brand));
}

.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.site-logout-form {
    flex: 0 0 auto;
}

.site-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    min-width: 0;
    max-width: 132px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.site-user span {
    font-size: 14px;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.site-balance-pill {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    gap: 6px;
    align-items: baseline;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.site-balance-pill strong {
    font-size: 14px;
}

.site-header-login,
.site-header-logout {
    white-space: nowrap;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
}

.site-header-logout {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-weight: 700;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
}

.site-header-logout:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    cursor: pointer;
}

.primary-button {
    background: var(--site-brand);
    color: #fff;
}

.primary-button:hover {
    background: var(--site-brand-strong);
}

.ghost-button {
    background: transparent;
    border-color: var(--site-line);
    color: var(--site-ink);
}

.ghost-button.inverted {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.text-link {
    padding: 0;
    min-height: auto;
    color: var(--site-brand);
}

.site-flash {
    display: grid;
    gap: 10px;
    padding-top: 18px;
}

.flash {
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid;
    background: #fff;
}

.flash.success {
    color: var(--site-success);
    border-color: rgba(21, 128, 61, 0.18);
}

.flash.error {
    color: var(--site-danger);
    border-color: rgba(214, 69, 69, 0.18);
}

.hero-band {
    background:
        linear-gradient(120deg, rgba(11, 17, 30, 0.96), rgba(23, 32, 51, 0.88)),
        linear-gradient(135deg, rgba(21, 101, 216, 0.26), transparent 50%);
    color: #fff;
    padding: 40px 0 52px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 32px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1,
.auth-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.06;
}

.hero-copy p:not(.eyebrow) {
    margin: 16px 0 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.8;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 24px;
    max-width: 660px;
}

.hero-search .primary-button {
    min-width: 132px;
}

.hero-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.hero-search-tags a {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.hero-search-tags a:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.hero-actions,
.paywall-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-metrics,
.detail-summary,
.detail-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.hero-metrics div,
.detail-summary div,
.detail-metrics div,
.wallet-balance-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metrics strong,
.detail-summary strong,
.detail-metrics strong,
.wallet-balance-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
}

.hero-metrics span,
.detail-summary span,
.detail-metrics span,
.wallet-balance-card span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
}

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

.hero-cover {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
    position: relative;
    background: rgba(255, 255, 255, 0.06);
}

.hero-cover img {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
}

.hero-cover-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
}

.hero-cover-meta strong,
.hero-cover-meta span {
    display: block;
}

.hero-cover-meta span {
    color: rgba(255, 255, 255, 0.72);
    margin-top: 4px;
}

.trust-band,
.content-section,
.page-hero,
.detail-hero,
.auth-shell,
.reader-shell {
    padding: 34px 0;
}

.trust-grid,
.dual-grid,
.account-grid,
.wallet-grid {
    display: grid;
    gap: 18px;
}

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

.trust-grid article,
.rank-panel,
.update-panel,
.account-card,
.reader-sidebar-card,
.reader-paywall {
    padding: 24px;
    border-radius: var(--site-radius);
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.trust-grid p,
.detail-description,
.list-item p {
    color: var(--site-muted);
    line-height: 1.75;
}

.list-item-meta {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.55;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2,
.auth-card h2,
.reader-paywall h2 {
    margin: 4px 0 0;
    font-size: 30px;
}

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

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

.comic-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--site-shadow);
}

.comic-card.compact .comic-card-body {
    padding: 14px;
}

.comic-cover,
.detail-cover {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
}

.comic-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.comic-card-body strong,
.rank-item strong,
.update-item strong,
.list-item strong {
    font-size: 18px;
}

.meta-line,
.description-line,
.soft-note,
.detail-meta,
.detail-copy p,
.auth-hero p,
.auth-benefits span,
.reader-toolbar p,
.reader-chapter-list small {
    color: var(--site-muted);
}

.description-line {
    line-height: 1.7;
    min-height: 72px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--site-panel-soft);
    border: 1px solid var(--site-line);
    font-size: 13px;
}

.tag-row.spacious {
    margin-top: 16px;
}

.detail-tags {
    gap: 12px;
}

.detail-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px !important;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(86, 119, 201, 0.34), rgba(48, 68, 122, 0.42)) !important;
    border: 1px solid rgba(162, 187, 255, 0.26) !important;
    color: #f8fbff !important;
    -webkit-text-fill-color: #f8fbff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px rgba(7, 11, 22, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.detail-tag:hover {
    background: linear-gradient(180deg, rgba(101, 142, 255, 0.48), rgba(61, 87, 161, 0.5)) !important;
    border-color: rgba(186, 205, 255, 0.38) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.card-footer,
.chapter-status {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: var(--site-muted);
    font-size: 14px;
    margin-top: auto;
}

.content-section.alt,
.page-hero,
.auth-shell {
    background: rgba(255, 255, 255, 0.44);
}

.dual-grid,
.wallet-grid {
    grid-template-columns: 1.15fr 0.85fr;
}

.author-form-shell {
    width: min(860px, var(--site-shell));
    margin: 0 auto;
}

.author-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.66fr);
    gap: 16px;
    align-items: start;
}

.author-overview-card,
.author-guide-card,
.author-empty-state {
    padding: 16px 18px;
    border-radius: var(--site-radius);
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.author-overview-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
        var(--site-panel);
    padding: 18px 20px;
}

.author-stat-grid,
.author-guide-grid,
.author-comic-grid {
    display: grid;
    gap: 18px;
}

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

.author-stat-card {
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(21, 101, 216, 0.06), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(21, 101, 216, 0.12);
    min-height: 116px;
}

.author-stat-card span,
.author-guide-step {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--site-brand);
    letter-spacing: 0.04em;
}

.author-stat-card strong,
.author-guide-card strong,
.author-empty-state strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

.author-stat-card p,
.author-guide-card p,
.author-empty-state p {
    margin: 6px 0 0;
    color: var(--site-muted);
    line-height: 1.45;
    font-size: 12px;
}

.author-profile-card {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    width: min(100%, 400px);
    justify-self: end;
    gap: 8px;
}

.author-overview-card .section-head h2,
.author-profile-card .section-head h2 {
    font-size: 20px;
}

.author-overview-card .soft-note,
.author-profile-card .soft-note {
    font-size: 12px;
    line-height: 1.45;
}

.author-dashboard-grid .eyebrow {
    margin-bottom: 6px;
}

.author-overview-head {
    align-items: end;
}

.author-overview-inline-note {
    margin: 0;
    max-width: 280px;
    text-align: right;
}

.author-profile-form {
    gap: 10px;
}

.author-bio-textarea {
    min-height: 82px;
    padding-top: 12px;
}

.author-profile-actions {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.author-profile-head {
    align-items: start;
}

.author-profile-head-note {
    margin: 6px 0 0;
}

.author-form-actions .primary-button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
}

.author-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--site-panel-soft);
    border: 1px solid var(--site-line);
    color: var(--site-ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.author-status-badge.success {
    background: rgba(21, 128, 61, 0.12);
    border-color: rgba(21, 128, 61, 0.18);
    color: var(--site-success);
}

.author-status-badge.pending {
    background: rgba(255, 176, 32, 0.14);
    border-color: rgba(255, 176, 32, 0.2);
    color: #9a6700;
}

.author-status-badge.danger {
    background: rgba(214, 69, 69, 0.12);
    border-color: rgba(214, 69, 69, 0.18);
    color: var(--site-danger);
}

.author-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.author-comic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.author-comic-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--site-shadow);
}

.author-comic-card:hover,
.author-guide-card:hover,
.creator-sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(17, 24, 39, 0.12);
}

.author-comic-card .comic-cover {
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.1), rgba(255, 176, 32, 0.08));
}

.author-comic-card .comic-card-body {
    gap: 10px;
    padding: 16px;
}

.author-comic-head {
    display: grid;
    gap: 4px;
}

.author-comic-head strong {
    line-height: 1.35;
}

.author-comic-updated {
    color: var(--site-muted);
    font-size: 12px;
}

.author-comic-meta {
    font-size: 13px;
}

.author-comic-tags {
    margin-top: 2px;
}

.author-comic-description {
    min-height: 64px;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-comic-footer {
    margin-top: 0;
    font-size: 13px;
}

.author-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.author-card-actions .ghost-button,
.author-card-actions .primary-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
}

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

.author-empty-state .primary-button {
    margin-top: 18px;
}

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

.author-guide-card {
    min-height: 100%;
}

.creator-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
    gap: 18px;
}

.creator-editor-card {
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96)),
        var(--site-panel);
}

.creator-form {
    gap: 16px;
}

.creator-form label {
    display: grid;
    gap: 8px;
}

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

.creator-form-grid-wide {
    align-items: end;
}

.creator-sidebar {
    display: grid;
    gap: 18px;
    align-content: start;
}

.creator-sidebar-card {
    padding: 22px;
    border-radius: var(--site-radius);
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.creator-sidebar-card h3 {
    margin: 8px 0 0;
    font-size: 22px;
}

.creator-sidebar-card p {
    color: var(--site-muted);
    line-height: 1.75;
}

.creator-checkbox-card {
    min-height: 56px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--site-line);
    background: var(--site-panel-soft);
}

.creator-note-list {
    display: grid;
    gap: 12px;
}

.creator-note-list div {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(21, 101, 216, 0.06), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(21, 101, 216, 0.12);
}

.creator-note-list strong,
.creator-note-list span {
    display: block;
}

.creator-note-list strong {
    font-size: 20px;
}

.creator-note-list span {
    margin-top: 6px;
    color: var(--site-muted);
    font-size: 13px;
}

.list-item-panel {
    padding: 18px 0;
}

.rank-item,
.update-item,
.list-item {
    display: grid;
    grid-template-columns: auto 72px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--site-line);
}

.update-item,
.list-item {
    grid-template-columns: 1fr auto;
}

.rank-item:first-of-type,
.update-item:first-of-type,
.list-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.rank-item img {
    width: 72px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.rank-index {
    font-size: 22px;
    font-weight: 700;
    color: var(--site-brand);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.author-actions form {
    margin: 0;
}

.compact-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.danger-button {
    color: var(--site-danger);
    border-color: rgba(214, 69, 69, 0.18);
    background: rgba(214, 69, 69, 0.04);
}

.danger-button:hover {
    background: rgba(214, 69, 69, 0.08);
    border-color: rgba(214, 69, 69, 0.28);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.page-hero-inner,
.auth-grid,
.detail-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
}

.catalog-search {
    width: min(640px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 14px;
}

.catalog-search input {
    min-height: 52px;
    padding: 0 20px;
    font-size: 14px;
}

.catalog-search input::placeholder {
    color: rgba(31, 36, 48, 0.52);
}

.catalog-search .primary-button {
    min-height: 52px;
    min-width: 118px;
    padding: 0 18px;
}

.detail-hero {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.74));
    color: #fff;
}

.detail-hero-inner {
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
}

.detail-cover {
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.detail-description {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.78);
    max-width: 760px;
}

.detail-wallet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 1px solid rgba(124, 162, 255, 0.42);
    background: linear-gradient(180deg, rgba(90, 131, 248, 0.26), rgba(60, 95, 196, 0.32));
    color: #eef4ff;
    -webkit-text-fill-color: #eef4ff;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(10, 18, 34, 0.2);
}

.detail-wallet-button:hover {
    background: linear-gradient(180deg, rgba(107, 148, 255, 0.34), rgba(74, 109, 213, 0.4));
    border-color: rgba(160, 188, 255, 0.5);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.detail-hero .ghost-button.inverted {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(247, 249, 255, 0.94);
    -webkit-text-fill-color: rgba(247, 249, 255, 0.94);
}

.detail-hero .ghost-button.inverted:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

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

.chapter-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.chapter-price {
    color: var(--site-accent);
}

.unlock-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--site-panel-soft);
}

.auth-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
}

.auth-hero {
    padding: 10px 0;
}

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

.auth-benefits div {
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.auth-benefits strong,
.wallet-balance-card strong {
    display: block;
}

.auth-card {
    padding: 24px;
    border-radius: 22px;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.auth-switcher {
    position: relative;
}

.auth-tab-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-tab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px;
    border-radius: 18px;
    background: var(--site-panel-soft);
    border: 1px solid var(--site-line);
    margin-bottom: 22px;
}

.auth-tab-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    cursor: pointer;
    color: var(--site-muted);
    font-weight: 600;
    transition: 160ms ease;
}

#login-mode-code:checked ~ .auth-tab-bar label[for="login-mode-code"],
#login-mode-password:checked ~ .auth-tab-bar label[for="login-mode-password"] {
    background: var(--site-brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(21, 101, 216, 0.22);
}

.auth-panel {
    display: none;
}

#login-mode-code:checked ~ .auth-panel-code,
#login-mode-password:checked ~ .auth-panel-password {
    display: grid;
    gap: 18px;
}

.auth-panel-head p {
    margin: 8px 0 0;
}

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

.auth-code-input {
    min-width: 0;
}

.auth-inline-button {
    min-width: 132px;
}

.auth-password-views {
    display: grid;
}

.password-view {
    display: none;
    gap: 18px;
}

.password-view.is-active {
    display: grid;
}

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

.auth-secondary-button {
    min-width: 132px;
}

.auth-main-submit {
    min-height: 46px;
    font-size: 18px;
    font-weight: 600;
}

.auth-main-submit-full {
    width: 100%;
}

.auth-inline-link-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.auth-inline-switch {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.88);
    color: var(--site-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
}

.auth-inline-switch:hover {
    color: var(--site-brand);
    border-color: rgba(21, 101, 216, 0.24);
    background: rgba(21, 101, 216, 0.06);
}

.auth-subpanel {
    display: grid;
    gap: 16px;
}

.auth-panel-head.compact h2,
.auth-panel-head.compact h3 {
    margin: 0;
    font-size: 18px;
}

.auth-reset-form {
    gap: 12px;
}

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

.auth-inline-button:disabled {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.24);
    color: rgba(100, 116, 139, 0.92);
    cursor: not-allowed;
    box-shadow: none;
}

.auth-code-note {
    display: block;
    margin-top: 8px;
    color: var(--site-muted);
    font-size: 12px;
    line-height: 1.6;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus,
.catalog-search input:focus,
.site-search-field:focus-within,
.hero-search-field:focus-within {
    outline: none;
    border-color: rgba(21, 101, 216, 0.34);
    box-shadow: 0 0 0 4px rgba(21, 101, 216, 0.08);
}

.stack-form textarea {
    min-height: 124px;
    resize: vertical;
}

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

.inline-form-flash {
    margin-bottom: 16px;
}

.inline-field-flash {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
}

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

.stack-form label span {
    display: block;
    margin-bottom: 8px;
    color: var(--site-muted);
}

.account-grid {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1fr) minmax(0, 1fr);
}

.profile-card .profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-card .profile-head img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-card .detail-metrics div {
    background: rgba(15, 23, 42, 0.018);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.profile-card .detail-metrics strong {
    color: var(--site-ink);
}

.profile-card .detail-metrics span {
    color: var(--site-muted);
}

.profile-card .chip-row {
    margin-top: 18px;
}

.account-password-panel {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--site-line);
}

.account-password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.account-password-grid input::placeholder {
    font-size: 13px;
}

.list-stack {
    display: grid;
}

.wallet-balance-card {
    min-width: 220px;
    background: var(--site-dark);
    color: #fff;
}

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

.package-card {
    padding: 24px;
    border-radius: 18px;
    background: var(--site-panel);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow);
}

.package-card strong {
    display: block;
    font-size: 24px;
}

.package-card p {
    margin: 8px 0 18px;
    color: var(--site-muted);
}

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

.package-actions > * {
    flex: 1 1 160px;
}

.package-actions-single {
    flex-basis: 100%;
}

.payment-qr-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.payment-qr-image {
    width: min(320px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 16px;
    margin: 12px auto 20px;
}

.reader-body {
    background: #eef1f6;
}

.reader-toolbar {
    padding: 20px 0;
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
}

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

.reader-toolbar h1 {
    margin: 8px 0 0;
    font-size: 28px;
}

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

.reader-sidebar {
    position: sticky;
    top: 112px;
}

.reader-chapter-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 240px);
    overflow: auto;
    margin-top: 16px;
}

.reader-chapter-list a {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--site-panel-soft);
    border: 1px solid var(--site-line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.reader-chapter-title {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
    word-break: break-word;
}

.reader-chapter-state {
    flex: 0 0 52px;
    width: 52px;
    text-align: right;
    white-space: nowrap;
    line-height: 1.45;
}

.reader-chapter-list a.is-active {
    border-color: rgba(21, 101, 216, 0.28);
    background: rgba(21, 101, 216, 0.08);
}

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

.reader-images {
    display: grid;
    gap: 0;
    justify-items: center;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
}

.reader-images img {
    display: block;
    width: min(780px, 100%);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.reader-image {
    display: block;
    min-height: 200px;
    opacity: 0.82;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.reader-image.is-lazy {
    background:
        linear-gradient(90deg, rgba(228, 234, 244, 0.94), rgba(243, 246, 251, 0.98), rgba(228, 234, 244, 0.94));
    background-size: 220% 100%;
    animation: reader-image-pulse 1.8s ease-in-out infinite;
}

.reader-image.is-ready {
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

@keyframes reader-image-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -20% 0;
    }
}

.reader-bottom-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 18px;
}

.site-pagination {
    padding-bottom: 34px;
}

.site-pagination,
.site-pagination-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.site-pagination-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.site-pagination-current {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
}

.site-footer {
    margin-top: 40px;
    padding: 26px 0 38px;
    border-top: 1px solid var(--site-line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.72));
}

.site-footer-inner {
    display: block;
    padding-bottom: 18px;
}

.site-footer p {
    color: var(--site-muted);
    line-height: 1.7;
}

.site-footer-brand strong {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 20px;
}

.site-footer-label {
    margin: 0 0 8px;
    color: var(--site-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.site-footer-brand p {
    max-width: 640px;
}

.site-footer-records {
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.site-footer-records p,
.site-footer-records a,
.site-footer-records span {
    color: var(--site-muted);
    line-height: 1.6;
}

.site-footer-record-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.site-footer-record-item {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0;
    white-space: nowrap;
}

.site-footer-record-item a {
    color: inherit;
}

.site-footer-record-strip a.site-footer-record-item:hover,
.site-footer-record-item a:hover {
    color: var(--site-brand);
}

.site-footer-report {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 10px;
    color: var(--site-muted);
    font-size: 13px;
    line-height: 1.7;
}

.site-footer-report a {
    color: inherit;
}

.site-footer-report a:hover {
    color: var(--site-brand);
}

.empty-state {
    text-align: center;
    padding: 70px 0 96px;
}

@media (max-width: 1100px) {
    .site-header-inner,
    .hero-grid,
    .detail-hero-inner,
    .auth-grid,
    .page-hero-inner,
    .author-dashboard-grid,
    .creator-workspace,
    .account-grid,
    .wallet-grid,
    .reader-layout,
    .dual-grid {
        grid-template-columns: 1fr;
    }

    .site-header-inner {
        padding: 16px 0;
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        padding-bottom: 16px;
    }

    .site-footer-records {
        text-align: left;
    }

    .site-footer-record-strip {
        justify-content: flex-start;
    }

    .auth-reset-grid,
    .account-password-grid {
        grid-template-columns: 1fr;
    }

    .auth-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-action-row .primary-button,
    .auth-action-row .ghost-button,
    .auth-secondary-button {
        width: 100%;
    }

    .auth-inline-link-row {
        justify-content: flex-start;
    }

    .site-utility,
    .site-nav,
    .site-header-actions {
        flex-wrap: wrap;
    }

    .site-search {
        width: 100%;
        grid-template-columns: 1fr;
    }

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

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

    .hero-covers,
    .comic-grid,
    .compact-grid,
    .author-comic-grid,
    .author-guide-grid,
    .author-stat-grid,
    .creator-form-grid,
    .package-grid,
    .chapter-grid,
    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reader-sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    :root {
        --site-shell: min(100vw - 24px, 100%);
    }

    .hero-covers,
    .comic-grid,
    .compact-grid,
    .author-comic-grid,
    .author-guide-grid,
    .author-stat-grid,
    .creator-form-grid,
    .package-grid,
    .chapter-grid,
    .trust-grid {
        grid-template-columns: 1fr;
    }

    .hero-metrics,
    .detail-summary,
    .detail-metrics {
        grid-template-columns: 1fr;
    }

    .reader-toolbar-inner,
    .site-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .reader-bottom-nav,
    .hero-actions,
    .paywall-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .site-search-field,
    .hero-search-field {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .site-utility,
    .site-header-actions {
        width: 100%;
    }

    .site-user {
        max-width: 100%;
    }

    .author-card-actions {
        grid-template-columns: 1fr;
    }
}
