/* Minimalist Cinema-Teaser + Plain Novel LP
 * Zero chrome over artwork; book-grade typography below.
 */

:root {
  --bg: #060508;
  --surface: #110e15;
  --ink: #ece6dc;
  --ink-body: #ddd6cb;
  --ink-dim: #8a8278;
  --ink-faint: #57514a;
  --crimson: #9e1c36;
  --crimson-deep: #7a1328;
  --crimson-glow: rgba(158, 28, 54, 0.36);
  --hairline: rgba(255, 255, 255, 0.08);
  --serif: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.page {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

/* ==========================================================================
   PART 1: FULL-BLEED CINEMA TEASER HERO
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 580px;
  max-height: 920px;
  background: #000;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}

.slide-poster,
.slide-cut,
.slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-poster {
  will-change: transform, filter, opacity;
  transform-origin: 43.5% 23.5%;
}

.slide-cut {
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  object-position: 50% 42%;
}

.slide-video {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 2;
}

.slide-video.is-ready {
  opacity: 1;
}

.slide-blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.slide-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(ellipse at 45% 32%, transparent 32%, rgba(0, 0, 0, 0.56) 100%),
    linear-gradient(
      to bottom,
      rgba(6, 5, 8, 0.16) 0%,
      rgba(6, 5, 8, 0) 24%,
      rgba(6, 5, 8, 0) 56%,
      rgba(6, 5, 8, 0.72) 78%,
      rgba(6, 5, 8, 0.96) 94%,
      #060508 100%
    );
  transition: opacity 0.4s ease;
}

/* Optional audio toggle (appears ONLY when loaded video has audio) */
.hero-mute {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 12;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(6, 5, 8, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(236, 230, 220, 0.85);
}

.hero-mute[hidden] {
  display: none;
}

/* Bottom minimal dock: subtitles + dots + 1-line title + single CTA */
.hero-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 0 22px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.hero-dock > * {
  pointer-events: auto;
}

/* Cinema subtitle (pure text, no box) */
.subtitle-stage {
  min-height: 54px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 18px;
  pointer-events: none;
}

.subtitle-line {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.07em;
  color: #fff;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.32s ease, transform 0.32s ease;
  white-space: pre-line;
}

.subtitle-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.subtitle-line.is-reply {
  font-size: 14.5px;
  font-weight: 400;
  color: rgba(236, 230, 220, 0.84);
  letter-spacing: 0.09em;
}

/* Tiny projection dots: ● ○ only */
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 16px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(236, 230, 220, 0.58);
  background: transparent;
  padding: 0;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Expand invisible touch hit target without enlarging visual dot */
.carousel-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.carousel-dot.is-active {
  background: #ece6dc;
  border-color: #ece6dc;
}

.ep-title {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(236, 230, 220, 0.72);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 312px;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--crimson) 0%, var(--crimson-deep) 100%);
  color: #fff;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 10px 30px var(--crimson-glow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.cta-btn:hover {
  filter: brightness(1.09);
}

.cta-btn:active {
  transform: scale(0.985);
}

.cta-age {
  margin: 8px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

/* ==========================================================================
   PART 2: PLAIN-BLACK NOVEL (ZERO GIMMICKS)
   ========================================================================== */
.novel {
  position: relative;
  overflow: hidden;
  padding: 68px 24px 52px;
  max-width: 500px;
  margin: 0 auto;
}

.novel-host-bg {
  position: absolute;
  right: -14px;
  bottom: 0;
  width: 78%;
  max-width: 340px;
  height: 300px;
  pointer-events: none;
  z-index: 1;
}

.novel-host-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 36% 12%;
  display: block;
  opacity: 0.96;
  -webkit-mask-image:
    linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.12) 22%, rgba(0, 0, 0, 0.78) 56%, rgba(0, 0, 0, 1) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0.25) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.12) 22%, rgba(0, 0, 0, 0.78) 56%, rgba(0, 0, 0, 1) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 1) 88%, rgba(0, 0, 0, 0.25) 100%);
  mask-composite: intersect;
}

.novel-lead {
  position: relative;
  z-index: 2;
  margin: 0 0 32px;
  padding-top: 22px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.92;
  letter-spacing: 0.06em;
  color: #f6f0e6;
  font-feature-settings: "palt" 1;
}

.novel-lead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 1px;
  background: var(--crimson);
}

.novel-body {
  position: relative;
  z-index: 2;
}

.novel-body p {
  margin: 0 0 1.65em;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 2.05;
  letter-spacing: 0.03em;
  color: var(--ink-body);
  white-space: pre-line;
  font-feature-settings: "palt" 1;
  text-shadow: 0 1px 12px rgba(6, 5, 8, 0.92), 0 0 24px rgba(6, 5, 8, 0.85);
}

.novel-body p:last-child {
  margin-bottom: 0;
}

/* Closing signature over bottom-right bust-up backdrop */
.novel-sign {
  position: relative;
  z-index: 2;
  margin: 120px 0 0;
  text-align: left;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: rgba(245, 239, 230, 0.88);
  text-shadow: 0 2px 14px rgba(6, 5, 8, 0.98), 0 0 24px rgba(6, 5, 8, 0.95);
}

.novel-sign::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: rgba(158, 28, 54, 0.85);
  vertical-align: middle;
  margin-right: 12px;
  transform: translateY(-1px);
}

/* ==========================================================================
   CLOSING CTA & MINIMAL FOOTER
   ========================================================================== */
.closing {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-sub {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 312px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink-body);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.cta-sub:hover {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.cta-sub[hidden] {
  display: none;
}

.series-pager {
  margin-top: 32px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.series-pager[hidden] {
  display: none;
}

.series-pager a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.series-pager a:hover {
  color: var(--ink);
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.foot-links {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.foot-links a:hover {
  color: var(--ink);
}

.foot-note {
  margin-top: 16px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ==========================================================================
   ARCHIVE INDEX (/ja/)
   ========================================================================== */
.lobby-head {
  padding: 36px 24px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--hairline);
}

.lobby-head img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lobby-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.lobby-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
}

.lobby-grid {
  padding: 24px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.poster-item {
  display: block;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 4;
}

.poster-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
  transition: transform 0.45s ease;
}

.poster-item:hover img {
  transform: scale(1.03);
}

.poster-item-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(to top, rgba(6, 5, 8, 0.94) 0%, rgba(6, 5, 8, 0.55) 60%, transparent 100%);
}

.poster-item-ep {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(236, 230, 220, 0.72);
  margin-bottom: 6px;
}

.poster-item-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}

/* ==========================================================================
   AGE GATE MODAL (1-TAP, 30-DAY MEMORY)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 2, 5, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  padding: 28px 22px 22px;
  background: #120f17;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  text-align: center;
}

.modal-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.modal-text {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-dim);
}

.modal-confirm {
  width: 100%;
  min-height: 48px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--crimson) 0%, var(--crimson-deep) 100%);
  color: #fff;
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.modal-cancel {
  margin-top: 10px;
  width: 100%;
  min-height: 40px;
  font-size: 12.5px;
  color: var(--ink-dim);
}

.modal-cancel:hover {
  color: var(--ink);
}

@media (min-width: 600px) {
  .hero {
    height: 88vh;
    min-height: 640px;
    max-height: 820px;
  }
  .subtitle-line {
    font-size: 20px;
  }
  .novel {
    padding: 80px 28px 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    scroll-behavior: auto;
  }
  .subtitle-line,
  .slide-video {
    transition: none;
  }
}
