@font-face {
  font-family: "Otaru Diary Serif";
  src: url("fonts/otaru-diary-serif-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #121b26;
  --panel: #1b2938;
  --panel-soft: #233648;
  --line: #3a4b59;
  --snow: #f5f3ed;
  --mist: #b9c7d1;
  --amber: #e4bf8d;
  --amber-dark: #3c3027;
  --photo-mat: #0d1621;
  --paper: #f1e8d7;
  --paper-text: #312a25;
  --paper-edge: #c3ab86;
  --paper-muted: #745a43;
  --heading: "Otaru Diary Serif", "Nanum Myeongjo", Batang, serif;
  --text: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", system-ui, sans-serif;
  --album-page-width: 1360px;
  --album-gutter: clamp(12px, 2vw, 24px);
  --album-inline-start: max(var(--album-gutter), env(safe-area-inset-left, 0px));
  --album-inline-end: max(var(--album-gutter), env(safe-area-inset-right, 0px));
  --album-inline-center: calc((100% - var(--album-page-width)) / 2);
}

.site-main:has(#experience:not([hidden])) {
  width: auto;
  padding-block-end: 0;
  margin-inline:
    max(var(--album-inline-start), var(--album-inline-center))
    max(var(--album-inline-end), var(--album-inline-center));
}

.experience {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

.experience-head {
  flex: none;
  border-color: var(--line);
}

.experience .reading-page {
  display: grid;
  flex: 1 0 auto;
  align-content: center;
  min-inline-size: 0;
}

.scene-frame:has(.scene-art:not([hidden])) {
  inline-size: fit-content;
  max-inline-size: 100%;
  margin-inline: auto;
}

.experience .scene-frame {
  --scene-photo-reserve: 234px;
}

.experience .scene-frame:has(.airport-dialogue:not([hidden])) {
  --scene-photo-reserve: 310px;
}

.experience .scene-frame:has(.inline-activity:not([hidden])) {
  --scene-photo-reserve: 322px;
}

.experience .scene-frame:has(.memory-speaker:not([hidden])) {
  --scene-photo-reserve: 350px;
}

.scene-frame:has(.airport-dialogue:not([hidden]), .memory-speaker:not([hidden])) .scene-content h2 {
  font-size: clamp(1.23rem, 2.15vw, 1.85rem);
}

.experience .scene-art {
  inline-size: fit-content;
  max-inline-size: 100%;
  margin-inline: auto;
}

.scene-art {
  border-color: var(--line);
  background: var(--photo-mat);
}

.experience .scene-art .scene-image {
  width: auto;
  height: auto;
  max-height: min(860px, max(180px, calc(100dvh - var(--scene-photo-reserve))));
  aspect-ratio: auto 16 / 9;
  object-fit: contain;
}

.cover h1,
.scene-content h2,
.journal-entry h2,
.modal-head h2 {
  letter-spacing: -0.04em;
}

.scene-meta,
.airport-speaker,
.memory-speaker {
  color: var(--amber);
}

.scene-frame:has(.airport-dialogue:not([hidden]), .memory-speaker:not([hidden])) .scene-meta {
  color: var(--mist);
}

.scene-caption {
  color: var(--mist);
}

.button-primary:not(:disabled):hover {
  border-color: #f4d5a7;
  background: #f4d5a7;
}

.modal {
  border-color: var(--line);
}

.modal::backdrop {
  background: #0d1621db;
}

.journal-entry-paper {
  border-color: var(--paper-edge);
  color: var(--paper-text);
  background-color: var(--paper);
}

.ink-line {
  color: var(--paper-text);
}

@media (max-width: 560px) {
  :root {
    --album-gutter: 8px;
  }

  .experience .scene-art .scene-image {
    max-height: 68dvh;
  }

}

@media (max-height: 560px) and (orientation: landscape) {
  .experience .scene-art .scene-image {
    max-height: 67dvh;
  }
}
