/* Turbogol (assets/turbogol/): the game's page and rooms in the campus, and the full-screen match */
.tone-turbo { --tone:#2f6fe0; }
[data-theme="dark"] .tone-turbo { --tone:#6f9cff; }
.tg-blue { --c:#3d86ff; } .tg-orange { --c:#ff8a2a; }

/* ---- Page ---- */
.tg-hero { display:flex; align-items:center; gap:16px; margin:6px 0 22px; padding:22px; border-radius:var(--r-lg); color:#fff; overflow:hidden; position:relative;
  background:radial-gradient(120% 140% at 0% 0%, #2f6fe0 0%, transparent 55%), radial-gradient(120% 140% at 100% 100%, #ff7a1a 0%, transparent 55%), #0d1424; box-shadow:var(--shadow); }
.tg-hero::after { content:""; position:absolute; inset:auto -10% -60% -10%; height:120%; background:repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 80px); transform:perspective(400px) rotateX(60deg); pointer-events:none; }
.tg-hero h1 { margin:0; font-size:30px; letter-spacing:-.02em; }
.tg-hero p { margin:4px 0 0; max-width:60ch; color:rgba(255,255,255,.82); font-size:15px; line-height:1.45; }
.tg-hero-icon { display:grid; place-items:center; width:56px; height:56px; flex:none; border-radius:16px; background:rgba(255,255,255,.12); }
.tg-hero-icon svg { width:32px; height:32px; }
.tg-home { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; margin-bottom:14px; }
@media (max-width: 960px) { .tg-home { grid-template-columns:minmax(0, 1fr); } }
.tg-card { display:grid; gap:12px; align-content:start; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--card); box-shadow:var(--shadow-sm); min-width:0; }
.tg-card h2 { margin:0; font-size:17px; letter-spacing:-.01em; }
.tg-card h3 { margin:0; font-size:13px; color:var(--mute); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.tg-note { margin:0; color:var(--mute); font-size:13px; line-height:1.5; }
.tg-card fieldset { display:grid; gap:6px; margin:0; padding:0; border:0; min-width:0; }
.tg-card legend { margin-bottom:6px; color:var(--mute); font-size:12px; font-weight:600; }
.tg-pills { display:flex; flex-wrap:wrap; gap:6px; }
.tg-pills label { position:relative; }
.tg-pills input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.tg-pills span { display:inline-flex; align-items:center; min-height:36px; padding:0 13px; border:1px solid var(--line); border-radius:99px; background:var(--paper); font-size:13.5px; font-weight:600; color:var(--ink); }
.tg-pills input:checked + span { border-color:var(--tone, #2f6fe0); background:color-mix(in srgb, #2f6fe0 14%, var(--card)); color:var(--ink); box-shadow:inset 0 0 0 1px #2f6fe0; }
.tg-pills input:focus-visible + span { outline:2px solid #2f6fe0; outline-offset:2px; }
.tg-go { display:flex; align-items:center; justify-content:center; min-height:46px; margin-top:4px; border:0; border-radius:12px; background:linear-gradient(90deg, #2f6fe0, #5a4bdf); color:#fff; font:650 15px var(--sans); cursor:pointer; transition:filter .15s, transform .1s; }
.tg-go:hover { filter:brightness(1.08); } .tg-go:active { transform:scale(.99); }
.tg-go:disabled { opacity:.55; cursor:default; filter:none; }
.tg-go.is-alt { background:var(--ink); }
[data-theme="dark"] .tg-go.is-alt { background:#2b3140; }
.tg-code-input { width:100%; height:56px; min-height:0; padding:0 12px; font:600 26px/1 var(--mono) !important; letter-spacing:.3em; text-align:center; text-transform:uppercase; }
.tg-home > .tg-card { display:flex; flex-direction:column; gap:12px; }
.tg-home > .tg-card .tg-go { margin-top:auto; }
.tg-home .form-error:empty { display:none; }
.tg-help { margin-bottom:24px; }
.tg-help p { margin:0; font-size:14px; line-height:1.55; }
.tg-help-cols { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:18px; }
@media (max-width: 700px) { .tg-help-cols { grid-template-columns:minmax(0, 1fr); } }
.tg-help-cols h3 { margin:6px 0 8px; }
.tg-keys { display:grid; grid-template-columns:max-content 1fr; gap:7px 12px; align-items:baseline; margin:0; padding:0; list-style:none; font-size:13px; }
.tg-keys li { display:contents; }
.tg-keys kbd { justify-self:start; padding:2px 7px; border:1px solid var(--line); border-bottom-width:2px; border-radius:6px; background:var(--paper); font:600 11.5px var(--mono); white-space:nowrap; }

/* ---- Room ---- */
.tg-room-grid { display:grid; grid-template-columns:minmax(0, 1.6fr) minmax(280px, 1fr); gap:14px; align-items:start; }
@media (max-width: 860px) { .tg-room-grid { grid-template-columns:minmax(0, 1fr); } }
.tg-teams { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
@media (max-width: 560px) { .tg-teams { grid-template-columns:minmax(0, 1fr); } }
.tg-team { display:grid; gap:10px; align-content:start; padding:16px; border:1px solid color-mix(in srgb, var(--c) 40%, var(--line)); border-radius:18px; background:linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--card)), var(--card) 60%); }
.tg-team header { display:flex; align-items:center; justify-content:space-between; }
.tg-team h3 { margin:0; color:var(--c); font-size:18px; }
.tg-team header span { color:var(--mute); font:600 13px var(--mono); }
.tg-team ul { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.tg-team li { display:flex; align-items:center; gap:8px; min-height:42px; padding:0 12px; border-radius:11px; background:var(--card); border:1px solid var(--line); font-size:14px; min-width:0; }
.tg-team li strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.tg-team li.is-me { border-color:var(--c); box-shadow:inset 0 0 0 1px var(--c); }
.tg-team li.is-empty { color:var(--faint); border-style:dashed; background:transparent; }
.tg-team li em { padding:1px 7px; border-radius:99px; background:var(--line-2); color:var(--mute); font:600 10px/1.6 var(--mono); font-style:normal; text-transform:uppercase; }
.tg-team li em.is-you { background:color-mix(in srgb, var(--c) 18%, transparent); color:var(--c); }
.tg-team li small { margin-left:auto; color:var(--mute); font:500 11px var(--mono); }
.tg-dot { width:8px; height:8px; flex:none; border-radius:50%; background:var(--line); }
.tg-dot.is-on { background:#32b36b; box-shadow:0 0 0 3px color-mix(in srgb, #32b36b 22%, transparent); }
.tg-mini { justify-self:start; min-height:34px; padding:0 12px; border:1px solid color-mix(in srgb, var(--c) 50%, var(--line)); border-radius:10px; background:transparent; color:var(--c); font:600 13px var(--sans); cursor:pointer; }
.tg-mini:hover { background:color-mix(in srgb, var(--c) 10%, transparent); }
.tg-side { display:grid; gap:14px; }
.tg-code { padding:10px 0; border-radius:12px; background:var(--paper); text-align:center; font:700 34px/1.1 var(--mono); letter-spacing:.22em; user-select:all; }
.tg-share { display:grid; gap:8px; }
.tg-share .jg-btn { justify-content:flex-start; gap:8px; }
.tg-share svg { width:16px; height:16px; }
.tg-host { display:grid; gap:12px; }
.tg-check { display:flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; }
.tg-check input { width:18px; height:18px; accent-color:#2f6fe0; }
.tg-select { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px; }
.tg-select select { min-height:36px; padding:0 8px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink); font:500 14px var(--sans); }
.tg-leave { justify-self:start; padding:8px 2px; border:0; background:none; color:var(--accent-ink); font:600 13.5px var(--sans); cursor:pointer; }
.tg-status { display:flex; align-items:center; gap:10px; margin:0; color:var(--mute); font-size:14px; line-height:1.5; }
.tg-status.is-bad, div.tg-status.is-bad { display:grid; gap:12px; justify-items:start; padding:16px; border:1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius:14px; background:var(--accent-soft); color:var(--ink); }
.tg-status.is-bad p { margin:0; }
.tg-spin { width:16px; height:16px; flex:none; border:2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color:currentColor; border-radius:50%; animation:tg-spin .8s linear infinite; }
@keyframes tg-spin { to { transform:rotate(360deg); } }

/* ---- The match, full screen ---- */
html.tg-playing, html.tg-playing body { overflow:hidden; overscroll-behavior:none; }
.tg-root { position:fixed; inset:0; z-index:2000; background:#05070d; color:#fff; font-family:var(--sans); user-select:none; -webkit-user-select:none; touch-action:none; -webkit-tap-highlight-color:transparent; }
.tg-root .tg-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.tg-hud { position:absolute; inset:0; pointer-events:none; }
.tg-hud .tg-ui { pointer-events:auto; }
.tg-top { position:absolute; top:max(10px, env(safe-area-inset-top)); left:50%; transform:translateX(-50%); display:grid; justify-items:center; gap:4px; }
.tg-score { display:flex; align-items:stretch; overflow:hidden; border-radius:10px; box-shadow:0 6px 24px rgba(0,0,0,.4); font-variant-numeric:tabular-nums; }
.tg-score b { display:grid; place-items:center; min-width:54px; padding:0 12px; font:800 28px/44px var(--sans); }
.tg-s0 { background:linear-gradient(180deg, #4b8fff, #2563d8); }
.tg-s1 { background:linear-gradient(180deg, #ff9a45, #e8650c); }
.tg-clock { display:grid; place-items:center; min-width:86px; padding:0 12px; background:rgba(8,12,22,.86); font:700 22px/44px var(--mono); }
.tg-ot { padding:2px 10px; border-radius:6px; background:#ffcc33; color:#1d1400; font:800 11px/1.6 var(--sans); letter-spacing:.1em; }
.tg-feed { position:absolute; top:max(12px, env(safe-area-inset-top)); right:max(12px, env(safe-area-inset-right)); display:grid; gap:6px; justify-items:end; max-width:min(44vw, 380px); margin:0; padding:0; list-style:none; }
.tg-feed li { padding:6px 12px; border-radius:9px; background:rgba(8,12,22,.72); font-size:13.5px; line-height:1.4; text-shadow:0 1px 2px rgba(0,0,0,.4); transition:opacity .9s; }
.tg-feed li.is-old { opacity:0; }
.tg-center { position:absolute; inset:24% 0 auto; display:grid; justify-items:center; text-align:center; text-shadow:0 4px 24px rgba(0,0,0,.6); }
.tg-msg { display:grid; justify-items:center; gap:6px; animation:tg-pop .35s var(--ease); }
.tg-msg strong { font:900 44px/1 var(--sans); letter-spacing:.02em; }
.tg-msg span { padding:4px 12px; border-radius:8px; background:rgba(8,12,22,.6); font-size:16px; font-weight:600; }
.tg-msg.is-small strong { font-size:24px; }
.tg-msg.is-count strong { font-size:clamp(70px, 14vw, 140px); color:#fff; -webkit-text-stroke:2px rgba(0,0,0,.25); }
.tg-goal { font-size:clamp(70px, 15vw, 150px) !important; color:var(--c); -webkit-text-stroke:3px #fff; font-style:italic; }
.tg-msg.is-demo strong { color:#ff9a3a; }
@keyframes tg-pop { from { transform:scale(.6); opacity:0; } 60% { transform:scale(1.08); opacity:1; } to { transform:scale(1); } }
.tg-boost { position:absolute; right:max(18px, env(safe-area-inset-right)); bottom:max(18px, env(safe-area-inset-bottom)); width:128px; height:128px; display:grid; place-items:center; align-content:center; }
.tg-boost svg { position:absolute; inset:0; width:100%; height:100%; transform:rotate(135deg); }
.tg-ring-bg, .tg-ring { fill:none; stroke-width:9; stroke-linecap:round; }
.tg-ring-bg { stroke:rgba(255,255,255,.14); stroke-dasharray:75 100; }
.tg-ring { stroke:#ffb02e; stroke-dasharray:33 100; filter:drop-shadow(0 0 6px rgba(255,170,40,.7)); transition:stroke-dasharray .08s linear; }
.tg-boost b { position:relative; font:800 38px/1 var(--sans); font-variant-numeric:tabular-nums; text-shadow:0 2px 8px rgba(0,0,0,.5); }
.tg-boost small { position:relative; color:rgba(255,255,255,.7); font:700 10px var(--sans); letter-spacing:.14em; }
.tg-speed { position:absolute; right:max(150px, calc(env(safe-area-inset-right) + 150px)); bottom:max(28px, env(safe-area-inset-bottom)); color:rgba(255,255,255,.8); font:600 13px var(--mono); }
.tg-speed b { font-size:20px; color:#fff; }
.tg-net { position:absolute; left:max(12px, env(safe-area-inset-left)); top:max(12px, env(safe-area-inset-top)); padding:3px 8px; border-radius:6px; background:rgba(8,12,22,.6); color:#9fe0b0; font:600 11.5px var(--mono); }
.tg-net.is-bad { color:#ffb08a; }
.tg-menu-btn { position:absolute; left:max(12px, env(safe-area-inset-left)); top:max(42px, calc(env(safe-area-inset-top) + 34px)); width:40px; height:40px; border:0; border-radius:10px; background:rgba(8,12,22,.6); color:#fff; font-size:20px; cursor:pointer; }
.tg-arrow { position:absolute; width:0; height:0; }
.tg-arrow i { position:absolute; left:-18px; top:-18px; width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.92); box-shadow:0 2px 10px rgba(0,0,0,.4); transform:rotate(var(--a, 0rad)); }
.tg-arrow i::after { content:""; position:absolute; right:-9px; top:9px; border:9px solid transparent; border-left:12px solid rgba(255,255,255,.92); border-right:0; }
.tg-board, .tg-menu, .tg-end { position:absolute; inset:0; display:grid; place-items:center; padding:20px; background:rgba(4,6,12,.55); backdrop-filter:blur(3px); overflow:auto; }
.tg-board[hidden], .tg-menu[hidden], .tg-end[hidden], .tg-wait[hidden], .tg-arrow[hidden], .tg-net[hidden], .tg-ot[hidden] { display:none; }
.tg-board { background:rgba(4,6,12,.35); backdrop-filter:none; pointer-events:none; }
.tg-panel { width:min(680px, 100%); max-height:100%; overflow:auto; padding:22px; border-radius:18px; background:rgba(14,18,30,.94); box-shadow:0 30px 80px rgba(0,0,0,.5); }
.tg-panel h2 { margin:0 0 6px; font-size:26px; }
.tg-panel h3 { margin:18px 0 8px; color:rgba(255,255,255,.6); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.tg-panel .tg-note { color:rgba(255,255,255,.65); }
.tg-panel .tg-keys kbd { border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.08); color:#fff; }
.tg-menu-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.tg-btn { min-height:44px; padding:0 16px; border:1px solid rgba(255,255,255,.18); border-radius:11px; background:rgba(255,255,255,.06); color:#fff; font:600 14.5px var(--sans); cursor:pointer; }
.tg-btn:hover { background:rgba(255,255,255,.12); }
.tg-btn.is-primary { border-color:transparent; background:linear-gradient(90deg, #2f6fe0, #5a4bdf); }
.tg-btn.is-danger { border-color:rgba(255,120,90,.4); color:#ffb4a0; }
.tg-settings { display:grid; gap:10px; margin-top:16px; padding:14px; border-radius:12px; background:rgba(255,255,255,.05); font-size:14px; }
.tg-settings label { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tg-settings input[type="range"] { width:min(240px, 50%); accent-color:#5a8dff; }
.tg-settings select { min-height:34px; padding:0 8px; border:1px solid rgba(255,255,255,.2); border-radius:8px; background:#1a2030; color:#fff; }
.tg-settings .tg-check { justify-content:flex-start; }
.tg-table { width:100%; margin-top:12px; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
.tg-table th { padding:8px 6px; border-bottom:2px solid var(--c); color:rgba(255,255,255,.7); font-size:12px; font-weight:600; text-align:center; }
.tg-table th:first-child { color:var(--c); font-size:15px; font-weight:800; text-align:left; }
.tg-table td { padding:7px 6px; border-bottom:1px solid rgba(255,255,255,.08); text-align:center; }
.tg-table td:first-child { text-align:left; font-weight:600; }
.tg-table tr.is-me td { background:rgba(255,255,255,.07); }
.tg-table em { color:rgba(255,255,255,.5); font-style:normal; font-size:11.5px; }
.tg-board .tg-panel, .tg-board > .tg-table { width:min(680px, 100%); }
.tg-board { align-content:center; }
.tg-board .tg-table { max-width:680px; padding:12px 16px; border-radius:14px; background:rgba(14,18,30,.9); }
.tg-end-panel { text-align:center; }
.tg-end-panel .tg-table { text-align:center; }
.tg-end-panel .tg-menu-actions { justify-content:center; }
.tg-kicker { margin:0; color:rgba(255,255,255,.6); font:700 12px var(--sans); text-transform:uppercase; letter-spacing:.14em; }
.tg-final { display:flex; justify-content:center; align-items:center; gap:18px; margin:6px 0; font:900 64px/1 var(--sans); font-variant-numeric:tabular-nums; }
.tg-final span { color:rgba(255,255,255,.4); font-size:40px; }
.tg-mvp { margin:0; color:rgba(255,255,255,.8); }
.tg-wait { position:absolute; inset:0; display:grid; place-content:center; justify-items:center; gap:12px; background:#05070d; font-size:15px; }
.tg-wait .tg-spin { width:28px; height:28px; border-width:3px; }

/* Touch controls */
.tg-touch { position:absolute; inset:0; pointer-events:none; }
.tg-stick-zone { position:absolute; left:0; bottom:0; width:45%; height:65%; pointer-events:auto; touch-action:none; }
.tg-stick { position:absolute; left:110px; top:calc(100% - 130px); width:120px; height:120px; margin:-60px 0 0 -60px; border:2px solid rgba(255,255,255,.25); border-radius:50%; background:rgba(255,255,255,.06); opacity:.55; }
.tg-stick.is-on { opacity:1; }
.tg-stick i { position:absolute; left:35px; top:35px; width:50px; height:50px; border-radius:50%; background:rgba(255,255,255,.55); }
.tg-tb { position:absolute; display:grid; place-items:center; border:2px solid rgba(255,255,255,.3); border-radius:50%; background:rgba(10,14,24,.45); color:#fff; font:800 11px var(--sans); letter-spacing:.06em; pointer-events:auto; touch-action:none; }
.tg-tb.is-on { background:rgba(255,255,255,.3); }
.tg-tb-jump { right:max(28px, env(safe-area-inset-right)); bottom:max(150px, calc(env(safe-area-inset-bottom) + 140px)); width:92px; height:92px; border-color:rgba(120,190,255,.6); }
.tg-tb-boost { right:max(130px, calc(env(safe-area-inset-right) + 120px)); bottom:max(40px, env(safe-area-inset-bottom)); width:84px; height:84px; border-color:rgba(255,176,46,.7); }
.tg-tb-slide { right:max(140px, calc(env(safe-area-inset-right) + 130px)); bottom:max(150px, calc(env(safe-area-inset-bottom) + 140px)); width:64px; height:64px; font-size:9.5px; }
.tg-tb-cam { right:max(28px, env(safe-area-inset-right)); top:max(70px, calc(env(safe-area-inset-top) + 60px)); width:48px; height:48px; font-size:20px; }
.tg-root:has(.tg-touch) .tg-boost { right:max(16px, env(safe-area-inset-right)); bottom:auto; top:max(8px, env(safe-area-inset-top)); width:76px; height:76px; }
.tg-root:has(.tg-touch) .tg-tb-cam { top:max(92px, calc(env(safe-area-inset-top) + 86px)); }
.tg-root:has(.tg-touch) .tg-feed { display:none; }
.tg-root:has(.tg-touch) .tg-boost b { font-size:24px; }
.tg-root:has(.tg-touch) .tg-speed { display:none; }
@media (max-width: 600px) { .tg-score b { min-width:42px; font-size:22px; line-height:38px; } .tg-clock { min-width:70px; font-size:18px; line-height:38px; } .tg-feed { display:none; } }
@media (prefers-reduced-motion: reduce) { .tg-msg { animation:none; } .tg-spin { animation-duration:2s; } }

/* Replay */
.tg-replay { position:absolute; left:50%; bottom:max(28px, env(safe-area-inset-bottom)); display:none; justify-items:center; gap:4px; transform:translateX(-50%); text-align:center; text-shadow:0 2px 10px rgba(0,0,0,.6); }
.tg-root.is-replay .tg-replay { display:grid; }
.tg-replay b { padding:4px 14px; border-radius:6px; background:#e8333a; font:900 14px/1.4 var(--sans); letter-spacing:.2em; animation:tg-blink 1.2s steps(2) infinite; }
.tg-replay span { font:800 22px var(--sans); }
.tg-replay small { color:rgba(255,255,255,.75); font-size:12.5px; }
.tg-root.is-replay .tg-boost, .tg-root.is-replay .tg-speed, .tg-root.is-replay .tg-arrow { display:none; }
.tg-root.is-replay .tg-canvas { filter:saturate(1.15) contrast(1.05); }
@keyframes tg-blink { 50% { opacity:.55; } }
/* Menu extras */
.tg-val { margin-left:auto; color:rgba(255,255,255,.6); font:600 12px var(--mono); }
.tg-settings label:has(.tg-val) input[type="range"] { width:min(200px, 45%); }
.tg-small { justify-self:start; min-height:34px; padding:0 12px; font-size:13px; }
/* Touch quick chat */
.tg-tb-chat { right:max(28px, env(safe-area-inset-right)); top:max(130px, calc(env(safe-area-inset-top) + 124px)); width:48px; height:48px; font-size:20px; }
.tg-root:has(.tg-touch) .tg-tb-chat { top:max(92px, calc(env(safe-area-inset-top) + 86px)); right:max(86px, calc(env(safe-area-inset-right) + 86px)); }
.tg-chat-pick { position:absolute; right:max(142px, calc(env(safe-area-inset-right) + 142px)); top:max(92px, calc(env(safe-area-inset-top) + 86px)); display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; max-width:min(340px, 45vw); pointer-events:auto; }
.tg-chat-pick[hidden] { display:none; }
.tg-chat-pick button { min-height:40px; padding:0 14px; border:1px solid rgba(255,255,255,.25); border-radius:10px; background:rgba(10,14,24,.85); color:#fff; font:700 13px var(--sans); text-align:left; }
@media (prefers-reduced-motion: reduce) { .tg-replay b { animation:none; } }

/* Tutorial and the controls reminder */
.tg-learn { position:relative; z-index:1; margin-left:auto; flex:none; min-height:44px; padding:0 18px; border:1px solid rgba(255,255,255,.35); border-radius:12px; background:rgba(255,255,255,.12); color:#fff; font:650 14.5px var(--sans); cursor:pointer; }
.tg-learn:hover { background:rgba(255,255,255,.2); }
.tg-learn.is-new { border-color:transparent; background:#fff; color:#0d1424; box-shadow:0 6px 20px rgba(0,0,0,.25); }
@media (max-width: 640px) { .tg-hero { flex-wrap:wrap; } .tg-learn { width:100%; margin-left:0; } }
.tg-tut { position:absolute; left:max(64px, calc(env(safe-area-inset-left) + 60px)); top:max(12px, env(safe-area-inset-top)); width:min(360px, calc(100vw - 140px)); padding:14px 16px; border:1px solid rgba(255,255,255,.14); border-radius:14px; background:rgba(10,14,24,.88); box-shadow:0 10px 30px rgba(0,0,0,.4); font-size:14px; line-height:1.5; }
.tg-tut h3 { margin:2px 0 6px; font-size:19px; }
.tg-tut p { margin:0; color:rgba(255,255,255,.88); }
.tg-tut .tg-tut-step { color:rgba(255,255,255,.55); font:700 11px var(--sans); letter-spacing:.1em; text-transform:uppercase; }
.tg-tut kbd, .tg-hint kbd { display:inline-block; padding:1px 7px; border:1px solid rgba(255,255,255,.3); border-bottom-width:2px; border-radius:6px; background:rgba(255,255,255,.1); color:#fff; font:700 12px var(--mono); }
.tg-tut-bar { height:4px; margin:12px 0 8px; overflow:hidden; border-radius:2px; background:rgba(255,255,255,.12); }
.tg-tut-bar i { display:block; height:100%; background:linear-gradient(90deg, #3d86ff, #ff8a2a); transition:width .3s; }
.tg-tut-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tg-tut-tick { color:#5fe08a; }
.tg-tut.is-ok { animation:tg-ok .5s var(--ease); border-color:#5fe08a; }
@keyframes tg-ok { 40% { transform:scale(1.04); } }
.tg-root:has(.tg-touch) .tg-tut { padding:8px 10px; font-size:12px; line-height:1.4; }
/* Wide landscape phone or tablet: a column on the left, clear of the scoreboard in the middle */
@media (orientation: landscape) {
  .tg-root:has(.tg-touch) .tg-tut { left:max(60px, calc(env(safe-area-inset-left) + 56px)); top:max(8px, env(safe-area-inset-top)); width:min(300px, calc(50vw - 165px)); }
}
/* Narrow landscape (a small phone on its side): a compact column between the menu and the scoreboard */
@media (orientation: landscape) and (max-width: 720px) {
  .tg-root:has(.tg-touch) .tg-tut { left:max(56px, calc(env(safe-area-inset-left) + 52px)); width:max(140px, calc(50vw - 160px)); padding:6px 9px; font-size:11.5px; line-height:1.35; }
  .tg-root:has(.tg-touch) .tg-tut h3 { font-size:13px; }
  .tg-root:has(.tg-touch) .tg-tut .tg-tut-step { font-size:10px; }
}
/* Portrait: a band across the screen, under the scoreboard and the buttons at the top, above the car */
@media (orientation: portrait) {
  .tg-root:has(.tg-touch) .tg-tut { top:max(150px, calc(env(safe-area-inset-top) + 144px)); left:max(12px, env(safe-area-inset-left)); right:max(12px, env(safe-area-inset-right)); width:auto; font-size:13px; }
}
.tg-root:has(.tg-touch) .tg-tut h3 { margin:0 0 3px; font-size:14px; }
.tg-root:has(.tg-touch) .tg-tut-bar { margin:6px 0 4px; }
.tg-root:has(.tg-touch) .tg-tut-actions { margin-top:4px; }
.tg-root:has(.tg-touch) .tg-tut .tg-small { min-height:28px; font-size:11.5px; }
.tg-hint { position:absolute; left:50%; bottom:max(18px, env(safe-area-inset-bottom)); display:flex; flex-wrap:wrap; justify-content:center; gap:6px 14px; max-width:min(760px, calc(100vw - 300px)); padding:10px 14px; border-radius:12px; background:rgba(10,14,24,.75); transform:translateX(-50%); font-size:13px; }
.tg-hint[hidden] { display:none; }
.tg-hint span { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
@media (prefers-reduced-motion: reduce) { .tg-tut.is-ok { animation:none; } }

