/* The travel album shares the reader's palette. Its illustrations keep their own inks. */
.reader {
  --paper: var(--card);
  --atlas-ink: var(--ink);
  --atlas-muted: var(--muted);
  --atlas-red: var(--ruby);
  --atlas-rule: var(--line);
  --map-land: #e0d9ba;
  --map-route: #837359;
  --relief: #b7ad89;
  --map-pin: #656862;
  --map: #f7f3e7;
  --road: #deceb0;
  --stitch: #fff7df;
  --book-type: "Mshtakan", "Noto Serif Armenian", "Sylfaen", Georgia, serif;
  --weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='8' viewBox='0 0 52 8'%3E%3Cpath fill='none' stroke='%23995040' stroke-width='1.5' d='m0 4 4-3 4 3-4 3z M12 4h4l4-3 4 3-4 3-4-3m10 0 4-3 4 3-4 3z M38 4h4l4-3 4 3-4 3-4-3'/%3E%3C/svg%3E");
  --cloth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23947e5b' stroke-opacity='.105'%3E%3Cpath d='m9 13 4-4 4 4-4 4zM9 13H6m11 0h3M13 9V6m0 11v3m30 35 7-7 7 7-7 7zm3 0 4-4 4 4-4 4z'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  .reader {
    --map: #2a302e; --road: #54594a; --stitch: #93957d;
    --map-land: #48534a; --map-route: #beb695; --relief: #747d67; --map-pin: #636d68;
  }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.reader h1, .reader .place-line h2, .postcard-copy h2 { font-family: var(--book-type); }
.reader h1 { letter-spacing: -.025em; }
.reader .app-header { background: var(--paper); border-color: var(--atlas-rule); }
.topline { max-width: 1200px; }
.topline .brand { min-width: 0; }
.brand-mark { display: block; flex: none; width: clamp(44px, 7vw, 64px); }
.brand-mark img { display: block; width: 100%; height: auto; }
.brand-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.has-tabs .brand { display: inline-flex; margin-right: auto; }
.has-game .brand-name { display: none; }
.has-tabs #top-stats { margin: 0 0 0 auto; gap: clamp(5px,1.8vw,10px); }
.has-tabs .stat-chip { min-height: 33px; font-size: 13px; padding: 4px clamp(5px,2vw,12px); }
#top-level { border-radius: 4px; }
.boot-mark { display: grid; justify-items: center; gap: 14px; padding: 20vh 0; font-size: 14px; color: var(--atlas-muted); }
.reader[data-view] .boot-mark { display: none; }
#hub-status:not(.hidden) { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#hub-status::before { content: "Ա"; color: var(--atlas-red); font: bold 19px var(--book-type); }
.welcome-art { background: var(--map-land); box-shadow: 0 4px var(--atlas-rule); border: 5px solid var(--paper); }
.welcome-art > .journey-art, .unit-picture .journey-art, .postcard-picture > .journey-art { display: block; width: 100%; height: 100%; }
.journey-picture { overflow: hidden; }
.journey-picture img, .journey-picture > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.journey-picture:not(.missing) > svg, .journey-picture.missing img { display: none; }
.journey-picture.muted img { filter: sepia(.65) grayscale(.45) contrast(.68); opacity: .76; }
.welcome-logo { position: absolute; inset: 8% 5% 8% auto; }
.welcome-logo img { display: block; height: 100%; width: auto; border-radius: 13px; box-shadow: 0 2px 8px #0b11204d; }
#welcome-mascot { height: 59%; left: 1%; bottom: 0; }

.reader.has-tabs main { max-width: 1168px; }
.atlas-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.atlas-kicker { display: flex; align-items: center; gap: 8px; font: 750 10px/1.4 var(--display); letter-spacing: .17em; color: var(--atlas-red); }
.atlas-kicker i { width: 22px; height: 8px; background: var(--weave) left center / 52px 8px; }
.reader .atlas-heading h1 { margin: 5px 0 0; font-size: clamp(29px,4vw,46px); line-height: 1.18; font-weight: 700; }
.profile-atlas { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.reader .path-unit {
  border: 1px solid var(--atlas-rule); border-radius: 17px; box-shadow: 0 3px 0 color-mix(in srgb,var(--atlas-rule) 65%,transparent);
  background: var(--cloth) 0 0 / 84px var(--map); overflow: hidden;
}
.path-unit > .unit-banner { padding: 0; border-radius: 0; position: relative; inset: auto; box-shadow: none; background: var(--paper); color: var(--atlas-ink); z-index: 1; }
.unit-banner > .unit-picture, .unit-banner > .unit-copy { max-width: none; }
.unit-picture { height: clamp(148px,35vw,236px); overflow: hidden; border-bottom: 3px solid #b67551; background: #f6dfbc; }
.stop-ticket {
  position: absolute; top: 12px; left: 13px; border: 1px solid #796f56; border-radius: 3px;
  padding: 4px 9px; font: 780 10px/1.25 var(--display); letter-spacing: .12em; white-space: pre;
  color: #3e4b43; background: #fff2dcd9; box-shadow: 2px 2px 0 #8e826044;
}
.path-unit .unit-info { top: 4px; right: 5px; padding: 9px; color: #425047; }
.path-unit .unit-info .icon { background: #fff1d7e6; border: 1px solid #817861; stroke-width: 2; }
.path-unit .unit-info .game-icon { background: none; border: 0; }
.unit-copy { padding: 12px 17px 16px; }
.unit-copy::after, .postcard-copy::before, .map-caption::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 6px;
  background: var(--weave) center / 39px 6px repeat-x; opacity: .67;
}
.place-line { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 14px; }
.place-line h2 { color: var(--heading); text-shadow: none; font-size: clamp(25px,3.1vw,37px); margin: 0; line-height: 1.2; font-weight: 700; }
.unit-region { display: inline-flex; align-items: center; gap: 3px; color: var(--atlas-red); font-size: 12px; font-weight: 650; }
.unit-region .icon { width: 15px; height: 15px; }
.unit-lesson { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--atlas-muted); font-size: 13px; line-height: 1.45; }
.unit-lesson b { white-space: nowrap; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trail {
  max-width: none; background: var(--map);
  --road: #bb9265; --stitch: #fff2ce;
}
#units { position: relative; }
.trail-landscape, .trail-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trail-landscape { z-index: -2; overflow: hidden; }
.trail-line { z-index: -1; }
.trail.trail-painted { max-width: 560px; aspect-ratio: 1 / 2; }
.trail-painted .trail-line { display: none; }
/* Its own GPU layer: Android WebView otherwise leaves faint seams where it tiles the large scaled picture. */
.trail-scene img { width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); }
.road { stroke-width: 12px; }
.road-stitches { stroke-dasharray: 2 6; stroke-width: 2.5px; }
.node-caption, .trail-card-title { background: var(--paper); color: var(--atlas-ink); border: 1px solid var(--atlas-rule); border-radius: 6px; }
.node-caption { position: absolute; left: var(--node-x); top: 42px; translate: -50% 0; font-size: 11px; font-weight: 720; white-space: nowrap; padding: 0 6px; }
.trail-painted .node-caption { z-index: 2; pointer-events: none; }
.lesson-node { width: 70px; height: 58px; }
.lesson-node.current { --face: #ffd29c; --edge: #ad602e; --node-ink: #593418; }
.lesson-node.available { --face: #fff0d7; --edge: #a68a66; --node-ink: #624f3a; }
.lesson-node.done { --face: #ffcf64; --edge: #a67629; --node-ink: #694511; }
.lesson-node.locked { --face: #dad7cf; --edge: #948f82; --node-ink: #5e5a53; }
.lesson-node.locked > .game-icon { filter: saturate(.38); }
.gift-ribbon, .seed-badge {
  position: absolute; left: calc(100% - 13px); top: -5px; display: grid; place-items: center;
  height: 27px; padding: 1px 5px 1px 2px; border: 1px solid #94724a; border-radius: 5px 9px 9px 5px;
  color: #57412c; background: #ffebbe; box-shadow: 0 2px 0 #69543f70; font: 800 12px/1 var(--display);
}
.gift-ribbon.on-left, .seed-badge.on-left { left: auto; right: calc(100% - 13px); }
.seed-badge { width: 23px; height: 23px; padding: 0; border-radius: 50%; }
.lesson-node .seed-badge .icon { width: 15px; height: 15px; }
.gift-ribbon::before { content: ""; position: absolute; top: 100%; left: 6px; width: 10px; height: 6px; background: #a96b4b; clip-path: polygon(0 0,100% 0,100% 100%,50% 65%,0 100%); }
.lesson-node .gift-ribbon .treasure-art { width: 22px; height: 22px; }
.lesson-node.locked :is(.gift-ribbon, .seed-badge) { filter: saturate(.68); }
.lesson-node.done :is(.gift-ribbon, .seed-badge) { color: #244d3d; border-color: #58795f; background: #e0efd3; }
.lesson-node.done .gift-ribbon::before, .collected-pin { background: #40735a; color: #fff5d8; }
.lesson-node.current .gift-ribbon::after {
  content: ""; position: absolute; right: -4px; top: -5px; width: 10px; height: 13px; background: #fff8ce;
  clip-path: polygon(50% 0,64% 35%,100% 50%,63% 62%,50% 100%,36% 64%,0 50%,36% 36%);
}
.sheet-prize { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 8px 10px; border: 1px solid var(--atlas-rule); border-radius: 9px; background: var(--paper); color: var(--atlas-ink); font-weight: 600; }
.sheet-prize :is(.treasure-art, .icon) { flex: none; width: 31px; height: 31px; }
.chest-caption { white-space: nowrap; }
.start-bubble { font-size: 11px; background: var(--atlas-ink); color: var(--paper); bottom: calc(100% + 12px); border-radius: 7px; padding: 6px 11px; }
.path-mascot { position: absolute; z-index: 2; top: 0; width: clamp(124px, 36.4vw, 166px);
  translate: -50% -45%; display: grid; justify-items: center; pointer-events: none; }
.friend-right .path-mascot { left: 76%; }
.friend-left .path-mascot { left: 23%; }
.reader .path-mascot-tap { display: block; width: 100%; padding: 0; border: 0; background: none; pointer-events: auto; }
:is(.path-mascot, .path-travel) .fx-mascot { display: block; width: 100%; filter: drop-shadow(0 3px 3px #381f31a0); }
.fx-path-wave { opacity: 0; }
.path-landing { visibility: hidden; }
.path-travel { position: absolute; z-index: 4; pointer-events: none; }
.path-travel-art { position: absolute; inset: 0; offset-rotate: 0deg; }
.trail-postcard {
  position: absolute; top: 0; left: 50%; translate: -50% -50%; display: grid; justify-items: center;
  gap: 5px; background: transparent; border: 0; color: var(--atlas-muted); padding: 5px 8px;
}
.trail-paper, #album-sample { transform: rotate(-7deg); position: relative; isolation: isolate; display: block; background: #dcdaca; border: 4px solid #fff7e5; outline: 1px solid #b9b4a2; box-shadow: 2px 3px 0 #968e7866; }
.trail-paper { width: 85px; height: 53px; }
.trail-paper > .journey-art, #album-sample > .journey-art { display: block; width: 100%; height: 100%; overflow: hidden; }
.trail-postcard:not(.earned) .trail-paper svg.journey-art { filter: brightness(0); opacity: .39; }
.trail-postcard.trail-chest { padding: 0; }
.trail-paper .mini-seal { position: absolute; right: 2px; top: 2px; width: 13px; height: 14px; line-height: 13px; font-size: 12px; color: #777565; background: #eee6cf; border: 1px dotted; font-style: normal; }
.trail-card-title { font-size: 11px; padding: 1px 7px; }
.profile-atlas.panel { justify-content: flex-start; color: var(--heading); }
.profile-atlas span:last-child { margin-left: auto; }
.album-link { display: flex; align-items: center; gap: 12px; text-align: left; }
.album-link strong, .album-link small { display: block; }
.album-link strong { font-size: 15px; color: var(--heading); }
.album-link small { font-size: 12px; color: var(--atlas-muted); margin-top: 3px; }
.album-link > span:last-child { margin-left: auto; color: var(--atlas-red); font-size: 23px; }
#album-sample { width: 62px; height: 44px; flex: none; }
.goal-panel .aside-heading { gap: 10px; margin-bottom: 17px; }
.goal-panel .aside-heading h2 { font-size: 17px; }
.goal-panel .goal-emblem { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--blue-soft); box-shadow: none; color: var(--heading); border-radius: var(--chip-radius); }
.goal-panel .goal-emblem svg { width: 22px; }
#aside-goal { font-size: 29px; line-height: 1.2; color: var(--heading); letter-spacing: -.02em; }
#aside-meter { height: 7px; margin-top: 10px; }
.reader #aside-profile { font-size: 12px; min-height: 38px; padding: 6px 0 0; }
.unit-guide h2 { font-size: 17px; }
.guide-row { font-size: 13px; }
.guide-row.current { background: var(--tab-on); color: var(--heading); }
.guide-row + .guide-row { border-top: 1px solid var(--atlas-rule); border-radius: 0; }
@media (prefers-color-scheme: dark) {
  .lesson-node.available { --face: #e8d4b4; --edge: #8d7256; }
  .lesson-node.locked { --face: #555f69; --edge: #343d48; --node-ink: #dce2e7; }
  .welcome-art > .journey-art { filter: brightness(.86) saturate(.86); }
}
@media (min-width: 700px) {
  .atlas-heading { margin-bottom: 20px; }
  .path-layout { grid-template-columns: minmax(0,1fr) minmax(245px,.47fr); gap: 24px; }
  .unit-picture { height: clamp(164px,19vw,248px); }
  .unit-copy { padding: 15px 22px 19px; }
  .unit-region { font-size: 14px; }
  .unit-lesson { font-size: 15px; }
  .stop-ticket { left: 17px; top: 15px; }
  .unit-guide.panel, .goal-panel.panel { padding: 21px; }
}
@media (min-width: 1000px) {
  .has-tabs .brand-name { display: inline; }
  .has-tabs .topline { gap: 15px; }
  .has-tabs .game-tabs { position: static; padding: 0; border: 0; margin: 0 auto; }
  .game-tabs > div { gap: 3px; }
  .game-tabs button { min-height: 39px; flex: none; border-radius: var(--button-radius); padding: 6px 9px; font-size: 13px; gap: 5px; }
  .game-tabs .icon { width: 18px; height: 18px; padding: 0; border-radius: 0; }
  .game-tabs [aria-current] { background: var(--tab-on); }
  .has-tabs #top-stats { margin-left: 0; }
  .reader.has-tabs main { padding-top: 30px; }
  .path-layout { grid-template-columns: minmax(0,1fr) 310px; }
  .album-link.panel { padding: 19px; }
}

/* The atlas has an unoutlined land wash, a printed route, and numbered, keyboard-operable pins. */
.atlas-layout { display: grid; align-items: start; gap: 16px; max-width: 920px; margin-inline: auto; }
.atlas-plate, .atlas-register { min-width: 0; border: 1px solid var(--line); border-radius: var(--card-radius); overflow: hidden; background: var(--card); color: var(--ink); box-shadow: var(--card-shadow); }
.map-caption { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 17px 16px; }
.map-caption h2, .atlas-register h2 { margin: 0; font-family: var(--book-type); font-size: 22px; }
.map-caption .album-count { flex: none; white-space: nowrap; color: var(--atlas-red); font-size: 13px; font-weight: 700; }
#album-map {
  position: relative; isolation: isolate; max-width: 420px; margin: auto; aspect-ratio: 320 / 460;
  background-image: linear-gradient(to right,transparent calc(100% - 1px),color-mix(in srgb,var(--atlas-rule) 32%,transparent) 1px),
    linear-gradient(to bottom,transparent calc(100% - 1px),color-mix(in srgb,var(--atlas-rule) 32%,transparent) 1px);
  background-size: 9% 6.26%;
}
.album-terrain { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-pin { position: absolute; transform: translate(-50%,-50%); display: grid; place-items: center; width: 11%; height: 7.65%; min-height: 0; min-width: 0; background: none; border: 0; padding: 0; border-radius: 50%; }
.atlas-pin b { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50% 50% 50% 15%; transform: rotate(-6deg); background: var(--map-pin); color: white; box-shadow: 0 1px 2px #323d354d; font: 750 10px/1 system-ui,sans-serif; }
.atlas-pin.earned b, .map-legend span:first-child::before { background: #ab4939; }
.atlas-pin:hover b, .atlas-pin:focus-visible b { outline: 2px solid var(--atlas-red); }
.map-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 10px; border-top: 1px solid var(--atlas-rule); font-size: 11px; color: var(--atlas-muted); }
.map-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--map-pin); border-radius: 50% 50% 50% 15%; margin-right: 5px; }
.atlas-register h2 { padding: 12px 17px; border-bottom: 1px solid var(--atlas-rule); }
#album-index { padding: 0 13px; margin: 0; list-style: none; }
.atlas-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 7px 1px; border: 0; border-radius: 0; background: transparent; color: var(--atlas-ink); font-size: 13px; text-align: left; }
.atlas-row .journey-picture { width: 48px; aspect-ratio: 2 / 1; flex: none; border-radius: 3px; }
#album-index li + li { border-top: 1px solid var(--atlas-rule); }
.atlas-row .index-number { font: 700 12px/1 system-ui,sans-serif; color: var(--atlas-muted); }
.atlas-row.earned .index-number, .atlas-row.earned .row-arrow { color: var(--atlas-red); }
.row-arrow { margin-left: auto; font-size: 18px; color: var(--atlas-muted); }
@media (min-width: 700px) {
  .atlas-layout { grid-template-columns: 1.25fr 1fr; gap: 24px; }
  #album-map { max-width: clamp(290px,calc(69.56dvh - 199px),420px); }
  #album-index { max-height: min(62vh,610px); overflow-y: auto; scrollbar-color: var(--atlas-rule) var(--paper); }
}
/* Postcard front and printed notes share one sheet, even at large text sizes. */
html:has(#postcard[open]) { overflow: hidden; }
#postcard {
  position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none;
  background: var(--bg); color: var(--ink); border: 0; padding: 16px;
  padding-inline: calc(16px + env(safe-area-inset-left)) calc(16px + env(safe-area-inset-right));
  overflow: auto; overscroll-behavior: contain;
}
#postcard[open] { display: flex; }
.postcard-wrap { width: min(100%,530px); margin: auto; padding-block: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-bottom)); }
.postcard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.postcard-heading { color: var(--atlas-red); font-size: 13px; font-weight: 750; }
.postcard-close { padding: 0; width: 44px; height: 44px; font: 500 17px/1 system-ui,sans-serif; }
.postcard-paper { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--window-radius); box-shadow: var(--window-shadow); padding: 8px; }
.postcard-picture { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #f6dfbc; }
.postcard-copy { position: relative; padding: 16px 12px 9px; }
.postcard-copy::before { top: 2px; bottom: auto; }
.region-label { color: var(--atlas-red); font-size: 12px; font-weight: 780; }
.postcard-copy h2 { margin: 3px 0 8px; font-size: clamp(28px,5vw,39px); line-height: 1.24; }
.postcard-caption { font: 500 19px/1.45 var(--book-type); margin: 6px 0 10px; }
.postcard-fact { margin: 0; padding: 9px 0 2px; border-top: 1px solid var(--atlas-rule); color: var(--atlas-muted); font-size: 14px; }
.postcard-caption:empty, .postcard-fact:empty { display: none; }
.postcard-note { margin: 17px 0 0; color: var(--atlas-muted); font-size: 13px; }
.postcard-done { display: block; width: 100%; margin: 15px auto 2px; }
.postal-stamp { position: absolute; top: 10px; right: 11px; display: grid; place-items: center; align-content: center; gap: 2px; width: 53px; height: 61px; transform: rotate(8deg); color: #7d6653; background: #f1deb8; border: 2px dotted #9d8262; outline: 2px solid #f0e0c4; }
.postal-stamp span { font-size: 6px; font-weight: 800; letter-spacing: .07em; }
.postal-stamp b { font-size: 8px; line-height: 1; }
.stamp-wheel { width: 25px; height: 25px; }
.postal-stamp.inked { color: #983b2f; background: #faddac; border-color: #b76248; }
.postmark { position: absolute; right: 35px; top: 42px; width: 89px; transform: rotate(-10deg); opacity: .85; }
.postcard-picture > .fx-mascot { position: absolute; left: 2%; bottom: 0; width: 22%; max-height: 55%; }
@keyframes ink-stamp { from { opacity: 0; transform: translate(-8px,-13px) rotate(-23deg) scale(1.65); } 72% { opacity: 1; transform: rotate(-8deg) scale(.93); } }
@media (prefers-reduced-motion: no-preference) {
  html:not(.fx-recording) .celebrating .postmark { animation: ink-stamp .54s cubic-bezier(.21,.76,.38,1) both; }
}

/* Each plate carries its own hour. Shared SVG cuts inherit these material inks
   from the local <use>, including when two different hours share the viewport. */
.journey-inks {
  --soil: #c4ba83; --pasture: #aaaf79; --verge: #91a171;
  --foliage: #426b52; --crown: #8da861; --stone: #80858a; --sunstone: #b4aba0;
  --tuff: #bd8270; --crop: #d5b876; --peak: #788e9e;
  --ground: color-mix(in srgb,var(--soil),var(--shade) var(--grade));
  --meadow: color-mix(in srgb,var(--pasture),var(--shade) var(--grade));
  --sedge: color-mix(in srgb,var(--verge),var(--shade) var(--grade));
  --strata: color-mix(in srgb,var(--rockLight) 65%,var(--rock));
  --contour: color-mix(in srgb,var(--sedge) 67%,#63584e);
  --far: color-mix(in srgb,var(--haze) 64%,var(--peak));
  --mount: color-mix(in srgb,var(--peak),var(--shade) var(--grade));
  --facet: color-mix(in srgb,var(--mount) 67%,#364956);
  --foothill: color-mix(in srgb,var(--sedge) 57%,var(--far));
  --snow: color-mix(in srgb,#fffdf1 70%,var(--light));
  --snowPatch: #ecf4ed; --ice: #b2d3df;
  --leaf: color-mix(in srgb,var(--foliage),var(--shade) var(--grade));
  --leafLight: color-mix(in srgb,var(--crown) 70%,var(--light));
  --twig: color-mix(in srgb,var(--verge) 65%,var(--light)); --glint: var(--twig);
  --base-bark: color-mix(in srgb,#464a43,var(--shade) var(--grade));
  --bark: var(--base-bark);
  --rock: color-mix(in srgb,var(--stone),var(--shade) var(--grade));
  --rockLight: color-mix(in srgb,var(--sunstone) 71%,var(--light));
  --cliffLine: color-mix(in srgb,var(--rock) 70%,#263846);
  --masonry: color-mix(in srgb,var(--tuff),var(--shade) var(--grade));
  --joint: color-mix(in srgb,var(--masonry) 65%,#333a40);
  --roof: color-mix(in srgb,#707679,var(--shade) var(--grade));
  --stoneLit: color-mix(in srgb,var(--light) 62%,var(--tuff));
  --wallFront: var(--stoneLit); --wallSide: var(--joint);
  --window: var(--bark); --lamp: var(--stoneLit); --shadow: #25334142;
  --plot: color-mix(in srgb,var(--crop),var(--shade) var(--grade));
  --furrow: color-mix(in srgb,var(--plot) 69%,#67563e);
  --beach: color-mix(in srgb,#e2c798,var(--shade) var(--grade));
  --straw: color-mix(in srgb,#ebc170 74%,var(--light));
  --fruit: #e9a05d; --grape: #794260; --flower: #c96c64; --petal: var(--stoneLit);
  --cloud: color-mix(in srgb,var(--haze) 76%,white);
  --water: var(--water-ink); --foam: color-mix(in srgb,var(--light) 69%,var(--water));
  --cabin: color-mix(in srgb,#b0503c 77%,var(--shade));
}
.journey-inks[data-light=right] { --wallFront: var(--masonry); --wallSide: var(--stoneLit); }
.journey-inks:is([data-hour=dusk],[data-hour=night]) {
  --window: #ffda92; --lamp: #ffdd9f; --snow: #aec4d4; --shadow: #101c374f;
  --leafLight: color-mix(in srgb,var(--leaf) 72%,var(--light));
  --stoneLit: color-mix(in srgb,var(--masonry) 53%,var(--light));
  --rockLight: color-mix(in srgb,var(--rock) 63%,var(--light));
  --twig: color-mix(in srgb,var(--sedge) 74%,var(--light));
}
.journey-inks[data-hour=sunset] {
  --leafLight: color-mix(in srgb,var(--leaf) 72%,var(--light));
  --rockLight: color-mix(in srgb,var(--rock) 61%,var(--light));
}
.journey-inks[data-route=stairs] { --peak:#90aabd; --soil:#dedcc6; --pasture:#a5b59a; --verge:#95aa91; --tuff:#dacdb3; }
.journey-inks[data-route=avenue] { --peak:#b89b8a; --soil:#d5a38e; --pasture:#dcb295; --verge:#b29475; --tuff:#ce907c; }
.journey-inks[data-route=park] { --soil:#739477; --pasture:#537e65; --verge:#355d57; }
.journey-inks[data-route=square] { --soil:#83888d; --pasture:#8c8b92; --verge:#a28a85; --tuff:#ac7e74; }
.journey-inks[data-route=citadel] { --soil:#dcb479; --pasture:#c39970; --verge:#b38861; --tuff:#b97555; }
.journey-inks[data-route=basalt] { --soil:#a6a68a; --stone:#676b7c; --sunstone:#a4a0a0; --verge:#747e6d; }
.journey-inks[data-route=grotto] { --soil:#aa9279; --stone:#79727b; --sunstone:#a59a91; --peak:#87757d; }
.journey-inks[data-route=vineyard] { --soil:#c2b685; --pasture:#99a466; --verge:#83905c; --crop:#b79d69; }
.journey-inks[data-route=orchard] { --soil:#d2d598; --pasture:#b7c78c; --verge:#98b47d; --crown:#96b971; }
.journey-inks[data-route=colonnade] { --soil:#e4c08a; --pasture:#dbba87; --verge:#adad74; --tuff:#cf9375; }
.journey-inks[data-route=slope] { --soil:#a8b393; --stone:#748180; --sunstone:#a9b6a0; --peak:#738b97; }
.journey-inks[data-route=letters] { --soil:#d7b076; --pasture:#c29a64; --verge:#b18a58; --stone:#a77c6d; }
.journey-inks[data-route=reeds] { --soil:#a7a580; --verge:#768974; --tuff:#b47965; }
.journey-inks[data-route=beech] { --soil:#8da483; --pasture:#6a937e; --verge:#648171; --foliage:#3f7669; --crown:#8aaf92; }
.journey-inks[data-route=woodland] { --soil:#789b62; --pasture:#729457; --verge:#648253; --foliage:#38634f; --crown:#86aa61; }
.journey-inks[data-route=gorge] { --soil:#8fa477; --pasture:#738f66; --stone:#698274; --sunstone:#b6bd8c; }
.journey-inks[data-route=tuff] { --soil:#dfbd77; --pasture:#cba45b; --verge:#b19662; --tuff:#625c60; --roof:#5a575d; --stone:#777173; --crop:#ebc779; --peak:#8a929b; }
.journey-inks[data-route=canyon] { --soil:#be684c; --stone:#a34b3d; --sunstone:#e1925e; --peak:#b56552; --verge:#bb7857; }
.journey-inks[data-route=arpa] { --soil:#c49772; --stone:#a16e5f; --sunstone:#d39d76; --peak:#a07776; }
.journey-inks[data-route=falls] { --soil:#8a9b9c; --stone:#627a83; --verge:#668578; --sunstone:#a0b4b0; }
.journey-inks[data-route=stones] { --soil:#acaf81; --pasture:#838f79; --stone:#64717e; --sunstone:#b6b9b3; }
.journey-inks[data-route=ropeway] { --soil:#809789; --stone:#516d70; --sunstone:#a1b397; --peak:#789094; }
.journey-inks[data-route=snow] { --soil:#d9e4df; --verge:#afc7ca; --sunstone:#bdc6c3; --peak:#628ba6; }

.unit-picture > .journey-inks { overflow: visible; }
.trail-line .road { stroke: #51443795; stroke-width: 4.5px; }
.trail-line .road-stitches { stroke: #fff1c9; stroke-width: 2px; stroke-dasharray: 2 6; }
[data-route=boat] + .trail-line .road { stroke: #413b5975; stroke-width: 3.8px; stroke-dasharray: 7 7; }
[data-route=boat] + .trail-line .road-stitches { stroke: #fff5df; stroke-width: 2px; stroke-dasharray: 7 7; }
.trail:has([data-hour=night], [data-hour=dusk]) .lesson-node:not(.current):not(:focus-visible) { outline: 1px solid #f5dfb5; }

@media (prefers-reduced-motion: no-preference) {
  .path-in-view .trail-cloud { animation: trail-cloud 35s ease-in-out infinite alternate; }
  .path-in-view .trail-glints { animation: trail-glints 7s ease-in-out infinite alternate; }
  .reader[data-view=path] .lesson-node { transition: transform .19s cubic-bezier(.18,.62,.33,1.45); }
  .lesson-node.path-in-view.current::before { animation: node-breathe 3.8s ease-in-out infinite; }
  .lesson-node.path-in-view .start-bubble { animation: bubble-hop 3.8s ease-in-out infinite; }
  .lesson-node.path-in-view .gift-ribbon { transform-origin: 30% 10%; animation: ribbon-sway 4.7s ease-in-out infinite; }
  .trail-stop:nth-child(even) .lesson-node.path-in-view .gift-ribbon { animation-delay: -2s; }
  .lesson-node.path-in-view.current .gift-ribbon::after { animation: ribbon-glint 3s ease-in-out infinite; }
  .path-mascot.path-in-view .fx-character { animation: path-idle 5.4s ease-in-out -.45s infinite; }
  .path-mascot.path-in-view .fx-path-wave { animation: path-wave 10.8s steps(1, end) -.45s infinite; }
  .path-mascot.path-in-view .fx-path-idle { animation: path-wave-hide-idle 10.8s steps(1, end) -.45s infinite; }
  .path-mascot.path-in-view .fx-companion { animation: path-pet-idle 5.4s ease-in-out -.32s infinite; }
  .path-travel .fx-character { animation: path-stride .27s ease-in-out 3; }
  .path-travel .fx-companion { animation: path-stride .25s ease-in-out .05s 3; }
  .lesson-node.path-just-done { animation: node-done .62s ease-out both; }
  .lesson-node.unlock { animation: node-unlock .38s ease-out both; }
  .trail-chest.path-in-view.ready:not(.opening) .chest-art { animation: chest-ready 4.8s ease-in-out infinite; }
  .trail-chest.path-in-view.opening .chest-lid { animation: chest-unseal .52s ease-out both; }
  .trail-chest.path-in-view.opening::before { animation: chest-light .85s ease-out both; }
  .trail-chest.path-in-view:not(.open)::after { animation: chest-gleam 6.4s ease-in-out infinite; }
  .path-in-view.trail-scene > img:not([hidden]) { animation: trail-drift 25s ease-in-out infinite alternate; }
  .path-in-view.unit-picture > .journey-art, .trail-chest.path-in-view .trail-paper > .journey-art {
    animation: picture-drift 22s ease-in-out infinite alternate;
  }
}
.trail-chest:not(.open)::after { content: "✦"; position: absolute; left: 62%; top: 20%; color: #fff7c8;
  text-shadow: 0 1px 3px #764920; font-size: 19px; line-height: 1; pointer-events: none; opacity: 0; }
.trail-paper { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  html:not(.fx-recording) .reader .lesson-node:is(.path-just-done, .unlock) {
    animation: fx-soft-pulse .52s ease-out both !important;
  }
  html:not(.fx-recording) .reader .lesson-node:is(.path-just-done, .unlock):not(.path-in-view) {
    animation-play-state: paused !important;
  }
  .reader[data-view=path] .lesson-node:active { opacity: .78; transform: none; }
}
.lesson-node:is(.path-just-done, .unlock):not(.path-in-view) {
  animation-play-state: paused;
}
@keyframes trail-cloud { to { transform: translateX(10px); } }
@keyframes trail-glints { to { opacity: .5; } }
@keyframes ribbon-glint { 0%, 55%, 100% { opacity: .4; transform: scale(.65); } 75% { opacity: 1; transform: scale(1.1); } }
@keyframes ribbon-sway { 25% { transform: rotate(5deg); } 70% { transform: rotate(-4deg); } }
@keyframes node-breathe { 50% { transform: scale(1.055); opacity: .65; } }
@keyframes bubble-hop { 50% { transform: translateY(-3px); } }
@keyframes node-unlock { from { transform: scale(.78); opacity: .48; } }
@keyframes node-done {
  23% { transform: scale(.95,.91); }
  56% { transform: translateY(-8px) scale(1.12); }
  78% { transform: scale(1.03,.96); }
}
@keyframes path-idle {
  14% { transform: translateY(-4px) scale(.97,1.04); }
  31% { transform: translateX(-5px) rotate(-9deg); }
  51% { transform: translateX(5px) rotate(9deg) scale(1.03,.98); }
  67% { transform: translateY(3px) scale(1.08,.91); }
  76% { transform: translateY(-19px) rotate(-5deg); }
  85% { transform: scale(1.04,.95); }
}
@keyframes path-wave { 43% { opacity: 1; } 51% { opacity: 0; } }
@keyframes path-wave-hide-idle { 43% { opacity: 0; } 51% { opacity: 1; } }
@keyframes path-pet-idle { 27% { transform: rotate(7deg); } 76% { transform: translateY(-9px) rotate(-5deg); } 87% { transform: none; } }
@keyframes path-stride { 46% { transform: translateY(-16px) rotate(-7deg); } 82% { transform: scale(1.04,.94); } }
@keyframes chest-ready {
  0%, 65%, 90%, 100% { transform: none; }
  72% { transform: translateY(-3px) rotate(-5deg); }
  80% { transform: translateY(-2px) rotate(5deg); }
  86% { transform: rotate(-2deg); }
}
@keyframes chest-unseal { 0%, 12% { transform: none; } 70% { transform: translateY(-15px) rotate(-11deg); } }
@keyframes chest-light { from { transform: scale(.65); } 55% { transform: scale(1.65); } to { transform: scale(1.1); } }
@keyframes chest-gleam {
  0%, 63%, 85%, 100% { opacity: 0; transform: scale(.55); }
  73% { opacity: 1; transform: scale(1.08); }
}
@keyframes trail-drift { from { transform: translateZ(0); } to { transform: translate3d(1px,-2px,0) scale(1.009); } }
@keyframes picture-drift { from { transform: scale(1.02); } to { transform: translate(-1%,1%) scale(1.07); } }

.journey-inks { --ridgeLight: color-mix(in srgb,var(--mount) 66%,var(--light)); }
.journey-inks[data-light=left] { --facet: color-mix(in srgb,var(--mount) 67%,var(--light)); }
.cast-shadow { transform: scaleX(calc(var(--cast-direction,1) * var(--shadow-length))) skewX(-18deg); }
.lamplight { opacity: var(--lamp-glow,0); }
.journey-inks:is([data-hour=dusk],[data-hour=night]) { --lamp-glow: .24; }
.journey-inks:is([data-hour=night],[data-hour=dusk]) {
  --cut-ink: #8096aa; --cut-rim: #acc5d2;
}
.landmark-cut { --bark: var(--cut-ink,var(--base-bark)); stroke: var(--cut-rim,none); stroke-width: .55; paint-order: stroke fill; }

/* Compact stop header (owner, 29 Nov 2026): no picture above the stop; number before the title, «i» top right. */
.path-unit > .unit-banner.compact { border-bottom: 3px solid #b67551; }
.unit-banner.compact > .unit-copy { padding: 11px 52px 12px 16px; }
.unit-banner.compact .place-line h2 { display: flex; align-items: baseline; gap: 10px; font-size: clamp(22px,2.6vw,30px); }
.unit-banner.compact .stop-number { flex: none; font: 800 14px/1 var(--display, inherit); letter-spacing: .06em; padding: 5px 7px 4px;
  border-radius: 8px; background: #b67551; color: #fff7ea; transform: translateY(-3px); font-variant-numeric: tabular-nums; }
.path-unit .unit-banner.compact > .unit-info { position: absolute; top: 6px; right: 6px; }
.unit-banner.compact .unit-copy::after { display: none; }

/* The bigger Նռնիկ sits a little higher beside his lesson, so he never covers the next lesson's button. */
.path-mascot { width: clamp(108px, 30vw, 150px); translate: -50% -66%; }
