:root {
  color-scheme: dark;
  --ink: #f7f2ff;
  --muted: #b9aed4;
  --paper: #030207;
  --surface: #120a1f;
  --line: rgba(166, 113, 255, 0.18);
  --accent: #7b35f5;
  --accent-soft: #d4c4ff;
  --violet: #a764ff;
  --pearl: #f1ecff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(3, 2, 7, 0.88);
  border-bottom: 1px solid rgba(166, 113, 255, 0.16);
  backdrop-filter: blur(16px);
}

.brand,
.hero-actions,
.card-actions,
.filter-group {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
}

.language-button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.language-button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(9, 11, 15, 0.88), rgba(9, 11, 15, 0.42) 56%, rgba(9, 11, 15, 0.1)),
    linear-gradient(0deg, rgba(9, 11, 15, 0.86), rgba(9, 11, 15, 0) 48%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 36px));
  margin: 0 auto 9vh clamp(18px, 6vw, 72px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4rem, 13vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  width: min(620px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.card-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.filter,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

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

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.button.small {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.button.ghost {
  color: var(--muted);
  background: rgba(166, 113, 255, 0.1);
}

.button.disabled {
  cursor: default;
  opacity: 0.64;
}

.toolbar-band {
  background: rgba(10, 7, 16, 0.98);
  border-bottom: 1px solid var(--line);
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0;
}

.search-field {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
}

.filter-group {
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(166, 113, 255, 0.1);
}

.filter.active {
  color: #0a0710;
  background: var(--accent-soft);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.works-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  gap: 22px;
  justify-content: start;
}

.crawler-links {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.work-card {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 25, 31, 0.08);
}

.work-cover-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.work-cover-link img {
  width: 100%;
  height: 100%;
  min-height: 204px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.work-card-body {
  align-self: center;
  padding: 18px 20px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-tags span {
  padding: 6px 8px;
  color: var(--accent-soft);
  background: rgba(123, 53, 245, 0.18);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
}

.work-card h3,
.latest-item h3,
.steps h3 {
  margin: 14px 0 8px;
  font-size: 1.2rem;
}

.work-card h3 {
  font-size: 1.35rem;
}

.work-card h3 a,
.latest-item h3 a {
  text-decoration: none;
}

.work-card p,
.steps p,
.site-footer p {
  color: var(--muted);
  line-height: 1.55;
}

.work-card p {
  margin-bottom: 16px;
}

.latest-band,
.downloads-band,
.plugin-band,
.publish-band {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
}

.latest-band {
  background: rgba(255, 255, 255, 0.02);
}

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

.latest-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.latest-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.latest-item span {
  color: var(--violet);
  font-size: 0.82rem;
  font-weight: 900;
}

.latest-item h3,
.latest-item p {
  margin: 2px 0;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.download-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.download-item strong {
  color: var(--accent-soft);
}

.official-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.official-link {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.official-link.primary-link {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.steps article {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps strong {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--violet);
  border-radius: 8px;
}

code {
  padding: 2px 6px;
  background: rgba(166, 113, 255, 0.12);
  border-radius: 6px;
}

.reader-dialog {
  width: min(920px, calc(100% - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.reader-dialog::backdrop {
  background: rgba(12, 14, 18, 0.72);
}

.reader-shell {
  background: var(--paper);
}

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.reader-topbar h2,
.reader-meta {
  margin: 0;
}

.reader-meta {
  color: var(--violet);
  font-size: 0.82rem;
  font-weight: 900;
}

.icon-button {
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--ink);
}

.chapter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.chapter-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.chapter-tabs button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.reader-pages {
  display: grid;
  gap: 0;
  padding: 0;
}

.reader-page {
  display: grid;
  min-height: 58svh;
  place-items: center;
  padding: clamp(36px, 8vw, 96px);
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-page:nth-child(2n) {
  color: var(--ink);
  background: #fff;
}

.reader-page span {
  color: var(--pearl);
  font-weight: 900;
}

.reader-page p {
  width: min(640px, 100%);
  margin: 14px 0 0;
  font-size: clamp(1.4rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.site-footer {
  padding: 34px 18px;
  text-align: center;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.route-view {
  min-height: calc(100svh - 72px);
}

.manga-page {
  background: var(--paper);
}

.manga-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: #fff;
}

.manga-backdrop,
.manga-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.manga-backdrop {
  object-fit: cover;
  filter: blur(14px);
  transform: scale(1.08);
}

.manga-shade {
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.94), rgba(8, 10, 14, 0.68), rgba(8, 10, 14, 0.94)),
    linear-gradient(0deg, rgba(8, 10, 14, 0.96), rgba(8, 10, 14, 0.2));
}

.manga-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(22px, 4vw, 42px);
  width: min(1180px, calc(100% - 36px));
  min-height: 420px;
  margin: 0 auto;
  padding: 56px 0 38px;
}

.manga-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  opacity: 0.82;
  text-decoration: none;
}

.manga-info h1,
.chapter-header h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 1;
  letter-spacing: 0;
}

.manga-badges,
.manga-actions,
.chapter-tools,
.chapter-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.manga-badges {
  margin-top: 22px;
}

.manga-badges span {
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.manga-description {
  max-width: 740px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
  line-height: 1.65;
}

.manga-test-note {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 20px 0 0;
  padding: 10px 12px;
  color: #0a0710;
  background: #d4c4ff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  box-shadow: 0 14px 26px rgba(123, 53, 245, 0.3);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.manga-test-note[hidden] {
  display: none;
}

.manga-actions {
  margin-top: 28px;
}

.manga-actions .button.secondary {
  color: var(--app-text);
  background:
    linear-gradient(160deg, rgba(23, 12, 44, 0.94), rgba(6, 4, 14, 0.98));
  border: 1px solid rgba(212, 196, 255, 0.18);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.manga-actions .button.secondary:hover {
  color: var(--app-pearl);
  border-color: rgba(212, 196, 255, 0.34);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 22px rgba(127, 56, 255, 0.16);
}

.manga-content {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 26px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0 76px;
}

.manga-facts,
.chapter-list-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manga-facts {
  align-self: start;
  padding: 22px;
}

.manga-facts h2,
.chapter-list-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.manga-facts dl {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
}

.manga-facts div {
  display: grid;
  gap: 4px;
}

.manga-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manga-facts dd {
  margin: 0;
  font-weight: 800;
}

.chapter-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.chapter-count {
  color: var(--accent-soft);
  font-weight: 900;
}

.chapter-list {
  display: grid;
}

.chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.chapter-row:last-child {
  border-bottom: 0;
}

.chapter-row span {
  display: grid;
  gap: 5px;
}

.chapter-row small {
  color: var(--muted);
}

.chapter-row em {
  color: var(--violet);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 900;
}

.chapter-page {
  background: #111318;
  color: #fff;
}

.chapter-header {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 28px;
}

.chapter-header .eyebrow {
  margin-top: 8px;
}

.chapter-header h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.chapter-tools,
.chapter-footer {
  margin-top: 22px;
}

.chapter-page .button.secondary,
.chapter-page .button.ghost {
  color: #f7f2ff;
  background: linear-gradient(160deg, rgba(22, 12, 42, 0.96), rgba(7, 5, 15, 0.98));
  border: 1px solid rgba(212, 196, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.chapter-page .button.secondary:hover,
.chapter-page .button.ghost:hover {
  color: #ffffff;
  border-color: rgba(167, 100, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 24px rgba(125, 67, 255, 0.16), 0 14px 30px rgba(0, 0, 0, 0.34);
}

.chapter-page .button.disabled,
.chapter-page .button.disabled:hover {
  color: rgba(247, 242, 255, 0.54);
  border-color: rgba(212, 196, 255, 0.12);
  box-shadow: none;
}

.webtoon-strip {
  width: min(760px, 100%);
  margin: 0 auto;
  background: #050609;
}

.webtoon-cover-panel,
.webtoon-panel {
  min-height: 86svh;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.webtoon-cover-panel {
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.webtoon-cover-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webtoon-cover-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 6, 9, 0.96), rgba(5, 6, 9, 0.18));
}

.webtoon-cover-panel div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: clamp(28px, 8vw, 64px);
}

.webtoon-cover-panel span {
  color: var(--pearl);
  font-weight: 900;
}

.webtoon-cover-panel strong {
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1;
}

.webtoon-panel {
  display: grid;
  place-items: center;
  padding: clamp(32px, 8vw, 78px);
  background:
    linear-gradient(135deg, rgba(49, 18, 108, 0.36), rgba(167, 100, 255, 0.13)),
    #120a1f;
}

.webtoon-panel:nth-child(2n + 1) {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(212, 196, 255, 0.12), rgba(49, 18, 108, 0.22)),
    #160d29;
}

.webtoon-panel small {
  color: var(--violet);
  font-weight: 900;
}

.webtoon-panel p {
  width: min(620px, 100%);
  margin: 14px 0 0;
  font-size: clamp(1.45rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.chapter-footer {
  justify-content: center;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.novel-page {
  min-height: 100svh;
  background: #000;
}

.novel-page .chapter-header {
  width: min(768px, calc(100% - 40px));
  padding: 34px 0 0;
  text-align: center;
}

.novel-page .back-link,
.novel-page .chapter-header .eyebrow,
.novel-page .chapter-tools {
  display: none;
}

.novel-page .chapter-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.novel-reader {
  width: min(768px, calc(100% - 40px));
  margin: 8px auto 0;
  padding: 26px 22px 54px;
  border-top: 1px solid #242831;
  background: #000;
}

.novel-reader p {
  margin: 0 0 28px;
  color: #fff;
  font-size: clamp(1.08rem, 2.8vw, 1.28rem);
  font-weight: 700;
  line-height: 1.82;
  text-align: left;
}

.novel-page .chapter-footer {
  width: min(768px, calc(100% - 40px));
  padding: 0 0 46px;
}

.novel-page .chapter-footer .button {
  background: #10131a;
  color: #f4f7fb;
  border-color: #242831;
}

.image-chapter-page {
  background: #000;
}

.image-reader {
  display: grid;
  gap: 0;
  width: min(900px, 100%);
  margin: 0 auto;
  background: #000;
}

.image-reader img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 760px) {
  .site-header,
  .toolbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    margin-bottom: 48px;
  }

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

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

  .work-cover-link img {
    min-height: 168px;
  }

  .work-card-body {
    padding: 14px;
  }

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

  .latest-item .button {
    grid-column: 1 / -1;
  }

  .manga-layout,
  .manga-content {
    grid-template-columns: 1fr;
  }

  .manga-layout {
    align-items: end;
    min-height: auto;
    padding-top: 34px;
  }

  .manga-cover {
    width: min(260px, 78vw);
  }

  .chapter-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Nyxalira-inspired catalog pass */
:root {
  color-scheme: dark;
  --app-bg: #030207;
  --app-surface: rgba(14, 8, 27, 0.94);
  --app-surface-2: rgba(8, 5, 18, 0.98);
  --app-line: rgba(156, 92, 255, 0.2);
  --app-text: #f7f2ff;
  --app-muted: #b8aecf;
  --app-soft: #ddd3ff;
  --app-pearl: #d4c4ff;
  --app-violet: #9f5cff;
  --app-midnight: #31126c;
  --app-electric: #7f38ff;
}

body {
  color: var(--app-text);
  background:
    linear-gradient(180deg, #030207 0%, #070411 38%, #10071f 100%);
  background-attachment: fixed;
}

.site-header {
  background: rgba(3, 2, 7, 0.9);
  border-bottom-color: var(--app-line);
}

.brand {
  color: var(--app-text);
}

.brand-mark {
  filter:
    drop-shadow(0 0 10px rgba(123, 53, 245, 0.42))
    drop-shadow(0 0 24px rgba(167, 100, 255, 0.18));
}

.hero {
  min-height: 430px;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(3, 2, 7, 0.96), rgba(17, 7, 35, 0.72) 58%, rgba(3, 2, 7, 0.28)),
    linear-gradient(0deg, rgba(3, 2, 7, 1), rgba(3, 2, 7, 0.16) 54%);
}

.hero-content {
  margin-bottom: 58px;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  line-height: 0.94;
}

.eyebrow {
  color: var(--app-pearl);
}

.toolbar-band {
  background: rgba(7, 4, 16, 0.96);
  border-bottom-color: var(--app-line);
}

.search-field {
  color: var(--app-muted);
}

.search-field input {
  color: var(--app-text);
  background: rgba(3, 2, 7, 0.84);
  border-color: var(--app-line);
}

.filter {
  color: var(--app-soft);
  background: rgba(212, 196, 255, 0.07);
}

.filter.active {
  color: #0a0710;
  background: var(--app-pearl);
}

.section {
  padding: 46px 0;
}

.section-heading {
  display: grid;
  align-items: start;
  justify-content: start;
  gap: 4px;
  margin-bottom: 20px;
  text-align: left;
}

.section-note {
  width: min(760px, 100%);
  margin: 8px 0 14px;
  color: var(--app-muted);
  border-left: 2px solid rgba(212, 196, 255, 0.42);
  padding: 5px 0 5px 10px;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.5;
}

.section-heading h2 {
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  line-height: 1.04;
  text-align: left;
}

#library .section-heading h2 {
  display: none;
}

.works-grid {
  grid-template-columns: repeat(auto-fit, 172px);
  gap: 16px;
  justify-content: start;
}

.work-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
  padding: 10px;
  color: var(--app-text);
  background:
    linear-gradient(160deg, rgba(23, 12, 44, 0.94), rgba(9, 6, 20, 0.98));
  border-color: var(--app-line);
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.work-card:hover {
  border-color: rgba(212, 196, 255, 0.32);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42), 0 0 24px rgba(127, 56, 255, 0.18);
  transform: translateY(-2px);
}

.work-cover-link {
  position: relative;
  display: block;
  z-index: 1;
}

.work-cover-link img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.work-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: inline-flex;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  color: #fff;
  background: rgba(6, 4, 14, 0.72);
  border: 1px solid rgba(212, 196, 255, 0.22);
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.work-card-body {
  position: relative;
  z-index: 1;
  align-self: start;
  padding: 0 2px 2px;
}

.work-card h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.work-card p {
  display: none;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.78rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.plugin-band,
.publish-band {
  background: transparent;
}

.plugin-band,
.publish-band,
.site-footer {
  width: min(980px, calc(100% - 36px));
  margin-inline: auto;
  padding-inline: 0;
}

.official-links,
.steps {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.official-link,
.steps article,
.manga-facts,
.chapter-list-wrap {
  color: var(--app-text);
  background:
    linear-gradient(160deg, rgba(23, 12, 44, 0.94), rgba(9, 6, 20, 0.98));
  border-color: var(--app-line);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
}

.official-link.primary-link {
  background:
    linear-gradient(135deg, rgba(212, 196, 255, 0.1), transparent 46%),
    linear-gradient(135deg, #211044, #5e20d6 58%, #12091f);
}

.manga-genre {
  display: none;
}

.official-link span,
.steps p,
.manga-facts dt,
.chapter-row small,
.site-footer p {
  color: var(--app-muted);
}

.manga-page {
  color: var(--app-text);
  background: var(--app-bg);
}

.manga-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
  width: min(980px, calc(100% - 36px));
  min-height: 0;
  margin: 0 auto;
  padding: 42px 0 24px;
}

.manga-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-color: var(--app-line);
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.manga-info {
  text-align: left;
}

.manga-info h1 {
  max-width: 720px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.06;
  text-align: left;
}

.manga-badges span {
  color: var(--app-soft);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--app-line);
  border-radius: 999px;
}

.manga-description {
  max-width: 600px;
  color: var(--app-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
}

.manga-test-note {
  margin-top: 18px;
}

.manga-content {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  width: min(980px, calc(100% - 36px));
  padding-bottom: 74px;
}

.manga-facts h2 {
  color: var(--app-text);
}

.manga-facts .fact-author dd {
  color: #f7f2ff;
}

.manga-facts .fact-genre dd {
  color: #a764ff;
}

.manga-facts .fact-status dd {
  color: #9ff4d0;
}

.manga-facts .fact-rating dd {
  color: #9db7ff;
}

.manga-facts .fact-publish dd {
  color: #d4c4ff;
}

.chapter-row {
  color: var(--app-text);
}

.chapter-row em {
  color: var(--app-pearl);
}

.chapter-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--app-line);
  background: rgba(7, 4, 16, 0.74);
}

.chapter-search-field {
  display: grid;
  gap: 8px;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chapter-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  color: var(--app-text);
  background: rgba(3, 2, 7, 0.86);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.chapter-control-button {
  min-height: 42px;
  padding: 0 10px;
  color: var(--app-soft);
  background: rgba(212, 196, 255, 0.07);
  border: 1px solid rgba(212, 196, 255, 0.12);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.chapter-sort-toggle {
  align-self: end;
}

.chapter-control-button.is-active,
.chapter-sort-toggle {
  color: #0a0710;
  background: var(--app-pearl);
  border-color: transparent;
}

.chapter-list {
  gap: 12px;
  padding: 14px;
}

.chapter-list-entry {
  position: relative;
}

.chapter-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  color: var(--app-text);
  background:
    linear-gradient(90deg, rgba(212, 196, 255, 0.08), transparent 18%),
    linear-gradient(160deg, rgba(23, 12, 44, 0.94), rgba(9, 6, 20, 0.98));
  border: 1px solid var(--app-line);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.chapter-row:hover {
  border-color: rgba(212, 196, 255, 0.32);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34), 0 0 22px rgba(127, 56, 255, 0.14);
  transform: translateY(-1px);
}

.chapter-row:last-child {
  border-bottom: 1px solid var(--app-line);
}

.chapter-row .chapter-thumb {
  display: block;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border: 1px solid rgba(212, 196, 255, 0.16);
  border-radius: 14px;
  background: rgba(3, 2, 7, 0.72);
}

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

.chapter-row .chapter-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chapter-row .chapter-main strong {
  font-size: 1rem;
  line-height: 1.18;
}

.chapter-row .chapter-editorial-title {
  display: -webkit-box;
  color: var(--app-soft);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.28;
}

.chapter-row .chapter-main small {
  color: var(--app-muted);
}

.chapter-row .chapter-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.chapter-row .chapter-format-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  color: var(--app-pearl);
  background: rgba(212, 196, 255, 0.08);
  border: 1px solid rgba(212, 196, 255, 0.14);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-row .chapter-format-pill.is-novel {
  color: #b6f2db;
  background: rgba(111, 209, 173, 0.08);
  border-color: rgba(111, 209, 173, 0.18);
}

.chapter-search-empty {
  margin: 0;
  padding: 20px;
  color: var(--app-muted);
  text-align: center;
}

.site-footer {
  background:
    linear-gradient(180deg, rgba(18, 10, 31, 0), rgba(10, 6, 20, 0.82)),
    #05030a;
  border-top: 1px solid var(--app-line);
}

.site-footer a {
  display: inline-block;
  margin-top: 10px;
  color: var(--app-pearl);
  font-weight: 800;
  text-decoration: none;
}

.footer-policy-title {
  margin-top: 22px;
  color: var(--app-text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-policy-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 8px;
}

.footer-policy-links a {
  margin-top: 0;
}

.legal-page {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0;
}

.legal-language-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.legal-document {
  padding: clamp(24px, 5vw, 48px);
  color: var(--app-text);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 18px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.legal-document h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.legal-document h2 {
  margin: 34px 0 10px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  letter-spacing: 0;
}

.legal-document p,
.legal-document li {
  color: var(--app-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.legal-document ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-document a {
  color: var(--app-pearl);
  font-weight: 800;
}

.legal-updated {
  margin: 14px 0 28px;
  color: var(--app-muted);
  font-weight: 800;
}

@media (max-width: 760px) {
  .hero {
    min-height: 420px;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 156px));
    justify-content: start;
  }

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

  .work-card h3 {
    font-size: 0.88rem;
  }

  .work-card p {
    font-size: 0.72rem;
  }

  .manga-layout,
  .manga-content {
    grid-template-columns: 1fr;
  }

  .manga-cover {
    width: min(210px, 58vw);
  }

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

  .chapter-row {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 96px;
    padding-right: 58px;
  }

  .chapter-row .chapter-thumb {
    width: 64px;
    height: 64px;
  }

  .chapter-row .chapter-meta {
    grid-column: 2;
    justify-items: start;
  }
}
