:root {
  font-family: "Nanum Myeongjo", "Apple SD Gothic Neo", "Noto Serif KR", serif;
  color: #292820;
  background: #eee5d5;
  color-scheme: light;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-width: 280px; min-height: 100%; }
body { background: #eee5d5; overflow-x: clip; }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #934b36; outline-offset: 3px;
}
button:disabled { cursor: default; }
.cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  min-height: 100dvh;
  background: #ece1cf;
}
.cover-art {
  position: absolute;
  display: block;
  max-width: none;
  border: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}
.cover-action {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: #231f19;
  outline-offset: -2px;
  touch-action: manipulation;
}
.cover-action img {
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  user-select: none;
}
.cover-action .cover-fallback { display: none; font-weight: 700; font-size: 1.3rem; }
.cover-action.art-missing .cover-fallback { display: block; }
.cover-action.art-missing img { display: none; }
.more {
  position: absolute;
  z-index: 10;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  border: 0;
  background: rgba(238,229,213,.83);
  color: #322a20;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}
.settings-sheet {
  position: absolute;
  z-index: 12;
  top: calc(60px + env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #eee5d5;
  border: 1px solid rgba(61,51,38,.25);
}
.settings-sheet[hidden] { display: none; }
.settings-sheet button {
  border: 0; background: transparent;
  color: #30271c; min-width: 48px; min-height: 48px;
  padding: 9px;
}
.settings-sheet button[aria-pressed="true"] {
  box-shadow: inset 0 -2px #9e4133;
}
.reader {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #eee5d5;
  padding:
    calc(80px + env(safe-area-inset-top))
    clamp(16px,5vw,56px)
    calc(84px + env(safe-area-inset-bottom));
}
.reader-nav {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 4;
}
.reader-nav button {
  width: 48px; height: 48px; padding: 0;
  border: 0; color: #3a322a; background: transparent;
  font-size: 26px;
}
.reader-inner {
  position: relative;
  z-index: 2;
  max-width: 690px;
  margin: 0 auto;
  min-height: 72dvh;
}
.reader-title {
  max-width: min(72vw,370px);
  max-height: 64px;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.reader-hanja {
  font-weight: 600; font-size: clamp(24px,6.5vw,38px);
  writing-mode: vertical-rl;
  text-orientation: upright;
  position: absolute; right: clamp(4px,4vw,28px); top: 58px;
  margin: 0; letter-spacing: .13em;
}
.reader-art {
  display: block; position: absolute; top: 122px; right: -15%;
  width: min(125%, 890px);
  height: auto;
  opacity: .12;
  object-fit: contain;
  pointer-events: none;
  z-index: -1;
}
.reader-controls {
  position: relative;
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 10px;
  margin-top: 38px;
}
.reader-controls label { display: inline-flex; align-items: center; gap: 9px; }
.reader-controls input, .reader-controls select {
  min-height: 48px;
  max-width: 190px;
  border: 0;
  border-bottom: 1px solid #a19887;
  background: transparent;
  padding: 6px 4px;
  color: #24221d;
}
.reader-controls button {
  border: 0;
  color: #292820; background: transparent;
  min-height: 48px; min-width: 48px;
  font-size: 21px;
}
.reader-copy {
  margin-top: clamp(82px,18vh,180px);
  max-width: 33em;
  font-size: clamp(16px,3.6vw,19px);
  line-height: 1.95;
  word-break: keep-all;
}
.reader-copy p { margin: 0 0 1.4em; }
.reader-note { font-size: .89rem; line-height: 1.7; opacity: .72; }
.reader-month-name { margin: 0 0 26px; font-weight: 500; font-size: 1.45rem; }
@media (max-width: 360px) {
  .reader { padding-left: 16px; padding-right: 16px; }
  .reader-controls { gap: 4px; }
  .reader-controls input { max-width: 148px; }
}
@media (prefers-reduced-motion: no-preference) {
  .reader-art { transition: opacity 180ms ease; }
}
@media (orientation: landscape) and (max-height: 600px) {
  /* Browser can reflow; this does NOT assert native Android portrait. */
  .reader { padding-top: 72px; }
  .reader-copy { margin-top: 50px; }
}

/* Pure document typography: no synthetic cards or detached art panels. */
.canonical-reading {
  margin-top: 1.6em;
}
.reader-subheading {
  font-size: clamp(19px, 4.6vw, 24px);
  font-weight: 600;
  line-height: 1.55;
  margin: 2em 0 .8em;
}
.reader-source {
  white-space: pre-line;
  line-height: 1.9;
  color: #504b42;
  padding-inline-start: .25em;
  font-size: clamp(16px, 3.5vw, 19px);
}


/* CBTOK desktop landscape from 900px: keep phone/tablet portrait art untouched.
   Approved mobile 941x1672 hero and its pixel geometry are untouched. */
.desktop-title, .desktop-ink { display: none; }
@media (min-width: 900px) and (orientation: landscape) {
  :root { background: #fbfaf6; }
  body { background: #fbfaf6; }
  .cover {
    height: 100dvh; min-height: 680px;
    background: #fbfaf6;
  }
  .cover-art { display: none; }
  .desktop-ink {
    position: absolute; display: block; z-index: 1;
    right: -5vw; top: 2%;
    width: min(72vw, 1040px); height: auto; opacity: .57;
    pointer-events: none; user-select: none;
  }
  .desktop-title {
    position: absolute; display: flex; z-index: 2;
    top: 16%; right: clamp(8%, 12vw, 15%);
    align-items: flex-start;
    gap: clamp(16px, 2vw, 32px);
    color: #201c18;
  }
  .desktop-title-hanja {
    font-family: "Nanum Myeongjo", "Noto Serif CJK KR", serif;
    writing-mode: vertical-rl; text-orientation: upright;
    font-size: clamp(58px, 5.4vw, 82px);
    font-weight: 750; letter-spacing: .18em; line-height: 1.05;
  }
  .desktop-title-ko {
    writing-mode: vertical-rl; text-orientation: upright;
    font-size: 19px; line-height: 1.45;
    letter-spacing: .5em; padding-top: 8px;
  }
  /* English needs a horizontal two-line title, not vertical Latin glyphs. */
  .desktop-title[data-locale="en"] {
    top: 8%;
    right: clamp(11%, 15vw, 19%);
  }
  .desktop-title[data-locale="en"] .desktop-title-hanja {
    font-size: clamp(50px, 4.6vw, 68px);
    letter-spacing: .15em;
  }
  .desktop-title[data-locale="en"] .desktop-title-ko {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: pre-line;
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(21px, 2.15vw, 29px);
    line-height: 1.38;
    letter-spacing: .035em;
    min-width: 170px;
    padding-top: 6px;
  }
  .desktop-title[data-locale="en"] .desktop-seal {
    position: absolute;
    left: -67px;
    top: calc(100% + 8px);
    margin: 0;
  }
  .desktop-seal {
    align-self: flex-end; margin-left: -58px; margin-bottom: -75px;
    display: flex; align-items: center; justify-content: center;
    width: 45px; height: 45px;
    font-size: 18px; font-weight: 700; writing-mode: vertical-rl;
    border: 3px solid #a34534; color: #a34534; letter-spacing: .05em;
  }
  .cover-action {
    position: absolute; top: 52%;
    left: clamp(140px, 18.5vw, 355px);
    height: 76px; width: 320px; padding: 0; z-index: 3;
  }
  .cover-action[data-service="tojeong"] { top: 66%; }
  .cover-action img { width: 292px; max-height: 86px; height: auto; }
  .cover-action:hover { transform: translateX(6px); }
  .cover-action:focus-visible { outline-offset: 10px; }
  .more { background: transparent; right: 3%; top: 4%; }
  .settings-sheet { background: #fbfaf6; }
  .reader { background: #fbfaf6; padding-top: max(84px, 10vh); }
  .reader-inner { max-width: min(76vw, 960px); }
  .reader-title { max-width: 360px; }
  .reader-copy { max-width: 670px; margin-top: clamp(70px,10vh,126px); }
  .reader-art { right: -8vw; opacity: .21; }
}
.daily-reading { margin-top: 1.8rem; }
.daily-area { margin-bottom: 2.7rem; }
.daily-area .reader-subheading { margin: 1.8rem 0 .6rem; }
