/* Terminalerna (flygplats, station, hamn). Allt prefixat .tm-. Palett från spelets :root med reservvärden. */

.tm-root {
  position: absolute; inset: 0; z-index: 30; overflow: hidden;
  container: tm / size;
  color: var(--ink, #3a2e22);
  background: var(--paper, #f6ecd6);
  font-family: 'Fraunces', Georgia, serif;
  user-select: none; -webkit-user-select: none;
  --tm-ink: #3a2e22;
  --tm-dim-o: 0;
  --tm-liv1: #2f5f8a; --tm-liv2: #8fc1d9;
}
.tm-root *, .tm-root *::before, .tm-root *::after { box-sizing: border-box; }
.tm-root [hidden] { display: none !important; }
.tm-root h2, .tm-root p { margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm-root { --tm-dim-o: .26; } }
:root[data-theme="dark"] .tm-root { --tm-dim-o: .26; }

/* ---------- stämning efter världsdel ---------- */
.tm-c-europa { --tm-liv1: #2f5f8a; --tm-liv2: #8fc1d9; }
.tm-c-nordamerika { --tm-liv1: #c8452b; --tm-liv2: #2f4f7a; }
.tm-c-sydamerika { --tm-liv1: #e08a3c; --tm-liv2: #d9628a; --tm-wash: #ff6f91; --tm-wash-o: .05; }
.tm-c-afrika { --tm-liv1: #3f7d3a; --tm-liv2: #efc23f; --tm-wash: #ff9a3d; --tm-wash-o: .08; }
.tm-c-asien { --tm-liv1: #c8452b; --tm-liv2: #efc23f; --tm-wash: #ff7b6b; --tm-wash-o: .04; }
.tm-c-oceanien { --tm-liv1: #2fa6a0; --tm-liv2: #f2d06b; --tm-wash: #38d6c4; --tm-wash-o: .04; }
.tm-g-green { --bd-far-hue: #7f9d8e; --bd-mid-hue: #5f8466; --bd-near-hue: #44694a; --gr: #86a864; }
.tm-g-sand { --bd-far-hue: #d1ad78; --bd-mid-hue: #bb9156; --bd-near-hue: #8d6c3d; --gr: #d6b982; }
.tm-g-snow { --bd-far-hue: #9fb0c6; --bd-mid-hue: #7d93ae; --bd-near-hue: #5f7694; --gr: #e4eaf0; }

/* ---------- tid på dygnet ---------- */
.tm-slot-0 { --tm-sky-top: #9cc6dd; --tm-sky-bot: #fde7bf; --tm-sun: #ffe08a; --tm-sx: 300px; --tm-sy: 196px; --tm-tint: #ffdca0; --tm-tint-o: .1; --tm-lights: 0; --tm-win: #c9e6ee; --tm-sea-a: #b4dbd9; --tm-sea-b: #6fa9ad; }
.tm-slot-1 { --tm-sky-top: #69aedb; --tm-sky-bot: #d4ebf2; --tm-sun: #fff2b0; --tm-sx: 1180px; --tm-sy: 130px; --tm-tint: #fff; --tm-tint-o: 0; --tm-lights: 0; --tm-win: #cfe9f2; --tm-sea-a: #9fd1d6; --tm-sea-b: #4f95a0; }
.tm-slot-2 { --tm-sky-top: #5a5a9a; --tm-sky-bot: #f6a96a; --tm-sun: #ff9a4e; --tm-sx: 1240px; --tm-sy: 205px; --tm-tint: #ff8a50; --tm-tint-o: .17; --tm-lights: .6; --tm-win: #ffcf7a; --tm-sea-a: #e8a98a; --tm-sea-b: #5a6f93; }
.tm-slot-3 { --tm-sky-top: #0d1430; --tm-sky-bot: #2d3b6b; --tm-sun: #fff; --tm-sx: 1240px; --tm-sy: 205px; --tm-tint: #0a1440; --tm-tint-o: .58; --tm-lights: 1; --tm-win: #ffd36a; --tm-sea-a: #2a3a64; --tm-sea-b: #121c3a; }

/* ---------- illustrationen ---------- */
.tm-in { position: absolute; inset: 0; --pa-h: 36px; --fs: clamp(10px, 1.14cqw, 19px); --cw: calc(var(--fs) * .74 + 2px); }
.tm-hall { position: absolute; inset: 0; background: var(--paper, #f6ecd6); }
.tm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tm-svg text { pointer-events: none; }
.tm-hall .i { stroke: var(--tm-ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.tm-hall .thin { stroke-width: 1.4; }
.tm-hall .thick { stroke-width: 4.5; }
.tm-hall .nofill { fill: none; }
.tm-hall .hl { stroke: rgba(255, 255, 255, .38); stroke-width: 3; fill: none; stroke-linecap: round; }
.tm-hall .hl2 { fill: rgba(255, 255, 255, .4); }
.tm-hall .strap { fill: rgba(58, 46, 34, .28); }
.tm-hall .shadow { fill: rgba(40, 25, 10, .2); }
.tm-hall .flr { stroke: rgba(58, 46, 34, .14); stroke-width: 2; fill: none; }
.tm-hall .rim { fill: rgba(255, 255, 255, .3); }
.tm-hall .glare { fill: rgba(255, 255, 255, .13); }
.tm-hall .screen { fill: #8be0a4; }
.tm-hall .bulb { fill: #ffe9a0; stroke: var(--tm-ink); stroke-width: 1.6; }
.tm-hall .belt { stroke: #c8452b; stroke-width: 4; }
.tm-hall .lattice { stroke: rgba(40, 30, 20, .5); stroke-width: 2; fill: none; }
.tm-hall .arch0 { fill: none; stroke: #4a3b2c; stroke-width: 16; stroke-linejoin: round; }
.tm-hall .thinline { stroke: rgba(40, 30, 20, .4); stroke-width: 2; }
.tm-hall .svgt { font-family: 'Fraunces', serif; font-weight: 700; fill: #3a2e22; font-size: 22px; }
.tm-hall .svgt.sign { fill: #fff6e0; font-size: 28px; }
.tm-hall .svgt.sign.sm { font-size: 20px; letter-spacing: .1em; }
.tm-hall .svgt.sgn { fill: #fff; font-size: 34px; letter-spacing: .08em; }
.tm-hall .sgn-in { fill: none; stroke: #fff; stroke-width: 2; }
.tm-hall .kioskin { fill: rgba(58, 46, 34, .38); }
.tm-hall .cratein { fill: rgba(58, 46, 34, .12); }

/* fyllnadsfärger */
.tm-hall .f-paper { fill: #f6ecd6; } .tm-hall .f-paper2 { fill: #efe0bd; }
.tm-hall .f-white { fill: #fbf6ea; } .tm-hall .f-white2 { fill: #ece4d2; }
.tm-hall .f-wood { fill: #d9bf8a; } .tm-hall .f-wood2 { fill: #c49a5c; }
.tm-hall .f-dark { fill: #4a3b2c; } .tm-hall .f-metal { fill: #9d9c94; }
.tm-hall .f-concrete { fill: #cfc6b2; } .tm-hall .f-asphalt { fill: #6b6862; }
.tm-hall .f-red { fill: #c8452b; } .tm-hall .f-blue { fill: #3f6e9a; } .tm-hall .f-yellow { fill: #efc23f; }
.tm-hall .f-green { fill: #5c9552; } .tm-hall .f-orange { fill: #e08a3c; } .tm-hall .f-pink { fill: #d9628a; }
.tm-hall .f-accent { fill: var(--accent, #c8452b); } .tm-hall .f-accent2 { fill: var(--accent-2, #2f6f6a); } .tm-hall .f-accentd { fill: #8a2f1d; }
.tm-hall .f-leaf { fill: #5e9a54; } .tm-hall .f-leaf2 { fill: #447f46; }
.tm-hall .f-trunk { fill: #a67c52; } .tm-hall .f-pot { fill: #c9794d; }
.tm-hall .f-frame { fill: #566468; } .tm-hall .f-ceil { fill: #e4d7bb; }
.tm-hall .f-floor { fill: #e3d3ae; } .tm-hall .f-platform { fill: #d8cdb6; } .tm-hall .f-edge { fill: #bcb09a; }
.tm-hall .f-glassdark { fill: #3d5a66; } .tm-hall .f-glassroof { fill: rgba(190, 222, 235, .6); }
.tm-hall .f-ironring { fill: #6b6e68; } .tm-hall .f-clockface { fill: #fbf4e0; }
.tm-hall .f-stone { fill: #b7a58a; } .tm-hall .f-quay { fill: #cdb890; } .tm-hall .f-hull { fill: #34506b; }
.tm-hall .f-ballast { fill: #8d8473; } .tm-hall .f-pigeon { fill: #9a9aa6; }
.tm-hall .f-liv1 { fill: var(--tm-liv1); } .tm-hall .f-liv2 { fill: var(--tm-liv2); }
.tm-hall .f-ground { fill: var(--gr, #86a864); }
.tm-hall .tm-win { fill: var(--tm-win); }
.tm-hall .rail { stroke: #4a4338; stroke-width: 4; } .tm-hall .sleeper { fill: #6b5436; }
.tm-hall .rw-line { stroke: #efe3c6; stroke-width: 4; stroke-dasharray: 50 40; }
.tm-hall .rwl { fill: #ffd36a; } .tm-hall .tire { fill: #2a2420; }
.tm-hall .rope { fill: none; stroke: #b08a54; stroke-width: 5; stroke-linecap: round; }
.tm-hall .foam { fill: rgba(255, 255, 255, .5); } .tm-hall .seashadow { fill: rgba(20, 50, 60, .3); }
.tm-hall .wave { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 3; stroke-linecap: round; }
.tm-hall .gull { fill: none; stroke: var(--tm-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tm-hall .puff { fill: #ebe5d8; opacity: 0; }

/* fjärran vyer: dimma efter himlens färg */
.tm-hall .bd-far { fill: color-mix(in srgb, var(--tm-sky-bot) 58%, var(--bd-far-hue, #7f9d8e)); }
.tm-hall .bd-mid { fill: color-mix(in srgb, var(--tm-sky-bot) 34%, var(--bd-mid-hue, #5f8466)); }
.tm-hall .bd-near, .tm-hall .bd-tree { fill: color-mix(in srgb, var(--tm-sky-bot) 14%, var(--bd-near-hue, #44694a)); }
.tm-hall .bd-a { fill: color-mix(in srgb, var(--tm-sky-bot) 30%, #c98b6b); }
.tm-hall .bd-b { fill: color-mix(in srgb, var(--tm-sky-bot) 30%, #d9b66a); }
.tm-hall .bd-c { fill: color-mix(in srgb, var(--tm-sky-bot) 30%, #8fb0a3); }
.tm-hall .bd-white { fill: color-mix(in srgb, var(--tm-sky-bot) 30%, #fff); stroke: none; }
.tm-hall .bd-clockface { fill: #fbf4e0; }
.tm-hall .bd-line, .tm-hall .bd-line2 { stroke: color-mix(in srgb, var(--tm-sky-bot) 20%, var(--bd-near-hue, #44694a)); stroke-width: 4; fill: none; }
.tm-hall .bd-line2 { fill: color-mix(in srgb, var(--tm-sky-bot) 30%, var(--bd-near-hue, #44694a)); stroke-width: 6; }
.tm-hall .snowcap { fill: color-mix(in srgb, var(--tm-sky-bot) 25%, #fff); }
.tm-hall .dim { opacity: .7; }
.tm-hall .win-lit { fill: #ffd36a; opacity: .85; }

/* himmel */
.tm-hall .cloud { fill: #fff; opacity: .85; }
.tm-slot-2 .tm-hall .cloud { fill: #ffd8b8; opacity: .8; }
.tm-slot-3 .tm-hall .cloud { fill: #6a76a8; opacity: .4; }
.tm-hall .tm-sun { transform: translate(var(--tm-sx, 300px), var(--tm-sy, 300px)); }
.tm-hall .tm-sun-core { fill: var(--tm-sun); }
.tm-hall .tm-moon { transform: translate(1100px, 140px); display: none; }
.tm-slot-3 .tm-hall .tm-sun { display: none; }
.tm-slot-3 .tm-hall .tm-moon { display: block; }
.tm-hall .moon-disc { fill: #fff6d0; }
.tm-hall .moon-bite { fill: #1b2550; }
.tm-hall .tm-stars { opacity: 0; }
.tm-slot-3 .tm-hall .tm-stars { opacity: 1; }
.tm-hall .tm-star { fill: #fff6d6; }
.tm-slot-3 .tm-hall .tm-star { animation: tm-twinkle 3.5s ease-in-out infinite alternate; }

/* lager ovanpå: tintning, lampor, mörkt läge, korn */
.tm-hall .tm-wash { fill: var(--tm-wash, transparent); opacity: var(--tm-wash-o, 0); pointer-events: none; }
.tm-hall .tm-tint { fill: var(--tm-tint, #fff); opacity: var(--tm-tint-o, 0); pointer-events: none; }
.tm-hall .tm-lights { opacity: var(--tm-lights, 0); pointer-events: none; }
.tm-slot-0 .tm-hall .tm-lights, .tm-slot-1 .tm-hall .tm-lights { display: none; }
.tm-hall .tm-dim { fill: #05070f; opacity: var(--tm-dim-o, 0); pointer-events: none; }
.tm-hall::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .12 0 0 0 .5 -.1'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"); }

/* rörelse i scenen */
.tm-hall .tm-drift { animation: tm-drift linear infinite; }
.tm-hall .tm-plane-up { animation: tm-takeoff 70s linear infinite; animation-delay: -9s; }
.tm-hall .tm-plane-down { animation: tm-land 90s linear infinite; animation-delay: -62s; }
.tm-hall .tm-plane-up, .tm-hall .tm-plane-down { transform: translate(-300px, 246px); }
.tm-hall .tm-cart { animation: tm-cart 60s linear infinite; animation-delay: -20s; }
.tm-hall .tm-train { animation: tm-train 80s linear infinite; animation-delay: -30s; }
.tm-hall .tm-wave { animation: tm-wave linear infinite; }
.tm-hall .tm-bob { animation: tm-bob 7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.tm-hall .tm-trolley { animation: tm-trolley 46s ease-in-out infinite alternate; }
.tm-hall .tm-hoist { animation: tm-swing 5s ease-in-out infinite alternate; transform-origin: 8px 118px; }
.tm-hall .puff { animation: tm-puff 5.4s ease-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.tm-hall .tm-flag { animation: tm-flag 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 0 50%; }
.tm-hall .tm-radar { animation: tm-spin3 3s linear infinite; transform-origin: 610px 194px; }
.tm-hall .tm-peck { animation: tm-peck 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.tm-hall .tm-peck2 { animation-delay: -1.4s; }
.tm-hall .tm-sec { stroke: #c8452b; stroke-width: 1.8; stroke-linecap: round; animation: tm-spin 60s linear infinite; transform-origin: 0 0; }
.tm-hall .hand { stroke-width: 3.4; }
.tm-hall .tm-gull { transform-box: fill-box; }
.tm-hall .tm-gull.g0 { animation: tm-gull 34s linear infinite; }
.tm-hall .tm-gull.g1 { animation: tm-gull2 46s linear infinite; animation-delay: -18s; }
.tm-hall .tm-gull.g2 { animation: tm-gull 52s linear infinite; animation-delay: -35s; }
.tm-hall .tm-gull.g0 path, .tm-hall .tm-gull.g1 path, .tm-hall .tm-gull.g2 path { animation: tm-wing .7s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.tm-hall .tm-gear { animation: tm-gear 70s linear infinite; animation-delay: -9s; }

@keyframes tm-twinkle { from { opacity: .25; } to { opacity: 1; } }
@keyframes tm-drift { from { transform: translateX(-320px); } to { transform: translateX(1900px); } }
@keyframes tm-takeoff {
  0% { transform: translate(-300px, 246px) rotate(0); animation-timing-function: ease-in; }
  38% { transform: translate(760px, 246px) rotate(0); animation-timing-function: ease-in; }
  50% { transform: translate(1100px, 242px) rotate(-7deg); animation-timing-function: linear; }
  72% { transform: translate(1800px, 170px) rotate(-12deg); }
  100% { transform: translate(1900px, 140px) rotate(-12deg); }
}
@keyframes tm-gear { 0%, 48% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes tm-land {
  0% { transform: translate(-300px, 110px) rotate(5deg); animation-timing-function: linear; }
  35% { transform: translate(560px, 236px) rotate(-1deg); animation-timing-function: ease-out; }
  70% { transform: translate(1500px, 250px) rotate(0); }
  100% { transform: translate(1900px, 250px) rotate(0); }
}
@keyframes tm-cart { from { transform: translateX(-60px); } to { transform: translateX(1850px); } }
@keyframes tm-train {
  0% { transform: translateX(0); }
  16% { transform: translateX(1230px); animation-timing-function: linear; }
  58% { transform: translateX(1230px); animation-timing-function: ease-in; }
  76% { transform: translateX(2700px); }
  100% { transform: translateX(2700px); }
}
@keyframes tm-wave { to { transform: translateX(-100px); } }
@keyframes tm-bob { from { transform: translateY(-3px) rotate(-.35deg); } to { transform: translateY(4px) rotate(.35deg); } }
@keyframes tm-trolley { from { transform: translateX(0); } to { transform: translateX(110px); } }
@keyframes tm-swing { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
@keyframes tm-puff { 0% { opacity: 0; transform: translateY(0) scale(.5); } 15% { opacity: .85; } 100% { opacity: 0; transform: translate(-40px, -90px) scale(1.9); } }
@keyframes tm-flag { from { transform: skewY(-6deg) scaleX(.9); } to { transform: skewY(6deg) scaleX(1.05); } }
@keyframes tm-spin { to { transform: rotate(360deg); } }
@keyframes tm-spin3 { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
@keyframes tm-sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes tm-peck { 0%, 55%, 100% { transform: rotate(0); } 62%, 72% { transform: rotate(16deg); } 67% { transform: rotate(4deg); } }
@keyframes tm-gull { from { transform: translate(-80px, 120px); } 25% { transform: translate(380px, 90px); } 55% { transform: translate(860px, 140px); } 80% { transform: translate(1300px, 100px); } to { transform: translate(1700px, 130px); } }
@keyframes tm-gull2 { from { transform: translate(1700px, 100px) scaleX(-1); } 40% { transform: translate(900px, 160px) scaleX(-1); } to { transform: translate(-80px, 110px) scaleX(-1); } }
@keyframes tm-wing { from { transform: scaleY(1); } to { transform: scaleY(-.5); } }

/* ---------- utropsbandet ---------- */
.tm-pa { position: absolute; left: 0; right: 0; top: 0; height: var(--pa-h); z-index: 8; display: flex; align-items: center; gap: .7rem; padding: 0 .8rem 0 .6rem;
  background: linear-gradient(#1f1b16, #2c261e); border-bottom: 3px solid #0d0b09; color: #ffd77a;
  font: 700 clamp(12px, 1.1cqw, 15px) ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace; letter-spacing: .06em; text-shadow: 0 0 8px rgba(255, 190, 70, .5); }
.tm-pa-tag { flex: none; display: flex; align-items: center; gap: .35rem; background: #c8452b; color: #fff7e8; border-radius: 5px; padding: 2px 8px 2px 6px; font-size: .78em; letter-spacing: .14em; text-shadow: none; }
.tm-pa-tag svg { width: 1.2em; height: 1.2em; }
.tm-pa.ring .tm-pa-tag svg { animation: tm-ring .5s ease-in-out 6; }
.tm-pa.ring { color: #fff0c0; }
@keyframes tm-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.tm-pa-view { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.tm-pa-track { display: inline-flex; animation: tm-marq linear infinite; will-change: transform; }
.tm-pa-track.static { display: block; animation: none; text-overflow: ellipsis; overflow: hidden; }
@keyframes tm-marq { to { transform: translateX(-50%); } }

/* ---------- skylten ---------- */
.tm-sign { position: absolute; left: 3%; top: calc(var(--pa-h) + 26px); z-index: 5; transform: rotate(-1.2deg); transform-origin: 50% -26px; animation: tm-swingsign 6s ease-in-out infinite alternate; }
@keyframes tm-swingsign { from { transform: rotate(-1.6deg); } to { transform: rotate(-.2deg); } }
.tm-chain { position: absolute; top: -28px; width: 4px; height: 30px; background: repeating-linear-gradient(#3a2e22 0 5px, #9b8a70 5px 8px); }
.tm-chain.l { left: 16%; } .tm-chain.r { right: 16%; }
.tm-sign-face { display: flex; align-items: center; gap: .65rem; padding: .35rem 1rem .4rem .7rem; border: 3px solid #3a2e22; border-radius: 10px 13px 9px 14px / 13px 9px 14px 10px; box-shadow: 0 5px 0 rgba(58, 46, 34, .35); }
.tm-sign-face b { display: block; font: 700 clamp(15px, 1.9cqw, 30px) / 1.05 'Fraunces', Georgia, serif; white-space: nowrap; letter-spacing: .01em; }
.tm-sign-face small { color: inherit; opacity: .75; font: 500 clamp(14px, 1.5cqw, 22px) / 1 'Caveat', cursive; margin-top: 2px; }
.tm-sign-ic { width: clamp(24px, 2.6cqw, 40px); flex: none; }
.tm-sign-airport .tm-sign-face { background: #f2c94c; color: #2b2217; }
.tm-sign-station .tm-sign-face { background: #2f5f8a; color: #fff; border-color: #162a3d; box-shadow: inset 0 0 0 3px #fff, 0 5px 0 rgba(0, 0, 0, .3); }
.tm-sign-harbour .tm-sign-face { background: repeating-linear-gradient(180deg, #c49a5c 0 14px, #b78a4c 14px 16px); color: #2b2217; border-radius: 6px; }

/* ---------- scenen med tavla + biljett ---------- */
.tm-stage { position: absolute; left: 3%; right: 3%; top: max(36cqh, calc(var(--pa-h) + 120px)); bottom: 70px; z-index: 4;
  display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(290px, 1fr); gap: 2.4%; }

/* avgångstavlan */
.tm-board { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0;
  --tcols: calc(5 * var(--cw)) calc(14 * var(--cw)) calc(9 * var(--cw)) calc(5 * var(--cw) + 2.3em) calc(7 * var(--cw)) calc(8 * var(--cw));
  background: #1b1916; color: #f2ead3; border: 4px solid #3a2e22; border-radius: 12px 15px 11px 14px / 14px 11px 15px 12px;
  box-shadow: 0 0 0 3px #7a6648, 0 9px 0 rgba(58, 46, 34, .3), inset 0 0 50px rgba(0, 0, 0, .75);
  font: 700 var(--fs) ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace; padding: .55em .5em .6em; }
.tm-bchain { position: absolute; top: -40px; width: 4px; height: 36px; background: repeating-linear-gradient(#3a2e22 0 5px, #9b8a70 5px 8px); }
.tm-bchain.l { left: 12%; } .tm-bchain.r { right: 12%; }
.tm-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; padding: 0 .7em .45em; }
.tm-board-title { font: 700 1.55em / 1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .2em; color: #ffd34d; text-shadow: 0 0 10px rgba(255, 211, 77, .35); }
.tm-board-title i { font-style: normal; font-weight: 400; font-size: .55em; letter-spacing: .12em; color: #a79a7f; margin-left: .8em; text-transform: uppercase; }
.tm-board-clock { font-size: .8em; color: #a79a7f; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.tm-cols { display: grid; grid-template-columns: var(--tcols); justify-content: space-between; column-gap: .9em; padding: .3em .7em; font-size: .68em; letter-spacing: .16em; color: #8d826b; border-top: 2px solid #3a362e; border-bottom: 2px solid #3a362e; background: #23201b; }
.tm-cols .r { text-align: right; }
.tm-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #7a6648 #1b1916; outline: none; border-radius: 4px; scroll-padding: 2em; }
.tm-rows:focus-visible { outline: 3px solid var(--accent-2, #62b3ab); outline-offset: 2px; }
.tm-group { position: relative; }
.tm-daysep { position: sticky; top: 0; z-index: 2; padding: .4em .9em; background: #2a2620; color: #ffd34d; font-size: .7em; letter-spacing: .24em; border-bottom: 1px solid #3f3a30; }
.tm-daysep::after { content: ''; display: inline-block; vertical-align: middle; margin-left: .8em; width: 4em; border-top: 2px dotted #6b5a46; }

.tm-row { position: relative; display: grid; grid-template-columns: var(--tcols); justify-content: space-between; column-gap: .9em; align-items: start; padding: .5em .7em .45em; border-bottom: 1px dashed #36322a; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tm-row:hover { background: rgba(255, 255, 255, .055); }
.tm-row.is-sel { background: linear-gradient(90deg, rgba(255, 211, 77, .24), rgba(255, 211, 77, .08)); box-shadow: inset 4px 0 0 #ffd34d; }
.tm-row.is-sel::before { content: ''; position: absolute; left: .15em; top: 50%; width: 0; height: 0; margin-top: -.45em; border: .45em solid transparent; border-left: .6em solid #ffd34d; }
.tm-cell { min-width: 0; --g: #f4efe0; }
.c-code, .c-type, .c-price { --g: #ffd34d; }
.c-type { display: flex; align-items: flex-start; gap: .45em; padding-top: .1em; }
.c-type .tm-ic { width: 1.8em; height: 1.8em; margin-top: -.15em; color: #ffd34d; flex: none; }
.c-type .tm-flaps { margin-top: 0; }
.c-price { text-align: right; }
.c-price .tm-flaps { justify-content: flex-end; }
.tm-sub { display: block; margin-top: .3em; font-size: .62em; font-weight: 400; letter-spacing: .08em; color: #958a72; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.1em; }
.tm-st-ontime .c-status { --g: #7fe08a; }
.tm-st-boarding .c-status { --g: #ffd34d; }
.tm-st-boarding .c-status .tm-flaps { animation: tm-blink 1s steps(1, end) infinite; }
.tm-st-delayed .c-status { --g: #ff9d3d; }
.tm-st-delayed .c-status .tm-sub { color: #ff9d3d; }
.tm-st-boarding .c-status .tm-sub { color: #ffd34d; }
.tm-st-cancelled .c-status { --g: #ff6a5a; }
.tm-st-cancelled .c-time, .tm-st-cancelled .c-to, .tm-st-cancelled .c-code, .tm-st-cancelled .c-type, .tm-st-cancelled .c-price { --g: #7b7466; }
.tm-st-cancelled { cursor: not-allowed; }
.tm-st-cancelled::after { content: ''; position: absolute; left: .7em; right: .7em; top: 42%; height: 2px; background: #ff6a5a; opacity: .75; transform: rotate(-.3deg); pointer-events: none; }
.tm-dear:not(.tm-st-cancelled) .c-time, .tm-dear:not(.tm-st-cancelled) .c-to, .tm-dear:not(.tm-st-cancelled) .c-code, .tm-dear:not(.tm-st-cancelled) .c-type, .tm-dear:not(.tm-st-cancelled) .c-status { opacity: .5; }
.tm-dear:not(.tm-st-cancelled) .c-price { --g: #ff8a7a; }
.tm-dear:not(.tm-st-cancelled) .c-price .tm-sub { color: #ff8a7a; font-weight: 700; opacity: 1; }
@keyframes tm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* själva klaffarna */
.tm-flaps { display: inline-flex; vertical-align: top; }
.tm-ch { position: relative; display: block; flex: none; width: calc(var(--fs) * .74); height: calc(var(--fs) * 1.36); margin-right: 2px; color: var(--g, #f2ead3); font-size: var(--fs); }
.tm-h { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: linear-gradient(#2e2c27, #1f1d1a); }
.tm-t { top: 0; border-radius: 3px 3px 0 0; }
.tm-b { bottom: 0; border-radius: 0 0 3px 3px; background: linear-gradient(#191816, #282622); }
.tm-h::before { content: attr(data-c); position: absolute; left: 0; right: 0; height: calc(var(--fs) * 1.36); line-height: calc(var(--fs) * 1.36); text-align: center; }
.tm-t::before { top: 0; } .tm-b::before { bottom: 0; }
.tm-ch::after { content: ''; position: absolute; left: -1px; right: -1px; top: 50%; height: 1px; margin-top: -.5px; background: rgba(0, 0, 0, .8); z-index: 5; }
.tm-fl { backface-visibility: hidden; }
.tm-fl.tm-t { transform-origin: 50% 100%; animation: tm-ft .07s ease-in both; z-index: 3; }
.tm-fl.tm-b { transform-origin: 50% 0; transform: perspective(calc(var(--fs) * 16)) rotateX(90deg); animation: tm-fb .07s ease-out both; z-index: 4; }
@keyframes tm-ft { from { transform: perspective(calc(var(--fs) * 16)) rotateX(0); } to { transform: perspective(calc(var(--fs) * 16)) rotateX(-90deg); } }
@keyframes tm-fb { from { transform: perspective(calc(var(--fs) * 16)) rotateX(90deg); } to { transform: perspective(calc(var(--fs) * 16)) rotateX(0); } }

/* tom tavla */
.tm-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: .3em; text-align: center; padding: 1em; color: #f2ead3; font-family: 'Caveat', cursive; }
.tm-empty p { font-size: 2.1em; font-weight: 700; line-height: 1.1; color: #ffd34d; }
.tm-empty small { font-size: 1.4em; color: #b9ad94; }
.tm-sad { width: 9em; animation: tm-sadsway 4s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes tm-sadsway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* ---------- biljetten ---------- */
.tm-side { position: relative; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: .5rem .3rem .3rem; }
.tm-side-inner { flex: 1; min-height: 0; width: 100%; max-width: 390px; display: flex; flex-direction: column; gap: .45rem; }
.tm-side-inner > .tm-buy, .tm-side-inner > .tm-buy-note { flex: none; }
.tm-sheet-close { display: none; }
.tm-hint { align-self: center; max-width: 320px; margin-top: 1.5rem; padding: .7rem 1rem; background: var(--paper, #f6ecd6); color: var(--ink, #3a2e22); border: 2.5px solid var(--ink, #3a2e22); border-radius: 6px 14px 8px 12px; box-shadow: 0 4px 0 rgba(58, 46, 34, .3); transform: rotate(1.6deg); text-align: center; font: 700 clamp(18px, 1.9cqw, 28px) / 1.1 'Caveat', cursive; }
.tm-hint svg { width: 5em; margin-top: .2em; color: var(--accent, #c8452b); transform: scaleX(-1) rotate(-12deg); }
.tm-has-sel .tm-hint { display: none; }

.tm-ticket-wrap { position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 6px 12px; margin: 0 -6px; scrollbar-width: thin; filter: drop-shadow(0 6px 0 rgba(58, 46, 34, .3)); }
.tm-ticket-wrap::before { content: ''; position: absolute; z-index: 2; top: 5px; left: 50%; width: 86px; height: 24px; margin-left: -43px; background: rgba(232, 207, 135, .85); border: 1px solid rgba(58, 46, 34, .25); transform: rotate(-3deg); }
.tm-ticket { --stub: 60px; transform: rotate(-1.3deg); position: relative; display: flex; flex-direction: column; color: #3a2e22; background: #fbf3dd repeating-linear-gradient(0deg, transparent 0 27px, rgba(58, 46, 34, .05) 27px 28px);
  border: 3px solid #3a2e22; border-radius: 14px 16px 12px 15px / 15px 12px 16px 13px;
  -webkit-mask: radial-gradient(circle 10px at 0 calc(100% - var(--stub)), #0000 97%, #000), radial-gradient(circle 10px at 100% calc(100% - var(--stub)), #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 10px at 0 calc(100% - var(--stub)), #0000 97%, #000), radial-gradient(circle 10px at 100% calc(100% - var(--stub)), #0000 97%, #000); mask-composite: intersect; }
.tm-ticket.print { animation: tm-print .6s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes tm-print { from { transform: translateY(-40px) scaleY(.5) rotate(-1.3deg); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-1.3deg); } }
.tm-tk-main { padding: .8rem 1rem .7rem; display: grid; gap: .5rem; }
.tm-tk-top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.tm-tk-carrier { font-weight: 700; } .tm-tk-kind { color: var(--accent, #c8452b); font-weight: 700; border: 2px solid currentColor; padding: 0 .4rem; border-radius: 4px; transform: rotate(2deg); }
.tm-tk-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .4rem; }
.tm-tk-city small { display: block; font-size: .62rem; letter-spacing: .18em; color: #8a7556; }
.tm-tk-city b { display: block; font: 700 clamp(26px, 2.6cqw, 38px) / .95 'Caveat', cursive; overflow-wrap: anywhere; }
.tm-tk-city i { display: block; font-size: .72rem; font-style: normal; color: #6b5a46; }
.tm-tk-city.to { text-align: right; }
.tm-tk-arc { position: relative; width: 84px; color: var(--accent-2, #2f6f6a); }
.tm-tk-arc svg { width: 100%; display: block; }
.tm-tk-arc .tm-ic { position: absolute; left: 50%; top: 2px; width: 24px; height: 24px; margin-left: -12px; color: var(--accent, #c8452b); }
.tm-tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; margin: 0; padding: .4rem 0 .1rem; border-top: 2px dashed rgba(58, 46, 34, .35); }
.tm-tk-grid dt { font-size: .6rem; letter-spacing: .18em; color: #8a7556; }
.tm-tk-grid dd { margin: 0; font: 700 .98rem ui-monospace, Menlo, Consolas, monospace; }
.tm-tk-grid s { opacity: .55; } .tm-tk-grid .late { color: #c25a14; }
.tm-tk-lines { display: grid; gap: .3rem; }
.tm-tk-arrive { font: 700 1.5rem / 1 'Caveat', cursive; color: var(--accent-2, #2f6f6a); }
.tm-tk-note { font: 700 1.25rem / 1 'Caveat', cursive; color: #8a2f1d; }
.tm-tk-wait { display: inline-block; justify-self: start; font: 700 1.45rem / 1.05 'Caveat', cursive; padding: 0 .35rem; background: linear-gradient(transparent 48%, rgba(255, 205, 70, .75) 48%); transform: rotate(-1deg); }
.tm-tk-wait.long { background: linear-gradient(transparent 40%, rgba(255, 170, 60, .85) 40%); }
.tm-tk-warn { padding: .3rem .6rem; border: 2.5px dashed #8a6a3c; border-radius: 6px; background: repeating-linear-gradient(45deg, #efe0bd 0 8px, #e6d1a3 8px 16px); font: 700 1.3rem / 1.05 'Caveat', cursive; color: #5b3d1c; transform: rotate(.8deg); }
.tm-tk-stub { height: var(--stub); border-top: 2.5px dashed #3a2e22; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 0 1rem; }
.tm-barcode { flex: 1; height: 34px; background: repeating-linear-gradient(90deg, #3a2e22 0 2px, transparent 2px 4px, #3a2e22 4px 5px, transparent 5px 8px, #3a2e22 8px 11px, transparent 11px 12px, #3a2e22 12px 13px, transparent 13px 15px); }
.tm-tk-seat { font: 700 .9rem ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.tm-stamp { position: absolute; right: 14px; top: 40%; padding: .05rem .7rem; border: 4px solid #c8452b; border-radius: 8px; color: #c8452b; font: 700 2.1rem 'Fraunces', serif; letter-spacing: .06em; opacity: 0; transform: rotate(-14deg) scale(2.2); pointer-events: none; mix-blend-mode: multiply; }
.tm-ticket.bought .tm-stamp { animation: tm-stamp .35s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes tm-stamp { to { opacity: .9; transform: rotate(-14deg) scale(1); } }
.tm-tk-freighter .tm-tk-kind { color: #8a6a3c; }

.tm-buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .7rem 1.1rem; font: 700 1.2rem 'Fraunces', Georgia, serif; color: var(--on-accent, #fff7e8); cursor: pointer;
  background: var(--accent, #c8452b); border: 3px solid #3a2e22; border-radius: 12px 15px 11px 16px / 15px 11px 16px 12px; box-shadow: 0 5px 0 rgba(58, 46, 34, .55); transition: transform .08s, filter .15s; touch-action: manipulation; }
.tm-buy b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; background: rgba(0, 0, 0, .18); padding: .1rem .5rem; border-radius: 6px; white-space: nowrap; }
.tm-root .tm-buy:hover:not(:disabled) { background: var(--accent, #c8452b); transform: translateY(-2px); filter: brightness(1.08); }
.tm-root .tm-buy:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(58, 46, 34, .55); }
.tm-root .tm-buy:disabled { background: #8b8374; cursor: not-allowed; opacity: .85; }
.tm-buy:focus-visible, .tm-btn:focus-visible { outline: 3px solid var(--accent-2, #62b3ab); outline-offset: 3px; }
.tm-buy-note { align-self: center; padding: .1rem .7rem; background: var(--paper, #f6ecd6); color: var(--ink, #3a2e22); border: 2px solid var(--ink, #3a2e22); border-radius: 99px; font: 700 1.25rem / 1.1 'Caveat', cursive; text-align: center; }
.tm-buy-note.bad { color: var(--bad, #a62f2f); }

/* ---------- knappar, pratbubbla, plånbok ---------- */
.tm-btn { font: 700 1rem 'Fraunces', Georgia, serif; color: var(--ink, #3a2e22); background: var(--paper-2, #efe0bd); border: 2.5px solid var(--ink, #3a2e22); border-radius: 12px 14px 11px 15px / 14px 11px 15px 12px; padding: .5rem .9rem; box-shadow: 0 3px 0 rgba(58, 46, 34, .35); cursor: pointer; transition: transform .08s, background .15s; touch-action: manipulation; }
.tm-root .tm-btn:hover:not(:disabled) { background: var(--land, #e9c98a); transform: translateY(-2px); }
.tm-root .tm-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.tm-leave { position: absolute; left: 3%; bottom: 14px; z-index: 7; }
.tm-say { position: absolute; left: calc(3% + 210px); right: 24%; bottom: 8px; z-index: 7; display: flex; align-items: flex-end; gap: .4rem; pointer-events: none; }
.tm-staff { width: 52px; flex: none; filter: drop-shadow(0 3px 0 rgba(58, 46, 34, .3)); }
.tm-say p { position: relative; max-width: 100%; padding: .3rem .85rem .35rem; background: var(--paper, #f6ecd6); color: var(--ink, #3a2e22); border: 2.5px solid var(--ink, #3a2e22); border-radius: 16px 18px 16px 6px; box-shadow: 0 3px 0 rgba(58, 46, 34, .3); font: 700 clamp(19px, 1.7cqw, 26px) / 1.1 'Caveat', cursive; }
.tm-say p::before { content: ''; position: absolute; left: -11px; bottom: 6px; width: 16px; height: 16px; background: var(--paper, #f6ecd6); border-left: 2.5px solid var(--ink, #3a2e22); border-bottom: 2.5px solid var(--ink, #3a2e22); transform: rotate(45deg) skew(10deg, 10deg); }
.tm-say.pop p { animation: tm-pop .3s cubic-bezier(.2, 1.5, .4, 1); transform-origin: 0 100%; }
@keyframes tm-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.tm-wallet { position: absolute; right: 3%; bottom: 16px; z-index: 7; display: flex; align-items: center; gap: .4rem; padding: .15rem .9rem .15rem .45rem; background: var(--paper, #f6ecd6); color: var(--ink, #3a2e22); border: 2.5px solid var(--ink, #3a2e22); border-radius: 99px; box-shadow: 0 3px 0 rgba(58, 46, 34, .3); font: 700 1rem ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.tm-wallet svg { width: 24px; height: 24px; }

/* ---------- smal skärm: banner + kortlista, biljetten som bottenark ---------- */
@container tm (max-width: 959px) {
  .tm-in { --pa-h: 32px; --banner-h: clamp(186px, 31cqh, 250px); --fs: clamp(12px, 3.4cqw, 17px); }
  .tm-hall { bottom: auto; height: var(--banner-h); border-bottom: 4px solid #3a2e22; overflow: hidden; }
  .tm-svg { width: 200%; height: 200%; left: -40%; }
  .tm-sign { left: 8px; top: calc(var(--pa-h) + 22px); }
  .tm-sign-face b { font-size: clamp(14px, 4.3cqw, 20px); } .tm-sign-face small { font-size: 15px; } .tm-sign-ic { width: 24px; }
  .tm-sign-face { padding: .25rem .7rem .3rem .5rem; gap: .45rem; }
  .tm-leave { left: auto; right: 8px; bottom: auto; top: calc(var(--pa-h) + 10px); padding: .3rem .65rem; font-size: .85rem; }
  .tm-say { left: auto; right: 8px; top: calc(var(--banner-h) - 74px); bottom: auto; max-width: 62%; }
  .tm-staff { width: 36px; } .tm-say p { font-size: 18px; padding: .2rem .6rem .25rem; }
  .tm-wallet { right: 18px; bottom: auto; top: calc(var(--banner-h) + 12px); z-index: 7; font-size: .8rem; padding-right: .6rem; }
  .tm-wallet svg { width: 18px; height: 18px; }
  .tm-stage { left: 0; right: 0; top: var(--banner-h); bottom: 0; display: block; padding: 8px 8px 0; }
  .tm-board { height: 100%; --tcols: 1fr; border-width: 3px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: inset 0 0 40px rgba(0, 0, 0, .7); }
  .tm-bchain { display: none; } .tm-board-clock { display: none; }
  .tm-board-head { padding-right: 6.5em; }
  .tm-board-title { font-size: 1.25em; }
  .tm-cols { display: none; }
  .tm-rows { padding: .3em .35em 1em; }
  .tm-daysep { margin: 0 -.35em; }
  .tm-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'time status' 'to price' 'code type'; row-gap: .3em; padding: .55em .7em .5em; margin: .4em 0 0; border: 2px solid #36322a; border-radius: 9px; background: #23201b; }
  .tm-row.is-sel { border-color: #ffd34d; }
  .c-time { grid-area: time; } .c-status { grid-area: status; text-align: right; } .c-to { grid-area: to; } .c-price { grid-area: price; } .c-code { grid-area: code; } .c-type { grid-area: type; justify-self: end; }
  .c-status .tm-flaps { justify-content: flex-end; }
  .tm-st-cancelled::after { top: 50%; }
  .tm-side { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; z-index: 9; padding: 1.1rem .9rem calc(.9rem + env(safe-area-inset-bottom, 0px)); background: var(--paper-2, #efe0bd); border-top: 4px solid var(--ink, #3a2e22); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
    transform: translateY(calc(100% + 40px)); visibility: hidden; transition: transform .32s cubic-bezier(.2, .9, .3, 1), visibility 0s .32s; }
  .tm-has-sel .tm-side { transform: none; visibility: visible; transition-delay: 0s; }
  .tm-side-inner { max-width: 440px; margin: 0 auto; }
  .tm-hint { display: none; }
  .tm-sheet-close { display: block; position: absolute; right: 10px; top: 10px; z-index: 3; padding: .15rem .6rem; font-size: 1.05rem; }
  .tm-tk-city b { font-size: 28px; }
  .tm-ticket-wrap { margin-top: 12px; }
  .tm-ticket { --stub: 50px; } .tm-tk-main { padding: .6rem .9rem .5rem; gap: .35rem; } .tm-barcode { height: 28px; }
  .tm-buy { padding: .55rem 1rem; } .tm-side-inner { gap: .4rem; }
}
@container tm (min-width: 600px) and (max-width: 959px) {
  .tm-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 .5em; }
  .tm-daysep { grid-column: 1 / -1; }
}
@container tm (max-width: 959px) and (max-height: 500px) {
  .tm-in { --banner-h: 104px; }
  .tm-sign, .tm-say { display: none; }
  .tm-leave { top: calc(var(--pa-h) + 4px); }
  .tm-wallet { top: calc(var(--banner-h) + 8px); }
  .tm-side { max-height: 96%; }
}
@container tm (min-width: 960px) and (max-height: 800px) {
  .tm-tk-main { padding: .55rem .8rem .45rem; gap: .3rem; }
  .tm-tk-city b { font-size: 26px; }
  .tm-ticket { --stub: 42px; } .tm-barcode { height: 24px; }
  .tm-tk-grid { grid-template-columns: 1fr 1fr 1fr 1fr; gap: .2rem .5rem; padding-top: .3rem; } .tm-tk-grid dd { font-size: .86rem; }
  .tm-tk-arrive, .tm-tk-wait { font-size: 1.25rem; }
  .tm-buy { padding: .5rem 1rem; font-size: 1.05rem; }
}
@container tm (min-width: 960px) and (max-height: 640px) {
  .tm-stage { top: max(37cqh, calc(var(--pa-h) + 96px)); bottom: 60px; }
  .tm-tk-stub { display: none; } .tm-ticket { --stub: 0px; -webkit-mask: none; mask: none; }
  .tm-tk-main { padding: .45rem .8rem .5rem; } .tm-ticket-wrap { padding-bottom: 6px; }
  .tm-tk-top { font-size: .66rem; } .tm-tk-city b { font-size: 24px; }
  .tm-tk-lines { display: flex; flex-wrap: wrap; gap: .05rem .7rem; align-items: baseline; }
  .tm-tk-arrive, .tm-tk-wait, .tm-tk-note { font-size: 1.15rem; } .tm-tk-warn { font-size: 1.05rem; padding: .15rem .5rem; }
}
@container tm (min-width: 960px) and (max-height: 520px) {
  .tm-sign { display: none; } .tm-stage { top: calc(var(--pa-h) + 54px); }
}

/* ---------- långsam enhet: stillbild i hallen ---------- */
.tm-lite .tm-hall *, .tm-lite .tm-sign { animation: none !important; }
.tm-lite .tm-hall .tm-train { transform: translateX(1230px); }
.tm-lite .tm-hall .tm-plane-up { transform: translate(560px, 246px); }
.tm-lite .tm-hall .tm-plane-down { opacity: 0; }
.tm-lite .tm-hall .tm-drift { transform: translateX(200px); }
.tm-lite .tm-hall .tm-star { opacity: 1; }

/* ---------- mindre rörelse ---------- */
@media (prefers-reduced-motion: reduce) {
  .tm-root *, .tm-root *::before, .tm-root *::after { animation: none !important; transition: none !important; }
  .tm-hall .tm-plane-up { transform: translate(560px, 246px); } .tm-hall .tm-plane-down { opacity: 0; }
  .tm-hall .tm-train { transform: translateX(1230px); }
  .tm-hall .tm-star { opacity: 1; }
}
