/* The Calm Space journeys (calm-journeys.js): the journey line in the timer card, the optional
   map, the arrival card, and the moving window scenery. Autumn palette; calm, small motion. */

/* Window scenery: held still while a journey is paused or waiting, or when the student
   switched moving scenery off; reduced motion and Quiet mode are handled by calm-space.css. */
.cs-scene.cj-hold .cj-move, .cs-scene.cj-hold .cj-move * { animation-play-state: paused !important; }
.cs-root.cj-still .cs-scene .cj-move, .cs-root.cj-still .cs-scene .cj-spin { animation: none !important; }
.cs-scene .cj-fadein { animation: cj-fade 2.4s ease both; }
@keyframes cj-fade { from { opacity: 0; } to { opacity: 1; } }
.cs-scene .cj-spin { transform-box: view-box; animation: cj-spin var(--d, 9s) linear infinite; }
@keyframes cj-spin { to { transform: rotate(360deg); } }
.cs-root.lite .cs-scene .cj-near { animation-duration: 12s !important; }
/* Moving scenes turned off in the experience choices: still pictures everywhere here. */
html.xp-off-scenes .cs-scene *, html.xp-off-scenes .cs-bud, html.xp-off-scenes .cs-bud * { animation: none !important; }
html.xp-off-scenes .cs-scene .cs-a-fall, html.xp-off-scenes .cs-scene .cs-a-rise, html.xp-off-scenes .cs-scene .cs-a-drip, html.xp-off-scenes .cs-scene .cs-a-swim, html.xp-off-scenes .cs-scene .cs-ev { display: none; }

/* The journey line, inside the timer card above the ring */
.cj-line { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 0 0 6px; font-size: 13px; }
.cj-st { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: center; line-height: 1.35; }
.cj-st svg { flex: none; opacity: .9; }
.cj-st span { opacity: .9; }
.cj-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center; }
.cj-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cs-chip.cj-chip { min-height: 30px; padding: 4px 11px; font-size: 12.5px; }
.cs-chip.cj-gift { border-color: rgba(245, 166, 35, .8); }
.cj-prog { width: min(260px, 90%); height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.cj-prog i { display: block; height: 100%; background: #F5A623; border-radius: 4px; transition: width 1s linear; }
.cs-root.focus-only .cj-line, .cs-root.focus-only .cj-map { display: none; }

/* The optional map: a card on the left on wide screens; on phones a short card at the top, so
   Start / Pause and the toolbar stay clear */
.cj-map { position: absolute; z-index: 3; left: 16px; top: 78px; width: min(360px, calc(100% - 32px)); background: rgba(36, 26, 22, .88); color: #F6EDDD; border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 10px 12px 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.cj-map[hidden] { display: none; }
.cj-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.cj-map-head .cs-x { color: #F6EDDD; }
.cj-map-box { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; margin: 6px 0 8px; background: #2C4A5E; }
.cj-map-svg { width: 100%; height: 100%; display: block; }
.cj-map-sea { fill: #2E4E62; }
.cj-map-grid { fill: none; stroke: #F6EDDD; stroke-opacity: .08; stroke-width: 1; }
.cj-map-land path { fill: #B8945A; stroke: #7A5A34; stroke-width: 1; stroke-linejoin: round; }
.cj-map-route { fill: none; stroke: #F6EDDD; stroke-width: 2; stroke-dasharray: 5 5; stroke-opacity: .85; }
.cj-map-done { fill: none; stroke: #F5A623; stroke-width: 3; stroke-linecap: round; }
.cj-map-city { fill: #F6EDDD; stroke: #3B271C; stroke-width: 1; vector-effect: non-scaling-stroke; }
.cj-map-t { fill: #FBF3E6; font-family: var(--font-ui, system-ui); font-weight: 700; paint-order: stroke; stroke: #2A1C14; stroke-width: 3px; stroke-linejoin: round; }
.cj-map-mk { fill: #F5A623; opacity: .35; }
.cj-map-mk2 { fill: #FFE2A6; stroke: #8E3A18; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cj-map-now { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.cj-map-past { font-size: 12px; opacity: .85; margin: 0 0 4px; }
@media (max-width: 700px) {
  .cj-map { top: 64px; left: 8px; width: calc(100% - 16px); padding: 4px 10px 10px; background: #241A16; }
  .cj-map-box { aspect-ratio: auto; height: min(170px, 22vh); margin: 2px 0 6px; }
}

/* Destinations drawer: Relax & focus or Take a journey */
.cj-pick .cj-setup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.cj-pick .cj-setup label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.cj-pick .cj-setup select { font: inherit; font-size: 14px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); }
.cj-setup-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cj-pick-now { font-size: 13.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.cj-opts { margin: 6px 0 8px; font-size: 13px; }
.cj-opts summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

/* Arrival card (in the session summary, or on its own) */
.cj-arrive { text-align: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.cj-arrive.cj-compact { padding-bottom: 8px; }
.cj-arr-art { border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 8; margin: -6px 0 12px; background: #2f3a2c; }
.cj-arr-art svg { width: 100%; height: 100%; display: block; }
.cs-dialog .cj-arr-h { font-size: 22px; margin-bottom: 4px; }
.cj-fact { font-size: 14px !important; background: var(--color-hover); border-radius: 10px; padding: 8px 10px; text-align: left; }
.cs-dialog .cj-small { font-size: 12.5px; }
.cj-anim .cj-arr-art { animation: cj-rise .9s ease both; }

@keyframes cj-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.a11y-reduce-motion .cj-anim *, html.xp-off-celebrations .cj-anim * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .cj-anim * { animation: none !important; } }
.cj-souv { margin-top: 10px; }
.cj-souv-h { font-weight: 700; color: var(--color-text) !important; font-size: 14px !important; }
.cj-souv-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.cj-souv-b { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 120px; padding: 8px 6px; border-radius: 12px; border: 2px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.cj-souv-b:hover, .cj-souv-b:focus-visible { border-color: var(--color-accent-orange); outline: none; }
.cj-souv-art { height: 56px; display: flex; align-items: center; justify-content: center; }
.cj-souv-art svg { max-height: 56px; max-width: 80px; }
.cj-souv-n { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.cj-souv-k { font-size: 11px; color: var(--color-text-muted); }
.cj-souv-done { font-weight: 700; color: var(--color-text) !important; }
.cs-dialog { max-height: calc(100vh - 32px); overflow-y: auto; }

/* Destination tickets */
.cj-pick .cj-setup-1 { grid-template-columns: 1fr; }
.cj-home { margin: 4px 0 8px; font-size: 14px; line-height: 1.5; }
.cj-home a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--color-accent-orange); text-decoration: underline; text-underline-offset: 3px; }
.cj-tix-h { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); margin: 2px 0 6px; }
.cj-tix { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; margin-bottom: 10px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.cj-tix-b { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 0; border-radius: 10px; border: 2px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; overflow: hidden; }
.cj-tix-b:hover, .cj-tix-b:focus-visible { border-color: var(--color-accent-orange); outline: none; }
.cj-tix-b.on { border-color: var(--color-accent-orange); box-shadow: 0 0 0 2px var(--color-accent-orange) inset; }
.cj-tix-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 5px 9px; background: var(--tint-orange); color: var(--color-text); }
.cj-tix-b.on .cj-tix-top { background: var(--color-accent-orange); color: #fff; }
.cj-tix-city { font-weight: 800; font-size: 15px; padding: 5px 9px 0; line-height: 1.2; }
.cj-tix-ctry { font-size: 11.5px; color: var(--color-text-muted); padding: 0 9px 6px; }
.cj-tix-stub { border-top: 2px dashed var(--color-border); padding: 6px 9px 8px; display: flex; flex-direction: column; gap: 3px; }
.cj-tix-arts { display: flex; gap: 4px; align-items: center; height: 32px; }
.cj-tix-art { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; }
.cj-tix-art svg { width: 32px; height: 32px; }
.cj-tix-souv { font-size: 11px; line-height: 1.3; color: var(--color-text-muted); }
.cj-tix-got { font-size: 10.5px; font-weight: 700; color: var(--color-text); }
.cj-reg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.cj-reg .cs-cat { font-size: 12px; padding: 5px 10px; min-height: 30px; }
.cj-promo-b { display: flex; gap: 8px; flex-wrap: wrap; }
.cj-room { margin-bottom: 14px; }
.cj-go, .cj-kind .cs-cat { display: inline-flex; align-items: center; gap: 6px; }
.cj-go svg, .cj-kind .cs-cat svg, .cj-tix-top svg { width: 16px; height: 16px; flex: none; }
.cs-more { margin-top: 14px; border-top: 1px solid var(--color-border); padding-top: 10px; }
.cs-more > summary { cursor: pointer; font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }

/* Places and Journeys tabs, the starting place and destination search (owner, 30 Nov 2026) */
.cs-ptabs { position: sticky; top: -16px; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; margin: -16px -18px 16px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.cs-ptabs button { min-height: 54px; padding: 10px; border: 0; border-bottom: 4px solid transparent; background: none; color: var(--color-text); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.cs-ptabs button[aria-pressed="true"] { border-bottom-color: var(--color-accent-orange); }
.cs-ptabs button:focus-visible { outline: 3px solid var(--color-accent-orange); outline-offset: -4px; }
.cj-kind .cs-cat { min-height: 44px; }
.cj-start { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 12px 0; font-size: 15px; line-height: 1.5; }
.cj-start > span { flex: 1 1 180px; } .cj-start details[open] { flex-basis: 100%; }
.cj-start summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-accent-orange); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cj-start label, .cj-find { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 600; } .cj-start label { margin-bottom: 5px; }
.cj-start-row { display: flex; gap: 8px; margin-bottom: 8px; } .cj-start-row input { flex: 1; min-width: 0; } .cj-start-row .btn, .cj-start .cs-linkbtn, .cj-setup-acts .btn, .cj-more { min-height: 44px; }
.cj-pick .cs-linkbtn { color: var(--color-accent-orange); font-weight: 600; }
.cj-start input, .cj-find input { display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--color-border-strong); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 16px; }
.cj-find input { margin-top: 5px; }
.cj-why { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid var(--color-accent-orange); background: var(--tint-orange); color: var(--color-text); font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.cj-why[hidden] { display: none; }
.cj-more { width: 100%; margin: 2px 0 12px; }
.cj-go-bar { position: sticky; bottom: -24px; z-index: 2; margin: 12px -18px 12px; padding: 12px 18px 16px; border-top: 1px solid var(--color-border); background: var(--color-surface); } .cj-go-bar p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; } .cj-go-bar span { display: block; color: var(--color-text-muted); font-size: 14px; }
