@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #090a0c;
  --surface: #101216;
  --panel: #171a20;
  --panel-2: #20242b;
  --soft: #262b34;
  --text: #f8f3ed;
  --muted: #a9a4a0;
  --faint: #6f747c;
  --line: #2a3038;
  --accent: #ef4444;
  --accent-2: #ff8f3f;
  --gold: #f7c948;
  --green: #42d392;
  --shadow: 0 18px 52px rgba(0, 0, 0, .42);
  --radius: 8px;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.light {
  color-scheme: light;
  --bg: #f2f2f3;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f1f4;
  --soft: #e4e6ea;
  --text: #181a1f;
  --muted: #666b73;
  --faint: #858b94;
  --line: #dadde3;
  --accent: #d73636;
  --accent-2: #e86d25;
  --shadow: 0 18px 46px rgba(28, 31, 36, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 310px),
    var(--bg);
  color: var(--text);
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

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

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

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.app-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 92px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 0;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(9, 10, 12, 0));
}

:root.light .app-header {
  background: linear-gradient(180deg, var(--bg) 70%, rgba(242, 242, 243, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.18rem;
}

.brand-mark,
.avatar-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 950;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.avatar-link,
.secondary,
.ghost,
.primary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 850;
}

.icon-button {
  width: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
}

.avatar-link {
  width: 40px;
  border-radius: var(--radius);
}

.primary {
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
}

.secondary,
.ghost {
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost {
  background: transparent;
}

.hero-feed {
  min-height: 360px;
  display: grid;
  align-items: end;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, #2b1518, #111827 58%, #151515),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  padding: 28px;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 10, .94) 0%, rgba(6, 7, 10, .76) 48%, rgba(6, 7, 10, .34) 100%),
    var(--hero-image, none) center / cover no-repeat;
  transform: scale(1.02);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(9, 10, 12, .95), transparent);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: end;
  max-width: 700px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 10px;
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  line-height: .96;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: rgba(248, 243, 237, .78);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-poster {
  align-self: end;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .16);
  background: var(--panel-2);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

.hero-poster img,
.cover img,
.mini-cover img,
.rank-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.search-panel {
  position: relative;
  z-index: 2;
  margin: -28px 14px 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 18, 22, .96);
  box-shadow: var(--shadow);
}

:root.light .search-panel {
  background: rgba(255, 255, 255, .96);
}

.search-panel label,
.filter-strip label {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.search-row input,
.filter-strip select,
.scrape-controls input,
.scrape-controls select,
.scrape-actions input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
}

.search-row button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.notice-strip,
.section-block {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.notice-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 18px 0;
}

.notice-strip h2 {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.45;
}

.section-block {
  margin: 18px 0;
  padding: 16px;
}

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

.section-head h2 {
  margin: 3px 0 0;
  font-size: 1.28rem;
}

.tiny-note,
.catalog-head p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.mini-tabs,
.view-tabs,
.type-tabs,
.genre-rail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.mini-tabs button,
.view-tabs button,
.type-tabs button,
.genre-rail button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  font-size: .8rem;
}

.mini-tabs button.active,
.view-tabs button.active,
.type-tabs button.active,
.genre-rail button.active {
  background: var(--accent);
  color: var(--text);
}

.browse-strip {
  display: grid;
  gap: 12px;
}

.type-tabs,
.genre-rail {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.type-tabs button,
.genre-rail button {
  white-space: nowrap;
}

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

.latest-shelf {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.shelf-item {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.shelf-item .cover {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shelf-item strong {
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 138px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.mini-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #1b4250);
}

.mini-cover::after,
.cover::after,
.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, .76));
}

.latest-card .card-title,
.comic-card h3 {
  margin: 0;
  font-size: .98rem;
  line-height: 1.35;
}

.latest-card .card-title {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-weight: 900;
}

.latest-card .card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.chapter-pills,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chapter-pills {
  margin-top: 12px;
}

.chapter-pills span,
.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
}

.filter-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.filter-strip select {
  margin-top: 6px;
}

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

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

.comic-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--cover-a), var(--cover-b)),
    var(--panel-2);
}

.cover-title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  color: #fff;
  font-weight: 950;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.comic-info {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.meta-row,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.meta-row {
  color: var(--muted);
  font-size: .78rem;
}

.card-actions button,
.card-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 900;
}

.details-button {
  background: var(--accent);
  color: #fff;
}

.bookmark-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.compact .comic-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.compact .cover {
  aspect-ratio: auto;
  min-height: 142px;
}

.ranking,
.bookmark-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.ranking {
  list-style: none;
}

.ranking li {
  min-height: 72px;
}

.ranking li a {
  display: grid;
  grid-template-columns: 32px 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: inherit;
  padding: 9px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.ranking li a:hover,
.latest-card:hover,
.comic-card:hover {
  border-color: rgba(239, 68, 68, .56);
}

.rank-no {
  color: var(--accent);
  font-weight: 950;
  text-align: center;
}

.rank-cover {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}

.rank-title {
  font-weight: 900;
  line-height: 1.25;
}

.rank-rating {
  color: var(--gold);
  font-weight: 900;
}

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

.bookmark-empty,
.no-results {
  min-height: 118px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 0;
}

.site-footer div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-footer strong {
  font-size: 1.6rem;
}

.site-footer span {
  color: var(--muted);
  font-size: .85rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 30;
  width: min(520px, calc(100% - 20px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 18, 22, .94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

:root.light .bottom-nav {
  background: rgba(255, 255, 255, .94);
}

.bottom-nav a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  background: var(--accent);
  color: #fff;
}

.page-crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}

.page-crumb a {
  color: var(--text);
}

.manga-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.manga-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px;
}

.manga-copy h1 {
  margin: 9px 0 12px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.manga-copy p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.manga-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.manga-stats div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.manga-stats strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manga-stats span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.chapter-section {
  margin-top: 0;
}

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

.chapter-row {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}

.chapter-row:hover {
  border-color: rgba(239, 68, 68, .6);
  background: var(--panel-2);
}

.chapter-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chapter-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-row small {
  color: var(--muted);
  font-size: .78rem;
}

.chapter-row em {
  color: var(--accent);
  font-style: normal;
  font-size: .82rem;
  font-weight: 950;
  white-space: nowrap;
}

.chapter-row.disabled {
  cursor: not-allowed;
  opacity: .6;
}

.chapter-row.disabled:hover {
  border-color: var(--line);
  background: var(--panel);
}

.reader-toolbar {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 35;
  width: max-content;
  min-height: 54px;
  display: none;
  grid-template-columns: repeat(4, 42px);
  gap: 10px;
  align-items: center;
  transform: translateX(-50%);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(23, 25, 31, .96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
  backdrop-filter: blur(14px);
}

.reader-title-block {
  min-width: 0;
}

.reader-toolbar h1 {
  overflow: hidden;
  margin: 2px 0;
  font-size: 1.02rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-icon-link,
.reader-circle {
  width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--panel-2);
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
}

.reader-icon-link:hover,
.reader-circle:hover {
  background: var(--accent);
}

.reader-icon-link.disabled,
.reader-circle.disabled {
  color: var(--faint);
  cursor: not-allowed;
  opacity: .55;
}

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

.reader-floating-nav {
  position: fixed;
  left: 50%;
  top: 28px;
  z-index: 45;
  width: min(720px, calc(100% - 48px));
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px auto 46px;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -8px);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-2) 96%, transparent);
  color: var(--text);
  padding: 10px 18px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.reader-page.reader-controls-visible .reader-floating-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.reader-nav-icon {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text);
  font-size: 2.3rem;
  line-height: 46px;
  font-weight: 400;
}

.reader-nav-icon.home {
  font-size: 2rem;
}

.reader-nav-icon:hover {
  background: rgba(255, 255, 255, .08);
}

.reader-nav-icon.disabled {
  color: rgba(255, 255, 255, .35);
  pointer-events: none;
}

.reader-nav-title {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08rem;
  font-weight: 700;
}

.reader-nav-chapter {
  color: #a78bfa;
  white-space: nowrap;
  font-size: 1.04rem;
  font-weight: 700;
}

.reader-page.reader-controls-visible .reader-bottom-nav {
  display: grid;
}

.reader-page .reader-images {
  padding: 22px 0 34px;
}

.reader-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 35;
  width: max-content;
  display: none;
  grid-template-columns: repeat(3, 44px);
  gap: 10px;
  transform: translateX(-50%);
}

body.is-reader .app-shell {
  padding-bottom: 0;
}

.empty-page {
  min-height: 56vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.empty-page h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

body.is-reader .bottom-nav {
  display: none;
}

.detail-cover {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(145deg, var(--cover-a), var(--cover-b)),
    var(--panel-2);
  overflow: hidden;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.reader-images {
  display: grid;
  justify-items: center;
  background: #050505;
}

.reader-images img {
  display: block;
  width: min(100%, 880px);
  height: auto;
}

.reader-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

body.admin-page {
  background: var(--bg);
}

.quick-filter-tabs,
.chapter-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.chapter-range-tabs {
  padding: 0 20px 18px;
}

.update-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -2px 0 20px;
}

.update-controls .quick-filter-tabs,
.update-controls .view-tabs {
  margin: 0;
}

.view-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: block;
}

.grid-icon::before,
.grid-icon::after,
.list-icon::before {
  content: "";
  position: absolute;
  display: block;
  background: currentColor;
}

.grid-icon::before {
  inset: 1px auto auto 1px;
  width: 7px;
  height: 7px;
  box-shadow: 9px 0 0 currentColor, 0 9px 0 currentColor, 9px 9px 0 currentColor;
}

.list-icon::before {
  left: 1px;
  top: 3px;
  width: 16px;
  height: 3px;
  border-radius: 1px;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.quick-filter-tabs button,
.chapter-range-tabs button,
.chapter-toolbar select,
.reader-preferences select {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
  font-size: .76rem;
  font-weight: 600;
}

.quick-filter-tabs button.active,
.chapter-range-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text);
}

.empty-state.wide,
.no-results {
  grid-column: 1 / -1;
  min-height: 148px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.empty-state.wide strong {
  color: var(--text);
  font-size: 1.05rem;
}

.skeleton-hero,
.skeleton-card,
.skeleton-update {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
}

.skeleton-hero {
  min-height: 330px;
}

.skeleton-card {
  aspect-ratio: 2 / 3;
}

.skeleton-update {
  aspect-ratio: 2 / 3.65;
}

.skeleton-hero::after,
.skeleton-card::after,
.skeleton-update::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation: skeleton-shimmer 1.15s infinite;
}

@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

.update-card h3 .title-badge {
  position: static;
  min-width: 24px;
  height: 16px;
  margin: 3px 3px 0 0;
  padding: 0 5px;
  font-size: .58rem;
}

.completed-badge {
  background: var(--green);
}

.new-badge {
  background: var(--accent-2);
}

.updated-badge {
  background: var(--accent);
}

.chapter-panel {
  padding-bottom: 0;
}

.chapter-toolbar {
  position: sticky;
  top: 68px;
  z-index: 12;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  background: var(--panel);
}

.chapter-tile.is-read {
  opacity: .52;
}

.chapter-tile.is-read .chapter-copy strong::after {
  content: " sudah dibaca";
  display: inline-block;
  margin-left: 8px;
  color: #8b5cf6;
  font-size: .72rem;
}

.reader-page {
  background: #050505;
}

.reader-page[data-reader-bg="gray"] {
  background: #14161c;
}

.reader-page[data-reader-bg="white"] {
  background: #f4f5f7;
}

.reader-toolbar {
  grid-template-columns: 42px minmax(120px, 280px) auto 42px 42px 42px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.reader-toolbar strong,
.reader-toolbar span:not(.reader-icon-link) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: .82rem;
  font-weight: 950;
}

.reader-toolbar > span:not(.reader-icon-link) {
  color: #a78bfa;
}

.reader-preferences {
  position: fixed;
  right: 18px;
  top: 86px;
  z-index: 35;
  display: none;
  gap: 8px;
}

.reader-page.reader-controls-visible .reader-preferences {
  display: flex;
}

.reader-page.reader-controls-visible .reader-bottom-nav {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

.reader-bottom-nav {
  grid-template-columns: repeat(4, 44px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.reader-image-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0;
}

.reader-image-wrap:not(.loaded) {
  min-height: 220px;
}

.image-loader {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 900;
}

.reader-image-wrap.loaded .image-loader {
  display: none;
}

.image-retry {
  position: absolute;
  top: 58px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  min-height: 34px;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  padding: 0 13px;
  font-weight: 900;
}

.reader-page[data-reader-mode="fit"] .reader-images img {
  width: min(100%, 880px);
}

.reader-page[data-reader-mode="original"] .reader-images {
  overflow-x: auto;
  justify-items: start;
}

.reader-page[data-reader-mode="original"] .reader-images img {
  width: auto;
  max-width: none;
}

.reader-page[data-reader-mode="single"] .reader-image-wrap {
  display: none;
  min-height: calc(100vh - 42px);
  align-content: center;
}

.reader-page[data-reader-mode="single"] .reader-image-wrap.active {
  display: grid;
}

.reader-page[data-reader-mode="single"] .reader-images img {
  width: min(100%, 880px);
  max-height: calc(100vh - 60px);
  object-fit: contain;
}

.reader-toolbar {
  grid-template-columns: repeat(4, 42px);
  width: max-content;
}

.reader-preferences,
.reader-toolbar {
  display: none !important;
}

.reader-page .reader-images img {
  width: min(100%, 880px);
  max-width: 100%;
}

@media (max-width: 980px) {
  .hero-card {
    grid-template-columns: 1fr 190px;
  }

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

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

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

@media (max-width: 760px) {
  .app-shell {
    padding-inline: 12px;
  }

  .hero-card {
    min-height: 420px;
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero-card::before {
    background:
      linear-gradient(180deg, rgba(6, 7, 10, .28) 0%, rgba(6, 7, 10, .82) 55%, rgba(6, 7, 10, .98) 100%),
      var(--hero-image, none) center / cover no-repeat;
  }

  .hero-poster {
    display: none;
  }

  .notice-strip,
  .section-head,
  .catalog-head {
    align-items: stretch;
    flex-direction: column;
  }

  .recommend-list,
  .filter-strip,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .comic-grid,
  .bookmark-list,
  .latest-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-cover {
    min-height: 360px;
  }
}

/* Final hero layout pass */
@media (min-width: 761px) {
  .shinigami-layout .shin-hero-grid {
    --hero-desktop-height: clamp(300px, 27vw, 360px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    align-items: stretch;
    gap: 24px;
    height: var(--hero-desktop-height);
    margin-bottom: 42px;
    overflow: hidden;
  }

  .shinigami-layout .hero-feed {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: grid;
    align-items: stretch;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .shinigami-layout .home-featured-shell,
  .shinigami-layout .home-featured-hero {
    width: 100%;
    max-width: 100%;
    height: 100%;
  }

  .shinigami-layout .home-featured-shell {
    height: 100%;
  }

  .shinigami-layout .hero-manhwa-panel {
    display: grid;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .shinigami-layout .hero-manhwa-list {
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 8px;
    height: 100%;
    min-height: 0;
  }

  .shinigami-layout .hero-manhwa-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 8px;
    border-radius: 12px;
    overflow: hidden;
  }

  .shinigami-layout .hero-manhwa-cover {
    width: 52px;
    border-radius: 8px;
  }

  .shinigami-layout .hero-manhwa-copy strong {
    font-size: .84rem;
    line-height: 1.18;
  }

  .shinigami-layout .hero-manhwa-copy small {
    font-size: .72rem;
  }

  .shinigami-layout .home-featured-hero {
    height: 100%;
    aspect-ratio: auto;
    animation: none;
  }

  .shinigami-layout .hero-manhwa-list {
    gap: 12px;
  }

  .shinigami-layout .hero-manhwa-item {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .shinigami-layout .hero-manhwa-cover {
    width: 64px;
    border-radius: 10px;
  }

  .shinigami-layout .hero-manhwa-copy strong {
    font-size: .94rem;
    line-height: 1.22;
  }

  .shinigami-layout .hero-manhwa-copy small {
    font-size: .8rem;
  }
}

@media (max-width: 760px) {
  .shinigami-layout .shin-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .shinigami-layout .hero-feed {
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .shinigami-layout .home-featured-hero,
  .shinigami-layout .home-featured-visual,
  .shinigami-layout .home-featured-copy {
    animation: none;
  }
}

/* Hero/nav refinements */
.mobile-header-search {
  display: none;
}

.shinigami-layout .hero-feed {
  min-height: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shin-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  align-items: stretch;
  gap: 24px;
}

.home-featured-shell {
  min-width: 0;
}

.home-featured-hero {
  height: clamp(340px, 32vw, 455px);
}

.hero-dots {
  margin-top: 0;
}

.hero-manhwa-panel {
  display: grid;
  height: auto;
  min-height: 0;
}

.hero-manhwa-list {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 12px;
  height: 100%;
}

.hero-manhwa-item {
  min-height: 0;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: var(--panel-2);
}

.hero-manhwa-cover {
  width: 72px;
  border-radius: 11px;
}

.hero-manhwa-copy strong {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
}

.hero-manhwa-copy small {
  font-size: .86rem;
}

.back-to-top {
  width: 44px;
  height: 44px;
  right: 24px;
  bottom: 24px;
  border-radius: 10px;
}

.back-to-top span {
  width: 16px;
  height: 16px;
  border-width: 3px;
}

.drawer-compass-icon,
.drawer-star-icon,
.drawer-book-icon {
  width: 22px;
  height: 22px;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.drawer-compass-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.drawer-compass-icon::before {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  left: 5px;
  top: 5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.drawer-star-icon::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 69% 57%, 79% 92%, 50% 72%, 21% 92%, 31% 57%, 2% 35%, 38% 34%);
}

.drawer-book-icon {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.drawer-book-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  border-left: 2px solid currentColor;
}

@media (max-width: 760px) {
  .mobile-header-search {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    justify-self: end;
    color: #a9afba;
  }

  .mobile-header-search span {
    width: 20px;
    height: 20px;
    position: relative;
    display: block;
    border: 3px solid currentColor;
    border-radius: 50%;
  }

  .mobile-header-search span::after {
    content: "";
    width: 9px;
    height: 3px;
    position: absolute;
    right: -8px;
    bottom: -4px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
  }

  .shin-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .home-featured-shell {
    gap: 8px;
  }

  .home-featured-hero {
    height: clamp(300px, 90vw, 350px);
  }

  .hero-dots {
    min-height: 10px;
  }

  .hero-dots button {
    width: 7px;
    height: 7px;
  }

  .hero-dots button.active {
    width: 40px;
  }

  .hero-manhwa-panel {
    height: auto;
  }

  .hero-manhwa-list {
    grid-template-rows: none;
    gap: 12px;
    height: auto;
  }

  .hero-manhwa-item {
    min-height: 84px;
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 12px;
    border-radius: 18px;
  }

  .back-to-top {
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 18px;
  }
}

@media (max-width: 460px) {
  .app-shell {
    padding-bottom: 106px;
  }

  .hero-feed,
  .hero-card {
    min-height: 390px;
  }

  .hero-copy h1 {
    font-size: 2.35rem;
  }

  .search-panel {
    margin-inline: 8px;
  }

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

  .comic-grid {
    gap: 10px;
  }

  .comic-info {
    padding: 9px;
  }

  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .card-actions button,
  .card-actions a {
    width: 100%;
  }

  .ranking li a {
    grid-template-columns: 26px 46px minmax(0, 1fr);
  }

  .rank-rating {
    display: none;
  }

  .bottom-nav {
    bottom: 8px;
  }

  .bottom-nav a {
    min-height: 42px;
    font-size: .68rem;
  }

}

/* Shinigami-style layout */
.shinigami-layout {
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
}

.shinigami-layout .app-shell {
  width: min(1180px, calc(100% - 32px));
  padding: 32px 0 72px;
}

.shin-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
}

.shin-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 0;
}

.shin-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: 0;
}

.shin-brand {
  font-size: 1rem;
  flex: 0 0 auto;
}

.shin-brand.logo-image-only span:last-child,
.footer-brand.logo-image-only span:last-child,
.shin-brand.logo-text-only .shin-logo,
.footer-brand.logo-text-only .shin-logo {
  display: none;
}

.shin-brand.logo-image-only .shin-logo,
.footer-brand.logo-image-only .shin-logo {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.shin-logo {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text);
  font-size: .75rem;
}

.shin-logo.has-logo-image {
  overflow: visible;
  background: transparent;
}

.shin-logo.has-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shin-brand.logo-image-only {
  min-height: 54px;
}

.shin-brand.logo-image-only .shin-logo.has-logo-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shin-brand.logo-image-only .shin-logo.has-logo-image img {
  width: clamp(128px, 16.5vw, 195px);
  height: auto;
  max-width: 100%;
  max-height: 48px;
}

.footer-brand.logo-image-only .shin-logo.has-logo-image img {
  width: clamp(90px, 13.5vw, 128px);
  height: auto;
  max-height: 33px;
}

.shin-nav {
  flex: 1 1 auto;
  display: inline-flex;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 34px);
}

.shin-nav a {
  color: var(--muted);
  position: relative;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.shin-nav a.active,
.shin-nav a:hover {
  color: var(--accent);
}

.shin-nav a.active::after {
  content: "";
  height: 3px;
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 52%, transparent);
}

.shin-search {
  flex: 0 1 260px;
  position: relative;
  width: min(260px, 25vw);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(420px, calc(100vw - 24px));
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, #000 4%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 7px;
  color: var(--text);
}

.search-suggestion-item:hover,
.search-suggestion-submit:hover {
  background: var(--panel);
}

.search-suggestion-cover {
  width: 42px;
  aspect-ratio: 3 / 4;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: var(--panel);
}

.search-suggestion-cover .cover-title,
.search-suggestion-cover .country-dot,
.search-suggestion-cover .title-badge,
.search-suggestion-cover .rank-badge {
  display: none;
}

.search-suggestion-cover img,
.search-suggestion-cover .cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-suggestion-item strong {
  display: block;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.25;
}

.search-suggestion-item small,
.search-suggestion-empty {
  color: var(--muted);
  font-size: .75rem;
}

.search-suggestion-submit {
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
  border-radius: 7px;
  background: transparent;
  color: var(--accent);
  text-align: left;
  padding: 0 8px;
  font-size: .78rem;
  font-weight: 700;
}

.mobile-search-toggle {
  display: none;
}

.shin-search input {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 10px;
  font-size: .78rem;
}

.shin-search button,
.shin-icon,
.shin-user {
  min-height: 30px;
  border-radius: 7px;
  background: var(--soft);
  color: var(--text);
  padding: 0 9px;
  font-size: .72rem;
  font-weight: 900;
}

.shin-icon,
.shin-user {
  width: 32px;
  display: grid;
  place-items: center;
  padding: 0;
}

.shin-user {
  border-radius: 50%;
  background: #677184;
}

body.is-reader .shin-header {
  display: none;
}

.notice-line {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: .82rem;
}

.notice-line strong,
.notice-line a {
  color: var(--accent);
}

.banner-slot-wrap {
  width: 100%;
}

.site-banner {
  width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px dashed color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 7px;
  aspect-ratio: 12 / 1;
  margin: 0 0 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 54%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 12px, transparent 12px 24px),
    var(--panel);
  color: color-mix(in srgb, var(--text) 74%, var(--muted));
  text-align: center;
  text-decoration: none;
}

.site-banner-update_after_grid {
  margin-top: 28px;
}

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

.site-banner span {
  padding: 0 14px;
  font-size: clamp(.72rem, 1.6vw, 1rem);
  font-weight: 700;
  letter-spacing: .02em;
}

.chapter-list-banner {
  aspect-ratio: 10 / 1;
  margin: 18px 0;
}

.ad-placeholder,
.ad-banner {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
}

.ad-placeholder {
  min-height: 90px;
  border: 1px dashed rgba(255, 255, 255, .16);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 12px, transparent 12px 24px),
    #181a20;
  color: #6f747c;
  font-size: .8rem;
  font-weight: 900;
}

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

.ad-banner {
  min-height: 42px;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 18% 40%, rgba(255, 255, 255, .28), transparent 17%),
    linear-gradient(90deg, var(--ad-a), var(--ad-b));
  font-weight: 1000;
}

.ad-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .08) 0 7px, transparent 7px 18px),
    linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 46%, rgba(0, 0, 0, .35));
  mix-blend-mode: soft-light;
}

.ad-banner strong {
  font-size: clamp(.92rem, 2vw, 1.5rem);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.ad-banner span {
  margin-top: 3px;
  color: rgba(255, 255, 255, .78);
  font-size: .62rem;
  letter-spacing: .08em;
}

.ad-green { --ad-a: #14271d; --ad-b: #54c13d; }
.ad-orange { --ad-a: #4d1c17; --ad-b: #ff9a27; }
.ad-gold { --ad-a: #090909; --ad-b: #d59a1d; }
.ad-blue { --ad-a: #02102f; --ad-b: #1979ff; }
.ad-black { --ad-a: #050505; --ad-b: #292929; }
.ad-cyan { --ad-a: #042a36; --ad-b: #3bc5f0; }
.ad-red { --ad-a: #22050b; --ad-b: #db1e3a; }
.ad-pink { --ad-a: #3b0f32; --ad-b: #ff71af; }
.ad-yellow { --ad-a: #4b2b00; --ad-b: #ffe35c; }
.ad-navy { --ad-a: #020817; --ad-b: #1843b7; }
.ad-purple { --ad-a: #17002b; --ad-b: #8b5cf6; }

.top-ad-stack {
  margin: 18px 0 28px;
}

.ad-top {
  margin: 16px 0 34px;
}

.popular-ad {
  margin: 12px 0 28px;
}

.shin-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
  margin-bottom: 42px;
}

.shinigami-layout .hero-feed,
.shinigami-layout .hero-card {
  min-height: 0;
  border-radius: 18px;
}

.shinigami-layout .hero-feed {
  box-shadow: none;
}

.home-featured-shell {
  display: grid;
}

.home-featured-hero {
  position: relative;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(28px, 4vw, 48px) clamp(28px, 4.6vw, 48px);
  border-radius: 18px;
  background: var(--panel);
  isolation: isolate;
  animation: heroSlideIn .58s cubic-bezier(.2, .8, .2, 1) both;
}

.home-featured-hero::before {
  content: "";
  position: absolute;
  inset: -28px;
  z-index: -2;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface) 72%, transparent), color-mix(in srgb, var(--accent-2) 28%, transparent)),
    var(--hero-image, none) center / cover no-repeat;
  filter: blur(16px) saturate(.78);
  transform: scale(1.03);
}

.home-featured-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 96%, transparent) 0%, color-mix(in srgb, var(--bg) 84%, transparent) 33%, color-mix(in srgb, var(--bg) 42%, transparent) 63%, color-mix(in srgb, var(--bg) 10%, transparent) 100%),
    radial-gradient(circle at 78% 45%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 38%);
}

.home-featured-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 18%, transparent), transparent 48%, color-mix(in srgb, var(--bg) 8%, transparent)),
    var(--hero-image, none) center / cover no-repeat;
  background-position: center right;
  opacity: .9;
  transform: scale(1.02);
  animation: heroImageIn .68s cubic-bezier(.2, .8, .2, 1) both;
}

.home-featured-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 4%, transparent), color-mix(in srgb, var(--bg) 20%, transparent)),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 74%, transparent), color-mix(in srgb, var(--bg) 16%, transparent) 62%, color-mix(in srgb, var(--bg) 6%, transparent));
}

.home-featured-copy {
  position: relative;
  z-index: 1;
  width: min(560px, 62%);
  display: grid;
  align-content: center;
  padding-bottom: 0;
  color: var(--text);
  animation: heroCopyIn .5s cubic-bezier(.2, .8, .2, 1) both;
}

.chapter-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .92);
  font-size: 1.18rem;
  font-weight: 900;
}

.home-featured-title {
  display: -webkit-box;
  max-width: 540px;
  margin: 0 0 18px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 700;
}

.home-featured-synopsis {
  display: -webkit-box;
  max-width: 540px;
  margin: 0 0 22px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(255, 255, 255, .86);
  font-size: .94rem;
  line-height: 1.58;
}

.home-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 31px;
  overflow: hidden;
  margin-bottom: 18px;
}

.home-featured-tags span {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .9);
  font-size: .85rem;
  font-weight: 800;
}

.home-featured-meta {
  display: none;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
}

.hero-rating {
  color: #fff;
  font-size: .98rem;
  font-weight: 700;
}

.hero-rating::first-letter {
  color: #ff9d73;
}

.hero-genre {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: var(--text);
  padding: 0 10px;
  font-size: .86rem;
  font-weight: 600;
}

.start-reading {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0 20px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
  font-weight: 950;
}

.home-featured-dots {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.home-featured-dots button {
  padding: 0;
}

.home-featured-dots .hero-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #8b5cf6;
  background: transparent;
}

.home-featured-dots .hero-dot.active {
  background: #8b5cf6;
  box-shadow: inset 0 0 0 3px #111216;
}

.hero-arrow {
  width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #1f2026;
  color: #b9bbc3;
  font-size: 1.45rem;
  font-weight: 700;
}

.hero-manhwa-panel {
  display: grid;
  align-self: stretch;
  height: 360px;
}

.hero-panel-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-panel-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  line-height: 1.1;
}

.hero-panel-head a {
  color: #c7c7cc;
  font-size: 1rem;
  font-weight: 500;
}

.hero-manhwa-list {
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
}

.hero-manhwa-item {
  min-height: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  background: #24252b;
}

.hero-manhwa-cover {
  width: 58px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #15161b;
  color: #fff;
  font-weight: 700;
}

.hero-manhwa-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-manhwa-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hero-manhwa-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: .9rem;
  line-height: 1.28;
  font-weight: 600;
}

.hero-manhwa-copy small {
  color: #a7a8af;
  font-size: .72rem;
  font-weight: 400;
}

@keyframes heroSlideIn {
  from {
    opacity: .82;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroImageIn {
  from {
    transform: translateX(34px) scale(1.02);
  }
  to {
    transform: translateX(0) scale(1);
  }
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.shin-feature-card {
  grid-template-columns: minmax(0, 1fr) 170px;
  padding: 22px;
  background: #101216;
}

.shin-feature-card::before {
  background:
    linear-gradient(90deg, rgba(10, 12, 16, .96) 0%, rgba(10, 12, 16, .62) 62%, rgba(10, 12, 16, .22)),
    var(--hero-image, none) right center / cover no-repeat;
  filter: saturate(.95);
}

.shin-feature-card .hero-copy h1 {
  max-width: 520px;
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.shin-feature-card .hero-copy p {
  display: -webkit-box;
  max-width: 520px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #e5e7eb;
  font-size: .88rem;
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.feature-meta span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  font-weight: 900;
}

.feature-character {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: end;
  width: 145px;
  height: 145px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
}

.feature-character img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.announcement-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.section-head.compact {
  margin: 0;
}

.section-head.compact h2 {
  font-size: 1.2rem;
}

.section-head.compact a {
  color: #c8cbd2;
  font-size: .82rem;
  font-weight: 900;
}

.announce-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #23252b;
}

.announce-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #ef4444);
  font-weight: 1000;
}

.announce-card strong,
.announce-card small {
  display: block;
}

.announce-card strong {
  font-size: .86rem;
}

.announce-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
}

.home-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 4px 0 24px;
}

.home-slider-dots button,
.home-slider-dots span {
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}

.home-slider-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.shinigami-layout .section-block {
  margin: 42px 0;
  padding: 0;
  border: 0;
  background: transparent;
}

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

.shinigami-layout .section-head h2 {
  font-size: 1.45rem;
}

.shinigami-layout .type-tabs,
.shinigami-layout .genre-rail,
.shinigami-layout .mini-tabs,
.shinigami-layout .view-tabs {
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  padding: 0;
}

.shinigami-layout .type-tabs button,
.shinigami-layout .genre-rail button,
.shinigami-layout .mini-tabs button,
.shinigami-layout .view-tabs button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.shinigami-layout .type-tabs button.active,
.shinigami-layout .genre-rail button.active,
.shinigami-layout .mini-tabs button.active,
.shinigami-layout .view-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text);
}

.shinigami-layout .genre-rail {
  display: none;
}

.shinigami-layout .type-tabs:empty {
  display: none;
}

.latest-shelf {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

.recommend-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 0 10px;
}

.poster-only-item {
  display: block;
  min-width: 0;
}

.recommend-card {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.recommend-card:nth-child(n + 9),
#popular .popular-card:nth-child(n + 9) {
  display: none;
}

.poster-only-item .cover,
.recommend-card .cover {
  aspect-ratio: 2 / 3;
}

.shinigami-layout .shelf-item {
  gap: 7px;
}

.shinigami-layout .shelf-item .cover,
.shinigami-layout .poster-only-item .cover,
.shinigami-layout .comic-card .cover,
.popular-card .cover {
  border: 0;
  border-radius: 7px;
  background: var(--panel);
  box-shadow: none;
}

.rank-badge,
.country-dot {
  position: absolute;
  z-index: 3;
  min-width: 22px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: .65rem;
  font-weight: 1000;
}

.rank-badge {
  left: 5px;
  top: 5px;
  background: var(--accent);
  color: var(--text);
}

.rank-badge.mini {
  background: var(--accent);
}

.country-dot {
  right: 5px;
  top: 5px;
  background: #fff;
}

.shinigami-layout .cover-title {
  display: none;
}

.recommend-list .cover img,
#popular .popular-card .cover img {
  object-fit: cover;
  background: var(--panel);
}

.recommend-card .cover,
.recommend-card .cover img,
.poster-only-item .cover,
.poster-only-item .cover img,
#popular .popular-card .cover,
#popular .popular-card .cover img {
  border-radius: 7px;
}

.cover-completed {
  position: absolute;
  z-index: 4;
  left: 5px;
  bottom: 5px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  background: var(--green);
  color: var(--bg);
  padding: 0 6px;
  font-size: .55rem;
  font-weight: 950;
  line-height: 1;
}

.shinigami-layout .shelf-item strong,
.shinigami-layout .comic-card h3 {
  color: var(--text);
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.28;
  white-space: normal;
}

.shinigami-layout .update-card h3 {
  min-height: 2.6em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  margin: 8px 0 0;
  text-align: center;
}

.update-labels {
  display: none;
}

.shinigami-layout .update-card h3 a {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-height: 2.6em;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.title-badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: #ef2f28;
  color: #fff;
  font-size: .58rem;
  font-weight: 1000;
  line-height: 1;
  margin-top: 2px;
}

.hot-badge {
  position: absolute;
  z-index: 3;
  left: 5px;
  top: 5px;
  min-width: 30px;
  height: 18px;
  margin: 0;
  background: var(--accent);
  font-size: .55rem;
}

.shinigami-layout .shelf-item small {
  color: var(--muted);
}

.filter-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.shinigami-layout .filter-strip {
  display: none;
}

.shinigami-layout .catalog-head {
  display: none;
  justify-content: flex-end;
}

.shinigami-layout .catalog-head p {
  margin-right: auto;
}

body.is-catalog-page .shin-hero-grid,
body.is-catalog-page .browse-strip,
body.is-catalog-page #popular,
body.is-catalog-page #latest,
body.is-catalog-page #bookmarks {
  display: none;
}

body.is-catalog-page #update {
  margin-top: 8px;
}

body.is-catalog-page .shinigami-layout .catalog-head,
body.is-catalog-page .catalog-head {
  display: flex;
}

.directory-page {
  padding: 42px 0 72px;
}

.directory-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.directory-head h1 {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.directory-head p {
  color: var(--muted);
  font-size: .98rem;
}

.genre-index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.genre-index-grid a {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}

.genre-index-grid a:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  transform: translateY(-1px);
}

.genre-index-grid strong {
  font-size: .95rem;
}

.genre-index-grid span {
  color: var(--muted);
  font-size: .76rem;
}

.series-meta-grid .meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-size: .78rem;
  font-style: normal;
  font-weight: 700;
}

.series-meta-grid .meta-chip:hover {
  background: var(--accent);
  color: var(--text);
}

.search-page-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding: 34px 0 72px;
}

.search-filter-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: var(--panel);
}

.search-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-filter-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.search-filter-head span {
  color: var(--muted);
  font-size: 1rem;
}

.search-genre-field,
.search-page-input {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--muted);
}

.search-page-input {
  grid-template-columns: 22px 1fr;
}

.search-genre-field input,
.search-page-input input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .82rem;
}

.search-genre-field input::placeholder,
.search-page-input input::placeholder {
  color: var(--muted);
}

.search-genre-list {
  max-height: 168px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 5px;
}

.search-genre-list::-webkit-scrollbar {
  width: 5px;
}

.search-genre-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--faint);
}

.search-genre-list button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-size: .76rem;
  font-weight: 800;
}

.search-genre-list button.active,
.search-genre-list button:hover {
  background: var(--accent);
  color: var(--text);
}

.search-filter-group {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.search-filter-group label {
  display: grid;
  gap: 8px;
}

.search-filter-group label > span {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
}

.search-filter-group select,
.search-toolbar select {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  appearance: none;
  background-color: var(--panel-2);
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f4f4f5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 18px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  color: var(--text);
  padding: 0 52px 0 16px;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
}

.search-results-panel {
  min-width: 0;
}

.search-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 150px;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.search-toolbar select {
  width: 100%;
  min-width: 0;
  background-position: right 16px center;
  padding-right: 48px;
}

.search-result-meta {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: .78rem;
}

.search-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.search-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 6px;
  border-radius: 7px;
  background: #22242a;
}

.search-card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--cover-a), var(--cover-b));
}

.search-card-cover .cover {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
}

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

.search-card-cover .cover-title,
.search-card-cover .rank-badge {
  display: none;
}

.search-card h2 {
  min-height: 2.65em;
  margin: 0;
  color: var(--text);
  font-size: .86rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: center;
}

.search-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-card-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #e5e7eb;
  font-size: .64rem;
  font-weight: 800;
}

.search-card-stats span {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  padding: 0 6px;
}

.search-pagination {
  margin-top: 30px;
}

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

.shinigami-layout .comic-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 18px;
}

.shinigami-layout .comic-card {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shinigami-layout .comic-card.no-chapters .comic-info {
  padding-top: 9px;
}

.shinigami-layout .comic-card.no-chapters h3 {
  margin-bottom: 0;
}

.shinigami-layout .comic-grid.compact .update-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.shinigami-layout .comic-grid.compact .cover {
  width: 96px;
  min-height: 0;
  aspect-ratio: 2 / 3;
}

.shinigami-layout .comic-grid.compact .comic-info {
  padding-top: 0;
  gap: 10px;
}

.shinigami-layout .comic-grid.compact .update-card h3 {
  min-height: 0;
  justify-content: flex-start;
  text-align: left;
}

.shinigami-layout .comic-grid.compact .chapter-pair a {
  min-height: 28px;
}

.shinigami-layout .comic-grid.compact .chapter-pair span {
  min-height: 0;
  min-width: 0;
}

.shinigami-layout .comic-info {
  padding: 8px 0 0;
  gap: 8px;
}

.shinigami-layout .meta-row {
  display: none;
  min-height: 0;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 900;
}

.update-tabs {
  margin: -4px 0 16px;
}

.update-ad {
  margin: 4px 0 26px;
}

.update-bottom-ad {
  margin: 28px 0 22px;
}

.chapter-pair {
  display: grid;
  gap: 7px;
}

.comic-grid:not(.compact) .chapter-pair a:nth-child(n + 3) {
  display: none;
}

.chapter-pair a {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-size: .76rem;
  font-weight: 850;
}

.chapter-pair span {
  min-width: 0;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-pair small {
  flex: 0 0 auto;
  color: #d1d5db;
  font-size: .68rem;
  font-weight: 900;
}

.shinigami-layout .card-actions {
  display: none;
}

.home-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
}

.home-pagination button,
.home-pagination span {
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.home-pagination button.active,
.home-pagination button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text);
}

.home-pagination button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

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

#popular {
  margin-top: 34px;
}

#popular .section-head {
  display: block;
  margin-bottom: 16px;
}

#popular .section-head h2 {
  margin-bottom: 16px;
  font-size: 1.45rem;
}

#popular .mini-tabs {
  gap: 10px;
}

#popular .mini-tabs button {
  min-width: 80px;
  min-height: 34px;
  padding: 0 14px;
  font-size: .78rem;
}

#popular .ranking {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 0 10px;
}

#popular .popular-card,
#popular .popular-card a {
  min-height: 0;
}

#popular .popular-card {
  min-width: 0;
}

#popular .popular-card a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#popular .popular-card .cover {
  aspect-ratio: 2 / 3;
  min-height: 0;
}

#popular .popular-card strong {
  display: none;
}

.hidden-library {
  display: none;
}

.shin-footer {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 22px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #a3a7b0;
  text-align: center;
}

.footer-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .78rem;
}

.bottom-nav {
  display: none;
}

.series-hero {
  position: relative;
  min-height: 238px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: 0 calc(50% - 50vw) 22px;
  padding: 72px max(28px, calc((100vw - 1080px) / 2)) 28px;
  overflow: hidden;
}

.series-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 32%, transparent), var(--bg) 95%),
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 52%, transparent) 48%, var(--bg) 100%),
    var(--hero-image, none) center / cover no-repeat;
  filter: blur(6px) saturate(.9);
  transform: scale(1.05);
}

.back-dot {
  position: absolute;
  left: max(28px, calc((100vw - 1080px) / 2));
  top: 30px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
}

.back-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-35%, -50%) rotate(45deg);
}

.series-cover,
.series-copy,
.series-score {
  position: relative;
  z-index: 1;
}

.series-cover {
  width: 126px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.series-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-copy h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.series-copy small {
  color: #c6cad2;
  font-weight: 850;
}

.series-actions,
.series-score {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.series-actions {
  margin-top: 18px;
}

.series-score {
  align-self: center;
  color: #d8dbe2;
  font-size: .78rem;
  font-weight: 900;
}

.series-score span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .38);
}

.series-body,
.chapter-panel {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.series-synopsis {
  color: #d4d7dd;
  font-size: .88rem;
  line-height: 1.8;
}

.series-synopsis span {
  color: #8b5cf6;
  font-weight: 900;
}

.series-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 18px;
  font-size: .78rem;
}

.series-meta-grid div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.series-meta-grid strong {
  color: var(--text);
}

.series-meta-grid span {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.series-meta-grid em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 9px;
  font-style: normal;
  font-weight: 850;
}

.series-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.series-tabs button {
  min-height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
}

.series-tabs button.active {
  color: var(--accent);
}

.chapter-panel {
  margin-top: 30px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.chapter-panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  border-radius: 8px 8px 0 0;
  background: var(--panel);
  padding: 0 20px;
}

.chapter-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.2;
}

.chapter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 10px;
  padding: 18px 20px 16px;
  border-top: 1px solid var(--line);
}

.chapter-toolbar label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
}

.chapter-toolbar label span {
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

.chapter-toolbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: .94rem;
  font-weight: 500;
}

.chapter-toolbar input::placeholder {
  color: var(--muted);
}

.chapter-toolbar select {
  min-width: 190px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 34px 0 14px;
  font-size: .88rem;
  font-weight: 600;
  line-height: 44px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.chapter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}

.chapter-tile {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--panel) 86%, var(--surface));
  transition: transform .18s ease, background .18s ease;
}

.chapter-tile:not(.disabled):hover {
  background: var(--panel-2);
  transform: translateX(3px);
}

.chapter-thumb {
  height: 68px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel-2);
}

.chapter-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-copy {
  min-width: 0;
}

.chapter-copy strong,
.chapter-copy small,
.chapter-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-copy strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: .94rem;
  line-height: 1.2;
  font-weight: 600;
}

.chapter-copy .chapter-end-badge {
  min-height: 22px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 5px;
  background: var(--accent);
  color: var(--text);
  padding: 0 8px;
  font-size: .68rem;
  font-style: normal;
  line-height: 1;
  font-weight: 700;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.chapter-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: .82rem;
  font-style: normal;
  font-weight: 900;
}

.chapter-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}

.chapter-empty {
  grid-column: 1 / -1;
  min-height: 90px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.chapter-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0 20px 24px;
}

.chapter-pagination button,
.chapter-pagination span {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-size: .86rem;
  line-height: 1;
  font-weight: 600;
}

.chapter-pagination span {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.chapter-pagination button.active,
.chapter-pagination button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.chapter-pagination button:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.rules-card {
  margin-top: 42px;
  padding: 16px;
  border: 1px solid #6b7280;
  border-radius: 8px;
  background: #202228;
}

.rules-card h2,
.comment-list h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.rules-card p {
  color: #fca5a5;
  font-size: .78rem;
  line-height: 1.7;
}

.comment-box {
  margin-top: 24px;
}

.comment-box textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #252832;
  border-radius: 8px;
  background: #06070a;
  color: #fff;
  padding: 14px;
}

.comment-box div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.comment-list {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.comment-list article {
  max-width: 420px;
}

.comment-list strong {
  color: #a78bfa;
}

.comment-list p {
  color: #d1d5db;
}

@media (max-width: 900px) {
  .shin-inner {
    min-height: 56px;
  }

  .shin-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-featured-hero {
    height: auto;
    min-height: 390px;
    max-height: none;
    padding: 34px 28px;
    align-items: end;
  }

  .home-featured-visual {
    inset: 0;
    width: 100%;
    height: 100%;
    background-position: center top;
  }

  .home-featured-hero::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .92) 82%, #000 100%);
  }

  .home-featured-copy {
    width: 100%;
    max-width: 620px;
    align-self: end;
    padding-right: 0;
    padding-bottom: 0;
  }

  .home-featured-title {
    font-size: clamp(1.75rem, 8vw, 2.65rem);
  }

  .home-featured-dots {
    gap: 12px;
  }

  .ad-stack {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .top-ad-stack {
    margin-top: 8px;
  }

  .site-banner,
  .chapter-list-banner {
    min-height: 74px;
    aspect-ratio: 4 / 1;
    margin-bottom: 18px;
  }

  .ad-banner {
    min-height: 37px;
  }

  .recommend-list,
  .latest-shelf,
  .comic-grid,
  .ranking,
  #popular .ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .series-hero {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .series-score {
    grid-column: 1 / -1;
  }

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

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .shinigami-layout .comic-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .shinigami-layout .app-shell,
  .shin-inner {
    width: min(100% - 20px, 1180px);
  }

  .shin-header {
    overflow: visible;
  }

  .shin-inner {
    position: relative;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
  }

  .shin-brand {
    min-width: 0;
  }

  .shin-brand.logo-image-only {
    min-height: 58px;
  }

  .shin-brand.logo-image-only .shin-logo.has-logo-image img {
    width: clamp(99px, 33vw, 143px);
    max-height: 36px;
  }

  .shin-nav {
    display: none;
  }

  .shin-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-search-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
  }

  .mobile-search-toggle span {
    width: 14px;
    height: 14px;
    position: relative;
    display: block;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .mobile-search-toggle span::after {
    content: "";
    width: 7px;
    height: 2px;
    position: absolute;
    right: -6px;
    bottom: -3px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: left center;
  }

  .shin-search {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 80;
    display: none;
    width: 100%;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
  }

  body.mobile-search-open .shin-search {
    display: grid;
  }

  .search-suggestions {
    left: 0;
    right: 0;
    width: 100%;
  }

  .shinigami-layout .app-shell {
    padding-top: 18px;
  }

  .shin-hero-grid {
    gap: 56px;
    margin-bottom: 46px;
  }

  .shinigami-layout .hero-feed {
    min-height: 0;
  }

  .home-featured-hero {
    height: auto;
    min-height: clamp(520px, 132vw, 640px);
    max-height: none;
    padding: 0 18px 28px;
    align-items: end;
  }

  .home-featured-visual {
    height: 100%;
  }

  .home-featured-copy {
    padding-right: 0;
    padding-bottom: 0;
  }

  .chapter-kicker {
    display: none;
  }

  .home-featured-title {
    margin-bottom: 12px;
    font-size: 1.78rem;
    line-height: 1.14;
  }

  .home-featured-synopsis {
    margin-bottom: 0;
    -webkit-line-clamp: 2;
    font-size: 1.03rem;
    line-height: 1.45;
  }

  .home-featured-meta {
    display: flex;
  }

  .home-featured-tags {
    display: none;
  }

  .home-featured-tags span {
    min-height: 27px;
    padding: 0 10px;
    font-size: .72rem;
  }

  .start-reading {
    display: none;
  }

  .hero-manhwa-panel {
    display: grid;
    height: auto;
    gap: 9px;
  }

  .hero-panel-head h2 {
    font-size: 1.18rem;
  }

  .hero-panel-head a {
    font-size: .82rem;
  }

  .hero-manhwa-list {
    grid-template-rows: none;
    height: auto;
    gap: 8px;
  }

  .hero-manhwa-item {
    min-height: 58px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    padding: 7px;
    border-radius: 11px;
  }

  .hero-manhwa-cover {
    width: 44px;
    border-radius: 7px;
  }

  .hero-manhwa-copy strong {
    font-size: .72rem;
    -webkit-line-clamp: 1;
  }

  .hero-manhwa-copy small {
    font-size: .62rem;
  }

  #update .section-head {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
  }

  #update .section-head h2 {
    margin: 0;
  }

  .update-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
  }

  .update-controls .quick-filter-tabs {
    min-height: 31px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .update-controls .quick-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .update-controls .quick-filter-tabs button {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 0 12px;
    font-size: .72rem;
  }

  .update-controls .view-tabs {
    align-self: center;
    height: 31px;
    gap: 5px;
    margin: 0;
    padding: 0;
    border-radius: 7px;
    background: #202228;
    overflow: hidden;
  }

  .update-controls .view-tabs button {
    width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
    border-radius: 6px;
  }

  .latest-shelf,
  .recommend-list,
  .comic-grid,
  .ranking,
  #popular .ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommend-list,
  #popular .ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .genre-index-grid a {
    min-height: 70px;
    padding: 12px;
  }

  .search-page-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 0 66px;
  }

  .search-filter-panel {
    position: static;
    max-height: none;
    padding: 14px;
    border-radius: 10px;
  }

  .search-filter-head h1 {
    font-size: 1.08rem;
  }

  .search-genre-list {
    max-height: 114px;
  }

  .search-filter-group {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .search-filter-group label > span {
    font-size: .82rem;
  }

  .search-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .search-card {
    padding: 5px;
  }

  .search-card h2 {
    font-size: .68rem;
  }

  .search-card-stats {
    font-size: .55rem;
  }

  .recommend-card:nth-child(n + 4),
  #popular .popular-card:nth-child(n + 4) {
    display: none;
  }

  .poster-only-item {
    min-width: 0;
  }

  .shinigami-layout .section-block {
    margin: 28px 0;
  }

  .shinigami-layout .section-head {
    align-items: center;
    margin-bottom: 14px;
  }

  .shinigami-layout .section-head h2 {
    font-size: 1.15rem;
  }

  .shinigami-layout .type-tabs button,
  .shinigami-layout .mini-tabs button,
  .shinigami-layout .view-tabs button {
    min-height: 32px;
    padding: 0 13px;
    font-size: .75rem;
  }

  .shin-feature-card .hero-copy h1 {
    font-size: 1.35rem;
  }

  .chapter-pair a {
    min-height: 32px;
    font-size: .72rem;
  }

  #popular .section-head h2 {
    font-size: 1.15rem;
  }

  #popular .mini-tabs {
    gap: 10px;
  }

  #popular .mini-tabs button {
    min-width: 0;
    min-height: 34px;
    padding: 0 13px;
    font-size: .78rem;
  }

  .reader-bottom-nav {
    bottom: 14px;
    grid-template-columns: repeat(4, 40px);
    gap: 8px;
  }

  .reader-floating-nav {
    top: 14px;
    width: min(calc(100% - 20px), 520px);
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr) 38px auto 38px;
    gap: 7px;
    border-radius: 11px;
    padding: 7px 10px;
  }

  .reader-nav-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    border-radius: 9px;
    font-size: 1.95rem;
    line-height: 38px;
  }

  .reader-nav-icon.home {
    font-size: 1.75rem;
  }

  .reader-nav-title {
    font-size: .78rem;
  }

  .reader-nav-chapter {
    font-size: .86rem;
  }

  .reader-icon-link,
  .reader-circle {
    width: 38px;
    min-height: 38px;
  }

  .chapter-toolbar {
    top: 56px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px 14px;
  }

  .chapter-toolbar select {
    grid-column: auto;
    width: 100%;
  }

  .chapter-panel {
    width: min(100% - 20px, 1180px);
    margin-top: 20px;
    border-radius: 9px;
  }

  .chapter-panel-head {
    min-height: auto;
    padding: 14px 14px 12px;
  }

  .chapter-panel-head h2 {
    font-size: 1.2rem;
    line-height: 1.15;
  }

  .chapter-toolbar label {
    min-height: 40px;
    padding: 0 12px;
    gap: 9px;
  }

  .chapter-toolbar input {
    font-size: .82rem;
  }

  .chapter-toolbar select {
    min-height: 40px;
    line-height: 40px;
    font-size: .82rem;
    background-position:
      calc(100% - 18px) 16px,
      calc(100% - 13px) 16px;
  }

  .chapter-range-tabs {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0 14px 16px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
  }

  .chapter-range-tabs::-webkit-scrollbar {
    display: none;
  }

  .chapter-range-tabs button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 11px;
    font-size: .74rem;
  }

  .chapter-grid {
    gap: 8px;
    padding: 0 14px 16px;
  }

  .chapter-tile {
    min-height: 52px;
    padding: 9px 12px;
  }

  .chapter-copy strong {
    font-size: .86rem;
  }

  .chapter-copy small {
    font-size: .72rem;
  }

  .chapter-pagination {
    padding: 0 14px 18px;
  }

  .shin-feature-card {
    grid-template-columns: 1fr;
  }

  .feature-character {
    display: none;
  }

  .series-hero {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding-top: 70px;
  }

  .series-cover {
    width: 82px;
  }

  .series-copy h1 {
    font-size: 1.6rem;
  }

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

  .shin-footer {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    padding: 22px 18px 24px;
    text-align: center;
  }

  .shin-footer .footer-brand {
    width: 100%;
    min-height: 0;
    justify-content: center;
  }

  .footer-brand.logo-image-only .shin-logo.has-logo-image img {
    width: min(168px, 52vw);
    max-height: 42px;
  }

  .shin-footer p {
    max-width: 300px;
    margin: 0 auto;
    font-size: .84rem;
    line-height: 1.55;
  }
}

body {
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bottom-nav a[href*="admin"] {
  display: none;
}

.shinigami-layout .shin-brand,
.shinigami-layout .footer-brand,
.shinigami-layout .section-head h2,
.home-featured-title,
.series-copy h1,
.reader-title,
.reader-toolbar strong {
  font-weight: 700;
}

.chapter-kicker,
.home-featured-tags span,
.start-reading,
.shinigami-layout .type-tabs button,
.shinigami-layout .genre-rail button,
.shinigami-layout .mini-tabs button,
.shinigami-layout .view-tabs button,
.quick-filter-tabs button,
.chapter-pair a,
.chapter-pair small,
.shinigami-layout .shelf-item strong,
.shinigami-layout .comic-card h3,
.chapter-row strong,
.series-meta span,
.reader-circle,
.reader-icon-link {
  font-weight: 600;
}

.rank-badge,
.country-dot,
.title-badge,
.cover-completed,
.hot-badge {
  font-weight: 700;
}

.home-featured-synopsis,
.series-copy p,
.chapter-row time,
.chapter-row small,
.shin-footer,
.footer-stats {
  font-weight: 400;
}

.shinigami-layout .update-controls .view-tabs button {
  width: 31px;
  height: 31px;
  min-height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
}

.shinigami-layout .update-controls .view-tabs {
  margin: 0;
}

.shinigami-layout .mini-tabs button,
.shinigami-layout .view-tabs button,
.quick-filter-tabs button,
.chapter-range-tabs button,
.home-pagination button,
.chapter-pagination button {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

.shinigami-layout .mini-tabs button.active,
.shinigami-layout .view-tabs button.active,
.quick-filter-tabs button.active,
.chapter-range-tabs button.active,
.home-pagination button.active,
.home-pagination button:hover,
.chapter-pagination button.active,
.chapter-pagination button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--text);
}

.home-pagination span,
.chapter-pagination span {
  color: var(--muted);
}

/* New homepage hero and mobile navigation */
.mobile-menu-toggle,
.mobile-menu-drawer,
.mobile-menu-overlay,
.back-to-top {
  display: none;
}

.search-icon-button {
  width: 34px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
}

.search-icon-button span,
.drawer-search-icon {
  width: 15px;
  height: 15px;
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-icon-button span::after,
.drawer-search-icon::after {
  content: "";
  width: 7px;
  height: 2px;
  position: absolute;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.shin-hero-grid {
  display: block;
  margin-bottom: 42px;
}

.home-featured-shell {
  display: grid;
  gap: 12px;
}

.home-featured-hero {
  height: clamp(360px, 36vw, 520px);
  min-height: 0;
  max-height: none;
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 0;
  background: #151518;
  isolation: isolate;
}

.home-featured-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-image, none) center / cover no-repeat;
  filter: none;
  transform: none;
}

.home-featured-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 34%, #24050b 66%) 0%, rgba(53, 7, 16, .72) 34%, rgba(0, 0, 0, .08) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .12) 48%, rgba(0, 0, 0, .78) 100%);
}

.home-featured-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background: var(--hero-image, none) center / cover no-repeat;
  opacity: 1;
  transform: none;
}

.home-featured-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 44%, rgba(38, 6, 12, .9)) 0%, rgba(73, 8, 18, .66) 33%, rgba(0, 0, 0, .05) 72%),
    linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, .72));
}

.hero-badges {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-type-badge,
.hero-score-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hero-type-badge {
  padding: 0 18px;
  background: color-mix(in srgb, var(--accent) 72%, #ff8aad 28%);
}

.hero-score-badge {
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(22, 17, 20, .74);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
}

.hero-score-badge span {
  color: #ffd21f;
}

.home-featured-copy {
  position: absolute;
  left: 36px;
  right: auto;
  bottom: 38px;
  z-index: 2;
  width: min(520px, calc(100% - 72px));
  display: grid;
  gap: 18px;
  padding: 0;
}

.home-featured-title {
  max-width: 100%;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: #fff;
  font-size: clamp(2rem, 3.7vw, 3.25rem);
  line-height: 1.02;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-read-button,
.hero-info-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-read-button {
  gap: 10px;
  min-width: 170px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}

.hero-read-button span {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.hero-read-button span::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 2px;
  background: currentColor;
  transform: translateX(-50%);
}

.hero-info-button {
  width: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font-size: 1.1rem;
  font-family: ui-serif, Georgia, serif;
  text-transform: none;
  backdrop-filter: blur(10px);
}

.hero-synopsis-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 16px);
  z-index: 4;
  display: none;
  max-width: min(560px, 100%);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(20, 20, 23, .86);
  color: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .36);
}

.home-featured-hero.show-synopsis .hero-synopsis-popover {
  display: block;
}

.hero-synopsis-popover strong {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: .86rem;
}

.hero-synopsis-popover p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: .88rem;
  line-height: 1.55;
}

.hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 18px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 30%, #4a353b 70%);
}

.hero-dots button.active {
  width: 50px;
  background: color-mix(in srgb, var(--accent) 84%, #ff9ab7 16%);
}

.back-to-top {
  width: 54px;
  height: 54px;
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 85;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--accent) 58%, #13a7ff 42%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 82%, #ff8bac 18%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}

.back-to-top span {
  width: 19px;
  height: 19px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
  transform: translateY(5px) rotate(45deg);
}

body.show-back-top .back-to-top {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.bottom-nav {
  display: none !important;
}

@media (max-width: 760px) {
  .shin-inner {
    width: min(100% - 32px, 1180px);
    min-height: 62px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    justify-items: center;
    gap: 0;
  }

  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    align-content: center;
    justify-self: start;
    gap: 5px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #a9afba;
  }

  .mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  .shin-brand {
    grid-column: 2;
    justify-self: center;
  }

  .shin-brand.logo-image-only {
    min-height: 48px;
  }

  .shin-brand.logo-image-only .shin-logo.has-logo-image img {
    width: clamp(136px, 44vw, 190px);
    max-height: 42px;
  }

  .shin-nav,
  .shin-search {
    display: none !important;
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 88;
    background: rgba(0, 0, 0, .54);
  }

  .mobile-menu-overlay:not([hidden]) {
    display: block;
  }

  .mobile-menu-drawer {
    width: min(88vw, 360px);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    display: block;
    padding: 34px 20px;
    overflow-y: auto;
    background: #171719;
    color: #d7dbe2;
    transform: translateX(-104%);
    transition: transform .24s ease;
    box-shadow: 22px 0 50px rgba(0, 0, 0, .35);
  }

  body.mobile-menu-open .mobile-menu-drawer {
    transform: translateX(0);
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 32px;
  }

  .mobile-menu-head strong {
    color: #aeb4c0;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .22em;
  }

  .mobile-menu-close {
    width: 34px;
    height: 34px;
    position: relative;
    border: 0;
    background: transparent;
    color: #aeb4c0;
  }

  .mobile-menu-close::before,
  .mobile-menu-close::after {
    content: "";
    width: 25px;
    height: 3px;
    position: absolute;
    top: 16px;
    left: 4px;
    border-radius: 999px;
    background: currentColor;
  }

  .mobile-menu-close::before {
    transform: rotate(45deg);
  }

  .mobile-menu-close::after {
    transform: rotate(-45deg);
  }

  .mobile-menu-search {
    min-height: 52px;
    display: grid;
    grid-template-columns: 25px 1fr;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 16px;
    background: #111113;
    color: #9da4af;
  }

  .mobile-menu-search input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    outline: none;
  }

  .mobile-menu-search input::placeholder {
    color: #8b8f98;
  }

  .mobile-menu-links {
    display: grid;
    gap: 18px;
  }

  .mobile-menu-links a {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    border-radius: 16px;
    color: #d7dbe2;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
  }

  .mobile-menu-links a.active {
    background: color-mix(in srgb, var(--accent) 74%, #ff93ad 26%);
    color: #fff;
    box-shadow: 0 18px 28px color-mix(in srgb, var(--accent) 20%, transparent);
  }

  .drawer-home-icon,
  .drawer-stack-icon {
    width: 22px;
    height: 22px;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
  }

  .drawer-home-icon::before {
    content: "";
    position: absolute;
    inset: 6px 3px 2px;
    border: 3px solid currentColor;
    border-top: 0;
    border-radius: 3px;
  }

  .drawer-home-icon::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 4px;
    top: 0;
    border-left: 3px solid currentColor;
    border-top: 3px solid currentColor;
    transform: rotate(45deg);
    border-radius: 3px 0 0;
  }

  .drawer-stack-icon {
    border: 2px solid currentColor;
    border-left: 0;
    border-right: 0;
  }

  .drawer-stack-icon::before,
  .drawer-stack-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-top: 2px solid currentColor;
  }

  .drawer-stack-icon::before {
    top: 6px;
  }

  .drawer-stack-icon::after {
    bottom: 6px;
  }

  .shin-hero-grid {
    margin-bottom: 34px;
  }

  .home-featured-hero {
    height: clamp(300px, 92vw, 350px);
    border-radius: 9px;
  }

  .home-featured-visual,
  .home-featured-hero::before {
    background-position: center;
  }

  .home-featured-visual::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .06) 42%, rgba(0, 0, 0, .88) 100%);
  }

  .hero-badges {
    top: 18px;
    left: 18px;
    gap: 9px;
  }

  .hero-type-badge,
  .hero-score-badge {
    min-height: 34px;
    border-radius: 8px;
    font-size: .8rem;
  }

  .hero-type-badge {
    padding: 0 12px;
  }

  .hero-score-badge {
    padding: 0 11px;
  }

  .home-featured-copy {
    left: 20px;
    right: 20px;
    bottom: 22px;
    width: auto;
    gap: 12px;
  }

  .home-featured-title {
    -webkit-line-clamp: 1;
    font-size: clamp(1.35rem, 7vw, 1.72rem);
  }

  .hero-read-button,
  .hero-info-button {
    min-height: 42px;
  }

  .hero-read-button {
    min-width: 154px;
    padding: 0 16px;
    font-size: .8rem;
  }

  .hero-info-button {
    display: none;
  }

  .hero-synopsis-popover {
    padding: 12px;
  }

  .hero-synopsis-popover p {
    -webkit-line-clamp: 2;
  }

  .hero-dots {
    margin-top: 2px;
  }

  .back-to-top {
    width: 48px;
    height: 48px;
    right: 14px;
    bottom: 18px;
    border-radius: 10px;
  }
}

/* Final hero layout pass */
@media (min-width: 761px) {
  .shinigami-layout .shin-hero-grid {
    --hero-desktop-height: clamp(350px, 29vw, 390px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    align-items: stretch;
    gap: 24px;
    height: var(--hero-desktop-height);
    margin-bottom: 42px;
    overflow: hidden;
  }

  .shinigami-layout .hero-feed {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: grid;
    align-items: stretch;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .shinigami-layout .hero-manhwa-panel {
    display: grid;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
  }

  .shinigami-layout .hero-manhwa-list {
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .shinigami-layout .hero-manhwa-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 8px;
    border-radius: 12px;
    overflow: hidden;
  }

  .shinigami-layout .hero-manhwa-cover {
    width: 52px;
    border-radius: 8px;
  }

  .shinigami-layout .hero-manhwa-copy strong {
    font-size: .84rem;
    line-height: 1.18;
  }

  .shinigami-layout .hero-manhwa-copy small {
    font-size: .72rem;
  }

  .shinigami-layout .home-featured-shell,
  .shinigami-layout .home-featured-hero {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .shinigami-layout .home-featured-shell {
    display: grid;
    overflow: hidden;
  }

  .shinigami-layout .home-featured-hero {
    aspect-ratio: auto;
    animation: none;
  }

  .shinigami-layout .home-featured-title {
    max-width: min(720px, 78%);
    font-size: clamp(1.35rem, 2.05vw, 2rem);
    line-height: 1.15;
    -webkit-line-clamp: 2;
  }

  .shinigami-layout .home-featured-hero.show-synopsis .home-featured-copy {
    bottom: 42px;
  }

  .shinigami-layout .hero-synopsis-popover {
    top: auto;
    bottom: calc(100% + 16px);
    width: min(540px, calc(100vw - 120px));
    max-height: 138px;
    overflow: hidden;
  }

  .shinigami-layout .hero-synopsis-popover p {
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 760px) {
  .shinigami-layout .shin-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
  }

  .shinigami-layout .hero-feed {
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* Keep auto hero slides compact. Dots must not stretch the hero grid. */
@media (min-width: 761px) {
  .shinigami-layout .shin-hero-grid {
    --hero-card-height: clamp(300px, 29vw, 390px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    align-items: start;
    gap: 24px;
    height: auto;
    overflow: visible;
  }

  .shinigami-layout .hero-feed,
  .shinigami-layout .home-featured-shell {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .shinigami-layout .home-featured-shell {
    display: grid;
    grid-template-rows: var(--hero-card-height) auto;
    gap: 12px;
  }

  .shinigami-layout .home-featured-hero {
    height: var(--hero-card-height);
  }

  .shinigami-layout .hero-manhwa-panel {
    height: var(--hero-card-height);
  }

  .shinigami-layout .hero-badges {
    top: 22px;
    left: 24px;
    right: 24px;
    max-width: calc(100% - 48px);
    flex-wrap: wrap;
  }

  .shinigami-layout .home-featured-copy {
    top: auto;
    left: 30px;
    bottom: 34px;
    width: min(560px, calc(100% - 60px));
    gap: 16px;
  }

  .shinigami-layout .home-featured-title {
    max-width: 100%;
    font-size: clamp(1.25rem, 1.85vw, 1.8rem);
    line-height: 1.14;
    -webkit-line-clamp: 2;
  }

  .shinigami-layout .hero-dots {
    min-height: 16px;
    margin: 0;
    transform: none;
  }
}

@media (max-width: 760px) {
  .shinigami-layout .home-featured-shell {
    display: grid;
    gap: 10px;
  }

  .shinigami-layout .home-featured-copy {
    top: auto;
  }
}
