/* B0X3 v128 - the training camp (js/Training.js): TRAIN list, drill HUD, result card, the gym's TRAIN button.
   Layers: #tr sits over the gym inside #mp-lobby. During a drill (#mp-lobby.training-run) the gym's own HUD
   (dock, emotes, name tags, notes, the lobby header) steps aside: the cue at the top, the controls at the
   bottom, the boxer in between. Cues use shape and motion as well as colour. */

/* ---- the gym's TRAIN button (in the dock on phones; its own corner on a big screen) ---- */
.gym-train { min-height: 44px; padding: 6px 14px; border-radius: 12px; border: 1px solid rgba(90, 220, 180, .55); background: rgba(8, 26, 22, .86); color: #c8ffe9;
    font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; line-height: 1; letter-spacing: .12em; }
.gym-train:hover { border-color: #5adcb4; filter: brightness(1.1); }
.gym-train:focus-visible { outline: 2px solid var(--gold, #f0c040); outline-offset: 2px; }
@media (orientation: portrait) {
    .gym-dock.has-train .gym-quick { font-size: 24px; padding: 6px 8px; }
    .gym-dock.has-train .gym-train { flex: 0 0 auto; font-size: 20px; padding: 6px 10px; letter-spacing: .08em; }
    .gym-dock.has-train .gym-more { flex: 0 1 96px; }
}
@media (orientation: landscape) and (max-height: 500px) { .gym-train { min-height: 40px; font-size: 20px; } }
@media (min-width: 1100px) and (min-height: 600px) {
    .lb.gym .gym-dock.has-train { display: flex !important; right: auto; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); }
    .lb.gym .gym-dock.has-train > :not(.gym-train) { display: none !important; }
    .lb.gym .gym-dock.has-train .gym-train { min-height: 56px; padding: 8px 22px; font-size: 28px; }
}

/* ---- the gym steps aside while the camp is open ---- */
.lb.gym.training .gym-dock, .lb.gym.training .gym-emotes, .lb.gym.training .gym-note, .lb.gym.training .gym-zone,
.lb.gym.training .gym-crowd, .lb.gym.training .gym-card, .lb.gym.training #lb-wait, .lb.gym.training-run .gym-tags,
.lb.gym.training > .lb-head, .lb.gym.training #lb-home { visibility: hidden !important; }
.lb.gym.training .gym-floor { pointer-events: none; }

.tr { position: absolute; inset: 0; z-index: 7; width: auto !important; max-width: none !important; margin: 0 !important; pointer-events: none; font-family: "Oswald", sans-serif; color: #fff; }
.tr[hidden], .tr [hidden] { display: none !important; }
.tr > * { pointer-events: auto; }
.tr-hud { position: absolute; inset: 0; pointer-events: none; --c: #f0c040; }
.tr-hud > * { pointer-events: auto; }

/* ---- top bar ---- */
.tr-top { position: absolute; top: 0; left: 0; right: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: linear-gradient(rgba(6, 7, 11, .86), rgba(6, 7, 11, .55) 70%, rgba(6, 7, 11, 0)); }
.tr-stop { min-width: 44px; min-height: 44px; padding: 4px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(8, 10, 14, .7); color: #fff;
    font-family: "Teko", sans-serif; font-size: 22px; letter-spacing: .1em; line-height: 1; }
.tr-stop:hover { border-color: #ff8a8a; }
.tr-title { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-width: 0; font-family: "Teko", sans-serif; font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: .1em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.tr-icon { font-size: 24px; }
.tr-lvl { font-family: "Oswald", sans-serif; font-weight: 500; font-size: 13px; letter-spacing: .14em; color: var(--c); }
.tr-time { min-width: 64px; text-align: right; font-family: "Teko", sans-serif; font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.tr-time.low { color: #ff6a5a; }
.tr-bar { position: absolute; left: 0; right: 0; top: calc(max(8px, env(safe-area-inset-top)) + 52px); height: 4px; background: rgba(255, 255, 255, .1); }
.tr-bar i { display: block; height: 100%; background: var(--c); transform-origin: left center; }
.tr-score { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 62px); left: max(14px, env(safe-area-inset-left)); display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 72px;
    font-family: "Teko", sans-serif; font-weight: 600; text-shadow: 0 2px 10px rgba(0, 0, 0, .75); }
.tr-score > span:first-child { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.tr-combo { font-size: 18px; line-height: 1; color: #9ff0bf; letter-spacing: .08em; white-space: nowrap; }

/* ---- the cue lane (top, centre) ---- */
.tr-lane { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 66px); left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 210px)); min-height: 64px;
    padding: 8px 12px; border-radius: 16px; background: rgba(8, 10, 14, .78); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.tr-stage { position: absolute; right: 12px; top: 4px; font-size: 12px; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }
/* beat bar (rope) and needle bar (slam): a track, the GOOD bracket, the PERFECT core, a needle */
.tr-meter { position: relative; height: 22px; margin: 16px 64px 6px 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.tr-lane-slam .tr-meter { margin-right: 4px; }
.tr-zone, .tr-gold { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.tr-zone { background: rgba(60, 220, 130, .45); border: 2px solid #3cdc82; box-sizing: border-box; }
.tr-gold { background: #f0c040; top: 3px; bottom: 3px; }
.tr-needle { position: absolute; top: -7px; bottom: -7px; width: 8px; margin-left: -4px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px #111, 0 0 10px rgba(255, 255, 255, .6); }
.tr-ringcue { position: absolute; right: 12px; top: 50%; width: 46px; height: 46px; margin-top: -18px; }
.tr-ringcue i { position: absolute; inset: 0; border-radius: 50%; }
.tr-ring-t { border: 5px solid #f0c040; inset: 9px !important; }
.tr-ring-c { border: 3px solid #50aaff; transition: none; }
.tr-ringcue.hot .tr-ring-t { border-color: #fff; box-shadow: 0 0 12px #fff; }
/* speed bag */
.tr-lr { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tr-side { padding: 6px 12px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .2); font-size: 18px; letter-spacing: .1em; color: rgba(255, 255, 255, .55); }
.tr-side.next { border-color: var(--c); color: #fff; background: rgba(255, 255, 255, .08); transform: scale(1.08); }
.tr-hits { font-family: "Teko", sans-serif; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
/* mitts and heavy bag: the combo as chips */
.tr-phase { font-size: 13px; letter-spacing: .16em; color: rgba(255, 255, 255, .7); text-align: center; margin-bottom: 4px; }
.tr-phase.input { color: #3cdc82; font-weight: 600; }
.tr-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.tr-chipm { min-width: 64px; padding: 6px 10px; border-radius: 9px; border: 2px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); text-align: center;
    font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; line-height: 1; letter-spacing: .08em; }
.tr-chipm.m1 { border-color: #4aa8ff; } .tr-chipm.m2 { border-color: #ff8a3d; } .tr-chipm.m3 { border-color: #f5c518; }
.tr-chipm.lit { background: #fff; color: #111; transform: scale(1.12); }
.tr-chipm.now { box-shadow: 0 0 0 3px #fff; }
.tr-chipm.done { background: rgba(60, 220, 130, .3); border-color: #3cdc82; color: #d8ffe9; }
.tr-wbar { height: 4px; margin-top: 7px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tr-wbar i { display: block; height: 100%; background: var(--c); transform-origin: left center; }
/* slip bag: two dots close on the arrow; together = now */
.tr-slip { position: relative; height: 58px; display: flex; align-items: center; justify-content: center; }
.tr-arrow { font-size: 44px; line-height: 1; color: #5adcb4; transition: transform .08s; }
.tr-dot { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: #5adcb4; }
.tr-dot.l { margin-left: -44px; } .tr-dot.r { margin-left: 26px; }
.tr-slip.hot .tr-arrow { color: #f0c040; transform: scale(1.25); }
.tr-slip.hot .tr-dot { background: #f0c040; }
.tr-slip.far .tr-arrow { opacity: .45; }
/* reaction wall: the 2 x 2 board */
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 140px; margin: 0 auto; }
.tr-grid i { display: grid; place-items: center; height: 28px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .05); font-style: normal; font-size: 10px; letter-spacing: .12em; color: rgba(255, 255, 255, .5); }
.tr-grid i.lit { background: #d8b8ff; border-color: #fff; color: #111; font-weight: 700; transform: scale(1.06); box-shadow: 0 0 14px #aa6eff; }
/* ladder: notes run into the feet */
.tr-track { position: relative; height: 48px; margin-top: 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.tr-feet { position: absolute; left: 12%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; border: 3px solid #fff; }
.tr-feet.hot { box-shadow: 0 0 14px #fff; }
.tr-note { position: absolute; top: 50%; width: 36px; height: 36px; margin: -18px; display: grid; place-items: center; border-radius: 50%; background: #0a0b10; border: 3px solid;
    font-size: 18px; line-height: 1; }
.tr-note.d-1 { border-color: #4aa8ff; color: #4aa8ff; } .tr-note.d0 { border-color: #f5c518; color: #f5c518; } .tr-note.d1 { border-color: #ff8a3d; color: #ff8a3d; }
.tr-note.hot { background: #fff; color: #111; }

/* ---- judge, hint, countdown ---- */
.tr-judge { position: absolute; left: 50%; top: 74%; transform: translate(-50%, -50%); pointer-events: none !important; font-family: "Teko", sans-serif; font-weight: 700; font-size: 46px; line-height: 1;
    letter-spacing: .08em; white-space: nowrap; text-shadow: 0 3px 0 #000, 0 0 18px rgba(0, 0, 0, .8); opacity: 0; }
.tr-judge.pop { animation: trJudge .62s ease-out both; }
.tr-judge.perfect { color: #f0c040; } .tr-judge.good { color: #3cdc82; } .tr-judge.miss { color: #ff5a4a; } .tr-judge.level { color: #fff; } .tr-judge.busy { color: rgba(255, 255, 255, .7); font-size: 34px; }
@keyframes trJudge { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.35); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -64%) scale(1); } }
.tr-hint { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(8px, env(safe-area-inset-top)) + 146px); max-width: min(520px, calc(100% - 40px)); pointer-events: none !important;
    font-size: 12px; line-height: 1.3; letter-spacing: .03em; text-align: center; color: rgba(255, 255, 255, .72); text-shadow: 0 1px 4px #000; }
.tr-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none !important; font-family: "Teko", sans-serif; font-weight: 700; font-size: 130px; line-height: 1;
    color: #fff; text-shadow: 0 6px 0 rgba(0, 0, 0, .6), 0 0 40px var(--c); }
.tr-count.pop { animation: trCount .8s ease-out both; }
@keyframes trCount { 0% { transform: scale(1.6); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .9; } }
/* what to do, under the 3-2-1 (gone a second after GO) */
.tr-howto { position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100% - 32px)); pointer-events: none !important;
    display: grid; gap: 4px; padding: 10px 16px; border-radius: 14px; text-align: center; background: rgba(8, 10, 16, .82); border: 1px solid rgba(255, 255, 255, .16);
    border-top: 3px solid var(--c); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .45s; }
.tr-howto[hidden] { display: none; }
.tr-howto.out { opacity: 0; }
.tr-howto b { font-family: "Teko", sans-serif; font-weight: 600; font-size: 26px; line-height: 1.05; letter-spacing: .05em; color: #fff; }
.tr-howto span { font-size: 13px; line-height: 1.3; letter-spacing: .04em; color: rgba(255, 255, 255, .78); }
.tr-paused { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 5, 9, .7); }
.tr-paused-box { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: #10121a; border: 1px solid rgba(255, 255, 255, .14); text-align: center; }
.tr-paused-box b { font-family: "Teko", sans-serif; font-size: 40px; letter-spacing: .14em; color: #f0c040; }

/* ---- controls (bottom) ---- */
.tr-ctl { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; gap: 8px; }
.tr-ctl.has-pad { position: static; transform: none; width: auto; }
.tr-ctl.grid { display: grid; grid-template-columns: 1fr 1fr; width: min(380px, calc(100% - 24px)); }
.tr-cbtn { flex: 1 1 0; min-height: 60px; padding: 6px 8px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .25); background: rgba(14, 16, 24, .86); color: #fff;
    font-family: "Teko", sans-serif; font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: .08em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.tr-cbtn small { font-family: "Oswald", sans-serif; font-size: 11px; letter-spacing: .12em; color: rgba(255, 255, 255, .6); }
.tr-cbtn.down { transform: scale(.96); background: rgba(255, 255, 255, .2); }
.tr-cbtn:focus-visible { outline: 2px solid #f0c040; outline-offset: 2px; }
.tr-cbtn.big { min-height: 72px; font-size: 34px; }
.tr-cbtn.wide { flex: 1 1 100%; }
.tr-cbtn.gold { border-color: #f0c040; background: rgba(60, 44, 8, .88); }
.tr-cbtn.wait { opacity: .5; }
.tr-cbtn.lf, .tr-cbtn.jab { border-color: #4aa8ff; } .tr-cbtn.rf, .tr-cbtn.cross { border-color: #ff8a3d; } .tr-cbtn.both, .tr-cbtn.body { border-color: #f5c518; }
.tr-cbtn.p1, .tr-cbtn.p2, .tr-cbtn.p3, .tr-cbtn.p4 { min-height: 50px; border-color: #aa6eff; }
.tr-ctl.legend { flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 8px 10px; border-radius: 12px; background: rgba(8, 10, 14, .78); width: min(720px, calc(100% - 24px)); }
.tr-k { font-size: 13px; letter-spacing: .06em; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.tr-k kbd { display: inline-block; margin-right: 5px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); font-family: inherit; font-size: 12px; }

/* the touch pad: the punch flower's twin (sizes from PunchFlower.js) */
.tr-pad { position: fixed; z-index: 8; touch-action: none; -webkit-tap-highlight-color: transparent; }
.tr-pad-art { position: absolute; left: 0; top: 0; overflow: visible; }
.tr-pad-petal { fill: rgb(12, 16, 22); fill-opacity: .78; stroke-width: 3; transition: fill .08s; }
.tr-pad-petal.hit { fill: #fff; fill-opacity: .9; }
.tr-pad-petal.off, .tr-pad-icon.off, .tr-pad-label.off { opacity: .18; }
.tr-pad-guard { fill: rgb(14, 40, 30); fill-opacity: .82; stroke: #50e696; stroke-width: 2; }
.tr-pad-guard.off { opacity: .25; }
.tr-pad-knob { fill: #50e696; fill-opacity: .6; }
.tr-pad text { text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 2px; }
.tr-pad-label { font-family: 'Teko', 'Oswald', sans-serif; font-weight: 600; letter-spacing: 1px; fill: #fff; }
.tr-pad-icon { stroke-width: 0; fill: #fff; }
.tr-pad-glabel { fill: rgb(200, 255, 225); letter-spacing: 2px; }
.tr-pad.lit .tr-pad-petal { fill-opacity: .9; }
.tr-ctl.has-pad ~ .tr-hint, .tr-hud:has(.tr-pad) .tr-hint { max-width: min(420px, calc(100% - 40px)); }

/* ---- result card ---- */
.tr-result { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(4, 5, 9, .55); --c: #f0c040; overflow-y: auto; }
.tr-res-box { width: min(440px, 100%); display: grid; gap: 6px; padding: 16px 18px; border-radius: 20px; text-align: center; background: linear-gradient(170deg, #1c2030, #0a0b10);
    border: 1px solid rgba(255, 255, 255, .14); border-top: 4px solid var(--c); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.tr-res-name { font-family: "Teko", sans-serif; font-weight: 600; font-size: 30px; letter-spacing: .12em; line-height: 1; }
.tr-res-stars { font-size: 52px; line-height: 1; letter-spacing: .08em; }
.tr-star { color: rgba(255, 255, 255, .25); display: inline-block; }
.tr-star.on { color: #f0c040; text-shadow: 0 0 16px rgba(240, 192, 64, .6); }
.tr-res-stars.anim .tr-star.on { animation: trStar .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.tr-res-stars.anim .tr-star:nth-child(2) { animation-delay: .18s; } .tr-res-stars.anim .tr-star:nth-child(3) { animation-delay: .36s; }
@keyframes trStar { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
.tr-res-score { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.tr-res-score b { font-family: "Teko", sans-serif; font-size: 56px; line-height: 1; }
.tr-res-score span { font-size: 15px; letter-spacing: .1em; color: rgba(255, 255, 255, .72); }
.tr-res-score em { font-style: normal; color: #f0c040; font-weight: 600; }
.tr-res-line { margin: 0; font-size: 14px; letter-spacing: .05em; color: rgba(255, 255, 255, .8); }
.tr-res-coach { margin: 2px 0; padding: 6px 10px; border-radius: 10px; background: rgba(240, 192, 64, .12); font-size: 14px; }
.tr-res-coach.done { background: rgba(60, 220, 130, .2); color: #c8ffdc; font-weight: 600; }
.tr-xp:empty { display: none; }
.tr-res-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.tr-res-acts #tr-home { grid-column: 1 / -1; }
.tr-btn { min-height: 48px; padding: 6px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); color: #fff;
    font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; line-height: 1; letter-spacing: .1em; }
.tr-btn:hover { filter: brightness(1.15); border-color: rgba(255, 255, 255, .45); }
.tr-btn:focus-visible { outline: 2px solid #f0c040; outline-offset: 2px; }
.tr-btn-main { background: linear-gradient(100deg, #e8242a, #c0181e); border-color: transparent; }

/* ---- the list ---- */
.tr-list { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: radial-gradient(120% 90% at 50% 0%, rgba(18, 52, 44, .9), rgba(6, 7, 11, .97) 70%); }
.tr-list > * { width: min(820px, 100%); margin-left: auto; margin-right: auto; }
.tr-list-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; }
.tr-list-head h2 { margin: 0; text-align: center; font-family: "Teko", sans-serif; font-weight: 600; font-size: 34px; letter-spacing: .14em; color: #c8ffe9; }
.tr-back { min-height: 44px; padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; font-size: 14px; letter-spacing: .1em; }
.tr-total { padding: 4px 10px; border-radius: 999px; background: rgba(240, 192, 64, .14); color: #f0c040; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.tr-need { margin: 0 auto 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 106, 90, .12); border: 1px solid rgba(255, 106, 90, .4); font-size: 14px; line-height: 1.4; }
.tr-coachbox { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: rgba(240, 192, 64, .1); border: 1px solid rgba(240, 192, 64, .35); }
.tr-coachbox.complete { background: rgba(60, 220, 130, .12); border-color: rgba(60, 220, 130, .45); }
.tr-coachbox-t { font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .12em; line-height: 1; color: #f0c040; }
.tr-coachbox.complete .tr-coachbox-t { color: #9ff0bf; }
.tr-coachbox-c { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; letter-spacing: .08em; }
.tr-chip.done { background: rgba(60, 220, 130, .25); border-color: #3cdc82; }
.tr-coachbox-s { font-size: 13px; color: rgba(255, 255, 255, .75); }
.tr-builds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.tr-build { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.tr-build-n { font-size: 13px; letter-spacing: .12em; } .tr-build-n b { margin-left: 4px; }
.tr-build-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tr-build-bar i { display: block; height: 100%; }
.tr-power .tr-build-bar i { background: #ff7828; } .tr-speed .tr-build-bar i { background: #50aaff; }
b.tr-power { color: #ffa060; } b.tr-speed { color: #8cc8ff; }
.tr-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1); border-left: 4px solid var(--c); }
.tr-row-icon { font-size: 26px; }
.tr-row-main { display: grid; gap: 2px; min-width: 0; }
.tr-row-name { font-family: "Teko", sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .08em; line-height: 1; }
.tr-row-sub { font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .7); }
.tr-coach { margin-left: 8px; padding: 1px 6px; border-radius: 6px; background: #f0c040; color: #111; font-family: "Oswald", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .1em; vertical-align: middle; }
.tr-coach.done { background: #3cdc82; }
.tr-row-stats { display: grid; justify-items: end; gap: 2px; }
.tr-row-stars { font-size: 18px; line-height: 1; letter-spacing: .04em; }
.tr-row-best { font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .65); white-space: nowrap; }
.tr-go { min-width: 56px; min-height: 48px; padding: 4px 12px; border-radius: 12px; border: 0; background: var(--c); color: #111; font-family: "Teko", sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .1em; }
.tr-go:disabled { opacity: .35; }
.tr-go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tr-warm { display: block; margin-top: 10px; min-height: 44px; padding: 6px 14px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .3); background: transparent; color: rgba(255, 255, 255, .85); font-size: 13px; letter-spacing: .08em; }

/* ---- sizes ---- */
@media (max-width: 720px) { .tr-rows { grid-template-columns: 1fr; } }
@media (orientation: portrait) {
    .tr-lane { width: calc(100% - 24px); top: calc(max(8px, env(safe-area-inset-top)) + 112px); }
    .tr-score { top: calc(max(8px, env(safe-area-inset-top)) + 60px); flex-direction: row; align-items: baseline; gap: 10px; }
    .tr-hint { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 84px); }
    .tr-hud:has(.tr-pad) .tr-hint { display: none; }
    .tr-judge { top: 31%; }
    .tr-howto { top: calc(max(8px, env(safe-area-inset-top)) + 224px); }
    .tr-hud:has(.tr-pad) .tr-count { place-items: start center; padding-top: calc(max(8px, env(safe-area-inset-top)) + 380px); font-size: 96px; }
    .tr-title { font-size: 24px; } .tr-lvl { display: none; }
    .tr-stop-t { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
    .tr-top { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 4px; }
    .tr-bar { top: calc(max(4px, env(safe-area-inset-top)) + 48px); }
    .tr-title { font-size: 26px; }
    .tr-score { top: calc(max(4px, env(safe-area-inset-top)) + 56px); }
    .tr-score > span:first-child { font-size: 32px; }
    .tr-lane { top: calc(max(4px, env(safe-area-inset-top)) + 56px); min-height: 54px; padding: 6px 10px; }
    .tr-hint { display: none; }
    .tr-cbtn { min-height: 52px; font-size: 22px; }
    .tr-cbtn.big { min-height: 58px; font-size: 28px; }
    .tr-ctl.legend { display: none; }
    .tr-count { font-size: 100px; }
    .tr-howto { top: calc(50% + 48px); padding: 7px 12px; }
    .tr-howto b { font-size: 21px; }
    .tr-howto span { font-size: 12px; }
    .tr-hud:has(.tr-pad) .tr-howto { left: max(12px, env(safe-area-inset-left)); transform: none; max-width: min(470px, calc(100% - 330px)); }
    .tr-res-box { padding: 10px 14px; gap: 4px; width: min(560px, 100%); }
    .tr-res-stars { font-size: 38px; } .tr-res-score b { font-size: 40px; } .tr-res-name { font-size: 24px; }
    .tr-res-acts { grid-template-columns: 1fr 1fr 1fr; } .tr-res-acts #tr-home { grid-column: auto; }
    .tr-btn { min-height: 44px; font-size: 19px; }
}
@media (orientation: landscape) and (max-height: 350px) {
    .tr-lane { width: min(420px, calc(100% - 200px)); min-height: 48px; }
    .tr-chipm { min-width: 52px; font-size: 18px; padding: 4px 8px; }
    .tr-cbtn { min-height: 46px; }
    .tr-ctl.grid .tr-cbtn { min-height: 40px; }
    .tr-judge { font-size: 38px; top: 70%; }
    /* the smallest phones: the how-to card just under the cue, one line, the 3-2-1 small in a bottom corner */
    .tr-howto { top: calc(max(4px, env(safe-area-inset-top)) + 146px); padding: 5px 10px; }
    .tr-howto b { font-size: 17px; }
    .tr-howto span { display: none; }
    .tr-hud:has(.tr-pad) .tr-howto { max-width: min(400px, calc(100% - 240px)); }
    .tr-count { place-items: end start; padding: 0 0 76px max(16px, env(safe-area-inset-left)); font-size: 64px; }
    .tr-res-line { font-size: 12px; }
    .tr-coachbox-s, .tr-row-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-judge.pop { animation: trJudgeCalm .9s linear both; }
    .tr-count.pop, .tr-res-stars.anim .tr-star.on { animation: none; }
    .tr-side.next, .tr-chipm.lit, .tr-grid i.lit, .tr-slip.hot .tr-arrow { transform: none; }
}
@keyframes trJudgeCalm { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* the menu's settings gear sits over the lobby's top-right corner: out of the way while the camp is open */
body:has(#mp-lobby.training) .menu-gear { visibility: hidden; }
