/* România 2: map-blue and road-green over the 3D stage. Overlays are plain translucent fills that only fade/move —
   no backdrop blur, blend modes or masks (heavy CSS over WebGL can stall its frames). */
:root {
    --r2-ink: #0d1b28;
    --r2-text: #eef4fa;
    --r2-muted: #a9b8c8;
    --r2-green: #21d19f;
    --r2-glass: rgba(10, 22, 34, .88);
    --r2-glass-2: rgba(10, 22, 34, .7);
    --r2-line: rgba(140, 190, 230, .25);
}
body.romania2-page { background: #0b1722; color: var(--r2-text); overflow-x: clip; }
.r2-main { width: min(100% - 32px, 1180px); margin: 0 auto; padding-top: 96px; padding-bottom: 46px; }
.r2-intro { margin-bottom: 16px; }
.r2-eyebrow { margin: 0 0 4px; color: #ffc857; font: 700 .74rem/1.2 system-ui, sans-serif; letter-spacing: .14em; }
.r2-intro h1 { margin: 0 0 6px; font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); }
.r2-intro p { margin: 0; max-width: 72ch; color: var(--r2-muted); }
.r2-intro strong { color: var(--r2-text); }

.r2-stage {
    position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; min-height: 480px; max-height: 86vh;
    border-radius: 16px; border: 1px solid var(--r2-line); background: #a9cdee; box-shadow: 0 20px 60px #000a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; outline: none; user-select: none; -webkit-user-select: none;
}
@media (max-width: 760px) { .r2-stage { aspect-ratio: auto; height: 84svh; min-height: 520px; max-height: none; border-radius: 12px; } }
.r2-stage:fullscreen, .r2-stage:-webkit-full-screen { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; aspect-ratio: auto; }
.r2-stage.is-faux-full { position: fixed; inset: 0; z-index: 1052; width: 100vw; height: 100dvh; max-height: none; min-height: 0; border-radius: 0; border: 0; aspect-ratio: auto; }
.r2-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* covers + cards */
.r2-cover { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(8, 18, 28, .72); overflow-y: auto; }
.r2-cover[hidden] { display: none; }
.r2-rotate { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 20px; background: rgba(8, 18, 28, .82); color: #fff; text-align: center; }
.r2-rotate[hidden] { display: none; }
.r2-rotate b { font-size: 1.25rem; }
.r2-rotate small { opacity: .8; }
.r2-rotate-icon { font-size: 3.2rem; line-height: 1; animation: r2-turn 1.8s ease-in-out infinite; }
@keyframes r2-turn { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(-90deg); } }
#r2-end .r2-card { margin: auto auto 0; }   /* low on the screen: the fireworks are in the sky above */
#r2-end { align-items: flex-end; padding-bottom: 5%; background: linear-gradient(to bottom, rgba(8, 18, 28, 0) 0%, rgba(8, 18, 28, .1) 45%, rgba(8, 18, 28, .65) 100%); }
.r2-card { width: min(100%, 620px); background: var(--r2-glass); border: 1px solid var(--r2-line); border-radius: 14px; padding: 18px; color: var(--r2-text); margin: auto; }
.r2-card h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 10px; }
.r2-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.r2-money { color: #ffd166; font-weight: 700; }
.r2-head-right { display: inline-flex; align-items: center; gap: 10px; }
.r2-btn-sm { padding: 4px 10px; font-size: .85rem; }
.r2-veh { position: relative; }
.r2-veh.is-locked { opacity: .78; }
.r2-veh.is-locked .r2-veh-sub { color: #ffd166; font-weight: 700; }
.r2-veh-3d { position: absolute; top: 6px; right: 6px; font-size: .62rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); color: #fff; }
.r2-veh-3d:hover { background: var(--r2-green); color: #04261b; }
/* the garage */
.r2-garage { position: absolute; inset: 0; z-index: 8; pointer-events: none; color: #fff; }
.r2-garage[hidden] { display: none; }
.r2-garage > * { pointer-events: auto; }
.r2-gar-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; }
.r2-gar-title { flex: 1; min-width: 0; background: var(--r2-glass-2); border-radius: 10px; padding: 4px 12px; }
.r2-gar-title b { display: block; font-size: 1.05rem; }
.r2-gar-title small { display: block; font-size: .75rem; color: var(--r2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#r2-gar-act:disabled { opacity: .7; cursor: default; }
.r2-gar-modes { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 4px; background: var(--r2-glass-2); border-radius: 12px; padding: 4px; }
.r2-gar-modes button { border: 0; background: transparent; color: #fff; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.r2-gar-modes button[aria-pressed="true"] { background: var(--r2-green); color: #04261b; }
.r2-gar-drive { position: absolute; right: 10px; bottom: 60px; display: flex; gap: 6px; }
.r2-gar-drive button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--r2-glass-2); color: #fff; font-size: 1.1rem; touch-action: none; }
.r2-gar-drive button:active { background: rgba(46, 204, 113, .5); }
.r2-gar-hint { position: absolute; left: 10px; bottom: 60px; margin: 0; font-size: .72rem; color: var(--r2-muted); background: rgba(0, 0, 0, .35); padding: 3px 8px; border-radius: 6px; max-width: 46%; }
@media (max-width: 560px) { .r2-gar-hint { display: none; } .r2-gar-modes button { padding: 6px 8px; font-size: .78rem; } }
.r2-muted { color: var(--r2-muted); }
.r2-small { font-size: .8rem; margin: 10px 0 0; }
.r2-menucard { width: min(100%, 980px); }
.r2-menu-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .r2-menu-grid { grid-template-columns: 1fr; } }
.r2-vehs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
/* the map of Romania with the courses */
.r2-map { background: rgba(255, 255, 255, .03); border: 1px solid var(--r2-line); border-radius: 12px; padding: 6px; }
.r2-romap { width: 100%; height: auto; display: block; }
.r2-romap-land { fill: rgba(140, 190, 230, .1); stroke: rgba(255, 255, 255, .5); stroke-width: 1.5; stroke-linejoin: round; }
.r2-romap-ref circle { fill: #5d6b78; }
.r2-romap-ref text { fill: #7f8d9b; font-size: 10px; text-anchor: middle; pointer-events: none; }
.r2-romap-route { cursor: pointer; outline: none; }
.r2-romap-hit { fill: none; stroke: transparent; stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.r2-romap-line { fill: none; stroke: var(--c); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.r2-romap-route:not(.is-done):not(.is-sel) .r2-romap-line { opacity: .5; }   /* still to do: dimmer — the finished ones stand out */
.r2-romap-route.is-done .r2-romap-line { opacity: 1; stroke-width: 4.5; }
.r2-romap-route:hover .r2-romap-line, .r2-romap-route:focus-visible .r2-romap-line { opacity: 1; stroke-width: 5; }
.r2-romap-done { pointer-events: none; }
.r2-romap-done circle { fill: #ffd166; stroke: #0d1b28; stroke-width: 2; }   /* one way done: yellow */
.r2-romap-done.is-all circle { fill: #21d19f; }                              /* both ways: green */
.r2-romap-done text { fill: #0d1b28; font-size: 10px; font-weight: 900; text-anchor: middle; }
.r2-map-legend { margin: 4px 6px 2px; font-size: .78rem; color: var(--r2-muted); }
.r2-map-legend b { color: #ffd166; }
.r2-legend-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #21d19f; color: #0d1b28; font-weight: 900; font-size: .7rem; }
.r2-legend-dot.is-half { background: #ffd166; }
.r2-chip.is-done { background: rgba(33, 209, 159, .14); }
.r2-go-done { display: block; font-size: .72rem; font-weight: 700; opacity: .85; }
.r2-go.is-done { background: #9be8cf; }
.r2-romap-route.is-sel .r2-romap-line { opacity: 1; stroke-width: 6; filter: drop-shadow(0 0 4px var(--c)); }
.r2-romap-city { cursor: pointer; }
.r2-romap-city circle { fill: #fff; stroke: #0d1b28; stroke-width: 2; }
.r2-romap-city.is-half circle { fill: #ffe9a8; }   /* an end of a road done one way */
.r2-romap-city.is-done circle { fill: #21d19f; }   /* an end of a road done both ways: green, like its ✓ */
.r2-romap-city.is-sel circle { fill: #ffd166; }
.r2-romap-city text { fill: #fff; font-size: 13px; font-weight: 800; paint-order: stroke; stroke: #0d1b28; stroke-width: 3px; pointer-events: none; }
@media (max-width: 560px) { .r2-romap-city text { font-size: 19px; stroke-width: 4px; } .r2-romap-ref text { font-size: 14px; } .r2-romap-city circle { r: 8; } .r2-romap-line { stroke-width: 5; } }
/* the panel: the chosen road, its two directions */
.r2-pick-hint { color: var(--r2-muted); margin: 4px 0 8px; }
.r2-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; padding-right: 4px; }   /* many roads: scroll inside, the panel stays put */
.r2-chip { border: 1px solid var(--c); background: transparent; color: var(--r2-text); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.r2-chip:hover { background: rgba(255, 255, 255, .08); }
.r2-pick-head { border-left: 4px solid var(--c); padding-left: 10px; margin-bottom: 6px; }
.r2-pick-head b { display: block; font-size: 1.15rem; }
.r2-pick-head span { font-size: .85rem; color: var(--r2-muted); }
.r2-pick-towns { font-size: .82rem; margin: 0 0 4px; color: #cfd9e3; }
.r2-pick-note { font-size: .8rem; margin: 0 0 10px; }
.r2-go { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 6px; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--r2-green); color: #04261b; font-weight: 800; font-size: 1rem; cursor: pointer; }
.r2-go:hover { filter: brightness(1.08); }
.r2-veh { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--r2-line); background: rgba(255, 255, 255, .06); color: var(--r2-text); cursor: pointer; }
.r2-veh[aria-pressed="true"] { border-color: var(--r2-green); background: rgba(33, 209, 159, .16); }
.r2-veh-emoji { font-size: 1.8rem; line-height: 1; }
.r2-veh-name { font-weight: 700; }
.r2-veh-sub { font-size: .72rem; color: var(--r2-muted); text-align: center; }
.r2-courses { display: flex; flex-direction: column; gap: 6px; }
.r2-course { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 10px 14px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .08); color: var(--r2-text); cursor: pointer; }
.r2-course:hover, .r2-course:focus-visible { background: rgba(33, 209, 159, .22); }
.r2-course-name { font-weight: 700; font-size: 1.02rem; }
.r2-course-meta { font-size: .8rem; color: var(--r2-muted); }
.r2-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.r2-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2ee6a6, #1abc9c); border-radius: 999px; transition: width .2s linear; }
.r2-bar-thin { height: 5px; margin-top: 4px; }
.r2-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.r2-btn { border: 1px solid var(--r2-line); background: rgba(255, 255, 255, .08); color: var(--r2-text); border-radius: 10px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.r2-btn-main { background: var(--r2-green); color: #04261b; border-color: transparent; }

/* HUD */
.r2-hud { position: absolute; inset: 0; z-index: 6; pointer-events: none; color: #fff; }
.r2-hud[hidden] { display: none; }
.r2-box { position: absolute; left: 10px; background: var(--r2-glass-2); border-radius: 10px; padding: 4px 12px; text-align: center; }
.r2-box b { display: block; font-size: 1.5rem; line-height: 1.1; }
.r2-box small { display: block; font-size: .62rem; letter-spacing: .08em; color: var(--r2-muted); }
.r2-speedbox { top: 10px; }
.r2-speedbox.is-over b { color: #ff6b6b; }
.r2-speedbox.is-boost { background: rgba(255, 176, 0, .85); color: #1d1300; }
.r2-speedbox.is-boost small { color: #3d2a00; }
.r2-speedbox.is-super { background: linear-gradient(135deg, #ff3b8d, #8a3cff); color: #fff; }
.r2-speedbox.is-super small { color: #f3e6ff; }
/* the guardian angel: a golden card, only opacity / transform move */
.r2-angel { position: absolute; right: 64px; top: 226px; z-index: 7; display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 14px; border-radius: 16px; background: rgba(255, 244, 214, .95); color: #3b2a00; box-shadow: 0 0 40px rgba(255, 214, 102, .6); pointer-events: none; opacity: 0; transform: translateY(10px) scale(.94); transform-origin: right top; transition: opacity .3s ease, transform .3s ease; max-width: min(420px, 60%); }
.r2-angel.is-show { opacity: 1; transform: none; }
.r2-angel-icon { font-size: 2.6rem; line-height: 1; }
.r2-angel p { margin: 0; }
.r2-angel-title { font-weight: 900; font-size: 1.25rem; }
.r2-angel-text { font-size: .9rem; }
.r2-angel-big { font-size: 1.35rem; font-weight: 900; color: #b3261e; }
/* the autopilot let go (too fast in a bend) */
.r2-lost { position: absolute; right: 64px; top: 226px; z-index: 7; display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 14px; border-radius: 16px; background: rgba(120, 20, 14, .92); color: #fff; pointer-events: none; opacity: 0; transform: translateY(10px) scale(.94); transform-origin: right top; transition: opacity .3s ease, transform .3s ease; max-width: min(420px, 60%); }
.r2-lost.is-show { opacity: 1; transform: none; }
.r2-lost-icon { font-size: 2.4rem; line-height: 1; }
.r2-lost p { margin: 0; }
.r2-lost-title { font-weight: 900; font-size: 1.2rem; }
.r2-lost-text { font-size: .88rem; color: #ffd9d4; }
/* the bend warning, under the speedometer */
/* the overtaking light (a little traffic light + the word) */
.r2-pass { position: absolute; top: 128px; left: 10px; display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; border-radius: 10px; background: var(--r2-glass-2); color: #fff; }
.r2-pass[hidden] { display: none; }
.r2-pass-light { display: flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 7px; background: #111; }
.r2-pass-light i { width: 11px; height: 11px; border-radius: 50%; background: #333; }
.r2-pass.is-no .r2-pass-light i:nth-child(1) { background: #ff3b30; box-shadow: 0 0 8px #ff3b30; }
.r2-pass.is-tight .r2-pass-light i:nth-child(2) { background: #ffcc00; box-shadow: 0 0 8px #ffcc00; }
.r2-pass.is-go .r2-pass-light i:nth-child(3) { background: #34e36b; box-shadow: 0 0 8px #34e36b; }
.r2-pass b { display: block; font-size: .95rem; }
.r2-pass.is-no b { color: #ff7a70; } .r2-pass.is-tight b { color: #ffd84d; } .r2-pass.is-go b { color: #6ff09a; }
.r2-pass small { display: block; font-size: .75rem; color: var(--r2-muted); }
.r2-curve { position: absolute; top: 72px; left: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; background: rgba(214, 140, 0, .92); color: #1d1300; }
.r2-curve[hidden] { display: none; }
.r2-curve.is-must { background: rgba(200, 30, 30, .95); color: #fff; animation: r2-pulse .6s ease-in-out infinite alternate; }
@keyframes r2-pulse { from { opacity: 1; } to { opacity: .55; } }
.r2-curve-sign { font-size: 1.6rem; line-height: 1; }
.r2-curve b { display: block; font-size: .95rem; }
.r2-curve small { display: block; font-size: .78rem; }

/* the big locality card: only opacity / transform move (heavy CSS over WebGL can stall its frames) */
.r2-banner { position: absolute; right: 64px; top: 108px; z-index: 7; display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 10px; border-radius: 18px; background: rgba(10, 22, 34, .86); color: #fff; pointer-events: none; opacity: 0; transform: translateY(-8px) scale(.94); transform-origin: right top; transition: opacity .35s ease, transform .35s ease; max-width: min(440px, 62%); }
.r2-banner.is-show { opacity: 1; transform: none; }
.r2-banner canvas { width: 88px; height: 88px; flex: none; }
.r2-banner-text p { margin: 0; }
#r2-banner-kicker { font-size: 1.05rem; font-weight: 700; color: #ffd166; letter-spacing: .02em; }
.r2-banner.is-exit #r2-banner-kicker { color: #ff8b7a; }
.r2-banner-name { font-size: clamp(1.35rem, 3vw, 2.1rem); font-weight: 900; line-height: 1.05; }
.r2-banner-note { font-size: .85rem; color: var(--r2-muted); }
.r2-banner-note:empty { display: none; }
@media (max-width: 560px) { .r2-banner { gap: 10px; padding: 8px 12px 8px 8px; } .r2-banner canvas { width: 60px; height: 60px; } }
.r2-limit { position: absolute; top: 12px; left: 88px; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 6px solid #e3262b; color: #1d1d1b; display: grid; place-items: center; font: 800 1.15rem/1 system-ui, sans-serif; }
.r2-limit[hidden] { display: none; }
.r2-points { position: absolute; top: 12px; left: 146px; padding: 6px 12px; border-radius: 10px; background: var(--r2-glass-2); color: #ffd166; font-weight: 800; font-size: 1.05rem; transition: transform .2s ease; }
.r2-points[hidden] { display: none; }
/* the menu's Google line: the progress kept in the account */
.r2-cloud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 2px 0; font-size: .85rem; color: var(--r2-muted); }
.r2-cloud[hidden] { display: none; }
.r2-cloud b { color: #6ff0c4; }
.r2-cloud button { font: inherit; font-weight: 700; font-size: .82rem; padding: 6px 12px; border-radius: 999px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; cursor: pointer; }
.r2-cloud button:disabled { opacity: .6; cursor: default; }
.r2-cloud .is-err { color: #ff8b7a; }
/* the bike's "between the cars" stamina: drains in the middle, refills in your lane */
.r2-filter { position: absolute; top: 54px; left: 146px; display: flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 9px; background: var(--r2-glass-2); color: #fff; font: 700 .72rem/1 system-ui, sans-serif; }
.r2-filter[hidden] { display: none; }
.r2-filter i { position: relative; width: 64px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.r2-filter b { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 4px; background: #21d19f; }
.r2-filter.is-low b { background: #ffd166; }
.r2-filter.is-lock b { background: #ff6b6b; }
.r2-filter.is-lock span { opacity: .6; }
.r2-points.is-up { animation: r2-pop-up .6s ease; }
.r2-points.is-down { animation: r2-pop-down .8s ease; }
@keyframes r2-pop-up { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes r2-pop-down { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } }
.r2-altbox { top: 72px; }
.r2-routebox { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(56%, 420px); background: var(--r2-glass-2); border-radius: 10px; padding: 6px 12px; }
.r2-route-line { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.r2-route-line span:first-child { overflow: hidden; text-overflow: ellipsis; }
.r2-route-line span:last-child { color: var(--r2-green); }
.r2-sig { position: absolute; top: 84px; width: 30px; text-align: center; font-size: 1.5rem; line-height: 1; color: rgba(255, 255, 255, .22); }
.r2-sig-l { left: calc(50% - 86px); } .r2-sig-r { left: calc(50% + 56px); }
.r2-sig.is-on { color: #2ee66b; text-shadow: 0 0 10px #2ee66b; }
.r2-compass { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); min-width: 92px; padding: 6px 10px 5px; border-radius: 14px; background: var(--r2-glass-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
#r2-compass-arrow { width: 46px; height: 46px; display: block; transition: transform .15s linear; }
#r2-compass-arrow path { fill: var(--r2-green); stroke: #06281c; stroke-width: 2.5; stroke-linejoin: round; }
#r2-compass-text { font-size: .8rem; font-weight: 800; white-space: nowrap; }
.r2-compass.is-turn #r2-compass-arrow path { fill: #ffd166; }
.r2-compass.is-back #r2-compass-arrow path { fill: #ff6b6b; }
@media (pointer: coarse) { #r2-compass-arrow { width: 40px; height: 40px; } }
.r2-where { position: absolute; left: 10px; bottom: 34px; display: flex; flex-direction: column; gap: 2px; background: var(--r2-glass-2); border-radius: 10px; padding: 5px 10px; max-width: 60%; }
#r2-place { font-weight: 700; }
#r2-street { font-size: .78rem; color: var(--r2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#r2-street:empty { display: none; }
.r2-stats { position: absolute; left: 10px; bottom: 6px; margin: 0; font-size: .68rem; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 6px; padding: 2px 8px; }
.r2-attrib { position: absolute; right: 8px; bottom: 6px; margin: 0; font-size: .62rem; color: #24384a; pointer-events: auto; }
.r2-attrib a { color: inherit; }
.r2-tools { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.r2-round { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--r2-glass-2); color: #fff; cursor: pointer; }
.r2-round[aria-pressed="false"] { opacity: .45; }
.r2-round[hidden] { display: none; }
#r2-b-assist[aria-pressed="true"] { background: rgba(33, 209, 159, .55); }
#r2-b-curve[aria-pressed="true"] { background: rgba(255, 166, 0, .62); }
#r2-b-curve[hidden] { display: none; }
@media (max-height: 560px) { .r2-tools { gap: 5px; } .r2-round { width: 36px; height: 36px; } }
/* messages + cards in the top-right corner (left of the buttons): the middle of the screen stays clear for the road */
.r2-toast { position: absolute; top: 58px; right: 64px; z-index: 7; max-width: min(420px, 46%); text-align: left; background: rgba(10, 22, 34, .9); color: #fff; padding: 8px 16px; border-radius: 12px; font-weight: 600; pointer-events: none; }
.r2-toast[hidden] { display: none; }

/* touch controls (phones / tablets only) */
.r2-touch { display: none; }
@media (pointer: coarse) {
    .r2-touch { display: block; position: absolute; inset: 0; pointer-events: none; }
    .r2-tbtn { position: absolute; bottom: 58px; width: 66px; height: 66px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .2); color: #fff; font-size: 1.3rem; pointer-events: auto; touch-action: none; }
    .r2-tbtn.is-on { background: rgba(255, 255, 255, .42); }
    .r2-t-left { left: 14px; } .r2-t-right { left: 92px; }
    .r2-t-down { right: 92px; background: rgba(210, 60, 60, .38); } .r2-t-up { right: 14px; background: rgba(46, 204, 113, .4); }
    .r2-t-sigl, .r2-t-sigr { bottom: 134px; width: 54px; height: 54px; background: rgba(255, 176, 0, .35); font-size: 1.2rem; }
    .r2-t-sigl { left: 14px; } .r2-t-sigr { left: 92px; }
    .r2-t-hand { right: 92px; bottom: 134px; width: 58px; height: 58px; background: rgba(210, 60, 60, .45); }
    .r2-t-boost { right: 14px; bottom: 134px; width: 58px; height: 58px; background: rgba(255, 176, 0, .5); }
    .r2-where { bottom: 132px; } .r2-stats { bottom: 4px; font-size: .6rem; }
}
.r2-touch[data-mode="road"] .r2-fly-only, .r2-touch[data-mode="fly"] .r2-road-only { display: none; }

.r2-about { margin-top: 16px; color: var(--r2-muted); }
.r2-about summary { cursor: pointer; color: var(--r2-text); font-weight: 700; }
.r2-about kbd { background: #24384a; color: #fff; }

@media (max-width: 760px) {   /* phones: below the course bar + the arrow */
    .r2-toast { top: 150px; right: 56px; max-width: 62%; font-size: .85rem; }
    .r2-banner { top: 196px; right: 56px; }
    .r2-angel, .r2-lost { top: 290px; right: 56px; max-width: 72%; }
}

/* the junction-turn sign: a bent arrow + how sharp (4 bars, the colour) + metres left + the blinker to use */
.r2-turn { --lvl: #2ecc71; position: absolute; top: 58px; right: 64px; z-index: 7; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; background: rgba(10, 22, 34, .9); color: #fff; border: 2px solid transparent; pointer-events: none; }
.r2-turn[hidden] { display: none; }
.r2-turn.is-ok { border-color: #2ecc71; }
.r2-turn.is-urgent { border-color: #ff3b30; animation: r2-pulse .5s ease-in-out infinite alternate; }
.r2-turn-sign svg { width: 62px; height: 62px; display: block; }
.r2-turn b { display: block; font-size: 1.05rem; }
.r2-turn-lvl { display: flex; align-items: center; gap: 3px; margin: 3px 0 2px; }
.r2-turn-lvl i { width: 14px; height: 7px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.r2-turn-lvl i.is-on { background: var(--lvl); }
.r2-turn-lvl em { font-style: normal; font-weight: 700; font-size: .8rem; color: var(--lvl); margin-left: 6px; }
.r2-turn small { display: block; font-size: .78rem; opacity: .9; }
.r2-turn.is-ok small { color: #7dffb0; opacity: 1; }
/* while it shows, the other top-right messages stack below it */
.r2-turn:not([hidden]) ~ .r2-toast { top: 146px; }
.r2-turn:not([hidden]) ~ .r2-banner { top: 196px; }
.r2-turn:not([hidden]) ~ .r2-angel { top: 310px; }
@media (max-width: 760px) {
    .r2-turn { top: 150px; right: 56px; padding: 6px 10px 6px 6px; }
    .r2-turn-sign svg { width: 48px; height: 48px; }
    .r2-turn:not([hidden]) ~ .r2-toast { top: 228px; }
    .r2-turn:not([hidden]) ~ .r2-banner { top: 272px; }
    .r2-turn:not([hidden]) ~ .r2-angel { top: 360px; }
}

/* a phone on its side (short landscape): smaller pedals, the tools in two columns at the top right, the place name between
   the pedal groups at the bottom, every message card left of the tools — nothing covers the controls */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    .r2-tools { display: grid; grid-template-columns: repeat(2, 36px); gap: 5px; }
    .r2-round { width: 36px; height: 36px; }
    .r2-tbtn { bottom: 12px; width: 56px; height: 56px; font-size: 1.15rem; }
    .r2-t-left { left: 12px; } .r2-t-right { left: 76px; } .r2-t-down { right: 76px; } .r2-t-up { right: 12px; }
    .r2-t-sigl, .r2-t-sigr { bottom: 76px; width: 46px; height: 46px; font-size: 1rem; } .r2-t-sigl { left: 17px; } .r2-t-sigr { left: 81px; }
    .r2-t-hand, .r2-t-boost { bottom: 76px; width: 48px; height: 48px; } .r2-t-hand { right: 80px; } .r2-t-boost { right: 16px; }
    .r2-where { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); max-width: 36%; padding: 3px 9px; align-items: center; text-align: center; }
    .r2-stats { display: none; }
    .r2-attrib { right: auto; left: 50%; transform: translateX(-50%); bottom: 1px; font-size: .5rem; white-space: nowrap; }
    .r2-turn { top: 58px; right: 96px; padding: 5px 9px 5px 5px; } .r2-turn-sign svg { width: 44px; height: 44px; }
    .r2-toast { top: 58px; right: 96px; max-width: 42%; font-size: .82rem; padding: 6px 12px; }
    .r2-banner { top: 104px; right: 96px; padding: 6px 12px 6px 6px; } .r2-banner canvas { width: 52px; height: 52px; } .r2-banner-name { font-size: 1.25rem; }
    .r2-angel, .r2-lost { top: 120px; right: 96px; max-width: 46%; }
    .r2-turn:not([hidden]) ~ .r2-toast { top: 126px; }
    .r2-turn:not([hidden]) ~ .r2-banner { top: 172px; }
    .r2-turn:not([hidden]) ~ .r2-angel { top: 172px; }
}

/* phones: the angel / "out of the autopilot" cards as a short strip high in the corner — the road ahead stays in view */
@media (pointer: coarse) {
    .r2-angel, .r2-lost { gap: 8px; padding: 5px 12px 5px 8px; border-radius: 12px; max-width: min(300px, 46%); z-index: 8; }
    .r2-angel { box-shadow: 0 0 14px rgba(255, 214, 102, .55); }
    .r2-angel-icon, .r2-lost-icon { font-size: 1.35rem; }
    .r2-angel-title { font-size: .72rem; font-weight: 800; }
    .r2-angel-big { font-size: .92rem; line-height: 1.15; }
    .r2-lost-title { font-size: .9rem; }
    .r2-angel-text, .r2-lost-text { display: none; }
    .r2-angel, .r2-lost, .r2-turn:not([hidden]) ~ .r2-angel { top: 150px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    .r2-angel, .r2-lost, .r2-turn:not([hidden]) ~ .r2-angel { top: 58px; right: 96px; }
}
