.tone-comics-page {
  background:
    radial-gradient(circle at 50% 12%, rgba(232, 215, 178, 0.13), transparent 26rem),
    radial-gradient(circle at 50% 48%, rgba(134, 189, 180, 0.08), transparent 34rem),
    linear-gradient(180deg, #100806 0%, #0b0707 58%, #050303 100%);
}

.comics-hero {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(980px, calc(100% - 40px));
  min-height: 56svh;
  margin: 0 auto;
  padding: clamp(70px, 13vh, 150px) 0 clamp(54px, 9vh, 96px);
  text-align: center;
  isolation: isolate;
}

.comics-hero::before,
.comic-shell::before,
.reader::before {
  content: "";
  position: absolute;
  pointer-events: none;
}

.comics-hero::before {
  z-index: -1;
  width: min(720px, 84vw);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 215, 178, 0.10);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(232, 215, 178, 0.12), transparent 36%),
    repeating-radial-gradient(circle, rgba(242, 234, 223, 0.08) 0 1px, transparent 1px 78px);
  opacity: 0.78;
}

.comics-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(4rem, 14vw, 9.2rem);
  letter-spacing: -0.055em;
}

.comics-hero p:not(.label) {
  max-width: 42rem;
  margin-bottom: 30px;
  color: rgba(242, 234, 223, 0.72);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.comic-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.comic-shell,
.reader {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto clamp(74px, 10vw, 124px);
  border: 1px solid rgba(242, 234, 223, 0.13);
  border-radius: 32px;
  background:
    radial-gradient(circle at 16% 0%, rgba(232, 215, 178, 0.13), transparent 22rem),
    radial-gradient(circle at 92% 26%, rgba(134, 189, 180, 0.07), transparent 18rem),
    rgba(255, 255, 255, 0.028);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.comic-shell::before,
.reader::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(242, 234, 223, 0.07), transparent),
    repeating-linear-gradient(115deg, rgba(242, 234, 223, 0.035) 0 1px, transparent 1px 170px);
  opacity: 0.58;
}

.library-head,
.reader-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 44px) 0;
}

.library-head h2,
.reader-bar h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.library-head p:last-child,
.reader-bar p:last-child {
  max-width: 18rem;
  margin: 0 0 7px;
  color: rgba(242, 234, 223, 0.58);
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: right;
}

.collection-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 28px clamp(20px, 4vw, 44px) 10px;
  scrollbar-width: none;
}

.collection-tabs::-webkit-scrollbar {
  display: none;
}

.collection-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(242, 234, 223, 0.13);
  border-radius: 999px;
  padding: 12px 16px;
  color: rgba(242, 234, 223, 0.70);
  font: inherit;
  background: rgba(11, 7, 7, 0.35);
  box-shadow: inset 0 1px 0 rgba(242, 234, 223, 0.06);
  cursor: pointer;
}

.collection-tab[aria-selected="true"] {
  color: #1a100d;
  border-color: rgba(232, 215, 178, 0.52);
  background: linear-gradient(135deg, #f2eadf, #e0b46e);
  box-shadow: 0 14px 34px rgba(232, 180, 99, 0.18);
}

.comic-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 44px) clamp(24px, 4vw, 44px);
}

.comic-card {
  position: relative;
  min-width: 0;
}

.comic-card button,
.comic-card a {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
  gap: 14px;
  border: 1px solid rgba(242, 234, 223, 0.13);
  border-radius: 24px;
  padding: 14px;
  color: inherit;
  text-align: left;
  text-decoration: none;
  background:
    radial-gradient(circle at 28% 0%, rgba(232, 215, 178, 0.13), transparent 12rem),
    rgba(9, 7, 6, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(242, 234, 223, 0.06),
    0 20px 54px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.comic-card button:hover,
.comic-card a:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 215, 178, 0.34);
  background:
    radial-gradient(circle at 28% 0%, rgba(232, 215, 178, 0.19), transparent 12rem),
    rgba(15, 10, 8, 0.72);
}

.cover-frame {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(242, 234, 223, 0.10);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 24%, rgba(232, 215, 178, 0.22), transparent 44%),
    rgba(0, 0, 0, 0.24);
}

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

.pdf-cover {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: rgba(242, 234, 223, 0.9);
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 4.8rem);
}

.comic-card-title {
  display: grid;
  gap: 5px;
}

.comic-card-title strong {
  color: rgba(242, 234, 223, 0.95);
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.comic-card-title span {
  color: rgba(242, 234, 223, 0.56);
  font-size: 0.9rem;
  line-height: 1.45;
}

.reader {
  padding-bottom: clamp(24px, 4vw, 44px);
}

.reader[hidden] {
  display: none;
}

.reader-bar {
  align-items: center;
  padding-bottom: clamp(20px, 4vw, 34px);
}

.reader-back {
  flex: 0 0 auto;
  border: 1px solid rgba(242, 234, 223, 0.14);
  border-radius: 999px;
  padding: 12px 18px;
  color: rgba(242, 234, 223, 0.76);
  font: inherit;
  background: rgba(11, 7, 7, 0.52);
  cursor: pointer;
}

.reader-back:hover {
  color: var(--gold);
  border-color: rgba(232, 215, 178, 0.36);
}

.reader-pages {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  justify-items: center;
  padding: 0 clamp(14px, 4vw, 44px);
}

.reader-page {
  width: min(100%, 880px);
  margin: 0;
}

.reader-page img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(242, 234, 223, 0.14);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.reader-page figcaption {
  padding: 10px 4px 0;
  color: rgba(242, 234, 223, 0.48);
  font-size: 0.84rem;
  text-align: center;
}

.loading-note,
.empty-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  color: rgba(242, 234, 223, 0.7);
}

@media (max-width: 760px) {
  .comics-hero {
    min-height: auto;
    padding-top: 64px;
  }

  .library-head,
  .reader-bar {
    display: grid;
    align-items: start;
  }

  .library-head p:last-child,
  .reader-bar p:last-child {
    max-width: none;
    text-align: left;
  }

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

  .comic-card button,
  .comic-card a {
    padding: 10px;
    border-radius: 20px;
  }

  .cover-frame {
    border-radius: 15px;
  }
}

@media (max-width: 430px) {
  .comic-shell,
  .reader,
  .comics-hero {
    width: min(100% - 28px, 1180px);
  }

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

  .comic-card-title strong {
    font-size: 1.72rem;
  }

  .collection-tab {
    padding: 11px 14px;
  }
}
