@font-face {
  font-family: "Arcadia Myeongjo";
  src: url("noto-serif-kr-regular.woff") format("woff");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Arcadia Myeongjo";
  src: url("noto-serif-kr-bold.woff") format("woff");
  font-weight: 600 900;
  font-display: swap;
}
:root {
      color-scheme: dark;
      --night: #090b19;
      --night-deep: #060712;
      --lavender: #d6c2f0;
      --muted: #aca4bd;
      --gold: #e3cfa8;
      --hairline: rgba(221, 204, 244, .18);
      --font-ko: "Arcadia Myeongjo", "Noto Serif KR", "Nanum Myeongjo", "Malgun Gothic", serif;
      --font-en: "Cormorant Garamond", Garamond, Georgia, serif;
    }
    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body { margin: 0; background: var(--night); color: #ede8f4; font-family: var(--font-ko); overflow-x: hidden; isolation: isolate; }
    ::selection { color: #fff; background: #7050a9; }
    a { color: inherit; }
    button { font: inherit; }

    /* 밤의 서고와 어울리는 어두운 남보라 하늘. 외부 배경 이미지 없이 표현합니다. */
    .night-sky, .night-stars, .night-glow { position: fixed; inset: 0; pointer-events: none; }
    .night-sky {
      z-index: -5;
      background:
        radial-gradient(ellipse 64% 48% at 50% -14%, rgba(78,57,120,.38), transparent 82%),
        radial-gradient(ellipse 42% 54% at 0% 61%, rgba(38,40,88,.32), transparent 100%),
        radial-gradient(ellipse 50% 70% at 100% 78%, rgba(71,42,92,.24), transparent 90%),
        linear-gradient(110deg, #070916 0%, #111023 47%, #080a17 100%);
    }
    .night-stars {
      z-index: -4;
      opacity: .67;
      background-image:
        radial-gradient(circle at 12% 14%, rgba(242,228,255,.83) 0 1px, transparent 1.7px),
        radial-gradient(circle at 80% 25%, rgba(215,216,255,.63) 0 .8px, transparent 1.5px),
        radial-gradient(circle at 43% 84%, rgba(237,207,255,.62) 0 1px, transparent 1.8px),
        radial-gradient(circle at 71% 69%, rgba(248,231,198,.52) 0 .8px, transparent 1.5px),
        radial-gradient(circle at 29% 54%, rgba(242,228,255,.48) 0 .7px, transparent 1.4px);
      background-size: 420px 430px, 510px 490px, 380px 560px, 620px 530px, 690px 550px;
      animation: star-breathe 12s ease-in-out infinite alternate;
    }
    .night-glow {
      z-index: -3;
      background:
        radial-gradient(ellipse 18% 32% at 3% 25%, rgba(112,85,161,.09), transparent 100%),
        radial-gradient(ellipse 23% 28% at 95% 65%, rgba(92,69,154,.11), transparent 100%);
      filter: blur(34px);
      animation: glow-breathe 15s ease-in-out infinite alternate;
    }
    @keyframes star-breathe { from { opacity: .32; } to { opacity: .68; } }
    @keyframes glow-breathe { from { transform: translateY(-12px); } to { transform: translateY(22px); } }

    .reading-progress {
      position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100;
      background: linear-gradient(90deg, #b9a1dc, #ead5b0, #b6a2ee);
      transform: scaleX(0); transform-origin: left center; pointer-events: none;
      box-shadow: 0 0 15px rgba(214,194,240,.7);
    }
    .site-header {
      height: 66px; padding: 0 clamp(20px, 4vw, 64px);
      position: relative; z-index: 10;
      display: flex; align-items: center; justify-content: space-between;
      border-bottom: 1px solid rgba(226,211,250,.12);
      background: rgba(10,10,25,.34);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
    .brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-en); font-weight: 600; font-size: 18px; letter-spacing: .19em; text-decoration: none; color: #eadbc7; }
    .brand-symbol { color: #c6a4e6; font-size: 18px; }
    .header-note { color: #b0a6c0; font-family: var(--font-en); font-size: 12px; letter-spacing: .2em; }

    .hero {
      min-height: min(760px, 92svh);
      padding: 96px 24px 110px;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      text-align: center; position: relative;
    }
    .hero::after {
      content: ""; position: absolute; bottom: 0; left: 50%; width: min(470px, 75vw); height: 1px;
      background: linear-gradient(90deg, transparent, rgba(227,207,168,.38), transparent); transform: translateX(-50%);
    }
    .crest { width: 112px; height: 112px; border: 1px solid rgba(203,174,234,.28); border-radius: 50%; display: grid; place-items: center; position: relative; margin-bottom: 45px; box-shadow: 0 0 75px rgba(101,74,163,.18), inset 0 0 45px rgba(137,101,188,.08); }
    .crest::before, .crest::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(221,201,244,.18); border-radius: 50%; }
    .crest::after { inset: -13px; border-style: dashed; border-color: rgba(221,201,244,.17); animation: orbit 45s linear infinite; }
    @keyframes orbit { to { transform: rotate(360deg); } }
    .crest-moon { color: #ead4fb; font-family: Georgia, serif; font-size: 62px; line-height: 1; transform: rotate(-23deg); text-shadow: 0 0 28px rgba(191,151,240,.38); }
    .eyebrow { color: #c1b0d3; font-family: var(--font-en); font-size: 13px; letter-spacing: .31em; margin: 0 0 23px; }
    h1 { font-family: var(--font-ko); margin: 0; color: #f4edf7; font-size: clamp(38px, 6.4vw, 68px); font-weight: 600; line-height: 1.55; letter-spacing: -.055em; text-shadow: 0 8px 38px rgba(0,0,0,.35); }
    h1 em { font-style: normal; color: #dec2fa; text-shadow: 0 0 32px rgba(176,130,223,.26); }
    .hero-rule { display: flex; align-items: center; gap: 15px; margin: 28px 0 24px; color: #d4bdea; font-size: 15px; }
    .hero-rule::before, .hero-rule::after { content: ""; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, rgba(221,202,242,.52)); }
    .hero-rule::after { transform: rotate(180deg); }
    .hero-desc { margin: 0; color: #c1b7cb; font-size: 13px; line-height: 2.1; font-weight: 400; letter-spacing: .05em; }
    .read-cta { display: inline-flex; align-items: center; gap: 18px; margin-top: 41px; padding: 16px 25px; border: 1px solid rgba(218,192,235,.42); background: linear-gradient(145deg, rgba(120,92,159,.24), rgba(74,64,120,.09)); color: #f4e9ff; border-radius: 2px; font-size: 12px; letter-spacing: .1em; text-decoration: none; transition: border-color .2s, background .2s, transform .2s; }
    .read-cta:hover, .read-cta:focus-visible { border-color: #e1c9fa; background: rgba(141,99,198,.27); transform: translateY(-2px); }
    .read-cta span { color: #d1b3ef; font-size: 17px; }
    .hero-foot { position: absolute; bottom: 49px; color: rgba(199,188,215,.62); font-family: var(--font-en); font-size: 12px; letter-spacing: .19em; }

    .story-region { padding: 66px 20px 120px; position: relative; }
    .story-intro { text-align: center; margin: 0 auto 42px; }
    .story-kicker { display: block; margin-bottom: 12px; color: #ceb6ed; font-family: var(--font-en); letter-spacing: .24em; font-size: 15px; }
    .story-heading { margin: 0; font-size: 17px; color: #eddfeb; letter-spacing: .03em; font-weight: 400; }
    .story-caption { margin: 12px 0 0; color: #9f96ae; font-size: 12px; letter-spacing: .06em; }
    .comic-frame {
      position: relative; z-index: 1; width: min(100%, 52rem); margin: 0 auto; background: #000;
      border: 1px solid rgba(224,209,245,.12);
      box-shadow: 0 14px 70px rgba(0,0,0,.68), 0 0 135px rgba(77,51,115,.13);
      overflow: hidden;
    }
    .comic-frame img { display: block; width: 100%; height: auto; border: 0; margin: 0; padding: 0; }
    .comic-page { display: block; cursor: zoom-in; }
    .comic-page:focus-visible { outline: 3px solid var(--lavender); outline-offset: -3px; }
    .side-script { position: fixed; z-index: 0; top: 56%; color: rgba(209,181,229,.3); font-family: var(--font-en); font-size: 12px; letter-spacing: .35em; pointer-events: none; writing-mode: vertical-rl; }
    .side-script.left { left: clamp(25px, 8vw, 140px); transform: rotate(180deg); }
    .side-script.right { right: clamp(25px, 8vw, 140px); }
    .story-finish { max-width: 560px; margin: 0 auto; padding: 74px 20px 0; text-align: center; }
    .finish-decoration { color: #d1b1ec; font-size: 26px; display: block; margin-bottom: 22px; }
    .finish-title { margin: 0; font-size: 17px; font-weight: 400; color: #ebdff2; }
    .finish-description { color: #aaa0b6; font-size: 12px; line-height: 2; margin: 15px 0 0; }
    .finish-line { width: 68px; height: 1px; margin: 36px auto 0; background: #6f6082; }
    .footer { border-top: 1px solid rgba(225,209,242,.13); min-height: 110px; padding: 30px clamp(22px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 25px; background: rgba(8,8,21,.33); }
    .footer-mark { font-family: var(--font-en); color: #bdb2ca; font-size: 12px; letter-spacing: .17em; }
    .footer-links { display: flex; gap: 25px; flex-wrap: wrap; }
    .footer-links a { color: #d2c3df; text-decoration: none; font-size: 11px; letter-spacing: .02em; border-bottom: 1px solid rgba(225,203,248,.3); padding-bottom: 4px; transition: color .2s; }
    .footer-links a:hover { color: #fff; }

    .bgm-toggle {
      position: fixed; bottom: max(23px, env(safe-area-inset-bottom) + 15px); right: max(22px, env(safe-area-inset-right) + 15px); z-index: 80;
      min-width: 132px; height: 49px; padding: 0 15px 0 13px; display: inline-flex; justify-content: center; align-items: center; gap: 11px;
      border: 1px solid rgba(225,207,245,.32); border-radius: 99px; background: rgba(27,21,47,.91);
      backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); color: #e9dff1;
      box-shadow: 0 8px 35px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.06);
      cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
    }
    .bgm-toggle:hover { border-color: rgba(235,212,254,.72); background: rgba(49,31,75,.96); transform: translateY(-2px); }
    .bgm-toggle:focus-visible, a:focus-visible { outline: 2px solid #d0a8ee; outline-offset: 4px; }
    .bgm-toggle[data-playing="true"] { border-color: rgba(213,171,254,.68); background: rgba(64,38,89,.94); box-shadow: 0 9px 37px rgba(0,0,0,.48), 0 0 35px rgba(133,83,177,.16); }
    .speaker { width: 19px; height: 19px; display: block; fill: none; stroke: #d9c8ed; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
    .speaker .sound-waves { display: none; }
    .bgm-toggle[data-playing="true"] .speaker .sound-waves { display: initial; }
    .bgm-toggle[data-playing="true"] .speaker .sound-cross { display: none; }
    .bgm-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
    .bgm-title { font-family: var(--font-en); font-size: 11px; font-weight: 600; letter-spacing: .17em; line-height: 1; }
    .bgm-state { font-family: var(--font-ko); color: #b7a6c5; font-size: 10px; line-height: 1.35; letter-spacing: .01em; }
    .bgm-toggle[data-playing="true"] .bgm-state { color: #edd8ff; }

    @media (max-width: 820px) {
      .side-script { display: none; }
      .site-header { height: 59px; }
      .header-note { font-size: 10px; letter-spacing: .08em; }
      .hero { min-height: 80svh; padding: 95px 22px 105px; }
      .crest { width: 91px; height: 91px; margin-bottom: 37px; }
      .crest-moon { font-size: 51px; }
      .story-region { padding: 58px 10px 100px; }
    }
    @media (max-width: 520px) {
      .site-header { padding: 0 16px; }
      .brand { font-size: 14px; gap: 7px; }
      .header-note { font-size: 9px; }
      .hero { min-height: 81svh; }
      .eyebrow { font-size: 11px; letter-spacing: .22em; }
      .hero-desc { font-size: 12px; }
      .story-region { padding: 53px 0 80px; }
      .comic-frame { border-left: none; border-right: none; }
      .story-intro { margin-bottom: 30px; padding: 0 18px; }
      .story-heading { font-size: 15px; }
      .footer { justify-content: center; text-align: center; padding-bottom: 95px; }
      .bgm-toggle { bottom: max(16px, env(safe-area-inset-bottom) + 12px); right: max(15px, env(safe-area-inset-right) + 12px); min-width: 122px; height: 47px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
    }
/* Keep the original type hierarchy legible on narrow as well as large screens. */
.hero-desc, .read-cta, .story-caption, .finish-description {
  font-size: 1rem;
}
.hero-desc, .finish-description { word-break: keep-all; }
.story-heading { font-size: clamp(1.25rem, 2.6vw, 1.5rem); }
.read-cta { min-height: 48px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.bgm-title { font-size: .8125rem; }
.bgm-state { font-size: .8125rem; }
.bgm-text { gap: 3px; }
.story-region:focus { outline: none; }
.story-caption { word-break: keep-all; line-height: 1.65; }
html.viewing-original { overflow: hidden; }
.zoom-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #f1eaf7;
  background: #080914;
}
.zoom-dialog:not([open]) { display: none; }
.zoom-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.zoom-dialog::backdrop { background: #080914; }
.zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 4px max(18px, env(safe-area-inset-left));
  background: #151222;
}
.zoom-toolbar h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.zoom-toolbar h2 span { margin-left: .5rem; color: var(--lavender); font: .875rem system-ui, sans-serif; }
.zoom-toolbar button {
  min-width: 64px;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid #695873;
  border-radius: 6px;
  color: inherit;
  background: #292235;
  cursor: pointer;
}
.zoom-toolbar button:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; }
.zoom-hint {
  margin: 0;
  padding: 0 max(18px, env(safe-area-inset-right)) 9px max(18px, env(safe-area-inset-left));
  font-size: .875rem;
  color: #d6cbdc;
  background: #151222;
}
.zoom-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
  background: #000;
}
.zoom-viewport:focus-visible { outline: 2px solid var(--lavender); outline-offset: -2px; }
.zoom-viewport img { display: block; max-width: none; margin-inline: auto; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .zoom-viewport img { cursor: grab; }
  .zoom-viewport img:active { cursor: grabbing; }
}
@media (max-width: 520px) {
  .header-note { font-size: .75rem; letter-spacing: .04em; }
  .eyebrow { font-size: .75rem; }
  .hero { padding-bottom: 118px; }
  .hero-foot { font-size: .75rem; letter-spacing: .12em; }
}
