/* screens.css: map, tier sheet, mini-games, win card, reduced motion (ported from prototypes/game.html).
   Talks to: app/index.html and every component that uses these classes.
   Update: change a look here; class names are used by the JS components. */
/* ---------- full screens (map, mini-game) ---------- */
.screen {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column;
  height: 100vh; height: 100dvh; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); visibility: hidden; transition: transform .35s cubic-bezier(.2,.9,.3,1.1), visibility 0s .35s;
}
.screen.open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2,.9,.3,1.1); }
/* B23 (Guy 06.11 20:17 "light, fast, flowing"): a screen that is not shown (hidden below, or the map under an open game) pauses its endless
   animations (the family screen's 7 figures, the game's speaker pulse kept ticking every frame on the island); they go on when it opens */
/* no body:has() here: Chrome re-checks a :has() on <body> at every DOM change of the island (each frame), ui/screens.js sets .under */
.screen:not(.open), .screen:not(.open) *, #mapScreen.under, #mapScreen.under * { animation-play-state: paused !important; }
.bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: max(6px, env(safe-area-inset-top)) 10px 6px; }
.bar h2 { flex: 1; min-width: 0; margin: 0; font-weight: normal; font-size: 17px; line-height: 1.5; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.back { min-height: 48px; min-width: 48px; padding: 0 12px; font-size: 16px; --b: #6A4BF0; --b-hi: #9C86FF; --b-dark: var(--purple-dark); }
.bar .pill { flex: 0 0 auto; }
#mapScreen { background: linear-gradient(180deg, #3E2C8C 0%, #4C9A6A 30%, #6CC46A 100%); }
#mapScreen .bar { background: rgba(30,18,80,.55); }
#mapWrap { flex: 1 1 auto; min-height: 0; position: relative; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
#mapSvg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.badge { cursor: pointer; }
.energy-ring { animation: nodePulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.breathe { animation: breathe 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 80%; }
@keyframes breathe { 50% { transform: scale(1.06, .96); } }
.chest { cursor: pointer; }
.chest-shake { animation: chestShake 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }
@keyframes chestShake { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 84% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); } }
#chestScrim { position: fixed; inset: 0; z-index: 58; background: rgba(20,12,60,.45); }
#chestCard { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 59; width: min(340px, calc(100vw - 32px)); background: var(--sheet); border-radius: 24px; padding: 8px 16px 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#chestCard h3 { margin: 0; font-weight: normal; font-size: 22px; } #chestCard p { margin: 0 0 8px; font-size: 17px; }
.chest-opts { display: flex; gap: 8px; justify-content: center; } .chest-opt { flex: 1 1 0; font-size: 28px; min-height: 64px; } .chest-opt.soft { opacity: .5; }
#chestScrim[hidden], #chestCard[hidden] { display: none; }
.star-row { margin-top: 10px; padding: 8px 10px 10px; border-radius: 18px; background: #fff; box-shadow: 0 2px 0 rgba(43,35,80,.08), 0 6px 14px rgba(43,35,80,.08); }
.star-row.locked { opacity: .6; background: #F1EEF7; box-shadow: none; }
.star-row.locked .game-pick { box-shadow: none; border-bottom-width: 2px; transform: none; }
.star-row.gold { box-shadow: 0 0 0 2px #FFC93C inset, 0 6px 14px rgba(43,35,80,.08); }
.star-row.diamond { box-shadow: 0 0 0 2px #7FE3FF inset, 0 6px 14px rgba(43,35,80,.08); }
.star-row.target { animation: mapGlow 1.2s ease-in-out infinite; }
.star-head { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.6; }
.star-head .stars { display: inline-flex; } .star-name { flex: 1; }
.star-games { display: flex; gap: 8px; margin-top: 6px; }
.game-pick { flex: 1 1 0; min-width: 0; min-height: 96px; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 6px; font-size: 15px; font-weight: 700; line-height: 1.35; text-align: center; border-radius: 20px; --b: #6A4BF0; --b-hi: #9C86FF; --b-dark: var(--purple-dark); }
.game-pick[data-g="b"] { --b: #E0457B; --b-hi: #FF8AB0; --b-dark: #8A1E45; }
.game-pick svg { flex: 0 0 auto; width: 52px; height: 52px; background: #fff; border-radius: 16px; padding: 4px; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.game-pick .gp-t { display: flex; flex-direction: column; align-items: center; min-width: 0; } .game-pick small { font-size: 12px; opacity: .9; }
.game-pick.done { --b: #2EB86A; --b-hi: #6EE59A; --b-dark: #1B7F45; }
.game-pick.bonus { --b: #1E9BD6; --b-hi: #7FE3FF; --b-dark: #135E8C; }
.game-pick:disabled, .game-pick.locked-pick { --b: #A8A3B8; --b-hi: #D3CFE0; --b-dark: #7C7690; cursor: default; }
.soon-card { margin: 8px auto; max-width: 320px; background: var(--sheet); border-radius: 24px; padding: 10px 16px 14px; text-align: center; box-shadow: 0 10px 24px rgba(43,35,80,.25); color: var(--ink); }
.soon-card h3 { margin: 4px 0 0; font-weight: normal; font-size: 22px; } .soon-card p { margin: 2px 0 10px; font-size: 17px; line-height: 1.7; }
.soon-card .btn3d { width: 100%; }
.node { cursor: pointer; }
.pulse { animation: nodePulse 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nodePulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: .2; } }
.pathGlow { stroke-dasharray: 2 16; animation: flow 1.2s linear infinite; }
#mapToast { position: fixed; z-index: 25; top: calc(env(safe-area-inset-top) + 66px); left: 50%; transform: translateX(-50%); background: #fff; border-radius: 14px; padding: 2px 14px; font-size: 16px; line-height: 1.9; box-shadow: 0 4px 12px rgba(0,0,0,.25); opacity: 0; transition: opacity .3s; pointer-events: none; width: max-content; max-width: 92%; text-align: center; }
#mapToast.show { opacity: 1; }

/* tier sheet */
#tierScrim { position: fixed; inset: 0; z-index: 30; background: rgba(20,12,60,.45); opacity: 0; pointer-events: none; transition: opacity .25s; }
#tierScrim.open { opacity: 1; pointer-events: auto; }
#tierSheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--sheet); border-radius: 26px 26px 0 0;
  padding: 6px 14px calc(14px + env(safe-area-inset-bottom)); transform: translateY(calc(100% + 80px)); transition: transform .3s cubic-bezier(.2,.9,.3,1.15);
  box-shadow: 0 -8px 24px rgba(43,35,80,.3); max-height: 88dvh; overflow-y: auto;
}
#tierSheet.open { transform: none; }
#tierSheet h3 { margin: 0; font-weight: normal; font-size: 20px; line-height: 1.9; text-align: center; }
#tierSheet .desc { margin: 0 0 6px; font-size: 15px; text-align: center; opacity: .8; line-height: 1.8; }
.tier-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: right; margin-top: 8px; min-height: 60px; padding: 4px 12px;
  font-size: 16px; line-height: 1.6; justify-content: flex-start;
  --b: #2EB86A; --b-hi: #6EE59A; --b-dark: #1B7F45;
}
.tier-btn.t2 { --b: #2F7DE1; --b-hi: #7CB6FF; --b-dark: #1C56A8; }
.tier-btn.t3 { --b: #8E44AD; --b-hi: #C38BE0; --b-dark: #5E2A78; }
.tier-btn.locked { --b: #A8A3B8; --b-hi: #D3CFE0; --b-dark: #7C7690; color: #F4F2FA; }
.tier-btn .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tier-btn small { font-size: 13px; opacity: .9; }
.tier-btn .stars { flex: 0 0 auto; display: inline-flex; }

/* ---------- mini-game ---------- */
#gameScreen { background: radial-gradient(120% 80% at 50% 10%, #FFF6FF 0%, #E3D9FF 45%, #BFE9DA 100%); }
#gameScreen .bar { background: linear-gradient(180deg, #5B3FD6, #7B5CFF); border-bottom: 4px solid #3F2AA8; }
.prompt { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; background: #fff; border-radius: 18px; padding: 4px 8px 4px 12px; border-bottom: 4px solid #D8CCF5; box-shadow: 0 4px 10px rgba(43,35,80,.12); }
.prompt p { margin: 0; flex: 1; font-size: 17px; line-height: 1.85; }
.speak { flex: 0 0 auto; width: 52px; min-height: 52px; padding: 0; --b: #3AAFE3; --b-hi: #8BDBFF; --b-dark: #1F7AB0; }
#gNote { flex: 0 0 auto; margin: 6px 12px 0; text-align: center; font-size: 15px; line-height: 1.8; background: #FFF4C8; border-radius: 12px; display: none; }
#gNote.show { display: block; }
#arena { flex: 1 1 auto; min-height: 0; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; padding-bottom: 24px; }
#arena.won { justify-content: flex-start; }
#actors { flex: 0 1 240px; min-height: 130px; position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0; }
#gBlinky { height: 100%; max-height: 240px; aspect-ratio: 300 / 394; overflow: visible; display: block; }
.stone.held { position: absolute; left: 50%; bottom: 1%; margin-left: -33px; z-index: 3; animation: none; transform: rotate(-8deg) scale(.88); pointer-events: none; }
.stone.held.fixed { transform: rotate(0) scale(.95); filter: drop-shadow(0 0 10px #FFF3A0); }
#gWizard { position: absolute; right: 4%; bottom: 0; height: 62%; max-height: 150px; aspect-ratio: 130 / 196; overflow: visible; }
#gBubble { left: 50%; top: 10px; transform: translate(-50%, 0) scale(.8); font-size: 19px; }
#gBubble.show { transform: translate(-50%, 0) scale(1); }
#gBubble::after { display: none; }
#board { flex: 0 0 auto; min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 8px; position: relative; }
#pool { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 6px 10px 4px; min-height: 96px; align-content: center; }
.stone {
  position: relative; width: 66px; height: 76px; border: 0; padding: 0; background: none; cursor: pointer; touch-action: none;
  animation: floaty 2.6s ease-in-out infinite; color: #fff;
}
.stone:nth-child(2n) { animation-delay: -1.1s; } .stone:nth-child(3n) { animation-delay: -.5s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.stone svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stone .g { position: absolute; left: 0; right: 0; top: 9px; text-align: center; font-family: 'Varela Round', 'Rubik', sans-serif; font-size: 36px; line-height: 1.45; text-shadow: 0 2px 0 rgba(0,0,0,.28), 0 0 8px rgba(255,255,255,.4); pointer-events: none; }
.stone .g.sm { font-size: 24px; top: 16px; }
.stone.drop { margin-bottom: 14px; }
.stone.drop .g { font-size: 54px; top: -2px; }
.stone .nm { position: absolute; left: -8px; right: -8px; bottom: -18px; text-align: center; font-size: 13px; line-height: 1.4; color: var(--ink); pointer-events: none; }
.stone:active svg { transform: translateY(3px); }
.stone.dragging { animation: none; z-index: 40; transition: none; }
.stone.shake { animation: shake .45s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-6deg); } 40% { transform: translateX(7px) rotate(5deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.stone.hint::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,140,.95), rgba(255,240,140,0) 70%); animation: slotPulse 1s ease-in-out infinite; }
.stone.used { visibility: hidden; }
.flyer { position: fixed; z-index: 55; pointer-events: none; transition: transform .45s cubic-bezier(.5,-.3,.6,1), opacity .45s; }
.cart-row { display: flex; align-items: flex-end; gap: 2px; transition: transform 1.4s ease-in; }
.cart-row.go { transform: translateX(-140vw); }
.cart { width: 64px; height: 58px; position: relative; }
.cart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cart .g { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: 30px; line-height: 1.5; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.slotc { width: 52px; height: 58px; border-radius: 16px; border: 3px dashed #9C86FF; background: rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1.5; color: var(--ink); }
.slotc.filled { border-style: solid; border-color: #6A4BF0; background: linear-gradient(180deg, #fff, #EDE6FF); }
.slotc.op { width: 30px; border: 0; background: none; }
.bigword { font-size: 48px; line-height: 1.5; color: #fff; text-shadow: 0 3px 0 #4B32C8, 0 0 14px #FFE88A; white-space: nowrap; animation: popin .5s cubic-bezier(.3,1.7,.5,1) both; }
#cauldron { width: 120px; height: 92px; overflow: visible; }
.done-btn { --b: #2EB86A; --b-hi: #6EE59A; --b-dark: #1B7F45; min-height: 52px; font-size: 18px; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: rgba(75,50,200,.18); border: 2px solid rgba(75,50,200,.35); }
.dots i.on { background: radial-gradient(circle at 35% 30%, #FFF6B0, #FFB72B); border-color: #D9921A; }
/* owner spec 28 §3.1: no quiet-moment screen; a small, light pearl pane in the centre for a moment (it never blocks a tap) */
#calm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 8; display: none; align-items: center; justify-content: center; max-width: min(240px, calc(100% - 48px)); box-sizing: border-box; pointer-events: none;
  background: rgba(255,255,255,0.94); color: #1E293B; border: 1.5px solid #E2E8F0; border-radius: 22px; box-shadow: 0 6px 18px rgba(15,23,42,0.08);
  font-size: 18px; text-align: center; padding: 8px 18px; line-height: 1.5; }
#calm.show { display: flex; }
#winPanel { position: absolute; inset: 0; z-index: 9; display: none; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, rgba(30,18,80,0) 35%, rgba(30,18,80,.35) 100%); padding: 10px 12px 14px; }
#winPanel.show { display: flex; }
.win-card { width: 100%; max-width: 360px; background: var(--sheet); border-radius: 26px; padding: 4px 12px 10px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: popin .5s cubic-bezier(.3,1.7,.5,1) both; transform-origin: 50% 50%; }
.win-card h3 { margin: 0; font-weight: normal; font-size: 24px; line-height: 1.6; display: flex; align-items: center; justify-content: center; gap: 8px; }
.win-card .rw { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 0; font-size: 20px; }
.win-card .rw span { display: inline-flex; align-items: center; gap: 4px; direction: ltr; }
.win-card .built { font-size: 16px; margin: 0; color: #1B7F45; display: flex; align-items: center; justify-content: center; gap: 6px; }
.win-card .btn3d { width: 100%; max-width: none; margin-top: 6px; min-height: 50px; font-size: 18px; line-height: 1.4; white-space: normal; padding: 4px 10px; }
.win-row { display: flex; gap: 8px; } .win-row .btn3d { flex: 1 1 0; }
.arrowBounce { animation: arrowB .8s ease-in-out infinite; }
@keyframes arrowB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.tier-btn.target { animation: mapGlow 1.2s ease-in-out infinite; }
#mapToast svg, #tierDesc svg { vertical-align: middle; margin-inline-end: 4px; }
.sheet-done { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 0 6px var(--sheet), inset 0 2px 0 rgba(255,255,255,.45); }
.bubble::after { left: var(--tx, 50%); }
.bubble.notail::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .slot-ring, .slot-glow, .swim, .flicker, .smoke, .pulse, .pathGlow, .stone, #mapBtn, .tw, .arrowBounce, .tier-btn.target, .energy-ring, .breathe, .chest-shake, .star-row.target { animation: none !important; }
  #mapWrap { scroll-behavior: auto; }
  .popin { animation-duration: .01s; }
  .screen, #tierSheet { transition-duration: .01s; }
  .cart-row { transition-duration: .3s; }
}
/* ---------- mini-game shell (D-036): floating HUD, hero prompt card, lit stage ---------- */
#gameScreen { background: radial-gradient(120% 70% at 50% 30%, #FFF8E8 0%, #E8DEFF 55%, #BFE9DA 100%); }
#gameScreen .bar.gbar { background: none; border: 0; padding: max(8px, env(safe-area-inset-top)) var(--s3) 0; gap: var(--s2); }
.round-btn { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, #9C86FF, #6A4BF0); border: 2px solid rgba(255,255,255,.55); box-shadow: 0 5px 0 var(--violet-dark), inset 0 2px 0 rgba(255,255,255,.45), var(--sh-1); transition: transform .06s, box-shadow .06s; }
.round-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--violet-dark), inset 0 2px 0 rgba(255,255,255,.45); }
/* the title over its round dots (one column): the dots never sit on the text, whatever the title's length (D-092) */
.g-capsule { flex: 1; min-width: 0; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: var(--r-pill); padding: 0 var(--s3);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-line); box-shadow: var(--sh-1); }
.g-capsule h2 { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: clip; color: var(--ink); text-shadow: none; font-size: 15px; line-height: 1.2; white-space: nowrap; }
#gPips { display: inline-flex; gap: 4px; min-width: 0; max-width: 100%; flex: 0 0 auto; justify-content: center; }
#gPips:empty { display: none; }
#gPips i { box-sizing: border-box; flex: 0 1 9px; min-width: 5px; width: 9px; height: 9px; border-radius: 50%; background: rgba(36,28,74,.14); border: 2px solid rgba(36,28,74,.2); }
#gPips i.done { background: radial-gradient(circle at 35% 30%, #FFF6B0, #FFB72B); border-color: #D9921A; }
#gPips i.now { background: #fff; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,201,60,.45); }
#gameScreen .bar .pill { background: var(--glass); color: var(--ink); height: 48px; border: 1px solid var(--glass-line); border-bottom: 1px solid var(--glass-line); }
#gameScreen .prompt { margin: var(--s2) var(--s3) 0; padding: var(--s2) var(--s3) var(--s2) var(--s2); border-radius: var(--r-card); border: 2px solid #fff; border-bottom: 5px solid #E2D6FF;
  background: linear-gradient(180deg, #FFFFFF, #FFF8EA); box-shadow: var(--sh-2); gap: var(--s3); }
#gameScreen .prompt p { font-size: 18px; font-weight: 700; font-family: 'Rubik', var(--font); line-height: 1.7; color: var(--ink); }
#gGameIcon { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--paper-2); }
#gGameIcon:empty { display: none; }
.prompt .speak { width: 60px; min-height: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; padding: 0;
  background: radial-gradient(circle at 40% 30%, #8BDBFF, #1E9BD6); box-shadow: 0 5px 0 #135E8C, inset 0 2px 0 rgba(255,255,255,.5), 0 0 0 0 rgba(30,155,214,.5); animation: speakPulse 2s ease-in-out infinite; }
.prompt .speak:active { transform: translateY(4px); box-shadow: 0 1px 0 #135E8C; }
@keyframes speakPulse { 50% { box-shadow: 0 5px 0 #135E8C, inset 0 2px 0 rgba(255,255,255,.5), 0 0 0 10px rgba(30,155,214,0); } 0%, 100% { box-shadow: 0 5px 0 #135E8C, inset 0 2px 0 rgba(255,255,255,.5), 0 0 0 0 rgba(30,155,214,.45); } }
#arena { margin: var(--s2) var(--s2) 0; border-radius: var(--r-sheet); background: radial-gradient(90% 60% at 50% 45%, rgba(255,255,255,.75), rgba(255,255,255,.15)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), var(--sh-2); }
#actors { flex: 0 1 260px; min-height: 150px; }
#gBlinky { max-height: 260px; }
#gWizard { max-height: 140px; right: 6%; }
@media (prefers-reduced-motion: reduce) { .prompt .speak { animation: none; } }
/* station encounter (ROBLOX_LOOP §3) */
#encounter { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s5);
  background: radial-gradient(80% 60% at 50% 45%, rgba(255,255,255,.96), rgba(243,236,255,.92)); cursor: pointer; animation: popin .4s var(--spring) both; }
#encounter[hidden] { display: none; }
#encounter p { margin: 0; max-width: 320px; text-align: center; font-size: var(--t-lg); font-weight: 700; line-height: 1.75; color: var(--ink); }
.enc-solved { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin: 0 0 var(--s1); font-size: var(--t-md); color: var(--meadow-dark); }
@media (prefers-reduced-motion: reduce) { #encounter { animation: none; } }
/* 5-path capsule bar (D-037) */
#pathBar { flex: 0 0 auto; display: flex; gap: 6px; padding: 6px var(--s3); justify-content: center; background: rgba(30,18,80,.55); }
.path-cap { position: relative; flex: 1 1 0; max-width: 72px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; cursor: pointer;
  font: inherit; font-family: var(--font-num); font-weight: 700; font-size: var(--t-md); color: var(--ink);
  background: linear-gradient(180deg, #fff, #EDE6FF); border: 2px solid #fff; box-shadow: 0 4px 0 #9C86FF, inset 0 2px 0 #fff; }
.path-cap.on { background: linear-gradient(180deg, #FFE88A, #FFC93C); box-shadow: 0 4px 0 #C7780C, inset 0 2px 0 rgba(255,255,255,.6); }
.path-cap:active { transform: translateY(3px); box-shadow: 0 1px 0 #9C86FF; }
.path-cap.soon { opacity: .8; } .pc-lock { position: absolute; top: -4px; left: -4px; }
#mapWrap.preview::after { content: 'בְּקָרוֹב'; position: sticky; bottom: 40%; display: block; width: max-content; margin: -50vh auto 0; padding: 8px 26px; border-radius: 18px; font-size: var(--t-2xl); font-weight: 700;
  color: #fff; background: linear-gradient(180deg, #9C86FF, #6A4BF0); box-shadow: 0 5px 0 #3F2AA8, var(--sh-2); pointer-events: none; }
#mapWrap.preview #mapSvg .node, #mapWrap.preview #mapSvg .badge, #mapWrap.preview #mapSvg .chest { filter: grayscale(.8) opacity(.5); pointer-events: none; }
/* RTL for part-ordered rows (owner D-036 §4): the first part is always on the right, whatever the page direction.
   Measured 24.10: train cart 1 at x=229 > cart 2 at 163; cauldron slot 1 at 198 > slot 2 at 140 (both right-to-left). */
.cart-row { direction: rtl; }
