:root { --bg: rgba(38,38,38,.9); --fg: #f7f7f5; --acc: #fcb71e; --red: #c8102e; --dark: #2e2e2e; --line: rgba(255,255,255,.14); --ok: #7fd18b; --bad: #ff8a7a; --warn: #ffcf70; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a9d4f5; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--fg); touch-action: none; }
a { color: var(--acc); }
#view { position: fixed; left: 0; right: 0; bottom: 0; top: 54px; }
body.racing #view { top: 0; }
.hide { display: none !important; }
.dim { opacity: .65; } .small { font-size: 12.5px; }
.panel { position: fixed; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; backdrop-filter: blur(6px); }
#topbar { position: fixed; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: var(--dark); border-bottom: 2px solid var(--acc); z-index: 10; }
#topbar .brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
#topbar .brand img { width: 34px; height: 34px; } #topbar .brand b { color: var(--acc); }
#topbar .nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
#topbar .nav > * { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; border: 0; background: transparent; color: var(--fg); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
#topbar .nav > *:hover { background: rgba(255,255,255,.08); }
#topbar .nav > .on { background: var(--acc); color: #1b1b1b; }
body.racing #topbar, body.racing .panel.side, body.racing .panel.center, body.racing #adminBtn { display: none !important; }
.panel.side { left: 16px; top: 70px; width: min(370px, calc(100vw - 32px)); max-height: calc(100vh - 86px); overflow: auto; touch-action: pan-y; }
.panel.center { left: 50%; top: 70px; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 86px); overflow: auto; touch-action: pan-y; }
.panel.center.narrow { width: min(460px, calc(100vw - 24px)); }
.panel.center .row select { flex: 1; }
#bodies { display: flex; flex-direction: column; gap: 5px; }
.body { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.body.on { border-color: var(--acc); background: rgba(252,183,30,.15); }
.li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.okc { color: var(--ok); } .badc { color: var(--bad); }
.pen { color: #ffb0a0; font-weight: 700; margin: 4px 0; }
#surf.flash { color: #ff8a7a; font-size: 22px; }
.tt div i { display: block; font-style: normal; font-size: 10.5px; opacity: .8; font-weight: 400; }
h1 { margin: 0 0 4px; font-size: 21px; } h1 span { color: var(--acc); }
h2 { margin: 0 0 8px; font-size: 18px; }
h3 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: .65; font-weight: 600; }
.acc { font-size: 13px; margin-bottom: 10px; }
.seg2, #classes { display: flex; gap: 6px; }
.seg2 button, .cls { flex: 1; padding: 8px 0; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.cls small { display: block; font-weight: 400; font-size: 10.5px; opacity: .7; }
.seg2 button.on, .cls.on { background: var(--acc); color: #1b1b1b; border-color: var(--acc); }
select, input:not([type=range]):not([type=color]) { width: 100%; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--fg); font: inherit; }
select { font-weight: 600; } select option, select optgroup { color: #111; }
#trackInfo { font-size: 12.5px; opacity: .88; margin-top: 6px; } #trackInfo span { opacity: .8; } #trackInfo em { color: var(--warn); font-style: normal; }
label { display: block; margin: 8px 0; font-size: 13.5px; }
label span { float: right; opacity: .8; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--acc); }
input[type=color] { float: right; width: 46px; height: 24px; border: 0; background: none; padding: 0; }
#inspect { font-size: 12.5px; margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.05); }
#inspect .ok { color: var(--ok); } #inspect .bad { color: var(--bad); } #inspect .warn { color: var(--warn); }
#stats { font-size: 12px; opacity: .75; margin-top: 8px; }
#best { font-size: 13px; margin-top: 6px; color: var(--acc); }
.note { font-size: 12.5px; color: var(--warn); margin: 10px 0 0; min-height: 0; }
.row { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.row.small { margin-top: 6px; justify-content: space-between; }
button.main { flex: 1; padding: 12px; border: 0; border-radius: 10px; background: var(--acc); color: #1b1b1b; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
button.main:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
button.link { background: none; border: 0; color: var(--acc); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.hint { font-size: 12px; opacity: .6; margin-top: 10px; }
#adminBtn { right: 16px; top: 70px; padding: 8px 12px; }
#tiltBtn { width: 100%; margin-top: 8px; }
#admin { right: 16px; top: 118px; width: min(330px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: auto; touch-action: pan-y; }
#hud .top { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; }
.chip { white-space: nowrap; background: var(--bg); border-radius: 10px; padding: 6px 14px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 20px; color: var(--fg); border: 0; }
.chip.lbl { font-size: 14px; } .chip.x { cursor: pointer; font-size: 16px; padding: 8px 12px; }
#spdBox { position: fixed; right: 16px; bottom: 16px; background: var(--bg); border-radius: 14px; padding: 8px 16px; text-align: right; }
#spd { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
#progWrap { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); width: 260px; height: 6px; background: rgba(0,0,0,.35); border-radius: 3px; overflow: hidden; }
#prog { height: 100%; width: 0; background: var(--acc); }
#tourBar { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); }
.tt { display: flex; gap: 4px; justify-content: center; margin: 10px 0; }
.tt div { background: rgba(0,0,0,.35); border-radius: 8px; padding: 4px 8px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; min-width: 58px; }
.tt div small { display: block; font-weight: 400; font-size: 10.5px; opacity: .7; }
.tt div.cur { outline: 2px solid var(--acc); } .tt div.sum { background: rgba(242,182,50,.25); }
#steerBar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: min(360px, 60vw); height: 8px; background: rgba(0,0,0,.35); border-radius: 4px; }
#steerInd { position: absolute; top: -5px; width: 6px; height: 18px; margin-left: -3px; background: #fff; border-radius: 3px; left: 50%; }
#mini { position: fixed; left: 12px; bottom: 12px; background: rgba(18,22,28,.55); border-radius: 12px; }
#cd { position: fixed; top: 38%; left: 50%; transform: translate(-50%,-50%); font-size: 96px; font-weight: 900; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.5); }
#msg { position: fixed; top: 130px; left: 50%; transform: translateX(-50%); text-align: center; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
#surf { color: #ffd27a; } #contacts { color: #ffb0a0; display: block; }
#result { left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(440px, calc(100vw - 24px)); text-align: center; }
#result h2 { font-size: 44px; margin: 4px 0; }
#result .row { justify-content: center; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
.modal .panel { left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; touch-action: pan-y; }
.modal .panel.wide { width: min(620px, calc(100vw - 24px)); }
.err { color: var(--bad); font-size: 13px; min-height: 1em; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); }
tr.me td { background: rgba(242,182,50,.18); }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 18px; background: #a9d4f5; color: #1b2a3a; z-index: 30; }
@media (max-width: 700px) {
  #topbar { height: 50px; gap: 6px; padding: 0 6px; }
  #view { top: 50px; }
  #topbar .brand span { display: none; }
  #topbar .nav > * { padding: 7px 8px; font-size: 13px; }
  #topbar .nav > * span { display: none; }
  #topbar .nav > .on span, #navKontoBtn span { display: inline; }
  .panel.side { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 55vh; padding: 12px 14px; }
  .panel.center { top: 60px; max-height: calc(100vh - 70px); }
  .hide-sm { display: none; }
  #mini { width: 110px; height: 104px; bottom: 50px; }
  #spdBox { bottom: 50px; } #spd { font-size: 32px; }
  #adminBtn { top: 58px; right: 8px; }
  .tt div { min-width: 44px; padding: 3px 5px; font-size: 12px; }
}

#drivers { display: flex; flex-direction: column; gap: 4px; }
.agegrp { display: grid; grid-template-columns: 34px repeat(4, 1fr); gap: 4px; align-items: stretch; }
.agegrp > span { font-size: 11.5px; opacity: .7; align-self: center; }
.drv { padding: 4px 2px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.drv i { display: block; width: 14px; height: 4px; border-radius: 2px; margin: 0 auto 2px; }
.drv small { display: block; font-weight: 400; font-size: 10px; opacity: .7; }
.drv.on { border-color: var(--acc); background: rgba(252,183,30,.18); }
.drv.no { opacity: .35; }
#brakeBtn { position: fixed; right: 16px; bottom: 110px; width: 96px; height: 96px; border-radius: 50%; border: 3px solid #fff; background: rgba(200,16,46,.85); color: #fff; font: inherit; font-weight: 800; font-size: 15px; touch-action: none; display: none; }
#brakeBtn.on { background: #ff2d4a; transform: scale(.95); }
@media (pointer: coarse) { body.racing #brakeBtn { display: block; } }
#brakeHint { position: fixed; top: 42%; left: 50%; transform: translateX(-50%); font-size: 40px; font-weight: 900; color: #fff; text-shadow: 0 3px 12px rgba(200,16,46,.9); }
@media (max-width: 800px) { body.racing #brakeBtn { display: block; } }
