@font-face { font-family: 'Saira'; src: url('../assets/saira800.woff') format('woff'); font-weight: 800; font-display: swap; }
:root {
  --red: #e5161d; --red2: #b90f15; --black: #0b0b0c; --ink: #f4f4f4; --mute: #a9a9ad;
  --glass: rgba(10, 10, 12, 0.62); --line: rgba(255, 255, 255, 0.12);
  --green: #2fd36b; --bad: #ff4a4f; --purple: #b46bff;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--ink); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; overflow: hidden; overscroll-behavior: none; }
#app { position: fixed; inset: 0; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
#vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%); display: none; }
body.low #vignette { display: block; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; font-variant-numeric: tabular-nums; }
.hud-tl { position: absolute; left: calc(18px + var(--sal)); top: calc(16px + var(--sat)); background: linear-gradient(90deg, rgba(8,8,10,0.78), rgba(8,8,10,0.35)); border-left: 4px solid var(--red); padding: 10px 16px 10px 14px; min-width: 210px; border-radius: 2px 10px 10px 2px; }
.lbl { color: var(--mute); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-right: 8px; }
.lapline b { font-family: Saira, system-ui; font-size: 18px; }
.bigtime { font-family: Saira, system-ui; font-weight: 800; font-size: 40px; line-height: 1.05; letter-spacing: 0.01em; }
.rows div { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; margin-top: 3px; }
.rows b { font-family: Saira, system-ui; font-weight: 800; }
.record b { color: #ffd23c; }
.hud-tc { position: absolute; left: 50%; top: calc(16px + var(--sat)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sectors { display: flex; gap: 6px; }
.sec { background: rgba(8,8,10,0.7); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; min-width: 92px; text-align: center; }
.sec span { display: block; font-size: 10px; color: var(--mute); letter-spacing: 0.15em; }
.sec b { font-family: Saira, system-ui; font-size: 17px; }
.sec.good { border-color: var(--green); box-shadow: inset 0 -3px 0 var(--green); }
.sec.good b { color: var(--green); }
.sec.bad { border-color: rgba(255,74,79,0.8); box-shadow: inset 0 -3px 0 var(--bad); }
.sec.bad b { color: var(--bad); }
.delta { font-family: Saira, system-ui; font-size: 20px; padding: 3px 14px; border-radius: 20px; background: rgba(8,8,10,0.7); }
.delta.good { color: var(--green); } .delta.bad { color: var(--bad); }
.hud-tr { position: absolute; right: calc(16px + var(--sar)); top: calc(14px + var(--sat)); }
#minimap { width: 200px; height: 200px; background: rgba(8,8,10,0.55); border-radius: 14px; border: 1px solid var(--line); }
.hud-br { position: absolute; right: calc(22px + var(--sar)); bottom: calc(18px + var(--sab)); }
.speedo { position: relative; width: 210px; height: 128px; }
.speedo .arc { width: 100%; height: 100%; }
.speedo .track { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 12; stroke-linecap: round; }
.speedo .fill { fill: none; stroke: var(--red); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 252; stroke-dashoffset: 252; filter: drop-shadow(0 0 6px rgba(229,22,29,0.7)); }
.spd { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.spd b { font-family: Saira, system-ui; font-size: 56px; line-height: 1; display: block; text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
.spd span { font-size: 12px; color: var(--mute); letter-spacing: 0.2em; }
.hud-bl { position: absolute; left: calc(18px + var(--sal)); bottom: calc(18px + var(--sab)); pointer-events: auto; }
.btns { display: flex; gap: 6px; }
.btns button { background: rgba(8,8,10,0.7); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; min-width: 44px; }
.btns button:hover { border-color: var(--red); }
.btns button.off { color: var(--mute); text-decoration: line-through; }
.camname { margin-top: 8px; font-size: 12px; color: var(--mute); letter-spacing: 0.05em; }
.startlights { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); display: flex; gap: 14px; background: rgba(8,8,10,0.85); padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); }
.startlights i { width: 46px; height: 46px; border-radius: 50%; background: #2a0606; box-shadow: inset 0 0 10px rgba(0,0,0,0.7); transition: background 0.05s; }
.startlights i.on { background: radial-gradient(circle at 40% 35%, #ff8c8c, #ff1010 45%, #a00000); box-shadow: 0 0 22px rgba(255,20,20,0.9); }
.startlights.go i { background: radial-gradient(circle at 40% 35%, #b6ffc4, #20d84a 45%, #0a7a24); box-shadow: 0 0 22px rgba(40,240,90,0.9); }
.centermsg { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font-family: Saira, system-ui; font-size: 64px; letter-spacing: 0.04em; text-shadow: 0 4px 30px rgba(0,0,0,0.8); opacity: 0; transition: opacity 0.25s, transform 0.25s; transform: scale(0.96); }
.centermsg.show { opacity: 1; transform: scale(1); }
.toast { position: absolute; left: 50%; top: 21%; transform: translateX(-50%) translateY(-10px); background: rgba(8,8,10,0.82); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 10px 22px; border-radius: 10px; font-size: 18px; opacity: 0; transition: opacity 0.3s, transform 0.3s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { font-family: Saira, system-ui; font-size: 26px; margin: 0 6px; }
.toast .good { color: var(--green); } .toast .bad { color: var(--bad); } .toast .pb { color: var(--purple); }
.warn { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); background: var(--red); color: #fff; font-family: Saira, system-ui; font-size: 30px; padding: 8px 26px; border-radius: 8px; animation: blink 0.6s infinite alternate; }
.hint { position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%); background: rgba(8,8,10,0.85); padding: 10px 20px; border-radius: 10px; font-size: 16px; }
@keyframes blink { from { opacity: 1; } to { opacity: 0.45; } }
body.nohud #hud, body.nohud #touch { display: none !important; }

/* ---------- Dotyk ---------- */
#touch { position: absolute; inset: 0; pointer-events: none; -webkit-touch-callout: none; }
#touch button { pointer-events: auto; border: 2px solid rgba(255,255,255,0.22); background: rgba(10,10,12,0.42); border-radius: 50%; font-weight: 800; color: #fff; touch-action: none; }
#touch button.on { background: rgba(229,22,29,0.55); border-color: var(--red); }
.tleft { position: absolute; left: calc(14px + var(--sal)); bottom: calc(18px + var(--sab)); display: flex; gap: 14px; }
.tleft button { width: 92px; height: 92px; font-size: 30px; }
.tright { position: absolute; right: calc(14px + var(--sar)); bottom: calc(18px + var(--sab)); display: flex; gap: 14px; align-items: flex-end; }
.tright .gas { width: 110px; height: 110px; font-size: 20px; background: rgba(229,22,29,0.35); }
.tright .brake { width: 84px; height: 84px; font-size: 16px; }
.ttop { position: absolute; right: calc(230px + var(--sar)); top: calc(14px + var(--sat)); }
.ttop button { width: 44px; height: 44px; font-size: 16px; }
body.touch .hud-br { right: auto; left: 50%; transform: translateX(-50%) scale(0.7); transform-origin: bottom center; bottom: calc(4px + var(--sab)); }
body.touch .hud-bl { left: auto; right: calc(14px + var(--sar)); bottom: auto; top: calc(138px + var(--sat)); }
body.touch .hud-bl .camname { display: none; }
body.touch .hud-tl { transform: scale(0.78); transform-origin: top left; }
body.touch .hud-tc { transform: translateX(-50%) scale(0.8); transform-origin: top center; }
body.touch #minimap { width: 120px; height: 120px; }
body.touch .speedo { width: 200px; }

/* ---------- Menu ---------- */
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(16px + var(--sat)) calc(16px + var(--sar)) calc(16px + var(--sab)) calc(16px + var(--sal)); overflow-y: auto; touch-action: pan-y; }
#menu { background: linear-gradient(100deg, rgba(5,5,6,0.93) 0%, rgba(5,5,6,0.80) 46%, rgba(5,5,6,0.12) 78%, rgba(5,5,6,0) 100%); justify-content: flex-start; }
.menu-inner { width: min(560px, 100%); margin-left: clamp(0px, 4vw, 70px); }
.logo { height: 58px; display: block; margin-bottom: 10px; }
h1 { font-family: Saira, system-ui; font-weight: 800; font-size: clamp(30px, 4.4vw, 48px); line-height: 1; margin: 0 0 8px; letter-spacing: 0.01em; }
h1 em { font-style: normal; color: var(--red); }
.sub { margin: 0 0 18px; color: #cfcfd3; font-size: 15px; }
h2 { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin: 14px 0 8px; font-weight: 700; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { text-align: left; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.mode:hover { border-color: rgba(229,22,29,0.6); }
.mode.sel { border-color: var(--red); background: rgba(229,22,29,0.14); box-shadow: inset 0 0 0 1px var(--red); }
.mt { font-weight: 800; font-size: 16px; }
.md { font-size: 12.5px; color: #c4c4c8; line-height: 1.35; }
.mb { font-size: 12px; color: #fff; margin-top: 2px; }
.mb .rec { display: block; color: #ffd23c; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.seg button.sel { background: var(--red); color: #fff; }
.seg.disabled { opacity: 0.35; pointer-events: none; }
.start { margin-top: 18px; width: 100%; background: var(--red); border: 0; border-radius: 12px; padding: 15px; font-family: Saira, system-ui; font-size: 24px; letter-spacing: 0.12em; color: #fff; box-shadow: 0 10px 30px rgba(229,22,29,0.35); transition: transform 0.1s, background 0.15s; }
.start:hover { background: #ff2a31; } .start:active { transform: scale(0.98); }
.start.small { width: auto; font-size: 16px; padding: 11px 22px; margin: 0; letter-spacing: 0.08em; }
.help { margin-top: 14px; font-size: 13px; color: #cfcfd3; }
.help summary { cursor: pointer; color: #fff; font-weight: 700; }
.help .cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 8px; }
.help h3 { font-size: 12px; margin: 6px 0 4px; color: #fff; }
.help p { margin: 3px 0; line-height: 1.5; }
kbd { display: inline-block; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; font-family: inherit; }
footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: #cfcfd3; }
.cta { display: inline-block; background: #fff; color: #0b0b0c; text-decoration: none; font-weight: 800; padding: 10px 16px; border-radius: 10px; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.cta:hover { background: var(--red); color: #fff; }

/* ---------- Panel pauzy/wyników ---------- */
#panel { background: rgba(4,4,5,0.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.panel-inner { width: min(520px, 100%); background: rgba(14,14,16,0.92); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 14px; padding: 20px 22px; }
.panel-inner h2 { font-family: Saira, system-ui; font-size: 30px; color: #fff; letter-spacing: 0.02em; text-transform: none; margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 16px; }
.stats div { display: flex; flex-direction: column; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 8px 10px; }
.stats span { font-size: 11px; color: var(--mute); letter-spacing: 0.1em; text-transform: uppercase; }
.stats b { font-family: Saira, system-ui; font-size: 22px; }
.stats .gold b { color: #ffd23c; }
.stats .wide { grid-column: span 2; }
.pbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.pbtns button:not(.start) { background: rgba(255,255,255,0.07); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 700; }
.ctabox { margin-top: 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: linear-gradient(90deg, rgba(229,22,29,0.22), rgba(229,22,29,0.05)); border: 1px solid rgba(229,22,29,0.5); border-radius: 12px; padding: 12px 14px; }
.ctabox b { display: block; font-size: 16px; } .ctabox span { font-size: 12.5px; color: #d6d6da; }

/* ---------- Tryb zdjęć ---------- */
#photo { position: absolute; inset: 0; pointer-events: none; }
.pbar { pointer-events: auto; position: absolute; left: 50%; bottom: calc(18px + var(--sab)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: rgba(10,10,12,0.8); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.pbar > button:not(.start) { background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; font-weight: 700; font-size: 13px; }
.ptitle { font-family: Saira, system-ui; font-size: 16px; margin: 0 6px; color: var(--red); }
.pbar .seg { min-width: 300px; }
.phint { position: absolute; left: 50%; top: calc(14px + var(--sat)); transform: translateX(-50%); font-size: 12px; color: #ddd; background: rgba(10,10,12,0.55); padding: 6px 12px; border-radius: 8px; }
#photo.bare .pbar, #photo.bare .phint { display: none; }

/* ---------- Inne ---------- */
#rotate { position: absolute; inset: 0; background: #0b0b0c; z-index: 50; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
#rotate b { display: block; font-family: Saira, system-ui; font-size: 26px; margin-bottom: 8px; }
#rotate span { color: var(--mute); }
#loading { position: absolute; inset: 0; background: #0b0b0c; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity 0.6s; }
#loading img { width: 220px; }
#loading .bar { width: 240px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 10%; background: var(--red); transition: width 0.3s; }
#loading span { color: var(--mute); font-size: 13px; }
#loading.done { opacity: 0; pointer-events: none; }

@media (max-width: 900px), (max-height: 520px) {
  .menu-inner { margin-left: 0; width: min(760px, 100%); }
  #menu { background: rgba(5,5,6,0.86); align-items: flex-start; }
  .logo { height: 38px; margin-bottom: 4px; }
  h1 { font-size: 26px; } .sub { font-size: 13px; margin-bottom: 6px; }
  h2 { margin: 8px 0 5px; }
  .mode { padding: 8px 10px; } .md { display: none; }
  .start { margin-top: 10px; padding: 10px; font-size: 20px; }
  .help { display: none; }
  footer { margin-top: 8px; }
  .panel-inner { padding: 14px 16px; }
  .stats b { font-size: 18px; }
  .ctabox span { display: none; }
}
@media (max-height: 520px) {
  .pbar .seg { min-width: 240px; }
  .startlights i { width: 30px; height: 30px; }
  .centermsg { font-size: 44px; }
}

.kartinfo { margin: 6px 2px 0; font-size: 12px; color: #bdbdc2; min-height: 16px; }
@media (max-width: 900px), (max-height: 520px) { .kartinfo { display: none; } }

/* czcionka Saira ma z polskich znaków tylko Ó: pozostałe idą z czcionki systemowej, więc muszą mieć tę samą grubość */
.start, .warn, .centermsg, .panel-inner h2, h1 { font-weight: 800; }
/* panel pauzy na niskim ekranie telefonu mieści się bez ucinania */
@media (max-height: 520px) {
  #panel { overflow-y: auto; align-items: flex-start; }
  .panel-inner { padding: 10px 14px; }
  .panel-inner h2 { font-size: 20px; margin: 0 0 6px; }
  .stats { gap: 4px 10px; margin-bottom: 8px; }
  .stats div { padding: 3px 8px; }
  .stats span { font-size: 9.5px; }
  .stats b { font-size: 15px; }
  .ctabox { margin-top: 8px; padding: 6px 10px; }
  .ctabox b { font-size: 13px; }
}

.sec.purple { border-color: #b77bff; box-shadow: inset 0 -3px 0 #b77bff; }
.sec.purple b { color: #d3b0ff; }
.dbar { width: 180px; height: 4px; margin: 4px auto 0; background: rgba(8,8,10,0.55); border-radius: 2px; overflow: hidden; position: relative; }
.dbar i { position: absolute; left: 50%; width: 50%; height: 100%; display: block; transform: scaleX(0); transition: background .2s; }
.feedback { font-family: Saira, system-ui; font-size: 15px; letter-spacing: .04em; color: #e8e8ea; opacity: 0; transition: opacity .25s; text-align: center; margin-top: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.feedback.show { opacity: 1; }
.feedback .good { color: var(--green); } .feedback .pur { color: #d3b0ff; }
#introSkip { position: absolute; right: 22px; bottom: 18px; font-size: 13px; color: rgba(255,255,255,.75); text-shadow: 0 1px 3px #000; z-index: 40; pointer-events: none; }

/* tryb Dziecko: bez czasów, sektorów i prędkości; dwa wielkie przyciski skrętu na brzegach ekranu */
body.kidmode .rows, body.kidmode .bigtime, body.kidmode .hud-tc .sectors, body.kidmode #delta, body.kidmode .dbar, body.kidmode .hud-br, body.kidmode .hud-bl, body.kidmode #hint { display: none !important; }
body.kidmode .tright, body.kidmode .ttop { display: none !important; }
body.kidmode .tleft { left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); bottom: calc(14px + var(--sab)); justify-content: space-between; }
body.kidmode .tleft button { width: min(38vw, 62vh); height: min(38vw, 62vh); font-size: 72px; background: transparent; border: 3px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.75); text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
body.kidmode .tleft button.on { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.65); }

/* ---------- Runda 26: nowe menu (mieści się od 1280x720 i na telefonie; gdy brakuje miejsca, przewija się, nic nie jest ucięte u góry) ---------- */
#menu { align-items: flex-start; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
#menu .menu-inner { width: min(640px, 100%); margin: auto 0 auto clamp(0px, 4vw, 64px); padding: 4px 0 10px; }
.mhead { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.mhead .logo { height: 46px; margin: 0; }
.mhead h1 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 3px; }
.mhead .sub { margin: 0; font-size: 13.5px; }
#menu h2 { margin: 10px 0 6px; }
.profil { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; font-size: 13px; }
.profil:empty { display: none; }
.profil .lv { font-family: Saira, system-ui; font-weight: 800; font-size: 18px; color: #fff; }
.profil .xp { flex: 1; min-width: 90px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.profil .xp i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ff7a3c); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.profil .pill { background: rgba(255,255,255,0.08); border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.profil .pill b { color: #ffd23c; }
.profil button { background: var(--red); border: 0; border-radius: 9px; padding: 6px 12px; font-weight: 800; font-size: 13px; color: #fff; }
.gmodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gm { position: relative; text-align: left; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s, transform .12s; min-height: 56px; }
.gm:hover { border-color: rgba(229,22,29,0.6); transform: translateY(-1px); }
.gm.sel { border-color: var(--red); background: rgba(229,22,29,0.16); box-shadow: inset 0 0 0 1px var(--red); }
.gm b { font-size: 14.5px; font-weight: 800; }
.gm span { font-size: 11.5px; color: #c4c4c8; line-height: 1.3; }
.gm .nowe { position: absolute; right: 8px; top: 7px; background: #ffd23c; color: #111; font-size: 9.5px; font-weight: 900; border-radius: 6px; padding: 1px 5px; letter-spacing: .04em; }
#menu .modes .mode { padding: 9px 12px; }
#menu .md { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#menu .start { margin-top: 12px; padding: 13px; font-size: 26px; position: relative; overflow: hidden; }
#menu .start::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -50%; } 100% { left: 120%; } }
.tabs { display: flex; gap: 4px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 8px 4px; font-weight: 700; font-size: 13.5px; color: var(--mute); }
.tabs button.sel { color: #fff; border-bottom-color: var(--red); }
.tabpane { display: none; padding-top: 2px; }
.tabpane.sel { display: block; }
#menu .opts { display: block; }
.opts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#menu .help.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; font-size: 12.5px; color: #cfcfd3; margin-top: 4px; }
#menu .ogrze { margin-top: 8px; font-size: 12px; color: var(--mute); }
#menu footer { margin-top: 12px; }
@media (max-width: 900px), (max-height: 560px) {
  #menu { background: rgba(5,5,6,0.88); }
  #menu .menu-inner { margin: 0 auto; width: min(760px, 100%); }
  .mhead .logo { height: 32px; } .mhead .sub { display: none; }
  .gm span { display: none; } .gm { min-height: 0; padding: 8px 10px; }
  #menu .md { display: none; }
  #menu .start { padding: 10px; font-size: 21px; margin-top: 8px; }
  #menu h2 { margin: 7px 0 4px; }
  #menu .help.cols { grid-template-columns: 1fr; display: grid !important; }
  .seg button { font-size: 12px; padding: 7px 4px; white-space: normal; }
}
@media (max-width: 520px) { .gmodes { grid-template-columns: 1fr 1fr; } .modes { grid-template-columns: 1fr 1fr; } .opts2 { grid-template-columns: 1fr; } footer span { display: none; } }
#menu .gmodes { grid-template-columns: repeat(4, 1fr); }
#menu .gm span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-height: 560px) { #menu .profil { padding: 4px 10px; font-size: 12px; } #menu .profil .xp { display: none; } #menu .gm { padding: 6px 9px; } #menu .gm b { font-size: 13px; } #menu .modes .mode { padding: 6px 10px; } #menu .mt { font-size: 14px; } #menu .mb { display: none; } }
@media (max-width: 520px) { #menu .gmodes { grid-template-columns: 1fr 1fr; } }
