/* Game Lab: Train Track Race (two players, one device). Same family and themes as the other games. */
@font-face { font-family: 'DX Letters'; src: url('../../assets/fonts/dx-letters-bold.woff2') format('woff2'); font-weight: 700; font-display: block; }
.lt { --bar: rgba(255,255,255,.85); --txt: #1c2b3d; --panel: rgba(255,255,255,.88);
	position: relative; overflow: hidden; border-radius: 26px; max-width: 1060px; margin: 0 auto; padding: 0 0 72px; isolation: isolate;
	font-family: var(--dx-font-heading, 'Lexend', system-ui, sans-serif); color: var(--txt); box-shadow: 0 10px 30px rgba(28,43,61,.18); user-select: none; -webkit-user-select: none; }
.lt--night { --bar: rgba(20,26,50,.6); --txt: #fff; --panel: rgba(255,255,255,.9); }
.lt:fullscreen { max-width: none; border-radius: 0; overflow: auto; }
.lt-scene { position: absolute; inset: 0; z-index: -1; } .lt-scene svg { width: 100%; height: 100%; display: block; }
.lt-scene::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.25); } .lt--night .lt-scene::after { background: none; }
.lt-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .75rem; padding: .6rem .9rem; margin: .75rem; border-radius: 18px; background: var(--bar); backdrop-filter: blur(4px); }
.lt-turn { color: #fff; font-weight: 800; padding: .3rem .9rem; border-radius: 999px; white-space: nowrap; font-size: clamp(.95rem, .8rem + .6vw, 1.2rem); transition: background .3s; }
.lt-status { text-align: center; font-size: clamp(.95rem, .8rem + .7vw, 1.3rem); font-weight: 800; }
.lt-status--warn { color: #c23b3b; } .lt--night .lt-status--warn { color: #ffb4a8; } .lt-status--good { color: #1f7a4a; } .lt--night .lt-status--good { color: #9ff0c4; }
.lt-play { display: grid; grid-template-columns: 1fr 210px; gap: .9rem; margin: 0 .9rem; align-items: start; }
.lt-board { position: relative; border-radius: 20px; background: var(--panel); box-shadow: 0 6px 20px rgba(28,43,61,.1); padding: .4rem; }
.lt-svg { width: 100%; height: auto; display: block; max-width: none; }
.lt-stop text, .lt-end text { font-family: var(--dx-font-heading, 'Lexend', system-ui, sans-serif); }
.lt-train { position: absolute; width: 9.5%; transform: translate(-50%, -50%); transition: left .28s ease-in-out, top .28s ease-in-out; z-index: 2; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.lt-train svg { width: 100%; height: auto; display: block; max-width: none; }
.lt-side { display: grid; gap: .8rem; justify-items: center; }
.lt-spinner { position: relative; width: 180px; padding: .6rem .6rem .5rem; border-radius: 22px; border: 3px solid #26324a; background: #fff; box-shadow: 0 5px 0 #26324a; cursor: pointer; display: grid; justify-items: center; gap: .2rem; font: inherit; }
.lt-spinner svg { width: 140px; height: 140px; max-width: none; }
.lt-wheel { transition: transform 1.4s cubic-bezier(.15,.85,.25,1); transform-origin: 0 0; }
.lt-spinner__label { font-weight: 800; color: #17706f; }
.lt-spinner:disabled { cursor: default; opacity: .75; box-shadow: 0 3px 0 #26324a; transform: translateY(2px); }
.lt-spinner:not(:disabled) { animation: lt-glow 1.6s ease-in-out infinite; }   /* a pulsing ring, so the button itself stays still and easy to tap */
.lt-spinner:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lt-players { display: grid; gap: .5rem; width: 100%; }
.lt-pcard { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: .5rem; align-items: center; padding: .45rem .6rem; border-radius: 16px; background: #fff; border: 3px solid #e3e8ef; color: #1c2b3d; transition: border-color .3s, transform .3s; }
.lt-pcard.is-turn { border-color: var(--c); transform: scale(1.04); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.lt-pcard__train { grid-row: span 2; } .lt-pcard__train svg { width: 52px; height: auto; display: block; max-width: none; }
.lt-pcard__who { font-weight: 900; letter-spacing: .06em; color: var(--c); }
.lt-pcard__pos { font-size: .85rem; color: #566273; }
/* question card */
.lt-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(28,43,61,.32); backdrop-filter: blur(2px); padding: 1rem; overflow: auto; } .lt-overlay[hidden] { display: none; }
.lt-q { position: relative; background: #fffdf6; color: #1c2b3d; border: 4px solid var(--c); border-radius: 24px; box-shadow: 0 8px 0 var(--c), 0 18px 40px rgba(0,0,0,.25); padding: 1.2rem 1.4rem 1rem; max-width: 640px; width: 100%; text-align: center; animation: lt-pop .4s cubic-bezier(.34,1.56,.64,1);
	background-image: repeating-linear-gradient(180deg, transparent 0 46px, rgba(143,181,227,.35) 46px 48px); }
.lt-q__who { margin: 0 0 .5rem; font-weight: 800; color: var(--c); font-size: .95rem; letter-spacing: .04em; }
.lt-q__text { margin: 0 0 1rem; font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.25rem, .95rem + 1.4vw, 1.9rem); line-height: 1.7; }
.lt-blank { display: inline-block; min-width: 3em; height: 1.15em; margin: 0 .12em; vertical-align: -.12em; border-radius: 10px; border: 3px dashed #9fb4c9; background: rgba(175,205,239,.2); padding: 0 .2em; line-height: 1.05; }
.lt-blank.is-filled { min-width: 0; height: auto; border: 3px solid #2fa36b; background: #bfeccf; color: #1f7a4a; }
.lt-q__choices { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.lt-choice { position: relative; font-family: 'DX Letters', 'Andika', sans-serif; font-weight: 700; font-size: clamp(1.25rem, 1rem + 1.2vw, 1.8rem); min-width: 4.5em; padding: .4em .8em; border-radius: 16px; border: 3px solid #26324a; background: linear-gradient(180deg, #fff, #fff6d9); color: #1c2b3d; box-shadow: 0 5px 0 #26324a; cursor: pointer; }
.lt-choice:hover:not(:disabled) { transform: translateY(-2px); }
.lt-choice:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lt-choice.is-right { background: linear-gradient(180deg, #e9fbf1, #bfeccf); border-color: #1f7a4a; box-shadow: 0 5px 0 #1f7a4a; }
.lt-choice.is-wrong { background: #ffd9d4; border-color: #c23b3b; box-shadow: 0 5px 0 #c23b3b; }
.lt-mark { position: absolute; top: -13px; right: -10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 3px solid #fff; color: #fff; font-family: system-ui, sans-serif; font-size: 1.1rem; font-weight: 900; box-shadow: 0 3px 8px rgba(0,0,0,.3); animation: lt-pop .35s cubic-bezier(.34,1.56,.64,1); }
.lt-mark--right { background: #2fa36b; } .lt-mark--wrong { background: #d64545; }
.lt-q__note { min-height: 1.4em; margin: .9rem 0 0; font-weight: 800; color: #3b4a5c; }
/* start / end card */
.lt-card { background: #fff; color: #1c2b3d; border: 4px solid #26324a; border-radius: 26px; box-shadow: 0 8px 0 #26324a, 0 18px 40px rgba(0,0,0,.25); padding: 1.3rem 1.6rem; text-align: center; max-width: 500px; width: 100%; animation: lt-pop .45s cubic-bezier(.34,1.56,.64,1); }
.lt-card__kicker { margin: 0; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c0475a; }
.lt-card__title { margin: .3rem 0 .4rem; font-size: 1.45rem; } .lt-card__text { margin: 0 0 .8rem; color: #3b4a5c; font-family: var(--dx-font-body, inherit); }
.lt-card__train svg { width: 110px; height: auto; max-width: none; }
.lt-setup { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.lt-setup__p { display: grid; justify-items: center; gap: .3rem; padding: .7rem; border-radius: 16px; border: 3px solid var(--c); font-weight: 800; color: var(--c); }
.lt-setup__train svg { width: 70px; height: auto; max-width: none; }
.lt-setup__p input { font: inherit; font-weight: 800; font-size: 1.15rem; width: 6em; text-align: center; text-transform: uppercase; letter-spacing: .12em; padding: .3rem .4rem; border: 3px solid #26324a; border-radius: 12px; color: #1c2b3d; }
.lt-setup__note { margin: .6rem 0 0; font-size: .85rem; color: #566273; font-family: var(--dx-font-body, inherit); }
.lt-btn { font: inherit; font-weight: 800; font-size: 1.25rem; margin-top: 1rem; padding: .7rem 2.4rem; border-radius: 999px; border: 3px solid #26324a; background: #2fa36b; color: #fff; cursor: pointer; box-shadow: 0 5px 0 #1f6f48; }
.lt-btn:active, .lt-ctl:active { transform: translateY(2px); }
.lt-btn:focus-visible, .lt-ctl:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #17706f; }
.lt-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; } .lt-spacer { flex: 1; }
.lt-ctl { width: 48px; height: 48px; border-radius: 14px; border: 3px solid #26324a; background: rgba(255,255,255,.92); font-size: 1.35rem; cursor: pointer; box-shadow: 0 3px 0 #26324a; }
.lt-confetti { position: absolute; top: 0; z-index: 7; border-radius: 2px; pointer-events: none; }
@keyframes lt-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes lt-glow { 0%, 100% { box-shadow: 0 5px 0 #26324a, 0 0 0 0 rgba(242,176,30,.0); } 50% { box-shadow: 0 5px 0 #26324a, 0 0 0 8px rgba(242,176,30,.55); } }
@media (max-width: 760px) {
	.lt-play { grid-template-columns: 1fr; margin: 0 .4rem; }
	.lt-side { grid-template-columns: auto 1fr; align-items: center; justify-items: stretch; }
	.lt-spinner { width: 130px; } .lt-spinner svg { width: 100px; height: 100px; }
	.lt-top { margin: .6rem .5rem; grid-template-columns: 1fr; justify-items: center; gap: .3rem; }
	.lt-setup { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .lt *, .lt { animation: none !important; transition: none !important; } }
