/* painted edition: serif titles and a handwritten journal, as in the reference art */
body, #ui { font-family: 'Nunito Sans', system-ui, sans-serif; }
#title h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: calc(var(--px) * 34); letter-spacing: 0; }
#title .sub, #title .start, #hint, #journalBtn, #prompt .key, #dialog .name, #jCount { font-family: 'Nunito Sans', system-ui, sans-serif !important; font-weight: 600; }
#prompt .key { text-shadow: none; line-height: 1; }
#title .tag { font-family: 'Cormorant Garamond', Georgia, serif; font-size: calc(var(--px) * 9); line-height: 1.3; }
#dialog { font-family: 'Nunito Sans', system-ui, sans-serif; border-radius: calc(var(--px) * 2); }
#dialog.narrate { font-family: 'Cormorant Garamond', Georgia, serif; font-size: calc(var(--px) * 8.5); }
.toast { border-radius: calc(var(--px) * 1.5); }
.page h2, .page h3, #jNote, #jList li { font-family: 'Caveat', cursive; }
.page h2, .page h3 { font-size: calc(var(--px) * 12); }
#jNote, #jList li { font-size: calc(var(--px) * 8.5); }
#jSketch { image-rendering: auto; }
.tabs button { font-family: 'Caveat', cursive !important; font-size: calc(var(--px) * 8) !important; border-radius: 0 calc(var(--px) * 2) calc(var(--px) * 2) 0; }

/* A quiet cue appears only over the thing the player is looking at. */
#discoveryFocus { position: absolute; box-sizing: border-box; border: 1px solid rgba(255,207,114,.65);
  border-radius: 5px; background: rgba(255,207,114,.035); box-shadow: 0 0 20px rgba(255,207,114,.12);
  pointer-events: none; }
.discovery-label { position: absolute; bottom: calc(100% + 8px); left: 0; box-sizing: border-box;
  width: max-content; max-width: min(280px, 65vw); padding: 8px 12px; border: 1px solid #846b47;
  border-radius: 4px; background: rgba(15,22,30,.94); color: var(--paper); line-height: 1.4;
  font-size: clamp(11px, 1.1vw, 15px); box-shadow: 0 3px 12px #0006; }
.discovery-label strong, .discovery-label span { display: block; }
.discovery-label strong { font-weight: 600; }
.discovery-label.below { bottom: auto; top: calc(100% + 8px); }
.discovery-label span { color: #e1b97a; font-size: .85em; margin-top: 2px; }

/* Little Wanderings: the journal becomes a shelf of walks. */
#title { box-sizing: border-box; overflow-y: auto; cursor: default; padding: clamp(24px, 5vw, 72px); background: linear-gradient(90deg, #07131aef, #07131ab8 35%, #07131a00 78%); }
#title h1 { font-size: clamp(38px, 7vw, 92px); line-height: .9; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 14px; font-size: clamp(10px, 1vw, 13px); letter-spacing: .16em; text-transform: uppercase; }
#title .eyebrow { color: #d0b583; }
#title .sprig { font-size: clamp(15px, 2vw, 25px); margin: 18px 0; color: #c9a670; }
#title .intro-chapter { font-size: clamp(13px, 1.5vw, 20px); margin: 0 0 10px; }
#title .tag { max-width: 370px; font-size: clamp(16px, 1.8vw, 23px); line-height: 1.4; margin: 0; }
.intro-actions, .recap-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.paper-button, .quiet-button { font-family: 'Nunito Sans', sans-serif !important; font-size: clamp(12px, 1.1vw, 15px) !important; padding: 11px 18px; border-radius: 4px; }
.paper-button { background: #eadcbd; border: 1px solid #c1a87c; color: #283c3a; box-shadow: 0 3px 9px #0002; }
.paper-button:hover { background: #fff1d3; }
.quiet-button { color: inherit; border: 1px solid currentColor; background: transparent; opacity: .8; }
.quiet-button:hover { opacity: 1; }
.intro-controls { margin-top: 16px; color: #a8b5b6; font-size: clamp(9px, .95vw, 12px); }
#walkHud { position: absolute; top: calc(var(--px) * 8); left: calc(var(--px) * 8); display: flex; align-items: center; gap: 13px; }
#walksBtn { border: 1px solid #7c817b; background: #101b25ba; color: #efe3c6; border-radius: 3px; padding: 7px 13px; font-size: clamp(11px, 1vw, 14px) !important; }
#chapterName { font-size: clamp(10px, 1vw, 14px); color: #dfd6c2; text-shadow: 0 1px 4px #000; }
#toasts { top: calc(var(--px) * 27); }
#finishWalk { position: absolute; right: 24px; bottom: 24px; padding: 12px 20px; border: 1px solid #e1ca99; border-radius: 4px; background: #e8d9b9; color: #233d3b; font-size: 14px !important; box-shadow: 0 3px 16px #0005; }
#finishWalk span { margin-left: 16px; }
.chapter-overlay { position: absolute; inset: 0; display: grid; place-items: center; z-index: 15; pointer-events: auto; background: #08121dba; backdrop-filter: blur(5px); }
.walk-book { position: relative; box-sizing: border-box; width: min(1060px, calc(100% - 48px)); max-height: calc(100% - 36px); overflow: auto; padding: clamp(20px, 3vw, 42px); border: 1px solid #b29b73; border-radius: 8px; background: #eee3cb; color: #2e3e3c; box-shadow: 0 16px 70px #0007; }
.walk-book h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(25px, 3.3vw, 46px); font-weight: 500; line-height: 1.05; margin: 0 0 12px; }
.walk-book .eyebrow { color: #8c7250; }
.walk-intro { font-size: clamp(12px, 1.2vw, 15px); line-height: 1.5; margin: 0 0 24px; }
.close-book { position: absolute; right: 12px; top: 8px; border: none; background: transparent; color: #675744; width: 32px; height: 32px; font-size: 27px !important; z-index: 2; }
#chapterCards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.chapter-card { display: block; text-align: left; color: #293e3c; border: 1px solid #baa989; border-radius: 5px; overflow: hidden; padding: 0; background: #f5ecd9; transition: transform .2s, border-color .2s; min-width: 0; }
.chapter-card:hover, .chapter-card:focus-visible { border-color: #476b62; transform: translateY(-3px); }
.chapter-card img { display: block; width: 100%; aspect-ratio: 1.7; object-fit: cover; }
.chapter-card .card-copy { display: block; padding: 16px; }
.chapter-card small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #866d48; }
.chapter-card strong { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(20px, 2vw, 28px); font-weight: 600; line-height: 1.05; margin: 9px 0; }
.chapter-card .card-mood { display: block; font-size: 11px; line-height: 1.5; color: #66716b; min-height: 34px; }
.chapter-card .card-status { display: block; font-size: 11px; color: #416259; margin-top: 14px; }
.save-hint { margin: 22px 0 0; font-size: 11px; line-height: 1.5; color: #82765f; }
.recap-book { width: min(740px, calc(100% - 48px)); text-align: center; }
#recapText { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(18px, 2vw, 26px); line-height: 1.5; margin: 18px auto; max-width: 580px; }
#recapSketches { display: flex; justify-content: center; gap: 12px; margin: 20px 0; }
#recapSketches canvas { width: 29%; height: auto; border: 5px solid #f9f0dd; box-shadow: 0 2px 8px #51452b28; transform: rotate(-2deg); }
#recapSketches canvas:nth-child(2) { transform: rotate(2deg); }
#recapCount { font-size: 12px; color: #817054; }
.recap-actions { justify-content: center; }
#ui button:focus-visible { outline: 2px solid #e9b958; outline-offset: 3px; }
@media (max-width: 700px), (max-height: 540px) {
  #title { padding: 22px 28px; }
  #title h1 { font-size: clamp(32px, 6vw, 58px); }
  #title .eyebrow { margin-bottom: 8px; font-size: 9px; }
  #title .sprig { margin: 10px 0; }
  #title .tag { max-width: 300px; font-size: 16px; }
  .intro-actions { margin-top: 15px; }
  .intro-controls { margin-top: 10px; }
  .walk-book { padding: 22px; }
  #chapterCards { gap: 10px; }
  .chapter-card .card-copy { padding: 10px; }
  .chapter-card .card-mood { display: none; }
  .chapter-card .card-status { margin-top: 8px; }
  #finishWalk { right: 15px; bottom: 15px; font-size: 12px !important; padding: 9px 13px; }
}
@media (max-width: 500px) {
  #title { padding: 15px 20px; }
  #title h1 br { display: none; }
  #title h1 { font-size: 30px; }
  #title .sprig, .intro-controls { display: none; }
  #title .intro-chapter { margin-top: 12px; }
  #title .tag { max-width: 270px; font-size: 14px; }
  .paper-button, .quiet-button { padding: 8px 10px; font-size: 11px !important; }
  #chapterCards { grid-template-columns: 1fr; }
  .chapter-card { display: grid; grid-template-columns: 94px minmax(0, 1fr); }
  .chapter-card img { height: 100%; aspect-ratio: auto; }
  .chapter-card strong { font-size: 22px; }
  #chapterName { display: none; }
}
@media (max-width: 600px) and (orientation: portrait) {
  body { display: grid; place-items: center; }
  #stage { position: relative; left: auto; top: auto; transform: none; }
  .chapter-overlay { position: fixed; }
  .walk-book { width: calc(100% - 28px); max-height: calc(100% - 40px); }
}
