@font-face {
  font-family: "DejaVu Sans";
  font-style: normal;
  font-weight: 400 900;
  src: local("DejaVu Sans");
}

:root {
  color-scheme: dark;
  --ink-950: #0e100e;
  --ink-900: #151815;
  --ink-850: #1b1e1b;
  --ink-800: #242824;
  --paper: #e8e9e3;
  --muted: #a4aaa2;
  --faint: #747a73;
  --line: #343934;
  --accent: #e35537;
  --accent-hover: #f06a4b;
  --font-display: "DejaVu Sans", sans-serif;
  --font-body: "DejaVu Sans", "Microsoft YaHei", sans-serif;
  --shell: min(1180px, calc(100% - 32px));
  --radius: 2px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink-950);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.012) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--ink-950);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-width: 320px;
}

body::before {
  background: radial-gradient(circle at 68% 0%, rgb(227 85 55 / 0.08), transparent 34rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  background: var(--ink-800);
  display: block;
  max-width: 100%;
}

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

::selection {
  background: var(--accent);
  color: var(--ink-950);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.page-shell {
  margin-inline: auto;
  width: var(--shell);
}

.skip-link {
  background: var(--accent);
  color: var(--ink-950);
  font-weight: 900;
  left: 16px;
  padding: 10px 16px;
  position: fixed;
  top: -100px;
  z-index: 20;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  backdrop-filter: blur(14px);
  background: rgb(14 16 14 / 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-shell {
  align-items: center;
  display: flex;
  height: 64px;
  justify-content: space-between;
  margin-inline: auto;
  width: var(--shell);
}

.brand {
  align-items: baseline;
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand span {
  font-weight: 700;
}

.brand b {
  color: var(--accent);
  font-weight: 600;
}

.primary-nav {
  align-items: center;
  display: flex;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  gap: clamp(14px, 3vw, 32px);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.primary-nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.primary-nav a:hover {
  color: var(--paper);
}

.home-lead {
  align-items: center;
  display: grid;
  gap: clamp(28px, 7vw, 94px);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  min-height: min(730px, calc(100dvh - 64px));
  padding-block: clamp(48px, 8vw, 92px);
}

.lead-copy {
  max-width: 650px;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.lead-copy h1,
.category-header h1,
.detail-copy h1,
.reader-title h1,
.message-state h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.88;
}

.lead-copy h1 {
  font-size: clamp(4.2rem, 9vw, 8.8rem);
  margin-bottom: 28px;
}

.lead-summary {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  margin-bottom: 30px;
  max-width: 33rem;
}

.primary-action {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  color: #121411;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  transition: background 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.primary-action:hover {
  background: var(--accent-hover);
}

.primary-action:active {
  transform: translateY(1px);
}

.lead-visual {
  align-self: stretch;
  min-height: 430px;
  overflow: hidden;
  position: relative;
}

.lead-visual::after {
  background: linear-gradient(180deg, transparent 48%, rgb(9 11 9 / 0.9));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.lead-cover {
  height: 100%;
  object-fit: cover;
  transition: filter 300ms ease, transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.lead-visual:hover .lead-cover {
  filter: saturate(0.82) contrast(1.05);
  transform: scale(1.025);
}

.lead-caption {
  bottom: 24px;
  display: flex;
  flex-direction: column;
  left: 24px;
  position: absolute;
  z-index: 1;
}

.lead-caption b {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.lead-caption small {
  color: var(--muted);
  margin-top: 8px;
}

.category-rail {
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.category-rail a {
  align-items: center;
  border-right: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(12px, 2vw, 24px);
  transition: background 180ms ease;
}

.category-rail a:last-child {
  border-right: 0;
}

.category-rail a:hover {
  background: var(--ink-850);
}

.category-rail span {
  font-weight: 700;
}

.category-rail b {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.home-columns {
  display: grid;
  gap: clamp(40px, 8vw, 100px);
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
  padding-block: clamp(64px, 10vw, 120px);
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0;
}

.section-heading p {
  color: var(--faint);
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.update-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  padding-block: 18px;
}

.row-cover {
  height: 96px;
  overflow: hidden;
  width: 74px;
}

.cover-image {
  height: 100%;
  object-fit: cover;
  transition: filter 180ms ease, transform 300ms ease;
  width: 100%;
}

.row-cover:hover .cover-image,
.cover-link:hover .cover-image {
  filter: saturate(0.75);
  transform: scale(1.035);
}

.row-category {
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.row-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.72rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 8px;
}

.row-copy h3 a:hover,
.ranking-item a:hover,
.comic-tile h3 a:hover {
  color: var(--accent);
}

.row-copy > p:last-child {
  color: var(--faint);
  font-size: 0.78rem;
  margin-bottom: 0;
}

.meta-separator {
  margin-inline: 8px;
}

.row-update {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.row-update time {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.row-update a {
  border-bottom: 1px solid var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.ranking-section {
  align-self: start;
  position: sticky;
  top: 94px;
}

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

.ranking-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding-block: 16px;
}

.ranking-item > span:last-child {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.rank-number {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.ranking-item a {
  font-weight: 700;
}

.category-header {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-block: clamp(64px, 11vw, 132px) 42px;
}

.back-link {
  color: var(--muted);
  display: inline-block;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.back-link:hover {
  color: var(--accent);
}

.category-header h1 {
  font-size: clamp(5rem, 14vw, 11rem);
  margin-bottom: -0.04em;
}

.category-header > p {
  align-items: flex-end;
  display: flex;
  gap: 10px;
  margin-bottom: 0;
}

.category-header > p b {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 600;
  line-height: 0.75;
}

.category-header > p span {
  color: var(--muted);
  font-size: 0.82rem;
}

.catalog-section,
.recommendation-section {
  padding-block: clamp(56px, 9vw, 104px);
}

.catalog-grid {
  display: grid;
  gap: clamp(26px, 4vw, 48px) clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comic-tile-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.cover-link {
  aspect-ratio: 0.7;
  display: block;
  overflow: hidden;
}

.comic-tile-featured .cover-link {
  aspect-ratio: 1 / 1.12;
}

.comic-tile-copy {
  padding-top: 14px;
}

.tile-meta {
  color: var(--faint);
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.comic-tile h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 9px;
}

.comic-tile-featured h3 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.chapter-link {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.77rem;
  gap: 8px;
}

.chapter-link:hover {
  color: var(--accent);
}

.comic-hero {
  align-items: center;
  display: grid;
  gap: clamp(34px, 8vw, 112px);
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
  min-height: calc(100dvh - 64px);
  padding-block: clamp(48px, 8vw, 96px);
}

.detail-cover {
  margin-left: clamp(0px, 4vw, 48px);
  max-width: 430px;
  position: relative;
}

.detail-cover::before {
  border: 1px solid var(--line);
  content: "";
  inset: 14px -14px -14px 14px;
  position: absolute;
  z-index: -1;
}

.detail-cover-image {
  aspect-ratio: 0.7;
  object-fit: cover;
  width: 100%;
}

.detail-copy {
  max-width: 660px;
}

.detail-copy h1 {
  font-size: clamp(4.2rem, 9vw, 8.3rem);
  margin-bottom: 28px;
}

.detail-byline {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.detail-byline span {
  color: var(--faint);
  margin-inline: 10px;
}

.detail-summary {
  color: #c6cac3;
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: 30px;
  max-width: 58ch;
}

.chapter-section {
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 9vw, 100px);
}

.chapter-heading > a {
  border-bottom: 1px solid var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.chapter-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.chapter-grid a {
  align-items: center;
  background: var(--ink-850);
  display: flex;
  justify-content: space-between;
  min-height: 70px;
  padding: 16px 20px;
  transition: background 180ms ease, color 180ms ease;
}

.chapter-grid a:hover {
  background: var(--accent);
  color: var(--ink-950);
}

.chapter-grid small {
  color: var(--faint);
}

.chapter-grid a:hover small {
  color: inherit;
}

.recommendation-section {
  border-top: 1px solid var(--line);
}

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

.reader-mode .site-header {
  position: relative;
}

body.reader-mode::before,
.reader-mode .site-footer {
  display: none;
}

.reader-page {
  background: #101210;
  min-height: 100dvh;
  padding-bottom: 72px;
}

.reader-title {
  padding-block: 48px 30px;
  text-align: center;
}

.reader-title .back-link {
  display: block;
  margin-bottom: 28px;
  text-align: left;
}

.reader-title p {
  color: var(--muted);
  margin-bottom: 2px;
}

.reader-title h1 {
  font-size: clamp(3rem, 8vw, 5.8rem);
  margin-bottom: 0;
}

.reader-pagination {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  margin: 0 auto 28px;
  max-width: 960px;
  padding-inline: 16px;
}

.reader-pagination > * {
  color: var(--muted);
  font-size: 0.82rem;
}

.reader-pagination > a:last-child,
.reader-pagination > .reader-edge:last-child {
  text-align: right;
}

.reader-pagination a:hover {
  color: var(--accent);
}

.reader-directory {
  border: 1px solid var(--line);
  padding: 8px 14px;
}

.reader-pages {
  margin-inline: auto;
  max-width: 960px;
}

.reader-pages figure {
  margin: 0;
}

.reader-pages img {
  height: auto;
  width: 100%;
}

.reader-pages figcaption {
  background: #0b0d0b;
  color: var(--faint);
  font-size: 0.7rem;
  padding: 8px 12px;
  text-align: right;
}

.reader-pagination-bottom {
  margin-bottom: 28px;
  margin-top: 38px;
}

.reader-return {
  border-bottom: 1px solid var(--accent);
  display: table;
  font-weight: 700;
  margin-inline: auto;
}

.loading-state,
.message-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100dvh - 64px);
  padding-block: 64px;
  text-align: center;
}

.loading-state p,
.message-state > p {
  color: var(--muted);
}

.skeleton-wide,
.skeleton-grid {
  max-width: 800px;
  width: 100%;
}

.skeleton-wide {
  height: 34px;
  margin-bottom: 28px;
}

.skeleton-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.skeleton-grid i {
  aspect-ratio: 0.7;
}

.skeleton {
  background: linear-gradient(100deg, var(--ink-850) 30%, var(--ink-800) 50%, var(--ink-850) 70%);
  background-size: 300% 100%;
}

.state-code {
  color: var(--accent) !important;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.message-state h1 {
  font-size: clamp(3.7rem, 10vw, 7rem);
  margin-bottom: 24px;
}

.message-state .primary-action {
  margin-top: 16px;
}

.site-footer {
  align-items: end;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-inline: auto;
  padding-block: 40px 54px;
  width: var(--shell);
}

.site-footer p {
  color: var(--faint);
  font-size: 0.76rem;
  margin-bottom: 0;
}

.noscript {
  background: var(--accent);
  color: var(--ink-950);
  font-weight: 700;
  margin: 0;
  padding: 12px;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .lead-visual.reveal,
  .detail-copy.reveal {
    animation-delay: 100ms;
  }

  .update-row {
    animation: reveal-row 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--delay);
  }

  .skeleton {
    animation: shimmer 1.35s ease infinite;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

@keyframes reveal-row {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}

@keyframes shimmer {
  to {
    background-position: -100% 0;
  }
}

@media (max-width: 900px) {
  .home-lead {
    gap: 26px;
    grid-template-columns: minmax(0, 0.9fr) minmax(240px, 0.65fr);
  }

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

  .ranking-section {
    position: static;
  }

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

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

  .recommendation-rail .comic-tile:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --shell: calc(100% - 28px);
  }

  .nav-shell {
    height: 58px;
  }

  .brand {
    font-size: 1.05rem;
  }

  .primary-nav {
    font-size: 0.75rem;
    gap: 12px;
    letter-spacing: 0.02em;
  }

  .primary-nav a:nth-child(4) {
    display: none;
  }

  .home-lead {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding-block: 40px 28px;
  }

  .lead-copy,
  .lead-visual {
    width: 100%;
  }

  .lead-copy h1 {
    font-size: clamp(4rem, 20vw, 6.2rem);
    margin-bottom: 20px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  .lead-summary {
    margin-bottom: 24px;
  }

  .lead-visual {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  .category-rail {
    display: flex;
    margin-inline: 0;
    overflow-x: auto;
    padding-left: 14px;
    scrollbar-width: none;
    width: 100%;
  }

  .category-rail::-webkit-scrollbar {
    display: none;
  }

  .category-rail a {
    border-right: 1px solid var(--line);
    flex: 0 0 42vw;
  }

  .home-columns {
    padding-block: 58px 76px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .update-row {
    gap: 14px;
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .row-cover {
    height: 84px;
    width: 62px;
  }

  .row-update {
    align-items: center;
    flex-direction: row;
    grid-column: 2;
    margin-top: -12px;
  }

  .category-header {
    align-items: flex-start;
    padding-block: 62px 28px;
  }

  .category-header h1 {
    font-size: 25vw;
  }

  .category-header > p {
    flex-direction: column;
    gap: 8px;
  }

  .category-header > p b {
    font-size: 3.4rem;
  }

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

  .comic-tile-featured {
    grid-column: span 2;
    grid-row: auto;
  }

  .comic-tile-featured .cover-link {
    aspect-ratio: 1 / 1.08;
  }

  .comic-hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding-block: 40px 68px;
  }

  .detail-cover {
    margin: 0;
    max-width: none;
    width: calc(100% - 20px);
  }

  .detail-copy {
    width: 100%;
  }

  .detail-copy h1 {
    font-size: clamp(4rem, 20vw, 6.4rem);
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-rail {
    display: flex;
    margin-right: -14px;
    overflow-x: auto;
    padding-right: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .recommendation-rail .comic-tile,
  .recommendation-rail .comic-tile:nth-child(n + 4) {
    display: block;
    flex: 0 0 44vw;
    scroll-snap-align: start;
  }

  .reader-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .reader-directory {
    display: none;
  }

  .reader-pages {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

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

@media (max-width: 430px) {
  .primary-nav a:nth-child(3) {
    display: none;
  }

  .section-heading p {
    display: none;
  }

  .chapter-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


.chapter-locked a {
  opacity: 0.72;
  border-style: dashed;
}
.chapter-locked small {
  color: var(--accent);
}
.locked-chapter {
  margin: 1.5rem auto 2rem;
}
