:root {
  --bg: #050505;
  --panel: rgba(13, 13, 12, 0.82);
  --panel-strong: rgba(7, 7, 7, 0.94);
  --ink: #f3ead8;
  --muted: #b8aa91;
  --dim: rgba(243, 234, 216, 0.64);
  --brass: #c9a76b;
  --blue: #78d8ee;
  --line: rgba(201, 167, 107, 0.28);
  --red: #8d2028;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(5,5,5,0.92), rgba(5,5,5,0.5), rgba(5,5,5,0.94)),
    var(--room-bg, url("/assets/members/comics/blue-light-hunger/chapter-pages/Chapter_2_Blue_Light_Hunger_Page_01.jpg")) center / cover fixed,
    radial-gradient(circle at 12% 12%, rgba(120, 216, 238, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 26%, rgba(141, 32, 40, 0.18), transparent 30rem),
    linear-gradient(180deg, #050505 0%, #120f0d 48%, #050505 100%);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent, black 14%, black 88%, transparent);
}

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

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button {
  color: inherit;
}

.member-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
  background: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.54));
  border-bottom: 1px solid rgba(201, 167, 107, 0.18);
  backdrop-filter: blur(14px);
}

.brand-link img {
  width: clamp(8rem, 16vw, 14rem);
  filter: drop-shadow(0 0 18px rgba(201, 167, 107, 0.22));
}

.member-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(0.7rem, 2vw, 1.25rem);
  color: rgba(243, 234, 216, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.member-header a:hover,
.member-header a:focus-visible {
  color: var(--ink);
  outline: none;
}

.members-only-link {
  display: none;
}

body.has-member-session .members-only-link {
  display: inline;
}

.member-shell {
  width: min(1480px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0;
  scroll-margin-top: 5.5rem;
}

.member-intro {
  max-width: 66rem;
  min-height: 42svh;
  display: grid;
  align-content: end;
  padding-bottom: clamp(2rem, 4vw, 4rem);
}

.member-pass {
  width: min(34rem, 100%);
  display: grid;
  gap: 0.35rem;
  margin-top: 1.5rem;
  border: 1px solid rgba(201, 167, 107, 0.34);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(5,5,5,0.62);
  backdrop-filter: blur(8px);
}

.member-pass span,
.member-pass small {
  color: var(--blue);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.member-pass p {
  margin: 0;
  font-size: 0.92rem;
}

.member-login-form,
.member-session-panel {
  display: grid;
  gap: 0.85rem;
}

.member-login-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-login-form input {
  width: 100%;
  border: 1px solid rgba(210, 178, 111, 0.28);
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.42);
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
}

.member-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.member-login-actions button,
.button-lite {
  border: 1px solid rgba(210, 178, 111, 0.42);
  border-radius: 999px;
  background: rgba(210, 178, 111, 0.14);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0.72rem 1rem;
}

.member-login-actions button[type="submit"],
#reset-code {
  background: linear-gradient(135deg, var(--brass), #8f6b34);
  color: #080706;
}

#member-login-message {
  min-height: 1.3rem;
  margin: 0;
  color: var(--blue);
  font-size: 0.88rem;
}

.member-session-panel p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.member-session-panel .member-session-message {
  color: var(--cyan);
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

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

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-size: clamp(3.4rem, 8vw, 8rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.6rem, 2.7vw, 3.2rem);
  line-height: 1;
  text-wrap: balance;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  line-height: 1.1;
}

p {
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.65;
}

.reader-layout {
  display: none;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(22rem, 1.55fr) minmax(16rem, 0.78fr);
  gap: 1rem;
  align-items: start;
  scroll-margin-top: 5.5rem;
}

body.has-member-session .reader-layout {
  display: grid;
}

.library-panel,
.reader-panel,
.notes-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
    var(--panel);
}

.library-panel,
.notes-panel {
  position: sticky;
  top: 5rem;
  padding: 1rem;
}

.panel-heading {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201, 167, 107, 0.18);
}

.comic-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.comic-card {
  width: 100%;
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.55rem;
  background: rgba(0,0,0,0.35);
  text-align: left;
  cursor: pointer;
}

.comic-card.is-active {
  border-color: rgba(120, 216, 238, 0.72);
  background:
    linear-gradient(135deg, rgba(120, 216, 238, 0.13), transparent),
    rgba(0,0,0,0.48);
}

.comic-card img {
  width: 5.4rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.comic-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--blue);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.comic-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.comic-card small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reader-panel {
  overflow: hidden;
  min-width: 0;
}

.reader-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-bottom: 1px solid rgba(201, 167, 107, 0.18);
}

.reader-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  align-items: center;
}

.reader-status span,
#dialog-count {
  color: var(--dim);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.82rem;
}

.reader-status button,
.dialog-close {
  min-height: 2.4rem;
  border: 1px solid rgba(201, 167, 107, 0.36);
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  background: rgba(0,0,0,0.48);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.reader-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(72svh, 52rem);
  padding: clamp(0.8rem, 2vw, 1.4rem);
  background:
    radial-gradient(circle at 50% 10%, rgba(120, 216, 238, 0.08), transparent 22rem),
    #050505;
}

.page-frame {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: min(100%, 42rem);
}

.page-frame img {
  width: 100%;
  max-width: 100%;
  max-height: min(68svh, 48rem);
  object-fit: contain;
  object-position: top center;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.58);
  background: #050505;
}

.page-frame figcaption {
  min-height: 1.2rem;
  color: var(--dim);
  font-size: 0.9rem;
  text-align: center;
}

.reader-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 167, 107, 0.38);
  border-radius: 999px;
  background: rgba(0,0,0,0.66);
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.reader-nav--prev {
  left: 1rem;
}

.reader-nav--next {
  right: 1rem;
}

.reader-nav:disabled {
  opacity: 0.32;
  cursor: default;
}

.reader-controls {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-top: 1px solid rgba(201, 167, 107, 0.18);
}

#page-slider {
  width: 100%;
  accent-color: var(--brass);
}

.thumb-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(4.8rem, 6rem);
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.thumb-button {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  padding: 0.25rem;
  background: rgba(0,0,0,0.38);
  cursor: pointer;
}

.thumb-button.is-active {
  border-color: var(--brass);
}

.thumb-button img {
  width: 100%;
  aspect-ratio: 9 / 13;
  object-fit: contain;
  border-radius: 4px;
  object-position: top center;
  background: rgba(0,0,0,0.72);
}

.notes-panel {
  min-height: 24rem;
}

.member-drops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.member-drops span {
  border: 1px solid rgba(201, 167, 107, 0.4);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  background: rgba(0,0,0,0.38);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.reader-dialog {
  width: min(96rem, calc(100% - 1rem));
  height: min(96svh, 70rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #050505;
  color: var(--ink);
}

.reader-dialog::backdrop {
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
}

.dialog-reader {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dialog-page-wrap {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.dialog-page-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
}

.interview-feature {
  display: none;
  margin-top: clamp(4rem, 9vw, 9rem);
  scroll-margin-top: 5.5rem;
}

body.has-member-session .interview-feature {
  display: block;
}

.interview-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  padding: clamp(2.5rem, 6vw, 6rem) 0;
  border-top: 1px solid rgba(201, 167, 107, 0.5);
  border-bottom: 1px solid rgba(201, 167, 107, 0.24);
  background:
    linear-gradient(90deg, rgba(120, 216, 238, 0.055), transparent 40%),
    linear-gradient(270deg, rgba(141, 32, 40, 0.08), transparent 36%);
}

.interview-masthead h2 {
  max-width: 10ch;
  margin-bottom: 1.2rem;
  font-size: clamp(3.4rem, 7.5vw, 7.4rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.interview-standfirst {
  max-width: 48rem;
  margin-bottom: 1.5rem;
  color: rgba(243, 234, 216, 0.88);
  font-size: clamp(1.08rem, 1.7vw, 1.38rem);
  line-height: 1.6;
}

.interview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  color: var(--dim);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.interview-pullquote {
  margin: 0;
  border-left: 2px solid var(--blue);
  padding: 0.25rem 0 0.25rem clamp(1rem, 2vw, 1.6rem);
}

.interview-pullquote p {
  margin-bottom: 1rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.8rem);
  line-height: 1.15;
}

.interview-pullquote cite {
  color: var(--blue);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
}

.interview-transcript {
  width: min(68rem, 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 6rem) 0;
}

.interview-direction {
  width: min(46rem, 100%);
  margin: clamp(1.8rem, 4vw, 3.5rem) auto;
  color: rgba(184, 170, 145, 0.74);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  font-style: italic;
  line-height: 1.75;
  text-align: center;
}

.interview-turn {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  padding: 1.15rem 0;
}

.interview-speaker {
  margin: 0;
  padding-top: 0.25rem;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.interview-copy p {
  margin-bottom: 0.85rem;
  color: rgba(243, 234, 216, 0.92);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.72;
}

.interview-copy p:last-child {
  margin-bottom: 0;
}

.interview-turn--mara .interview-speaker {
  color: var(--brass);
}

.interview-turn--luca .interview-speaker {
  color: var(--blue);
}

.interview-turn--seraph .interview-speaker {
  color: #e3a6bd;
}

.interview-turn--featured {
  margin: clamp(1.2rem, 3vw, 2.4rem) 0;
  border-top: 1px solid rgba(201, 167, 107, 0.24);
  border-bottom: 1px solid rgba(201, 167, 107, 0.24);
  padding: clamp(1.5rem, 3vw, 2.6rem) 0;
}

.interview-turn--featured .interview-copy p {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.25vw, 2rem);
  line-height: 1.45;
}

.interview-chapter {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin: clamp(4rem, 9vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(201, 167, 107, 0.4);
  padding-bottom: 1rem;
}

.interview-chapter span {
  color: var(--blue);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.interview-chapter h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 4rem);
  text-transform: uppercase;
}

.interview-closing {
  width: min(52rem, 100%);
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  border-top: 1px solid rgba(201, 167, 107, 0.52);
  border-bottom: 1px solid rgba(201, 167, 107, 0.22);
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.interview-closing p {
  color: rgba(243, 234, 216, 0.82);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  line-height: 1.7;
}

.interview-closing p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

@media (max-width: 1180px) {
  .reader-layout {
    grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1.35fr);
  }

  .notes-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .interview-masthead {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.45fr);
  }
}

@media (max-width: 820px) {
  .member-header {
    position: relative;
    align-items: flex-start;
  }

  .brand-link img {
    width: 7.2rem;
  }

  .member-header nav {
    max-width: 52vw;
    font-size: 0.68rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .member-intro {
    min-height: auto;
  }

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

  .library-panel {
    position: static;
  }

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

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

  .comic-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .reader-topline {
    display: grid;
  }

  .reader-status {
    justify-content: flex-start;
  }

  .reader-stage {
    min-height: 70svh;
    padding-inline: 0.5rem;
  }

  .reader-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .reader-nav--prev {
    left: 0.35rem;
  }

  .reader-nav--next {
    right: 0.35rem;
  }

  .interview-masthead {
    grid-template-columns: 1fr;
  }

  .interview-masthead h2 {
    max-width: 100%;
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .interview-pullquote {
    max-width: 32rem;
  }

  .interview-turn {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    border-left: 2px solid rgba(255,255,255,0.08);
    padding-left: 1rem;
  }

  .interview-turn--mara {
    border-left-color: rgba(201, 167, 107, 0.5);
  }

  .interview-turn--luca {
    border-left-color: rgba(120, 216, 238, 0.5);
  }

  .interview-turn--seraph {
    border-left-color: rgba(227, 166, 189, 0.5);
  }

  .interview-turn--featured {
    padding-block: 1.5rem;
  }
}

@media (max-width: 560px) {
  .comic-list {
    grid-template-columns: 1fr;
  }

  .interview-meta {
    display: grid;
  }

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