/* «Мой поезд» (world.js, 15.10.2026): the world after the lessons. The scene keeps its paper colours in both themes (like the pictures);
   everything around it takes the tokens of the app. Ported from the prototype world-proto/index.html (approved by Михаил 15.10) */
.w-world { max-width: 560px; margin: 0 auto; display: grid; gap: 10px; padding-bottom: 24px; }
/* the bar of the world holds a title, two counters and the sound: tighter than the bar of the course, a long word wraps (WebKit, 15.10) */
.w-bar { gap: 8px; }
.w-bar .bar-title { min-width: 0; font-size: 1.15rem; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.w-bar .bar-title.long { font-size: 1rem; }
.w-bar .bar-title small { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }
@media (max-width: 359px) { .w-bar .bar-title { font-size: 1rem; } .w-bar .bar-title.long { font-size: .9rem; } }
.w-counts { display: inline-flex; gap: 5px; flex: none; }
.w-count { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px 3px 4px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-size: .94rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.w-count svg { width: 20px; height: 16px; }
.w-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.w-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); font: 800 .92rem var(--font);
  box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
.w-tab.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.w-tab.locked { color: var(--ink-soft); }
.w-cost { display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.w-cost svg { width: 18px; height: 14px; }
.w-locked { display: grid; gap: 10px; justify-items: center; padding: 12px 12px 16px; text-align: center; background: var(--card); }
.w-lockart { width: 100%; opacity: .55; filter: grayscale(.5); }
.w-locktext { margin: 0; }
.w-crate { font: 900 9px var(--font-zh, sans-serif); fill: #5B3A1A; }
.w-hit { fill: transparent; }
/* the animals of stop 9 are clear stickers: the course puts them on white (index.html), the world on its scenes */
.w-world img[src*="img/s9/zoo-"] { background: none; }
/* the entry card on the map of the course */
.w-entry { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.w-entry-art .tr-train { width: 100%; }
.w-entry-text { display: grid; gap: 2px; min-width: 0; }
.w-entry-text b { font-size: 1.1rem; font-weight: 900; }
.w-entry-text span { font-size: .84rem; color: var(--ink-soft); line-height: 1.25; }
.w-mapsvg { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: inset 0 0 0 2px #C9A16E; }
.w-st { cursor: pointer; }
.w-st.soon { opacity: .7; }
.w-stch { font: 700 19px var(--font-zh); fill: #232120; pointer-events: none; }
.w-st:not(.open) .w-stch { fill: #8A8F96; }
.w-mtrain { transition: transform 1.6s ease-in-out; }
.w-stcard { display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); min-height: 64px; }
.w-stname { margin: 0; font-size: 1.1rem; font-weight: 900; }
.w-stname .zh { color: var(--accent); }
.w-stnote { margin: 0; color: var(--ink-soft); }
.w-stcard .btn { justify-self: start; }
.w-prog { font-style: normal; color: var(--ink-soft); font-size: .86em; }
/* the scene */
.w-scene { border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 3px #232120, 0 10px 24px rgba(31, 29, 27, .18); background: #F7EAD3; touch-action: pan-y; }
.w-room { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.w-thing { cursor: grab; touch-action: none; }
.w-thing:focus-visible, .w-hero:focus-visible, .w-lamp:focus-visible { outline: 3px solid #F2B630; outline-offset: 2px; }
/* a finger's tap leaves no ring around the thing (Android Chrome); the keyboard still sees where it is */
.w-thing:focus:not(:focus-visible), .w-hero:focus:not(:focus-visible), .w-lamp:focus:not(:focus-visible), .w-st:focus:not(:focus-visible), .w-bed:focus:not(:focus-visible), .w-swim:focus:not(:focus-visible) { outline: none; }
.w-dragging { filter: drop-shadow(0 8px 3px rgba(35, 33, 32, .3)); cursor: grabbing; }
.w-hero { cursor: pointer; transition-property: transform; transition-timing-function: ease-in-out; transform-box: view-box; }
.w-window, .w-lamp { cursor: pointer; }
/* the world outside: layers roll by (two copies side by side), day and night, rain, rainbow, passers */
.w-layer { animation: wScroll var(--dur, 30s) linear infinite; }
.w-clouds { --dur: 70s; } .w-far { --dur: 46s; } .w-mid { --dur: 20s; } .w-near { --dur: 5s; }
.w-fast .w-mid { --dur: 7s; } .w-fast .w-near { --dur: 1.6s; } .w-fast .w-far { --dur: 16s; }
.w-closed .w-layer { animation-play-state: paused; }          /* the curtains are drawn: nothing to see */
@keyframes wScroll { to { transform: translateX(-400px); } }
.w-sky-night, .w-stars, .w-moon, .w-rain, .w-rainbow { opacity: 0; transition: opacity .9s ease; }
.w-sky-day, .w-sun { transition: opacity .9s ease, transform .9s ease; }
.w-night .w-sky-night, .w-night .w-stars, .w-night .w-moon { opacity: 1; }
.w-night .w-sun { opacity: 0; transform: translateY(40px); }
.w-raining .w-rain { opacity: 1; } .w-rainbowon .w-rainbow { opacity: .85; }
.w-raining .w-sun { opacity: .25; }
/* the drops and the stars move only when they are seen (in the day the stars are hidden, and the drops but in the rain) */
.w-raining .w-rain path { animation: wDrop .5s linear infinite; animation-delay: calc(var(--k) * -.07s); }
@keyframes wDrop { from { transform: translate(0, -14px); } to { transform: translate(-6px, 18px); } }
.w-night .w-star { animation: wTwinkle 2.2s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -.3s); }
@keyframes wTwinkle { to { opacity: .3; } }
.w-passer { animation: wPass 6s linear forwards; }
.w-passer.p-star { animation: wFall 2.4s ease-in forwards; }
.w-passer.p-birds, .w-passer.p-balloon { animation-duration: 6s; }
@keyframes wPass { from { transform: translateX(230px); } to { transform: translateX(-70px); } }
@keyframes wFall { from { transform: translate(200px, -10px); } to { transform: translate(40px, 70px); opacity: 0; } }
.w-curtain { transition: transform .5s ease; }
.w-curtain.l { transform: translateX(-18px); } .w-curtain.r { transform: translateX(18px); }
.w-closed .w-curtain.l { transform: translateX(56px); } .w-closed .w-curtain.r { transform: translateX(-56px); }
/* the light */
.w-dark { fill: #0E1530; opacity: 0; transition: opacity .9s ease; }
.w-night .w-dark { opacity: .34; } .w-night.w-lampon .w-dark { opacity: .14; }
.w-lightcone { opacity: 0; transition: opacity .5s ease; }
.w-lampon .w-lightcone { opacity: .16; } .w-night.w-lampon .w-lightcone { opacity: .34; }
/* the things alive */
.w-steam path { animation: wSteam 1.8s ease-in-out infinite; }
@keyframes wSteam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px); } }
.w-zzz text { font: 900 13px var(--font); fill: #3B86D9; animation: wZ 2.4s ease-in-out infinite; }
.w-zzz text:nth-child(2) { animation-delay: .5s; } .w-zzz text:nth-child(3) { animation-delay: 1s; }
@keyframes wZ { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.w-fish { animation: wFish 3s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -1.3s); }
@keyframes wFish { to { transform: translate(14px, 4px); } }
.w-catplay { animation: wRoll .4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes wRoll { from { transform: rotate(-8deg); } to { transform: rotate(8deg) translateY(-3px); } }
.w-zoom { animation: wZoom 1.6s ease-in-out; }
@keyframes wZoom { 40% { transform: translateX(46px); } 60% { transform: translateX(46px); } }
/* the toy train on the rug (a find of world.js): two laps round it, turned the way it goes, smaller at the back */
.w-loop { animation: wLoop 3.2s linear 2; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes wLoop {
  0% { transform: translate(0, 0) scale(1, 1); }
  12.5% { transform: translate(31px, -2.3px) scale(.97, .97); }
  24.9% { transform: translate(44px, -8px) scale(.94, .94); }
  25% { transform: translate(44px, -8px) scale(-.94, .94); }
  37.5% { transform: translate(31px, -13.7px) scale(-.9, .9); }
  50% { transform: translate(0, -16px) scale(-.88, .88); }
  62.5% { transform: translate(-31px, -13.7px) scale(-.9, .9); }
  74.9% { transform: translate(-44px, -8px) scale(-.94, .94); }
  75% { transform: translate(-44px, -8px) scale(.94, .94); }
  87.5% { transform: translate(-31px, -2.3px) scale(.97, .97); }
  100% { transform: translate(0, 0) scale(1, 1); }
}
/* the moon flower's light at night (world.js glowSVG, over the dark of the night) */
.w-glow { animation: wGlow 2.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes wGlow { from { opacity: .65; transform: scale(.9); } to { opacity: 1; transform: scale(1.08); } }
.w-spin { animation: wSpin 1.2s ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes wSpin { 50% { transform: scaleX(-1); } }
.w-lid { transition: transform .35s ease; transform-box: fill-box; transform-origin: 10% 100%; }
.w-lid.open { transform: rotate(-24deg) translateY(-6px); }
.w-radio.on { animation: wBop .33s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes wBop { to { transform: scale(1.06, .94); } }
.w-drops circle { animation: wDrip .5s linear infinite; }
@keyframes wDrip { to { transform: translateY(14px); opacity: 0; } }
.w-boom { animation: wBoom .4s ease-out; }
@keyframes wBoom { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.3); } }
.w-blink { animation: wBlink 4.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wBlink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
/* the calendar on the wall and the switch: their words big enough to read on a phone (15.10 review: 今天 was 9 px, the weekday 8) */
.w-caltop { font: 700 12px var(--font-zh); fill: #FFFFFF; } .w-caldate { font: 900 24px var(--font); fill: #232120; } .w-calwd { font: 800 10.5px var(--font); fill: #615C56; }
.w-swbtn { fill: #E9DFCD; stroke: #232120; stroke-width: 2; } .w-sw.on .w-swbtn { fill: #F2B630; }
.w-swch { font: 700 17px var(--font-zh); fill: #232120; pointer-events: none; }
.w-spark { animation: wBoom .9s ease-out forwards; }
/* the heroes */
.walking .w-bob { animation: wWalk .3s ease-in-out infinite alternate; }
@keyframes wWalk { to { transform: translateY(-4px) rotate(2deg); } }
.a-dance .w-bob { animation: wDance .45s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes wDance { from { transform: rotate(-7deg); } to { transform: rotate(7deg) translateY(-4px); } }
.a-jump .w-bob { animation: wJump .5s ease-out infinite; }
@keyframes wJump { 50% { transform: translateY(-22px); } }
.a-wave .w-arm-r { animation: wWave .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 20% 10%; }
@keyframes wWave { to { transform: rotate(-30deg); } }
/* the coach line */
.w-coach { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.w-face { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); display: block; }
.w-face svg { width: 100%; height: 100%; display: block; }
/* the line of Bao keeps three lines of height: the buttons under it do not jump when he speaks; a longer line gets a smaller font (world.js say) */
.w-bubble { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-size: 1rem; line-height: 1.3;
  height: calc(3.9rem + 20px); overflow: hidden; display: flex; align-items: center; }
.w-bubble.long { font-size: .88rem; line-height: 1.22; }
.w-bubble.longer { font-size: .78rem; line-height: 1.16; }
.w-line { min-width: 0; }
.w-bubble.new { animation: wPop .3s ease; }
@keyframes wPop { from { transform: scale(.96); } }
.w-who { color: var(--accent); }
/* the actions */
.w-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w-act { display: grid; justify-items: center; gap: 2px; min-height: 76px; padding: 8px 4px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); font: 900 1rem var(--font);
  box-shadow: 0 4px 0 var(--press), inset 0 0 0 2px var(--line); cursor: pointer; }
.w-act:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--press), inset 0 0 0 2px var(--line); }
.w-act svg { width: 36px; height: 30px; }
.w-act small { font-size: .78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.w-act.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-deep); }
.w-act.primary small { color: inherit; opacity: .85; }
/* a narrow phone (320 px): «Поручения» stays inside its button */
@media (max-width: 359px) { .w-act { font-size: .84rem; padding: 8px 2px; } .w-act small { font-size: .68rem; } .w-act svg { width: 32px; height: 27px; } }
/* the sheets */
.w-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 82vh; overflow-y: auto; transform: translateY(calc(100% + 48px)); transition: transform .3s ease;   /* + its shadow: hidden, it leaves no dark band at the bottom */
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(31, 29, 27, .25);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.w-sheet.open { transform: none; }
.w-sheethead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.w-sheethead h2 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.w-sheetpage { display: grid; gap: 10px; max-width: 560px; margin: 0 auto; }
.w-today { margin: 0; font-size: 1.05rem; }
.w-today .zh, .w-tomorrow .zh { font-size: 1.15em; color: var(--accent); }
.w-tasklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.w-tasklist li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--ground); }
.w-tasklist li.done { background: var(--good-soft); }
.w-check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); color: var(--good); font-weight: 900; }
.w-rew { color: var(--gold); font-variant-numeric: tabular-nums; }
.w-tomorrow { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.w-mapsvg { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: inset 0 0 0 2px #C9A16E; }
.w-st { cursor: pointer; }
.w-stch { font: 700 18px var(--font-zh); fill: #232120; pointer-events: none; }
.w-st:not(.open) .w-stch { fill: #8A8F96; }
.w-stcard { display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: var(--ground); min-height: 64px; }
.w-stname { margin: 0; font-size: 1.1rem; font-weight: 900; }
.w-stname .zh { color: var(--accent); }
.w-stnote { margin: 0; color: var(--ink-soft); }
.w-drawer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w-dcard { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 0; border-radius: 16px; background: #FFF6E6; color: #232120; font: 800 .8rem var(--font); line-height: 1.15;
  box-shadow: inset 0 0 0 2px #E4C9A1; cursor: grab; touch-action: none; }
.w-dcard svg { width: 100%; max-width: 92px; height: 70px; pointer-events: none; }
.w-ghost { position: fixed; z-index: 60; width: 110px; pointer-events: none; transform: translate(-50%, -85%); filter: drop-shadow(0 10px 6px rgba(0, 0, 0, .3)); }
.w-ghost svg { width: 100%; height: auto; }
.w-scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim, rgba(31, 29, 27, .42)); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.w-sheet.open ~ .w-scrim { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .w-layer, .w-rain path, .w-star, .w-steam path, .w-zzz text, .w-fish, .w-catplay, .w-radio.on, .w-blink, .walking .w-bob, .a-dance .w-bob, .a-jump .w-bob, .a-wave .w-arm-r,
  .w-loop, .w-zoom, .w-spin, .w-glow { animation: none !important; }
  .w-hero { transition-duration: 0ms !important; }
}
/* the ticket on the result screen of a lesson (app.js renderResult) */
.w-grant { margin: 0; display: inline-flex; align-items: center; gap: 8px; justify-self: center; padding: 8px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-weight: 900; }
.w-grant svg { width: 28px; height: 22px; }
/* the world's own toast: at the top, the actions under the scene stay free */
.w-toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 55; transform: translate(-50%, -20px); max-width: min(90vw, 420px);
  padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--ground); font-weight: 800; text-align: center; opacity: 0; pointer-events: none; }
.w-toast.show { animation: wToast 2.8s ease forwards; }
@keyframes wToast { 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
/* the ride (world-ride.js): the scene keeps its paper colours; the train of the captain (train.js) rolls on the rails of the scene */
.w-ride { position: relative; width: 100%; aspect-ratio: 360 / 230; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 3px #232120; background: #DDF2FF; max-width: 100%; }
.w-ridebg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w-ridetrain { position: absolute; left: 1%; bottom: 7.5%; width: 64%; }
.w-ridetrain .tr-train { width: 100%; height: auto; display: block; }
.w-rideev { position: absolute; inset: 0; pointer-events: none; }
.w-rideev > * { pointer-events: auto; }
.w-ridedark { position: absolute; inset: 0; pointer-events: none; background: rgba(12, 12, 30, 0); transition: background .6s ease; }
.w-ridedark.on { background: rgba(12, 12, 30, .86); }
.w-ridedark.on.lit { background: radial-gradient(circle at 70% 70%, rgba(255, 233, 160, .25) 0 18%, rgba(12, 12, 30, .55) 42%); }
.w-rideov { position: absolute; inset: 0; pointer-events: none; }
.w-rideov > * { pointer-events: auto; }
.w-evobj { position: absolute; border: 0; padding: 0; background: none; cursor: pointer; }
.w-evobj svg { width: 100%; height: auto; display: block; }
.w-cow { right: 6%; bottom: 9%; width: 26%; animation: wCowIn .9s ease-out both; }
.w-cow.scared { animation: wCowShake .3s ease-in-out 2; }
@keyframes wCowIn { from { transform: translateX(60%); opacity: 0; } }
@keyframes wCowShake { 50% { transform: translateX(-6px) rotate(-4deg); } }
.w-rocks { right: 6%; bottom: 8%; width: 24%; animation: wCowIn .6s ease-out both; }
.w-junction { position: absolute; right: 3%; bottom: 14%; display: grid; gap: 6px; }
.w-sign { display: grid; justify-items: center; min-width: 70px; min-height: 52px; padding: 4px 8px; border: 0; border-radius: 10px; background: #FFF6E6; color: #232120; box-shadow: 0 0 0 3px #232120, 0 4px 0 #8A5A2B; cursor: pointer; }
.w-sign .zh { font-size: 1.7rem; line-height: 1.1; }
.w-sign small { font-size: .8rem; color: #615C56; }
.w-ticket { position: absolute; left: 3%; top: 6%; padding: 4px 10px; border-radius: 10px; background: #F2B630; color: #232120; font-weight: 900; box-shadow: 0 0 0 2.5px #232120; }
.w-ticket .zh { font-size: 1.25rem; }
.w-tunnel { position: absolute; inset: 0; }
.w-crystal { position: absolute; width: 11%; border: 0; padding: 0; background: none; opacity: 0; transform: scale(.6); transition: opacity .4s ease, transform .4s ease; cursor: pointer;
  left: calc(52% + var(--k) * 14%); top: calc(14% + var(--k) * 9%); pointer-events: none; }
.w-crystal.show { opacity: 1; transform: none; pointer-events: auto; filter: drop-shadow(0 0 8px #9FE3FF); }
.w-crystal.got { opacity: .35; filter: none; }
.w-crystal svg { width: 100%; height: auto; display: block; }
.w-rainov { position: absolute; inset: 0; pointer-events: none; }
.w-rainov i { position: absolute; top: -10%; left: calc(var(--k) * 3.4%); width: 2px; height: 12%; background: #BFE3FF; border-radius: 2px; animation: wRainFall .6s linear infinite; animation-delay: calc(var(--k) * -.09s); }
@keyframes wRainFall { to { transform: translate(-14px, 900%); } }
.w-rbow { left: 22%; top: 6%; width: 56%; animation: wFadeIn .8s ease both; }
@keyframes wFadeIn { from { opacity: 0; } }
.w-halt { position: absolute; right: 3%; bottom: 9%; width: 28%; transition: transform .8s ease, opacity .8s ease; }
.w-halt svg { width: 100%; display: block; }
.w-halt.gone .w-riderpic { transform: translate(-160%, 10%) scale(.6); opacity: 0; animation: none; }   /* the wave would hold the transform: no walk into the train */
.w-riderpic { position: absolute; left: 22%; bottom: 44%; width: 56%; transition: transform .9s ease-in, opacity .9s ease-in; animation: wWaveR .6s ease-in-out infinite alternate; }
@keyframes wWaveR { to { transform: rotate(-6deg); } }
.w-shoot { left: 30%; top: 4%; width: 32%; animation: wShoot 3s linear both; }
@keyframes wShoot { from { transform: translate(120%, -20%); } to { transform: translate(-80%, 40%); opacity: .2; } }
.w-arrive { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; padding: 12px 18px; border-radius: 18px; background: rgba(255, 246, 230, .96);
  box-shadow: 0 0 0 3px #232120; color: #232120; text-align: center; animation: wPopC .4s ease both; min-width: 60%; }
@keyframes wPopC { from { transform: translate(-50%, -50%) scale(.96); } }      /* the pop keeps the card in the middle */
.w-arrivez { margin: 0; font-size: 2.6rem; line-height: 1; color: #B53F2B; }
.w-arriven { margin: 0; font-weight: 900; font-size: 1.1rem; }
.w-arrivem { margin: 0; font-weight: 800; color: #2D7A5E; }
.w-ridebar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.w-rideend { font-size: 1.4rem; color: var(--ink-soft); }
.w-rideend.to { color: var(--accent); }
.w-ridetrack { position: relative; height: 10px; border-radius: 999px; background: var(--line); }
.w-ridetrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--good); }
.w-ridedot { position: absolute; top: 50%; width: 22px; height: 22px; margin-left: -11px; margin-top: -11px; border-radius: 50%; background: #E5483D; box-shadow: 0 0 0 3px #232120; }
.w-ridectl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: stretch; }
.w-lever { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.w-lv { min-height: 48px; padding: 0 2px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 900 .95rem var(--font); cursor: pointer; }
.w-lv.on { background: var(--accent); color: var(--accent-ink); }
.w-horn, .w-light { display: grid; justify-items: center; gap: 0; min-width: 64px; padding: 4px 6px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); font: 800 .78rem var(--font);
  box-shadow: 0 4px 0 var(--press), inset 0 0 0 2px var(--line); cursor: pointer; }
.w-horn svg, .w-light svg { width: 32px; height: 32px; }
/* a narrow phone: «Быстро» stays whole on the lever (measured 15.10: 64 px of text and padding in a 56 px key at 360) */
@media (max-width: 389px) { .w-lv { font-size: .86rem; } }
@media (max-width: 359px) { .w-lv { font-size: .76rem; } .w-horn, .w-light { min-width: 52px; font-size: .72rem; } }
.w-light.on { background: var(--gold-soft); box-shadow: 0 4px 0 var(--press), inset 0 0 0 3px var(--gold); }
@media (prefers-reduced-motion: reduce) { .w-cow, .w-rocks, .w-rainov i, .w-riderpic, .w-shoot, .w-rbow { animation: none !important; } }
/* the stations (world-station.js): a scene of its own, the residents are the stickers of the course */
.w-station { position: relative; width: 100%; aspect-ratio: 360 / 260; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 3px #232120; background: #CFEFC4; }
.w-stbg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w-stpanda { position: absolute; left: 4%; bottom: 30%; width: 24%; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .15)); }
.w-shoots { position: absolute; inset: 0; }
.w-shoot2 { position: absolute; width: 9%; margin-left: -4.5%; border: 0; padding: 0; background: none; cursor: pointer; animation: wSprout .25s ease-out both; }
.w-shoot2 svg { width: 100%; height: auto; display: block; }
.w-shoot2.got { animation: wGot .3s ease-in forwards; }
.w-shoot2.down { animation: wDown .3s ease-in forwards; }
@keyframes wSprout { from { transform: translateY(40%) scaleY(.2); opacity: 0; } }
@keyframes wGot { to { transform: translateY(-60%) scale(1.3); opacity: 0; } }
@keyframes wDown { to { transform: translateY(40%) scaleY(.2); opacity: 0; } }
.w-stcount { position: absolute; right: 3%; top: 4%; display: grid; justify-items: center; min-width: 74px; padding: 6px 10px; border-radius: 14px; background: rgba(255, 246, 230, .95); box-shadow: 0 0 0 2.5px #232120; color: #232120; }
.w-stcount b { font-size: 1.8rem; line-height: 1; } .w-stcount .zh { font-size: 1.1rem; color: #B53F2B; } .w-stcount .py { font-size: .85rem; } .w-stcount small { font-size: .75rem; color: #615C56; }
.w-stbao { position: absolute; left: 6%; bottom: 20%; width: 18%; }
.w-stbao svg { width: 100%; height: auto; display: block; }
.w-rod { position: absolute; left: 14%; bottom: 30%; width: 50%; pointer-events: none; }
.w-float { position: absolute; left: 58%; top: 56%; width: 7%; border: 0; padding: 0; background: none; cursor: pointer; animation: wBob 1.2s ease-in-out infinite alternate; }
.w-float svg { width: 100%; height: auto; display: block; }
.w-float.bite { animation: wBite .25s ease-in-out infinite alternate; }
@keyframes wBob { to { transform: translateY(4px); } }
@keyframes wBite { to { transform: translateY(14px); } }
.w-catch { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); }
.w-catchcard { padding: 8px 12px; border-radius: 16px; background: rgba(255, 246, 230, .96); box-shadow: 0 0 0 3px #232120; animation: wPop .35s ease both; }
.w-catchcard svg, .w-catchcard img { width: 110px; height: auto; display: block; }
.w-stfruit { position: absolute; width: 11%; bottom: 32%; } .w-stfruit.a { left: 8%; } .w-stfruit.b { left: 42%; } .w-stfruit.c { left: 75%; }
.w-stseller { position: absolute; left: 36%; bottom: 4%; width: 28%; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .15)); }
.w-constel { position: absolute; right: 2%; top: 4%; width: 52%; aspect-ratio: 1; }
.w-constsvg { width: 100%; height: 100%; display: block; }
.w-cstar { fill: rgba(255, 243, 176, .55); cursor: pointer; }
.w-cstroke.now .w-cstar { fill: #FFE27A; animation: wTwinkle .8s ease-in-out infinite alternate; }
.w-cline { fill: none; stroke: #FFE27A; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.w-constel.done .w-constsvg { filter: drop-shadow(0 0 10px #FFE27A); }
.w-shopgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w-shopcard { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 0; border-radius: 16px; background: #FFF6E6; color: #232120; font: 800 .8rem var(--font); line-height: 1.15; box-shadow: inset 0 0 0 2px #E4C9A1; cursor: pointer; }
.w-shopcard svg, .w-shopcard img { width: 100%; max-width: 84px; height: 62px; object-fit: contain; }
.w-shopcard b { display: inline-flex; align-items: center; gap: 3px; font-size: .95rem; }
.w-shopcard b svg { width: 18px; height: 18px; }
.w-shopcard b .zh { font-style: normal; color: #B53F2B; }
.w-shopcard em { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 999px; background: #E5483D; color: #fff; font: 900 .62rem var(--font); font-style: normal; }
.w-shopcard.ask { box-shadow: inset 0 0 0 3px #E1A12E; background: #FBEFD6; }
.w-fishlist { display: grid; gap: 6px; }
.w-fishrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 10px; border: 0; border-radius: 14px; background: var(--ground); color: var(--ink); font: 800 .95rem var(--font); text-align: left; cursor: pointer; }
.w-fishrow svg, .w-fishrow img { width: 64px; height: 36px; object-fit: contain; }
.w-fishrow b { display: inline-flex; align-items: center; gap: 3px; } .w-fishrow b svg { width: 18px; height: 18px; }
.w-calboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.w-calday { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
.w-calday.now { box-shadow: inset 0 0 0 3px var(--accent); }
.w-calday .zh { font-size: 1.5rem; } .w-calday .py { font-size: .95rem; } .w-calday b { font-size: .85rem; color: var(--ink-soft); }
/* the album of the train */
.w-albsum { margin: 0; font-size: 1.05rem; }
.w-albgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.w-alb { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 8px 4px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); text-align: center; font-size: .72rem; line-height: 1.15; color: var(--ink-soft); min-height: 88px; min-width: 0; }
.w-alb > span:last-child { max-width: 100%; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }     /* «Обсерватория» in a 320 px cell */
.w-alb.got { color: var(--ink); box-shadow: inset 0 0 0 2px var(--gold); }
.w-alb > svg, .w-alb > img, .w-albicon { width: 100%; max-width: 60px; height: 44px; object-fit: contain; display: grid; place-items: center; }
.w-albicon > svg, .w-albicon > img { width: 100%; height: 44px; object-fit: contain; }      /* a px height: a % one grows with the picture in a grid */
.w-albq { width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.4rem; color: var(--ink-soft); }
.w-albhint { margin: -4px 0 0; font-size: .86rem; color: var(--ink-soft); }
.w-stamp { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 3px solid #C23B26; color: #C23B26; font-size: 1.3rem; }
.w-stamp.night { border-color: #233064; color: #233064; background: #FFE27A; }
/* the garden and the aquarium wagons */
.w-bed { cursor: pointer; }
.w-bedtxt { font: 800 11px var(--font); fill: #5B3A1A; }
.w-swim { cursor: pointer; }
.w-swimg { animation: wSwim 3.2s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -.7s); }
@keyframes wSwim { to { transform: translate(22px, 6px); } }
@media (prefers-reduced-motion: reduce) { .w-shoot2, .w-float, .w-swimg, .w-cstroke.now .w-cstar { animation: none !important; } }
