:root {
  --paper: #fffaf2;
  --paper-warm: #fff0d9;
  --brown: #4a3a1d;
  --brown-dark: #211413;
  --ink: #281a17;
  --muted: #6f6359;
  --yellow: #ffca05;
  --max: 1120px;
  --diagonal: clamp(64px, 6vw, 108px);
  --font-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* Keep the LP's rem baseline (normally 16px) above common html/:root resets.
   Do not use !important: accessibility tools may adjust the root size inline. */
html:root { font-size: 100%; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
  background: var(--brown-dark);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 2;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.sp-only { display: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 9px 14px;
  background: #fff;
  color: #111;
  font-family: var(--font-sans);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

#mainContent:focus { outline: none; }

.container {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

.hero,
.hero-picture { display: block; width: 100%; }
.hero { position: relative; }
.hero-picture img { width: 100%; }

.teaser-announcement {
  position: absolute;
  right: clamp(22px, 4.5vw, 76px);
  bottom: clamp(22px, 4vw, 70px);
  z-index: 2;
  width: min(41vw, 680px);
}

.teaser-announcement img { width: 100%; height: auto; }

.section-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
  background: rgba(74, 58, 29, 0.97);
  color: #fff;
  box-shadow: 0 5px 18px rgba(38, 25, 13, 0.2);
  backdrop-filter: blur(10px);
}

.section-nav ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(960px, 100%);
  min-height: 68px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.section-nav li { display: grid; place-items: stretch; }

.section-nav a,
.section-nav span {
  display: grid;
  place-items: center;
  min-height: 68px;
  padding: 8px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.section-nav span[aria-disabled="true"] { color: rgba(255, 255, 255, 0.74); cursor: default; }

.section-nav a:focus-visible,
.floating-cm:focus-visible,
.social a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: -4px;
}

.story {
  position: relative;
  z-index: 1;
  padding: 105px 0 99px;
  background: var(--paper);
  text-align: center;
}

.story::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: calc(var(--diagonal) * -1);
  left: 0;
  z-index: 2;
  height: var(--diagonal);
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.story-inner { position: relative; z-index: 3; }

.story h2,
.cm-section h2,
.characters > .container > h2 {
  margin: 0 0 54px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-wrap: balance;
}

.story-copy {
  max-width: 920px;
  margin-inline: auto;
  font-size: clamp(0.95rem, 1.28vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.035em;
}

.story-copy p { margin: 0 0 38px; }
.story-copy p:last-child { margin-bottom: 0; }
.story-copy .sound { margin-block: 42px; letter-spacing: 0.14em; }

.redacted {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.floating-cm {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 900;
  width: 132px;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.floating-cm.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.floating-cm img {
  width: 74px;
  max-height: 100px;
  margin: 0 auto -5px;
  object-fit: contain;
  object-position: top;
}

.floating-cm span {
  display: block;
  padding: 8px 12px;
  border: 2px solid var(--brown);
  background: rgba(255, 250, 242, 0.96);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 24px rgba(34, 21, 13, 0.16);
}

.cm-section {
  position: relative;
  padding: calc(100px + var(--diagonal)) 0 160px;
  background: var(--paper-warm);
  text-align: center;
}

.cm-section::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: calc(var(--diagonal) * -1);
  left: 0;
  z-index: 2;
  height: var(--diagonal);
  background: var(--paper-warm);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.cm-section > .container { position: relative; z-index: 3; }

.cm-section h2 { margin-bottom: 52px; }

.video-shell {
  width: min(100%, 960px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(49, 24, 21, 0.18);
  background: var(--brown-dark);
  box-shadow: 0 28px 60px rgba(63, 38, 24, 0.14);
  aspect-ratio: 16 / 9;
}

.video-shell iframe { display: block; width: 100%; height: 100%; border: 0; }

.video-placeholder {
  display: grid;
  place-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--font-sans);
  letter-spacing: 0.18em;
}

.video-placeholder span { font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 800; }
.video-placeholder small { margin-top: 4px; font-size: 0.72rem; }

.coming-soon {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 44px 24px;
  border: 1px solid rgba(49, 24, 21, 0.18);
  background:
    radial-gradient(circle at 72% 45%, rgba(92, 25, 99, 0.42), transparent 28%),
    var(--brown-dark);
  color: #fff;
  font-family: var(--font-sans);
  line-height: 1.4;
  box-shadow: 0 28px 60px rgba(63, 38, 24, 0.14);
}

.coming-soon span {
  color: var(--yellow);
  font-size: clamp(0.78rem, 1.2vw, 0.96rem);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.coming-soon p {
  margin: 2px 0;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  transform: translateX(0.22em);
}

.coming-soon time { font-size: clamp(1rem, 2vw, 1.45rem); font-weight: 700; letter-spacing: 0.06em; }

.characters {
  position: relative;
  overflow: hidden;
  padding: calc(114px + var(--diagonal)) 0 0;
  background: var(--paper);
}

.characters > .container > h2 { text-align: center; }

.character {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  align-items: center;
  gap: 68px;
  max-width: 970px;
  margin: 0 auto;
}

.character + .character { margin-top: 0; }

.character.character-eita {
  position: relative;
  isolation: isolate;
  margin-top: 60px;
  padding: calc(60px + var(--diagonal)) 0 75px;
}

.character-eita::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  background: var(--paper-warm);
  clip-path: polygon(0 var(--diagonal), 100% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.character-visual {
  display: grid;
  place-items: center;
  min-height: 540px;
}

.character-visual img {
  width: 100%;
  max-height: 570px;
  object-fit: contain;
}

.character-ane .character-visual img { max-width: 245px; }
.character-eita .character-visual img { max-width: 340px; }

.character-copy h3 {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: 0.05em;
}

.character-copy h3 small {
  margin-left: 8px;
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0;
}

.character-copy p {
  margin: 0;
  font-size: clamp(0.88rem, 1.28vw, 1rem);
  font-weight: 500;
  line-height: 2.05;
  letter-spacing: 0.03em;
}

.social {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 54px 0 72px;
  background: radial-gradient(circle at 50% 42%, #553318 0, #38200f 48%, #24130c 100%);
}

.social-title-image {
  width: 100%;
  margin: 0 auto 42px;
  text-align: center;
}

.social-title-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 20px);
  padding: 0 8px 12px;
  border-bottom: 6px solid var(--yellow);
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.42);
}

.social-title-image .social-title-logo {
  width: clamp(190px, 24vw, 286px);
  flex: 0 0 auto;
}

.social-title-label { white-space: nowrap; }

.social-title-image img,
.social-grid img {
  display: block;
  width: 100%;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.social-grid a {
  --social-y: 0px;
  --social-r: 0deg;
  display: block;
  min-width: 0;
  border-radius: 4%;
  transform: translateY(var(--social-y)) rotate(var(--social-r));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.social-grid a:nth-child(1) { --social-r: -0.4deg; }
.social-grid a:nth-child(2) { --social-y: 7px; --social-r: 0.7deg; }
.social-grid a:nth-child(3) { --social-y: 10px; --social-r: 0.4deg; }
.social-grid a:nth-child(4) { --social-y: 2px; --social-r: -0.5deg; }

.social-grid a:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 5px;
}

.footer {
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  background: #030303;
  color: #b7b7b7;
  font-family: var(--font-sans);
  text-align: center;
}

.footer small { font-size: 0.66rem; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .section-nav a:hover { background: rgba(255, 255, 255, 0.1); color: #ffecb1; }
  .floating-cm:hover { transform: translateY(-4px); }
  .social-grid a:hover { filter: brightness(1.07); transform: translateY(calc(var(--social-y) - 6px)) rotate(var(--social-r)) scale(1.025); }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .container { width: min(var(--max), calc(100% - 48px)); }
  .story { padding-top: 88px; }
  .character { gap: 40px; }
}

@media (max-width: 760px) {
  :root { --diagonal: 44px; }
  html { scroll-padding-top: 58px; }
  .container { width: min(var(--max), calc(100% - 32px)); }
  /* The recomposed static image includes a little lawn without increasing hero height. */
  .hero { height: auto; overflow: hidden; }
  .hero-picture img { height: auto; aspect-ratio: 1880 / 2120; object-fit: cover; object-position: center top; }
  .teaser-announcement {
    right: 12px;
    bottom: 18px;
    width: min(74vw, 360px);
  }
  .section-nav ul { min-height: 58px; }
  .section-nav a,
  .section-nav span { min-height: 58px; padding: 6px 3px; font-size: 0.72rem; letter-spacing: 0.02em; line-height: 1.2; }
  .section-nav li:last-child span { font-size: 0.66rem; }
  .story { padding: 56px 0 44px; }
  .story h2,
  .cm-section h2,
  .characters > .container > h2 { margin-bottom: 34px; }
  .story-copy { max-width: 35rem; font-size: 0.9rem; line-height: 1.95; text-align: center; }
  .story-copy p { margin-bottom: 26px; text-wrap: pretty; }
  .story-copy .sound { margin-block: 30px; text-align: center; }
  .pc-only { display: none; }
  .sp-only { display: inline; }
  .floating-cm { right: max(8px, env(safe-area-inset-right)); bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)); width: 100px; }
  .floating-cm img { width: 58px; max-height: 76px; }
  .floating-cm span { padding: 7px 6px; border-width: 1px; font-size: 0.78rem; }
  .cm-section { padding: calc(24px + var(--diagonal)) 0 44px; }
  .cm-section h2 { font-size: 1.8rem; }
  .video-shell { width: 100%; }
  .coming-soon { min-height: 210px; padding: 28px 16px; }
  .characters { padding: calc(24px + var(--diagonal)) 0 0; }
  .character { grid-template-columns: 1fr; gap: 18px; max-width: 34rem; }
  .character + .character { margin-top: 0; }
  .character.character-eita { margin-top: 36px; padding: calc(30px + var(--diagonal)) 0 50px; }
  .character-eita::before { top: 0; }
  .character-visual { min-height: 390px; }
  .character-visual img { max-height: 430px; }
  .character-ane .character-visual img { max-width: 190px; }
  .character-eita .character-visual img { max-width: 270px; }
  .character-copy { width: min(100%, 30rem); margin-inline: auto; text-align: center; }
  .character-copy h3 { font-size: 1.45rem; }
  .character-copy h3 small { display: inline-block; font-size: 0.52em; }
  .character-copy p { font-size: 0.86rem; line-height: 1.95; text-wrap: pretty; }
  .social { padding: 42px 0 54px; }
  .social-title-image { width: 100%; margin-bottom: 28px; text-align: center; }
  .social-title-text {
    gap: 10px;
    padding: 0 4px 8px;
    border-bottom: 4px solid var(--yellow);
    font-size: clamp(1.15rem, 5.6vw, 1.5rem);
    letter-spacing: 0.035em;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.42);
  }
  .social-title-image .social-title-logo { width: clamp(148px, 43vw, 200px); }
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .social-grid a:nth-child(1) { --social-y: 0px; --social-r: -0.6deg; }
  .social-grid a:nth-child(2) { --social-y: 4px; --social-r: 0.6deg; }
  .social-grid a:nth-child(3) { --social-y: 0px; --social-r: 0.5deg; }
  .social-grid a:nth-child(4) { --social-y: 4px; --social-r: -0.5deg; }
  .footer { padding-inline: 18px; line-height: 1.5; }
  .footer small { display: block; max-width: 360px; margin-inline: auto; font-size: 0.58rem; }
}

@media (max-width: 760px) and (orientation: portrait) {
  /* Reserve the nav height without cropping into the episode title's safe area. */
  .hero-picture img {
    max-height: max(104vw, calc(100vh - 58px));
    max-height: max(104vw, calc(100svh - 58px));
  }
}

@media (max-width: 380px) {
  .section-nav a,
  .section-nav span { font-size: 0.66rem; }
  .section-nav li:last-child span { font-size: 0.6rem; }
  .story-copy,
  .character-copy p { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
