:root {
  --midnight: #070c1b;
  --deep: #101832;
  --parchment: #f2ead7;
  --warm-gray: #c9c0ae;
  --gold: #f2ead7;
  --ice: #76e9ff;
  --text: #f7f0e4;
  --muted: #b9c0d5;
  --line: rgba(242, 234, 215, 0.78);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 88px;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 12%,
      rgba(118, 233, 255, 0.08),
      transparent 26%
    ),
    radial-gradient(
      circle at 80% 0%,
      rgba(229, 189, 40, 0.08),
      transparent 20%
    ),
    linear-gradient(180deg, var(--deep) 0%, var(--midnight) 100%);
  overflow-x: hidden;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size:
    67px 67px,
    113px 113px;
  background-position:
    12px 15px,
    38px 44px;
  opacity: 0.75;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--ice);
}
img {
  max-width: 100%;
  display: block;
}
main,
.site-header,
.site-footer,
.breadcrumbs {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
main {
  display: grid;
  gap: 32px;
  padding: 28px 0 56px;
}
.ornate-shell {
  position: relative;
  border: 2px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(16, 24, 50, 0.78);
  box-shadow: var(--shadow);
}
.dark-fill {
  background: rgba(3, 5, 10, 0.62);
}
.panel-light {
  color: var(--midnight);
  background: var(--parchment);
  border: 2px solid var(--line);
  border-radius: 52px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    var(--shadow);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 36px;
  padding: 26px 46px;
}
.brand {
  display: grid;
  gap: 4px;
}
.brand-title {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: 0.02em;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 0.96rem;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 30px);
  color: var(--muted);
  font-size: 0.96rem;
}
.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  border: 2px solid currentColor;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.nav-cta {
  color: #080b17;
  background: var(--gold);
  border-color: var(--gold);
}
.btn:hover,
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  color: inherit;
}
.btn-primary {
  color: #07101f;
  background: var(--ice);
  border-color: var(--ice);
}
.btn-secondary {
  color: var(--ice);
  background: transparent;
  border-color: var(--ice);
}
.btn-gold {
  color: #07101f;
  background: var(--gold);
  border-color: var(--gold);
}
.text-link {
  color: var(--ice);
  font-weight: 800;
}
.menu-toggle {
  display: none;
}
.breadcrumbs {
  margin-top: 28px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--muted);
}
.slash {
  opacity: 0.6;
}
.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 42px;
  align-items: center;
  padding: clamp(22px, 3.2vw, 42px);
}
.hero-copy h1,
.page-title h1,
.book-hero h1,
.character-hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.95;
}
.book-hero h1 {
  max-width: 12.5ch;
  font-size: clamp(2.15rem, 4.6vw, 4.35rem);
  line-height: 0.96;
}
.book-title-first-line,
.book-title-second-line {
  display: block;
}
.book-title-first-line {
  white-space: nowrap;
}
.book-title-second-line {
  white-space: nowrap;
}
.hero-copy p,
.book-hero-copy p,
.page-title p,
.character-hero p {
  color: var(--muted);
  max-width: 680px;
}
.eyebrow {
  color: var(--gold) !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
.book-hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: center;
  justify-items: stretch;
  width: 176px;
  margin-top: 0;
}
.book-hero-actions .btn {
  width: 100%;
  min-height: 52px;
  padding-inline: 20px;
  text-align: center;
}
.note {
  font-size: 0.92rem;
  color: var(--warm-gray);
}
.hero-cover,
.book-cover,
.character-portrait {
  min-height: 270px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-cover img,
.book-cover img,
.character-portrait img,
.book-thumb img,
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.start-grid {
  display: grid;
  gap: 16px;
}
.start-grid h2,
.section h2,
.subscribe-section h2,
.quick-links h2,
.relations h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}
.cards.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.mini-card {
  padding: 28px 42px;
  min-height: 110px;
  display: grid;
  gap: 8px;
}
.mini-card span {
  color: var(--muted);
}
.accent-gold {
  border-color: var(--gold);
}
.section,
.page-title,
.filters {
  padding: clamp(28px, 4vw, 52px);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head p {
  color: var(--muted);
  margin: 8px 0 0;
}
.book-list {
  display: grid;
  gap: 22px;
}
.book-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(242, 234, 215, 0.28);
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.02);
}
.book-thumb {
  height: 170px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 42px;
}
.book-info {
  display: grid;
  align-content: center;
  align-self: center;
  gap: 14px;
}
.book-info .eyebrow {
  margin: 0;
}
.book-info h3 {
  margin: 0;
  font-size: 1.5rem;
}
.book-info p {
  margin: 0;
  color: var(--muted);
}
.book-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 220px;
  margin-left: auto;
  align-self: center;
  height: 118px;
  padding: 0;
}
.book-actions .btn {
  width: 100%;
  min-height: 52px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span,
.tags em {
  display: inline-flex;
  padding: 6px 11px;
  border: 1px solid rgba(242, 234, 215, 0.28);
  border-radius: 999px;
  color: var(--warm-gray);
  font-size: 0.86rem;
  font-style: normal;
}
.tags.mini {
  justify-content: center;
}
.world-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: stretch;
}
.world-copy {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
}
.world-copy h2 {
  margin: 0;
}
.world-copy ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 12px;
}
.world-button {
  margin-top: 24px;
  align-self: start;
}
.world-art-card {
  margin: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 42px;
  background: transparent;
  padding: 0;
  box-shadow:
    inset 0 0 0 2px var(--line),
    var(--shadow);
  overflow: hidden;
  display: block;
  align-self: stretch;
}
.world-art-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 42px;
}
.world-art-card span {
  display: grid;
  place-items: center;
  min-height: 220px;
  height: 100%;
  color: var(--muted);
}
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.character-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.character-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(242, 234, 215, 0.34);
  border-radius: 48px;
  background: rgba(16, 24, 50, 0.7);
  min-height: 210px;
}
.character-card.large {
  min-height: 290px;
}
.character-card strong {
  font-size: 1.05rem;
}
.character-card small {
  color: var(--muted);
}
.portrait {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 234, 215, 0.08);
  overflow: hidden;
  color: var(--muted);
}
.character-card.large .portrait {
  width: 150px;
  height: 150px;
}
.subscribe-section {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
}
.subscribe-section p {
  color: #28314a;
}
.subscribe-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}
.subscribe-form label,
.filter-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.subscribe-form label span,
.filter-form label span {
  font-size: 0.86rem;
  color: inherit;
  opacity: 0.72;
}
input,
select {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(7, 12, 27, 0.28);
  padding: 0 18px;
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
  color: #07101f;
}
fieldset {
  grid-column: 1/-1;
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
legend {
  font-weight: 800;
  margin-bottom: 8px;
}
.checkbox {
  display: inline-flex !important;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px !important;
}
.checkbox input {
  min-height: auto;
  width: auto;
}
.form-message {
  grid-column: 1/-1;
  margin: 0;
  font-weight: 800;
}
.book-hero {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 3vw, 42px);
}
.book-cover {
  min-height: 230px;
}
.book-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}
.quick-links {
  padding: 34px;
  display: grid;
  align-content: start;
  gap: 16px;
}
.quick-links a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(7, 12, 27, 0.15);
  font-weight: 800;
}
.rich-text {
  color: var(--muted);
  line-height: 1.72;
}
.panel-light .rich-text,
.quick-links {
  color: var(--midnight);
}
.character-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: center;
  padding: clamp(28px, 4vw, 60px);
}
.character-portrait {
  min-height: 280px;
  border-radius: 999px;
}
blockquote {
  margin: 20px 0;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  color: var(--parchment);
  font-size: 1.1rem;
}
.character-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}
.relations {
  padding: 34px;
}
.relation-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.relation-list a {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(7, 12, 27, 0.14);
  border-radius: 24px;
}
.relation-list small {
  color: #4e566d;
}
.spoiler-card {
  border: 1px solid rgba(242, 234, 215, 0.28);
  border-radius: 26px;
  padding: 18px 22px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.spoiler-card summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--gold);
}
.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.gallery-item {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(242, 234, 215, 0.3);
  border-radius: 36px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 24px;
  background: var(--parchment);
}
.gallery-item span {
  font-weight: 800;
  padding-inline: 4px;
  text-align: center;
  justify-self: center;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.82);
  padding: 28px;
}
.lightbox[hidden] {
  display: none;
}
.lightbox img {
  max-height: 82vh;
  max-width: min(100%, 1080px);
  border-radius: 28px;
  background: var(--parchment);
}
.lightbox p {
  color: var(--text);
  font-weight: 800;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--midnight);
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
}
.narrow {
  max-width: 860px;
  margin-inline: auto;
}

.admin-login-section h1 {
  margin-top: 0;
}
.admin-login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.admin-login-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.admin-login-form .btn {
  margin-top: 10px;
  justify-self: start;
}
.admin-login-error {
  margin: 0;
  color: #ffb3b3;
  font-weight: 900;
}
.site-footer {
  padding: 34px 46px;
  margin-bottom: 40px;
  color: var(--muted);
}
@media (max-width: 900px) {
  main,
  .site-header,
  .site-footer,
  .breadcrumbs {
    width: min(680px, calc(100% - 24px));
  }
  .site-header {
    border-radius: 34px;
    padding: 20px 24px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 1.4rem;
  }
  .site-nav {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% + 12px);
    z-index: 5;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--midnight);
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.is-open {
    display: flex;
  }
  .hero-home,
  .book-hero,
  .character-hero,
  .subscribe-section,
  .book-layout,
  .character-body,
  .world-section {
    grid-template-columns: 1fr;
  }
  .book-row {
    grid-template-columns: 120px 1fr;
  }
  .book-actions {
    grid-column: 1/-1;
    max-width: none;
    margin-left: 0;
    flex-direction: row;
  }
  .book-actions .btn {
    flex: 1;
  }
  .book-hero-actions {
    width: 100%;
    max-width: 280px;
  }
  .cards.two,
  .filter-form {
    grid-template-columns: 1fr;
  }
  .character-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .character-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .subscribe-form {
    grid-template-columns: 1fr;
  }
  .world-art-card {
    max-width: 360px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  :root {
    --radius-xl: 42px;
  }
  main {
    gap: 22px;
    padding-top: 22px;
  }
  .hero-home,
  .section,
  .page-title,
  .filters,
  .book-hero,
  .character-hero,
  .subscribe-section {
    padding: 24px;
  }
  .hero-copy h1,
  .page-title h1,
  .book-hero h1,
  .character-hero h1 {
    font-size: 2.2rem;
  }
  .book-row {
    grid-template-columns: 1fr;
    border-radius: 32px;
  }
  .book-thumb {
    height: 220px;
  }
  .book-actions {
    flex-direction: column;
  }
  .book-actions .btn {
    width: 100%;
  }
  .character-grid,
  .gallery-grid,
  .character-grid.compact {
    grid-template-columns: 1fr;
  }
  .btn,
  .nav-cta {
    width: 100%;
  }
  fieldset {
    display: grid;
  }
}
