@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600&display=swap');
footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
#room {
  filter: saturate(1.08) sepia(0.085) contrast(1.075) brightness(0.99);
}
#memory-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
#memory-grain > div {
  position: absolute;
  pointer-events: none;
}
.film-grain {
  inset: -64px;
  opacity: 0.23;
  mix-blend-mode: soft-light;
  background-size: 256px 256px;
  animation: film-grain-drift 0.8s steps(1, end) infinite;
}
.video-scanlines {
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(56, 35, 22, 0.13) 2px,
    rgba(56, 35, 22, 0.13) 3px
  );
  opacity: 0.36;
  mix-blend-mode: multiply;
}
.film-patina {
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 35%, rgba(68, 39, 19, 0.14) 100%),
    linear-gradient(105deg, rgba(227, 173, 95, 0.045), rgba(125, 154, 156, 0.035));
  animation: film-exposure 9s ease-in-out infinite;
}
.video-tracking {
  inset: 0;
  background: linear-gradient(transparent 48%, rgba(239, 221, 184, 0.11) 49.7%, transparent 50.1%);
  opacity: 0.12;
  animation: video-tracking 18s linear infinite;
}
@keyframes film-grain-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  12% {
    transform: translate(-23px, 17px);
  }
  25% {
    transform: translate(31px, -11px);
  }
  37% {
    transform: translate(-15px, -29px);
  }
  50% {
    transform: translate(19px, 32px);
  }
  62% {
    transform: translate(-37px, 8px);
  }
  75% {
    transform: translate(11px, -31px);
  }
  87% {
    transform: translate(29px, 13px);
  }
}
@keyframes film-exposure {
  0%,
  100% {
    opacity: 0.8;
  }
  32% {
    opacity: 1;
  }
  68% {
    opacity: 0.64;
  }
}
@keyframes video-tracking {
  from {
    transform: translateY(-65%);
  }
  to {
    transform: translateY(65%);
  }
}
@media (prefers-reduced-motion: reduce) {
  #memory-grain > div {
    animation: none !important;
  }
}

header,
nav,
.hint,
footer {
  z-index: 2;
}
#tooltip {
  z-index: 4;
}
#panel,
#error {
  z-index: 5;
}
#choices {
  flex-direction: column;
  flex-wrap: nowrap !important;
}
#choices > .episode-card {
  width: 100%;
}
.episode-card {
  padding: 8px 0 22px;
}
.episode-card + .episode-card {
  border-top: 1px solid #c9bda5;
  padding-top: 26px;
}
.episode-number {
  font: 11px system-ui;
  letter-spacing: 0.12em;
  color: #997c51;
}
.episode-quote {
  font-size: 22px;
  line-height: 1.9;
  margin: 14px 0;
}
.episode-original-title {
  font-size: 10px;
  color: #8d826f;
  line-height: 1.8;
}
.episode-summary {
  font-size: 13px;
  line-height: 2.1;
  white-space: pre-line;
}
.player-area {
  margin: 24px 0;
  padding: 18px 0;
  border-block: 1px solid #cbbfa8;
}
.play {
  padding: 12px 17px;
  background: #545e45;
  color: #fff9ee;
  font-size: 12px;
  border-radius: 2px;
}
.stop {
  padding: 12px;
  background: none;
  color: #535944;
}
.audio-note,
.source-note {
  font-size: 10px;
  line-height: 1.7;
  color: #8d826f;
}
.audio-time {
  font: 10px system-ui;
  color: #8d826f;
}
.full {
  color: #565c46;
  font-size: 13px;
  text-underline-offset: 5px;
}
:root {
  color-scheme: light;
  font-family: 'Noto Serif JP', serif;
  color: #efe5d3;
  background: #26241f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
#room,
canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
header {
  position: fixed;
  top: 36px;
  left: 40px;
  pointer-events: none;
  text-shadow: 0 2px 18px #0009;
}
h1 {
  font-weight: 400;
  font-size: 30px;
  line-height: 1.65;
  letter-spacing: 0.13em;
  margin: 15px 0 8px;
}
header p {
  font-size: 12px;
  letter-spacing: 0.15em;
}
.eyebrow {
  font:
    10px/1.6 system-ui,
    sans-serif;
  letter-spacing: 0.2em;
}
nav {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 6px;
  background: #292720dc;
  border: 1px solid #e7dcc335;
  border-radius: 40px;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
}
nav button {
  padding: 11px 22px;
  border-radius: 25px;
  color: #c7bda9;
  background: transparent;
  font-size: 12px;
}
nav button:hover,
nav button.active {
  color: #25271f;
  background: #ede4d2;
}
button:focus-visible,
a:focus-visible {
  outline: none;
}
.hint {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 8px #000;
}
footer {
  position: fixed;
  bottom: 12px;
  right: 20px;
  color: #d1c7b488;
  font: 10px system-ui;
}
#tooltip {
  position: fixed;
  display: none;
  padding: 8px 13px;
  background: #fff3deed;
  color: #3e3a31;
  font-size: 12px;
  border-radius: 3px;
  pointer-events: none;
}
aside {
  position: fixed;
  right: 22px;
  top: 22px;
  bottom: 22px;
  width: 390px;
  max-width: calc(100vw - 28px);
  padding: 42px 30px;
  overflow: auto;
  background: #f3ecddf5;
  color: #36382f;
  box-shadow: 0 20px 70px #0005;
  backdrop-filter: blur(22px);
  border-radius: 4px;
}
aside[hidden] {
  display: none;
}
#close {
  position: absolute;
  right: 16px;
  top: 10px;
  font: 30px system-ui;
  background: none;
  color: #494538;
}
h2 {
  font-size: 25px;
  margin: 16px 0 26px;
  font-weight: 400;
}
h3 {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
}
.progress {
  height: 2px;
  background: #d7cdb8;
  margin-top: 16px;
}
.progress span {
  display: block;
  height: 100%;
  background: #6c7657;
  width: 0;
}
#error {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translateX(-50%);
  width: min(440px, 90vw);
  background: #f3ecdd;
  color: #333;
  padding: 20px;
}
#error[hidden] {
  display: none;
}
@media (max-width: 650px) {
  header {
    top: 22px;
    left: 22px;
  }
  h1 {
    font-size: 21px;
  }
  header p {
    font-size: 10px;
  }
  nav {
    bottom: 25px;
    gap: 0;
    width: max-content;
    max-width: 96vw;
  }
  nav button {
    padding: 11px 13px;
    font-size: 11px;
  }
  .hint {
    bottom: 90px;
    font-size: 11px;
  }
  aside {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
    height: 58vh;
    border-radius: 14px 14px 0 0;
    padding: 32px 24px;
  }
  h2 {
    margin: 12px 0 16px;
  }
  footer {
    font-size: 9px;
    bottom: 5px;
  }
}

#shelf-pages {
  position: fixed;
  left: 50%;
  bottom: 151px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: #292720dc;
  border: 1px solid #e7dcc335;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
}
#shelf-pages[hidden] {
  display: none;
}
#shelf-pages button {
  color: #e9dfcb;
  background: none;
  padding: 6px;
  font-size: 12px;
}
#shelf-pages button:disabled {
  opacity: 0.35;
  cursor: default;
}
@media (max-width: 650px) {
  #shelf-pages {
    bottom: 126px;
    gap: 6px;
    font-size: 11px;
  }
  #shelf-pages button {
    font-size: 11px;
    padding: 4px;
  }
}

.hint {
  pointer-events: none;
}
.episode-published {
  display: block;
  font: 11px/1.5 system-ui;
  letter-spacing: 0;
  color: #756b5b;
  margin: 5px 0 10px;
}
.summary-label {
  display: block;
  margin-top: 14px;
  font: 11px/1.5 system-ui;
  letter-spacing: 0.08em;
  color: #997c51;
}

.play:disabled {
  opacity: 0.5;
  cursor: default;
}
.full {
  display: inline-block;
}
.full:not([href]) {
  display: none;
}
.open-book {
  background: transparent;
  color: #565c46;
  padding: 8px 0;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.player-area button,
.terminal-playback button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.player-area button svg,
.terminal-playback button svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.object-picker {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
  font-size: 13px;
}
.object-picker select {
  width: 100%;
  font: inherit;
  padding: 10px;
  color: #36382f;
  background: #f3ecdd;
  border: 1px solid #c9bda5;
}
select:focus-visible,
#panel:focus-visible {
  outline: none;
}
.page-inactive #memory-grain > div {
  animation-play-state: paused;
}
