@font-face {
  font-family: 'ChosunIlboMyungjo';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/Chosunilbo_myungjo.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}
:root { color-scheme: dark; --accent: #A08436; --fade: 900ms; }
html, body { margin: 0; padding: 0; background: #2B2622; -webkit-tap-highlight-color: transparent; }
#reader {
  position: relative;
  min-height: 100dvh;
  background: #2B2622;
  color: #F2ECE0;
  font-family: 'ChosunIlboMyungjo', serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  outline: none;
}
#reader:focus-visible { outline: 1px solid var(--accent); outline-offset: -4px; }
#passage {
  max-width: 340px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--fade) ease;
}
#quote {
  margin: 0;
  font-size: 22px;
  line-height: 1.85;
  letter-spacing: -0.01em;
  white-space: pre-line;
  word-break: keep-all;
  text-wrap: pretty;
}
#source { font-size: 13px; letter-spacing: 0.2em; color: var(--accent); }
#toast {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(48px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}
#toast.visible { opacity: 1; transform: translateY(0); }
#intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #2B2622;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--fade) ease;
}
#intro h1 {
  margin: 0;
  padding-left: 0.3em;
  font-family: 'ChosunIlboMyungjo', serif;
  font-weight: normal;
  font-size: 30px;
  letter-spacing: 0.3em;
  color: #F2ECE0;
  opacity: 0;
  transition: opacity var(--fade) ease;
}
#intro.show h1 { opacity: 1; }
#intro.leave { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  #passage, #toast, #intro, #intro h1 { transition: none; }
}
