:root {
    --paper: #fbfaf7;
    --surface: #ffffff;
    --ink: #252c2a;
    --muted: #6e746f;
    --line: #e7e8e1;
    --red: #ce443c;
    --red-dark: #ad332c;
    --soft-red: #f8e9e5;
    --green: #244a43;
    --radius: 16px;
    --story-size: 18px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 28px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
select {
    cursor: pointer;
}

button {
    color: inherit;
}

button:disabled {
    cursor: default;
}

img,
svg {
    max-width: 100%;
}

img {
    display: block;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    line-height: 1.4;
    font-weight: 700;
}

h2 {
    font-size: 28px;
    letter-spacing: -0.8px;
}

h3 {
    font-size: 18px;
}

h2 .icon,
h1 .icon {
    color: var(--red);
    margin-right: 10px;
    vertical-align: -2px;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid #c7453e;
    outline-offset: 5px;
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.eyebrow {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 92px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.brand > .icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    color: var(--red);
}

.brand-caption {
    color: var(--muted);
    font-size: 14px;
    padding-left: 26px;
    border-left: 1px solid var(--line);
}

.header-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.search-trigger,
.shelf-link,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    min-height: 44px;
}

.search-trigger {
    border: 1px solid var(--line);
    border-radius: 30px;
    width: 224px;
    padding: 10px 18px;
    color: var(--muted);
    background: var(--paper);
}

.shelf-link {
    font-weight: 600;
}

.primary-nav {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 64px;
    align-items: center;
}

.nav-link {
    padding: 9px 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 14px;
    transition: background 0.18s ease;
}

.nav-link.active,
.nav-link:hover {
    background: var(--soft-red);
    color: var(--red-dark);
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
}

.hero {
    margin-top: 36px;
    padding: 48px 48px 44px;
    border: 1px solid #e8e6de;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    align-items: center;
    gap: 30px;
    min-height: 440px;
    background: #f1f0e9;
    overflow: hidden;
}

.red-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    margin-right: 8px;
}

.hero h1 {
    font-size: clamp(38px, 4vw, 54px);
    letter-spacing: 2px;
    margin: 14px 0 10px;
}

.hero-line {
    font-size: 25px;
    line-height: 1.6;
    font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
    letter-spacing: 1px;
}

.hero-description {
    color: var(--muted);
    margin-top: 16px;
    font-size: 14px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 18px;
    min-height: 46px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    transition: background 0.18s ease, transform 0.18s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.primary {
    background: var(--red);
    color: white;
}

.primary:hover {
    background: var(--red-dark);
}

.secondary {
    background: var(--surface);
    border-color: var(--line);
}

.dark {
    background: var(--green);
    color: white;
}

.hero-notes {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 25px;
    color: var(--muted);
    font-size: 12px;
}

.hero-notes span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero-notes .icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
}

.hero-visual {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    gap: 20px;
    min-width: 0;
}

.hero-cover,
.category-cover,
.cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--cover-color, #e2e6e2);
    aspect-ratio: 3 / 4;
}

.hero-cover {
    transform: rotate(-5deg);
    box-shadow: 10px 16px 0 rgba(41, 62, 56, 0.09), 0 18px 40px rgba(43, 54, 49, 0.14);
    margin: 6px 0 16px;
}

.hero-cover img,
.cover img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    font-size: 14px;
}

.cover:hover img,
.hero-cover:hover img {
    transform: scale(1.04);
}

.cover-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background: rgba(29, 44, 40, 0.78);
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 7px;
}

.cover-open {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 27px 12px 10px;
    color: white;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    font-size: 12px;
}

.hero-story {
    margin-bottom: 21px;
    padding-left: 16px;
    border-left: 2px solid var(--red);
}

.hero-story h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.hero-story > p:not(.eyebrow) {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.section {
    margin-top: 68px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading .muted {
    margin-top: 10px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--red-dark);
    font-weight: 600;
    flex-shrink: 0;
}

.text-link .icon {
    order: 2;
    width: 17px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.category-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    padding: 21px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
}

.category-tile .icon {
    color: var(--red);
    width: 24px;
    height: 24px;
    flex-basis: 24px;
}

.category-tile h3 {
    font-size: 15px;
}

.category-tile p {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
    margin-top: 5px;
}

.category-tile:hover {
    border-color: var(--red);
}

.category-descriptions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 20px;
    margin-top: 15px;
    font-size: 12px;
    color: var(--muted);
}

.category-descriptions strong {
    font-weight: 400;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 22px;
}

.comic-card {
    min-width: 0;
}

.card-copy {
    padding-top: 14px;
}

.card-copy .eyebrow {
    font-size: 12px;
    letter-spacing: 0;
    margin-bottom: 5px;
}

.card-copy h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.card-copy .muted {
    font-size: 12px;
}

.editor-feature {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    border-radius: 18px;
    background: #e9efeb;
    overflow: hidden;
}

.editor-art {
    background: var(--cover-color);
    min-height: 410px;
}

.editor-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 500px;
}

.editor-copy {
    padding: 40px 48px;
}

.editor-copy h2 {
    font-size: 30px;
    margin-bottom: 18px;
}

.editor-copy > p {
    font-size: 14px;
}

blockquote {
    margin: 24px 0;
    padding: 0 0 0 16px;
    border-left: 2px solid #82a39a;
    font-family: SimSun, serif;
    color: var(--green);
}

.editor-copy .button {
    margin-top: 24px;
}

.rank-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.7fr;
    gap: 32px;
}

.rank-lead {
    background: var(--green);
    color: #fff;
    padding: 27px 32px 32px;
    border-radius: 14px;
}

.rank-big {
    font-size: 64px;
    font-family: Georgia, serif;
    font-style: italic;
    line-height: 1.2;
    color: #c6dcd0;
    margin-bottom: 16px;
}

.rank-lead h3 {
    font-size: 25px;
    margin-bottom: 14px;
}

.rank-lead > p:not(.rank-big) {
    font-size: 14px;
    color: #deebe5;
}

.rank-lead .text-link {
    margin-top: 24px;
    color: white;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 26px;
}

.rank-list li {
    display: flex;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    min-width: 0;
}

.rank-no {
    color: #a8aca5;
    font-family: Georgia, serif;
    font-size: 26px;
    font-style: italic;
}

.rank-list h3 {
    font-size: 16px;
    margin-bottom: 7px;
}

.rank-list .muted {
    font-size: 12px;
}

.rank-arrow {
    margin-left: auto;
}

.rank-arrow span {
    display: none;
}

.two-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 24px;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.horizontal-card h3 {
    margin-bottom: 12px;
}

.horizontal-card p:not(.eyebrow) {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.update-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.update-row {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}

.update-row:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.update-row:nth-last-child(-n+2) {
    border-bottom: none;
}

.update-row time {
    font-family: Georgia, serif;
    color: var(--muted);
    font-size: 20px;
}

.update-row > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.update-name {
    font-weight: 600;
}

.status-pill {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 12px;
    color: #3d6955;
    background: #edf3ed;
    border-radius: 4px;
    padding: 2px 7px;
}

.update-row > .icon {
    color: var(--muted);
}

.mood-section {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 52px;
    background: #efece4;
    border-radius: 18px;
    padding: 40px;
    align-items: center;
}

.mood-section h2 {
    margin-bottom: 16px;
}

.mood-section p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
}

.mood-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.mood-chip {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #dcd9ce;
    background: transparent;
    font-size: 14px;
}

.mood-chip.selected {
    border-color: var(--green);
    color: white;
    background: var(--green);
}

.mood-result {
    background: var(--surface);
    padding: 30px;
    border-radius: 12px;
    min-height: 280px;
}

.mood-result h3 {
    font-size: 26px;
    margin-bottom: 14px;
}

.mood-result .button {
    margin-top: 24px;
}

.completed-card {
    padding: 30px;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px 20px;
    border-top: 3px solid var(--green);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.end-number {
    font-size: 36px;
    font-family: Georgia, serif;
    color: #b1b9b1;
}

.completed-card h3 {
    margin-bottom: 14px;
}

.completed-card > .text-link {
    grid-column: 2;
    margin-top: 12px;
}

.shelf-promo {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    gap: 64px;
    padding: 40px 0;
    border-block: 1px solid var(--line);
}

.shelf-promo h2 {
    margin-bottom: 18px;
}

.shelf-promo p {
    font-size: 14px;
    color: var(--muted);
}

.shelf-promo .button {
    margin-top: 24px;
}

.shelf-note {
    border-left: 2px solid #d5b79c;
    padding-left: 26px;
}

.shelf-note ol {
    padding-left: 20px;
    margin: 14px 0;
    font-size: 14px;
}

.shelf-note li + li {
    margin-top: 6px;
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq-list details {
    border-bottom: 1px solid var(--line);
}

.faq-list summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list details[open] summary .icon {
    transform: rotate(45deg);
}

.faq-list details p {
    color: var(--muted);
    padding: 0 40px 22px 0;
    font-size: 14px;
}

.about {
    display: grid;
    grid-template-columns: 1fr 0.28fr;
    gap: 70px;
}

.about h2 {
    margin-bottom: 20px;
}

.about p:not(.eyebrow) {
    color: var(--muted);
    margin-top: 14px;
    font-size: 14px;
}

.about-facts {
    border-left: 1px solid var(--line);
    padding-left: 36px;
    display: grid;
    gap: 20px;
}

.about-facts > div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.about-facts strong {
    font-family: Georgia, serif;
    color: var(--green);
    font-size: 36px;
    font-weight: 400;
}

.about-facts span {
    font-size: 12px;
    color: var(--muted);
}

.subscribe {
    display: grid;
    grid-template-columns: 1fr 210px;
    align-items: center;
    gap: 60px;
    background: var(--green);
    color: white;
    border-radius: 18px;
    padding: 44px 48px;
    margin-top: 76px;
}

.subscribe .eyebrow {
    color: #becfc7;
}

.subscribe h2 {
    margin-bottom: 16px;
}

.subscribe h2 .icon {
    color: #ecc7a5;
}

.subscribe p:not(.eyebrow) {
    color: #d4e2db;
    font-size: 14px;
}

.subscribe .secondary {
    color: white;
    background: transparent;
    border-color: #789a8b;
}

.subscription-note {
    margin-top: 20px;
    font-size: 12px !important;
}

.subscription-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-left: 1px solid #527368;
    padding-left: 30px;
}

.subscription-brand img {
    border-radius: 22px;
    width: 104px;
    height: 104px;
}

.subscription-brand strong {
    font-size: 21px;
}

.subscription-brand span {
    font-size: 12px;
    color: #d4e2db;
}

.site-footer {
    padding: 40px 0 24px;
}

.footer-top,
.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand.small {
    font-size: 21px;
    margin-bottom: 8px;
}

.brand.small .icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.copyright {
    font-size: 12px;
    color: var(--muted);
    padding-top: 24px;
    border-top: 1px solid var(--line);
    margin-top: 30px;
}

.breadcrumb {
    margin-top: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-hero {
    margin-top: 28px;
    padding: 36px 44px;
    background: #efece4;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 70px;
    align-items: center;
}

.category-hero h1 {
    font-size: 38px;
    margin-bottom: 20px;
}

.category-hero .muted {
    margin-top: 16px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.chapter-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
}

.chapter-copy h2 {
    font-size: 18px;
    letter-spacing: 0;
    margin-bottom: 12px;
}

.chapter-copy .eyebrow {
    letter-spacing: 0;
    margin-bottom: 7px;
}

.chapter-copy > .text-link {
    margin-top: 14px;
}

.category-guide {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.category-guide h2 {
    font-size: 23px;
    margin-bottom: 18px;
}

.category-guide p {
    color: var(--muted);
}

.reader {
    max-width: 840px;
    margin: 40px auto 70px;
}

.reading-heading {
    text-align: center;
}

.reading-heading h1 {
    font-size: 34px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}

.article-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reading-tools {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 26px 0;
}

.reading-tools > div {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}

.reading-tools select {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px;
}

.reading-tip {
    background: #efeee7;
    padding: 22px 26px;
    border-radius: 10px;
}

.reading-tip h2 {
    font-size: 17px;
    margin-bottom: 8px;
}

.reading-tip p {
    font-size: 14px;
    color: var(--muted);
}

.reader-panel {
    margin-top: 42px;
}

.reader-panel h2 {
    margin-bottom: 18px;
    font-size: 20px;
}

.reader-panel figure {
    margin: 0;
}

.reader-panel img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    background: #e5e6e0;
    border-radius: 10px;
}

.reader-panel figcaption {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 12px;
}

.story-text {
    font-size: var(--story-size);
    line-height: 2.2;
    margin: 26px 0 40px;
    letter-spacing: 0.4px;
}

.image-status {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 10px;
}

.chapter-end {
    text-align: center;
    padding: 35px 20px;
    border-block: 1px solid var(--line);
    margin-top: 36px;
}

.chapter-end > .icon {
    color: var(--green);
    width: 28px;
    height: 28px;
}

.chapter-end h2 {
    font-size: 23px;
    margin: 10px 0;
}

.chapter-end p {
    font-size: 14px;
    color: var(--muted);
}

.chapter-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 25px;
}

body.reading-dark {
    --paper: #1b2220;
    --surface: #27322c;
    --ink: #e6ece7;
    --muted: #afbdb3;
    --line: #3d4a41;
    --soft-red: #543a34;
    --red-dark: #ffd1c5;
    --green: #a8d4b7;
    color-scheme: dark;
}

.reading-dark .site-header,
.reading-dark .reading-tip {
    background: #252e29;
}

.reading-dark .reader-panel img {
    background: #29332c;
    filter: brightness(0.86);
}

.reading-dark .chapter-end > .icon {
    color: #a8d4b7;
}

.bookshelf-section h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.bookshelf-section > h2 {
    margin-top: 40px;
    font-size: 23px;
    margin-bottom: 20px;
}

.saved-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.saved-book,
.shelf-empty {
    background: var(--surface);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.shelf-empty {
    grid-column: 1 / -1;
    color: var(--muted);
}

.saved-book:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.saved-book h3 {
    margin-bottom: 8px;
}

.saved-book .button-row {
    margin-top: 16px;
}

dialog {
    width: min(620px, calc(100% - 32px));
    max-height: 85vh;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    color: var(--ink);
    background: var(--surface);
}

dialog::backdrop {
    background: rgba(22, 34, 28, 0.55);
    backdrop-filter: blur(4px);
}

.dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.dialog-heading h2 {
    font-size: 23px;
}

.icon-button {
    border: none;
    background: transparent;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
}

dialog label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
}

dialog input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    margin-bottom: 12px;
}

.search-results {
    margin-top: 18px;
}

.search-result {
    display: block;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.search-result strong,
.search-result span {
    display: block;
}

.search-result span {
    font-size: 14px;
    color: var(--muted);
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: max-content;
    max-width: calc(100% - 36px);
    padding: 12px 22px;
    background: #283e34;
    color: white;
    box-shadow: 0 8px 30px #0002;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.2s, transform 0.2s;
    font-size: 14px;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    padding: 10px 16px;
    color: white;
    background: var(--red-dark);
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
}

@media (max-width: 1100px) {
    .brand-caption {
        display: none;
    }

    .nav-link {
        padding-inline: 9px;
        gap: 6px;
    }

    .hero {
        padding: 34px;
    }

    .hero-visual {
        grid-template-columns: 1.2fr 1fr;
    }

    .hero-story h2 {
        font-size: 19px;
    }

    .category-grid,
    .poster-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rank-layout {
        grid-template-columns: 0.85fr 1.3fr;
        gap: 22px;
    }

    .rank-list {
        gap: 0 16px;
    }

    .rank-list li {
        gap: 9px;
    }

    .rank-arrow {
        display: none;
    }

    .horizontal-card {
        grid-template-columns: 110px 1fr;
        gap: 16px;
    }

    .chapter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .update-row {
        padding: 18px;
        gap: 13px;
    }

    .update-row > .icon {
        display: none;
    }

    .editor-copy {
        padding: 30px;
    }
}

@media (min-width: 761px) and (max-width: 1000px) {
    .primary-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-block: 10px;
    }

    .nav-link {
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 32px);
    }

    .header-main {
        min-height: 76px;
        gap: 16px;
    }

    .brand {
        font-size: 23px;
        gap: 9px;
    }

    .brand > .icon {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
    }

    .header-tools {
        gap: 14px;
    }

    .search-trigger {
        width: auto;
        border: 0;
        background: transparent;
        padding: 10px;
    }

    .search-trigger span,
    .shelf-link span {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .primary-nav {
        display: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding-bottom: 16px;
    }

    .primary-nav.open {
        display: grid;
    }

    .nav-link {
        justify-content: center;
        font-size: 13px;
        padding-inline: 4px;
    }

    .hero {
        margin-top: 24px;
        padding: 32px;
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .hero-visual {
        grid-template-columns: 170px 1fr;
        gap: 28px;
    }

    .hero-story h2 {
        font-size: 24px;
    }

    .hero-cover {
        margin-left: 8px;
    }

    .section {
        margin-top: 48px;
    }

    h2 {
        font-size: 24px;
    }

    .section-heading {
        align-items: flex-start;
        gap: 16px;
    }

    .section-heading > .text-link {
        margin-top: 7px;
        font-size: 12px;
    }

    .section-heading > .text-link .icon {
        display: none;
    }

    .poster-grid {
        gap: 24px 16px;
    }

    .category-descriptions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-tile {
        padding: 16px;
    }

    .editor-feature,
    .rank-layout,
    .mood-section,
    .shelf-promo,
    .about {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .editor-art {
        height: 270px;
        min-height: 0;
    }

    .editor-copy {
        padding: 8px 28px 32px;
    }

    .rank-lead {
        padding: 25px;
    }

    .rank-big {
        float: left;
        margin-right: 25px;
    }

    .two-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 130px 1fr;
    }

    .update-list {
        grid-template-columns: 1fr;
    }

    .update-row:nth-child(odd) {
        border-right: 0;
    }

    .update-row:nth-last-child(2) {
        border-bottom: 1px solid var(--line);
    }

    .mood-section {
        padding: 28px;
    }

    .shelf-promo {
        padding: 28px 0;
    }

    .shelf-note {
        padding-left: 20px;
    }

    .about-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-left: 0;
        padding-left: 0;
        gap: 10px;
    }

    .about-facts > div {
        display: grid;
        gap: 2px;
    }

    .subscribe {
        grid-template-columns: 1fr 120px;
        gap: 20px;
        padding: 30px;
        margin-top: 50px;
    }

    .subscription-brand {
        padding-left: 20px;
    }

    .subscription-brand span {
        display: none;
    }

    .subscription-brand strong {
        font-size: 17px;
    }

    .footer-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .category-hero {
        padding: 26px;
        grid-template-columns: 1fr 100px;
        gap: 24px;
    }

    .category-hero h1 {
        font-size: 30px;
    }

    .category-hero p:not(.eyebrow) {
        font-size: 14px;
    }

    .chapter-card {
        grid-template-columns: 1fr;
    }

    .chapter-card .cover {
        aspect-ratio: 4 / 3;
    }

    .reader {
        margin-top: 30px;
    }

    .reading-heading h1 {
        font-size: 27px;
    }

    .article-meta {
        gap: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-tools {
        gap: 3px;
    }

    .menu-toggle span,
    .shelf-link {
        display: none;
    }

    .menu-toggle {
        padding: 10px;
    }

    .primary-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        padding: 24px;
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-line {
        font-size: 22px;
    }

    .hero .button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-notes {
        gap: 8px 12px;
    }

    .hero-visual {
        grid-template-columns: 125px 1fr;
        gap: 18px;
    }

    .hero-story {
        padding-left: 10px;
        margin-bottom: 12px;
    }

    .hero-story h2 {
        font-size: 18px;
    }

    .hero-story .eyebrow {
        font-size: 12px;
        letter-spacing: 0;
    }

    .hero-story > p:not(.eyebrow) {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .hero-story .text-link {
        font-size: 12px;
    }

    .hero-story .text-link .icon {
        display: none;
    }

    .section-heading {
        flex-direction: column;
        gap: 8px;
    }

    .section-heading > .text-link {
        margin-top: 0;
    }

    .section-heading > .text-link .icon {
        display: inline-block;
    }

    .category-grid,
    .poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .category-tile {
        padding: 15px 12px;
        gap: 9px;
        font-size: 14px;
    }

    .category-descriptions {
        gap: 10px;
    }

    .category-descriptions strong {
        display: none;
    }

    .editor-copy h2 {
        font-size: 25px;
    }

    .rank-list {
        gap: 0 18px;
    }

    .rank-list h3 {
        font-size: 14px;
    }

    .rank-no {
        font-size: 21px;
    }

    .horizontal-card {
        padding: 16px;
        grid-template-columns: 95px 1fr;
        gap: 16px;
    }

    .horizontal-card .eyebrow {
        letter-spacing: 0;
    }

    .horizontal-card p:not(.eyebrow) {
        font-size: 13px;
    }

    .update-row {
        gap: 12px;
        padding: 16px 12px;
    }

    .update-row time {
        font-size: 17px;
    }

    .update-row .muted {
        font-size: 12px;
    }

    .update-name {
        font-size: 14px;
    }

    .status-pill {
        font-size: 12px;
        padding-inline: 4px;
    }

    .mood-section {
        padding: 24px;
    }

    .mood-result {
        padding: 24px;
    }

    .mood-chip {
        padding-inline: 7px;
        font-size: 13px;
    }

    .completed-card {
        padding: 22px;
        grid-template-columns: 34px 1fr;
        gap: 10px;
    }

    .subscribe {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 26px;
    }

    .subscription-brand {
        border-left: 0;
        border-top: 1px solid #527368;
        padding: 20px 0 0;
        flex-direction: row;
        gap: 16px;
    }

    .subscription-brand img {
        width: 54px;
        height: 54px;
        border-radius: 12px;
    }

    .footer-links {
        gap: 18px;
        flex-wrap: wrap;
    }

    .footer-links .icon {
        display: none;
    }

    .category-hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }

    .category-cover {
        display: none;
    }

    .chapter-grid {
        gap: 14px;
    }

    .chapter-card {
        padding: 12px;
        gap: 12px;
    }

    .chapter-copy h2 {
        font-size: 16px;
    }

    .chapter-copy .muted {
        font-size: 13px;
    }

    .reading-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .reading-tools > div {
        justify-content: center;
    }

    .reading-tools .button {
        padding-inline: 10px;
    }

    .reading-tip {
        padding: 20px;
    }

    .chapter-navigation {
        gap: 10px;
    }

    .chapter-navigation .button {
        font-size: 13px;
        padding-inline: 10px;
    }

    .chapter-navigation .icon {
        display: none;
    }

    .saved-grid {
        grid-template-columns: 1fr;
    }

    .saved-book:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
