:root {
  color-scheme: dark;
  --ink: #f8f0df;
  --muted: #c9baa4;
  --night: #090d13;
  --wood: #1b120d;
  --gold: #d7ae68;
  --line: rgba(226, 189, 119, .28);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(61, 107, 126, .24), transparent 30rem),
    linear-gradient(180deg, #07111b 0, #0d1115 24%, #15100c 70%, #090706 100%);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image: linear-gradient(90deg, transparent 49%, rgba(255,255,255,.025) 50%, transparent 51%);
  background-size: 9px 9px;
}

main { width: 100%; }

.story-flow, .opening, .profiles, footer {
  width: min(100%, 860px);
  margin-inline: auto;
}

.panel { position: relative; margin: 0 auto clamp(4.5rem, 12vw, 9rem); }
.panel img { display: block; width: 100%; height: auto; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 28px 70px rgba(0,0,0,.45); }
.panel.wide { width: min(100%, 820px); }
.panel.square { width: min(100%, 680px); }
.panel.portrait { width: min(100%, 620px); }

.opening { width: min(100%, 920px); margin-bottom: clamp(5rem, 15vw, 11rem); }
.opening img { width: 100%; }
.opening::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,8,14,.08), transparent 46%, rgba(3,8,14,.92)); pointer-events: none; }
.opening-copy { position: absolute; inset: auto 5% 5%; z-index: 2; text-align: center; text-shadow: 0 3px 14px #000; }
.opening-copy h1 { margin: 1.8rem 0 0; font-family: "Gowun Dodum", sans-serif; font-size: clamp(3rem, 10vw, 6.6rem); letter-spacing: .1em; color: #fff5dc; }
.narration { margin: .35rem 0; font-size: clamp(1.04rem, 3vw, 1.45rem); font-weight: 600; }

.narration-card, .room-card, .final-copy {
  width: min(92%, 680px);
  margin: 0 auto 1.5rem;
  padding: 1.15rem 1.35rem;
  color: #2d251d;
  background: rgba(255, 248, 230, .96);
  border: 1px solid rgba(215, 174, 104, .7);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
  font-family: "Gowun Dodum", sans-serif;
  text-align: center;
  font-size: clamp(1.02rem, 3vw, 1.35rem);
  line-height: 1.7;
}
.narration-card p { margin: .15rem 0; }
.narration-card.compact { margin-top: 1.5rem; }
.narration-card .time { display: block; margin-top: .8rem; color: #7b4e22; }

.speech {
  position: relative;
  width: min(92%, 600px);
  margin: 1.5rem auto 0;
  padding: 1rem 1.2rem;
  color: #25201b;
  background: rgba(255,255,255,.96);
  border: 2px solid rgba(41,34,28,.9);
  border-radius: 1.1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,.28);
  font-family: "Gowun Dodum", sans-serif;
  font-size: clamp(1.02rem, 3vw, 1.35rem);
  line-height: 1.55;
}
.speech b { display: block; margin-bottom: .35rem; color: #268f93; font-family: "Noto Sans KR", sans-serif; font-size: .78em; letter-spacing: .08em; }
.speech.left, .speech.right { inset: auto; }

.sfx { font-family: "Noto Sans KR", sans-serif; font-weight: 800; letter-spacing: .05em; text-shadow: 0 4px 8px #000, 0 0 16px rgba(255,255,255,.18); }
.sfx.rain { position: absolute; top: -5rem; right: 0; transform: rotate(-7deg); font-size: clamp(1.4rem, 5vw, 2.5rem); color: #caeaff; }
.step { position: absolute; z-index: 2; color: #eaf7ff; font-size: clamp(1.6rem, 6vw, 3rem); }
.step.one { left: 10%; bottom: 20%; transform: rotate(-12deg); }
.step.two { right: 7%; bottom: 7%; transform: rotate(8deg); }
.door { position: absolute; left: -5%; top: 16%; color: #f6e9cb; font-size: clamp(1.7rem, 6vw, 3.3rem); transform: rotate(-8deg); }

.interlude { width: min(100% - 2rem, 680px); margin: 0 auto clamp(5rem, 16vw, 11rem); text-align: center; }
.missing-art { min-height: 19rem; display: grid; place-items: center; border-block: 1px solid var(--line); background: radial-gradient(circle, rgba(41,142,147,.14), transparent 62%); }
.speech.text-only { position: relative; width: min(90%, 470px); margin: 0 auto; }
.drop { min-height: 18rem; display: grid; place-items: center; }
.drop .sfx { font-size: clamp(2.5rem, 12vw, 5rem); transform: rotate(-9deg); }

.silence { margin-top: 3rem; color: #cfc2b0; font-family: "Gowun Dodum", sans-serif; font-size: 1.25rem; letter-spacing: .25em; text-align: center; }
.room-card { margin-top: 1.5rem; }
.room-card strong { display: block; margin-bottom: .8rem; font-size: 1.16em; }
.room-card ul { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; margin: 0; padding: 0; list-style: none; }
.room-card li::before { content: "◆"; margin-right: .5rem; color: #a36c2d; font-size: .65em; vertical-align: middle; }
.final-copy { margin-top: 1.5rem; font-size: clamp(1.25rem, 4vw, 1.8rem); }
.final-copy p { margin: 0 0 .35rem; }
.final-copy strong { color: #7b4e22; }

.section-bridge { display: flex; align-items: center; gap: 1rem; width: min(100% - 3rem, 720px); margin: 2rem auto 7rem; color: var(--gold); }
.section-bridge span { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line)); }
.section-bridge span:last-child { background: linear-gradient(90deg, var(--line), transparent); }

.profiles { padding: 0 1.1rem 6rem; }
.profiles > header { margin-bottom: 3rem; text-align: center; }
.eyebrow { margin: 0; color: var(--gold); font-size: .76rem; font-weight: 700; letter-spacing: .24em; }
.profiles h2 { margin: .55rem 0 .5rem; font-family: "Gowun Dodum", sans-serif; font-size: clamp(2.1rem, 7vw, 3.7rem); }
.profiles header > p:last-child { margin: 0; color: var(--muted); }

.profile { --accent: #d7ae68; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: 0 22px 50px rgba(0,0,0,.28); }
.profile img { display: block; width: 100%; height: auto; background: #e9dfcf; }
.profile h3 { margin: .1rem 0; color: var(--accent); font-family: "Gowun Dodum", sans-serif; font-size: 2rem; }
.profile p { margin: .45rem 0 0; color: #e7dcc8; line-height: 1.65; }
.profile .meta { color: var(--muted); font-size: .9rem; font-weight: 600; }
.profile .number { color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .2em; }
.profile.featured { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(250px, .88fr); align-items: center; margin-bottom: 1.25rem; }
.profile.featured .portrait-wrap { max-height: 700px; overflow: hidden; }
.profile.featured img { min-height: 560px; object-fit: contain; }
.profile-copy { padding: clamp(1.5rem, 5vw, 3rem); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.profile-grid .profile > div { padding: 1.3rem 1.35rem 1.6rem; }
.profile-grid img { aspect-ratio: 832 / 970; object-fit: cover; object-position: top center; }
.mielle { --accent: #59dde0; }
.nika { --accent: #f29a45; }
.brika { --accent: #d2b86f; }
.bellia { --accent: #d36be8; }
.serpina { --accent: #4dbb83; }

footer { padding: 2rem 1rem 8rem; text-align: center; }
footer p { margin: 0; font-family: "Gowun Dodum", sans-serif; font-size: clamp(1.5rem, 5vw, 2.6rem); color: #f4e1bd; }

@media (max-width: 720px) {
  .story-flow { padding-inline: .65rem; }
  .panel { margin-bottom: 5rem; }
  .speech { width: calc(100% - 1rem); margin-top: 1rem; }
  .room-card ul { grid-template-columns: 1fr; }
  .profile.featured { grid-template-columns: 1fr; }
  .profile.featured .portrait-wrap { max-height: none; }
  .profile.featured img { min-height: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid img { aspect-ratio: auto; object-fit: contain; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel, .profile { animation: appear .7s both; animation-timeline: view(); animation-range: entry 8% cover 24%; }
  @keyframes appear { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
}
