/* Trabant Nevelde — felület (mobilelső, build nélkül)
   Paletta: docs/arculat.md. Sötét az alap, világos mód prefers-color-scheme-ra. */

:root {
  --hatter: #14181d;
  --panel: #1c222a;
  --panel-2: #242c36;
  --vonal: #2f3947;
  --szoveg: #e8eaed;
  --szoveg-halvany: #9aa4b2;
  --borostyan: #f0b323;
  --borostyan-sotet: #c48f12;
  --zold: #7fa650;
  --rozsda: #c25a3c;
  --siker: #5a9e6f;
  --kek: #5b8dd6;
  --arnyek: 0 6px 18px rgba(0, 0, 0, .35);
  --sugar: 14px;
  --sugar-kicsi: 8px;
  --nav-magas: 60px;
  --fej-magas: 56px;
  --erinto: 44px;
  --betu: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --atmenet: 180ms ease;
  --fej-hatter: rgba(20, 24, 29, .88);
  color-scheme: dark;
}

/* VILÁGOS PALETTA — két helyen szerepel, és a kettőnek EGYEZNIE kell:
   1) a rendszer világos módjára, ha a játékos nem kért kifejezetten sötétet,
   2) ha a játékos kézzel a világosat választotta (ez felülírja a rendszert).
   A kézi választást a <html data-tema="…"> hordozza, a layout.php teszi rá még a
   CSS betöltése előtt — különben a témaváltás villanna egyet minden oldalon. */
@media (prefers-color-scheme: light) {
  :root:not([data-tema="sotet"]) {
    --hatter: #f2f1ec;
    --panel: #ffffff;
    --panel-2: #eae8e0;
    --vonal: #d9d6cc;
    --szoveg: #1d2229;
    --szoveg-halvany: #5b6570;
    --borostyan: #b8820a;
    --borostyan-sotet: #8f6407;
    --zold: #5f8a2f;
    --rozsda: #b04a2c;
    --siker: #3d8a55;
    --kek: #2f66b8;
    --arnyek: 0 4px 14px rgba(0, 0, 0, .12);
    --fej-hatter: rgba(242, 241, 236, .9);
    color-scheme: light;
  }
}

/* (2) kézzel választott világos mód — a fenti blokk pontos mása */
:root[data-tema="vilagos"] {
  --hatter: #f2f1ec;
  --panel: #ffffff;
  --panel-2: #eae8e0;
  --vonal: #d9d6cc;
  --szoveg: #1d2229;
  --szoveg-halvany: #5b6570;
  --borostyan: #b8820a;
  --borostyan-sotet: #8f6407;
  --zold: #5f8a2f;
  --rozsda: #b04a2c;
  --siker: #3d8a55;
  --kek: #2f66b8;
  --arnyek: 0 4px 14px rgba(0, 0, 0, .12);
  --fej-hatter: rgba(242, 241, 236, .9);
  color-scheme: light;
}

/* ------------------------------------------------------- téma-kapcsoló */

.tema-valto {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--vonal);
  border-radius: var(--sugar-kicsi);
  background: var(--panel-2);
}

.tema-valto button {
  min-height: var(--erinto);
  padding: 0 14px;
  border: 0;
  border-radius: calc(var(--sugar-kicsi) - 2px);
  background: transparent;
  color: var(--szoveg-halvany);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--atmenet), color var(--atmenet);
}

.tema-valto button:hover { color: var(--szoveg); }

.tema-valto button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--szoveg);
  box-shadow: var(--arnyek);
}

.tema-valto button:focus-visible { outline: 2px solid var(--borostyan); outline-offset: 2px; }

/* Szűk telefonon inkább töltse ki a sort, mint hogy kilógjon. */
@media (max-width: 380px) {
  .tema-valto { display: flex; width: 100%; }
  .tema-valto button { flex: 1; padding: 0 6px; }
}

/* ---------------------------------------------------------------- alap */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--hatter);
  color: var(--szoveg);
  font-family: var(--betu);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100dvh;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

a { color: var(--borostyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
small, .halvany { color: var(--szoveg-halvany); }
.kicsi { font-size: .875rem; }
.szam { font-variant-numeric: tabular-nums; font-weight: 600; }
.jobbra { text-align: right; }
.kozepre { text-align: center; }
.rejtett, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

img, svg { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- fejléc */

.app-fej {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--panel);
  border-bottom: 1px solid var(--vonal);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
}

.app-fej-sor {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--fej-magas);
}

.app-fej .marka {
  font-weight: 700;
  color: var(--szoveg);
  letter-spacing: .01em;
  white-space: nowrap;
}

.app-fej .marka span { color: var(--borostyan); }

.fej-kocsi {
  width: 84px;
  height: 40px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fej-kocsi svg { width: 84px; height: auto; }
.fej-kocsi a { display: block; line-height: 0; }

.allapot-sav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0 8px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.allapot-sav::-webkit-scrollbar { display: none; }

.allapot-sav .mero {
  flex: 1 0 auto;
  min-width: 74px;
  background: var(--panel-2);
  border-radius: var(--sugar-kicsi);
  padding: 4px 8px;
  line-height: 1.15;
}
.allapot-sav .mero small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.allapot-sav .mero b { font-size: .95rem; font-weight: 700; white-space: nowrap; }
.allapot-sav .mero.figyelem b { color: var(--rozsda); }
.allapot-sav .mero.jo b { color: var(--siker); }

/* --------------------------------------------------------------- tartalom */

.tartalom {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-magas) + 24px + env(safe-area-inset-bottom));
}
.tartalom.nincs-nav { padding-bottom: 32px; }

.oldal-cim {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.kartya {
  background: var(--panel);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--arnyek);
}
.kartya h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kartya.kiemelt { border-color: var(--borostyan); }
.kartya.veszely { border-color: var(--rozsda); }

.racs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.racs-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 400px) { .racs-4 { grid-template-columns: repeat(2, 1fr); } }

.mutato {
  background: var(--panel-2);
  border-radius: var(--sugar-kicsi);
  padding: 10px 10px 8px;
  text-align: center;
}
.mutato small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.mutato b { display: block; font-size: 1.25rem; font-weight: 700; margin-top: 2px; }
.mutato .csik { height: 5px; border-radius: 3px; background: var(--vonal); margin-top: 6px; overflow: hidden; }
.mutato .csik i { display: block; height: 100%; background: var(--siker); transition: width var(--atmenet); }
.mutato .csik.figyelem i { background: var(--rozsda); }
.mutato .csik.kozepes i { background: var(--borostyan); }

/* ------------------------------------------------------------------ kocsi */

.kocsi-szinpad {
  background: radial-gradient(ellipse at 50% 85%, rgba(240, 179, 35, .14), transparent 60%), var(--panel);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar);
  padding: 12px 8px 4px;
  margin-bottom: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.kocsi-szinpad svg { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; }
.kocsi-szinpad .kocsi-nev { margin: 6px 0 4px; font-weight: 700; font-size: 1.1rem; }
.kocsi-szinpad .kocsi-nev small { font-weight: 400; margin-left: 6px; }
.kocsi-szinpad .rendszam {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .1em;
  background: #f4f4f0;
  color: #111;
  border: 2px solid #333;
  border-radius: 4px;
  padding: 0 6px;
  font-size: .85rem;
}
.kocsi-szinpad .hianyzik {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--szoveg-halvany);
  font-style: italic;
}
.kocsi-helyettes { min-height: 160px; display: flex; align-items: center; justify-content: center; }

.udvozlo {
  font-size: 1.15rem;
  text-align: center;
  padding: 6px 0 10px;
  font-style: italic;
  color: var(--szoveg);
}

/* animációk a kocsin (a C ügynök SVG-je adja az osztályokat) */
.trabant .tn-kerek { transform-box: fill-box; transform-origin: center; }
.trabant.megy .tn-kerek { animation: tn-forog 0.8s linear infinite; }
.trabant.megy .tn-fust { animation: tn-fust 1.4s ease-out infinite; }
.trabant.billeg { animation: tn-billeg 0.6s ease-in-out 2; }
.trabant.felvillan { animation: tn-villan 0.9s ease-out 1; }
.trabant.ujkep { animation: tn-ujkep 0.45s ease-out 1; }
.kocsi-csere { transition: opacity 220ms ease, transform 220ms ease; }
.kocsi-csere.atmenet { opacity: 0; transform: scale(.97); }

@keyframes tn-forog { to { transform: rotate(360deg); } }
@keyframes tn-fust { 0% { opacity: .9; transform: translate(0, 0) scale(.8); } 100% { opacity: 0; transform: translate(-18px, -14px) scale(1.5); } }
@keyframes tn-billeg { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-2px) rotate(-.6deg); } 75% { transform: translateY(1px) rotate(.5deg); } }
@keyframes tn-villan { 0% { filter: brightness(1); } 30% { filter: brightness(1.8) drop-shadow(0 0 12px var(--borostyan)); } 100% { filter: brightness(1); } }
@keyframes tn-ujkep { 0% { opacity: .4; transform: scale(.96); } 100% { opacity: 1; transform: scale(1); } }

/* ------------------------------------------------------------------ gombok */

.gomb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--erinto);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--borostyan);
  color: #1a1400;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--atmenet), transform 80ms ease, opacity var(--atmenet);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.gomb:hover { background: var(--borostyan-sotet); text-decoration: none; color: #1a1400; }
.gomb:active { transform: scale(.97); }
.gomb:focus-visible { outline: 3px solid var(--kek); outline-offset: 2px; }
.gomb:disabled, .gomb[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.gomb.masodlagos { background: var(--panel-2); color: var(--szoveg); border-color: var(--vonal); }
.gomb.masodlagos:hover { background: var(--vonal); }
.gomb.zold { background: var(--zold); color: #10170a; }
.gomb.veszely { background: var(--rozsda); color: #fff; }
.gomb.kicsi { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.gomb.teljes { width: 100%; }
.gomb.dolgozik { position: relative; color: transparent !important; pointer-events: none; }
.gomb.dolgozik::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, .35);
  border-top-color: #000;
  animation: tn-porog 0.7s linear infinite;
}
.gomb.masodlagos.dolgozik::after { border-color: rgba(255,255,255,.3); border-top-color: var(--szoveg); }
@keyframes tn-porog { to { transform: rotate(360deg); } }

.gombsor { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gombsor .gomb { flex: 1 1 auto; }
.liter-sor { flex-wrap: nowrap; }
.liter-sor .gomb { flex: 0 0 auto; min-width: var(--erinto); padding-left: 10px; padding-right: 10px; }
.liter-kijelzo { flex: 1 1 auto; text-align: center; font-size: 1.5rem; align-self: center; white-space: nowrap; }

/* ----------------------------------------------------------------- űrlap */

label { display: block; font-size: .9rem; color: var(--szoveg-halvany); margin-bottom: 4px; }
.mezo { margin-bottom: 12px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
  width: 100%;
  min-height: var(--erinto);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--vonal);
  background: var(--panel-2);
  color: var(--szoveg);
  font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--borostyan); outline-offset: 1px; border-color: var(--borostyan); }
textarea { min-height: 96px; resize: vertical; }
.hiba-szoveg { color: var(--rozsda); font-size: .9rem; margin-top: 6px; }

input[type="range"] { width: 100%; accent-color: var(--borostyan); min-height: var(--erinto); }

.szinvalaszto { display: flex; flex-wrap: wrap; gap: 8px; }
.szinvalaszto button {
  width: var(--erinto); height: var(--erinto);
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
}
.szinvalaszto button[aria-pressed="true"] { border-color: var(--borostyan); box-shadow: 0 0 0 2px var(--hatter); }

/* ------------------------------------------------------------------ fülek */

.fulek {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px 14px;
  padding: 0 16px;
  border-bottom: 1px solid var(--vonal);
}
.fulek::-webkit-scrollbar { display: none; }
.fulek button, .fulek a {
  flex: 0 0 auto;
  min-height: var(--erinto);
  padding: 8px 14px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--szoveg-halvany);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.fulek button[aria-selected="true"], .fulek a.aktiv { color: var(--borostyan); border-bottom-color: var(--borostyan); }

/* A fülsor vízszintesen görgethető, de a görgetősáv rejtve van — ettől széles
   képernyőn a jobb szélső fül némán lelógott a látható területről, és semmi nem
   jelezte, hogy ott van még valami (az admin Napló füle így tűnt el). Egérrel
   nem is kézenfekvő oldalra görgetni. 700 px fölött tehát inkább törjön több
   sorba; telefonon marad a görgetés, mert ott a húzás a természetes mozdulat. */
@media (min-width: 700px) {
  .fulek { flex-wrap: wrap; overflow-x: visible; }
}
.ful-lap[hidden] { display: none; }

.szuro { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.szuro button {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--vonal);
  background: var(--panel);
  color: var(--szoveg);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.szuro button[aria-pressed="true"] { background: var(--borostyan); color: #1a1400; border-color: var(--borostyan); font-weight: 700; }

/* ------------------------------------------------------------------ tételek */

.tetel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vonal);
}
.tetel:last-child { border-bottom: 0; }
.tetel .tetel-fo { flex: 1 1 auto; min-width: 0; }
.tetel .tetel-nev { font-weight: 600; }
.tetel .tetel-leiras { font-size: .85rem; color: var(--szoveg-halvany); }
.tetel .tetel-jobb { flex: 0 0 auto; text-align: right; }
.tetel.megvan { opacity: .65; }
.tetel.megvan .tetel-nev::after { content: " ✓"; color: var(--siker); }
.tetel .gomb { min-width: 88px; }

.cimke {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--szoveg-halvany);
  vertical-align: middle;
}
.cimke.kotelezo { background: rgba(194, 90, 60, .2); color: var(--rozsda); }
.cimke.tuning { background: rgba(127, 166, 80, .2); color: var(--zold); }
.cimke.siker { background: rgba(90, 158, 111, .2); color: var(--siker); }
.cimke.borostyan { background: rgba(240, 179, 35, .18); color: var(--borostyan); }

/* ár + magyarázat (jatekszabaly 6.2: minden árnál látszik, miért annyi) */
.ar { font-weight: 700; white-space: nowrap; }
.ar .ar-alap { font-weight: 400; color: var(--szoveg-halvany); text-decoration: line-through; margin-right: 4px; font-size: .85rem; }
.ar-magy { display: block; font-size: .78rem; color: var(--szoveg-halvany); white-space: normal; max-width: 180px; }
.ar-magy.dragabb { color: var(--rozsda); }
.ar-magy.olcsobb { color: var(--siker); }

/* görbe (14 napos árgörbe) */
.gorbe { width: 100%; height: 64px; display: block; }
.gorbe polyline { fill: none; stroke: var(--borostyan); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gorbe .gorbe-terulet { fill: var(--borostyan); opacity: .12; }
.gorbe .gorbe-alap { stroke: var(--vonal); stroke-width: 1; stroke-dasharray: 3 3; }
.gorbe circle { fill: var(--borostyan); }
.gorbe-cimke { display: flex; justify-content: space-between; font-size: .75rem; color: var(--szoveg-halvany); }

/* ------------------------------------------------------------- alsó nav */

.also-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--panel);
  border-top: 1px solid var(--vonal);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: space-around;
}
.also-nav a, .also-nav button {
  flex: 1 1 0;
  min-height: var(--nav-magas);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: 0;
  color: var(--szoveg-halvany);
  font: inherit;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.also-nav a:hover { text-decoration: none; }
.also-nav .ikon { font-size: 1.35rem; line-height: 1; }
.also-nav .aktiv { color: var(--borostyan); }
.jelzo {
  position: absolute;
  top: 8px;
  right: calc(50% - 20px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--rozsda);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.jelzo:empty, .jelzo[data-nulla="1"] { display: none; }

/* a „Több…" lap */
.tobb-lap {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-magas) + env(safe-area-inset-bottom));
  z-index: 49;
  background: var(--panel);
  border-top: 1px solid var(--vonal);
  border-radius: var(--sugar) var(--sugar) 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
  padding: 12px 16px 8px;
  max-height: calc(100dvh - var(--nav-magas) - var(--fej-magas) - 24px);
  overflow-y: auto;
  transform: translateY(110%);
  transition: transform 220ms ease;
}
.tobb-lap.nyitva { transform: translateY(0); }
.tobb-lap ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 480px) { .tobb-lap ul { grid-template-columns: repeat(4, 1fr); } }
.tobb-lap li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  border-radius: var(--sugar-kicsi);
  background: var(--panel-2);
  color: var(--szoveg);
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  padding: 6px;
}
.tobb-lap li a:hover { text-decoration: none; background: var(--vonal); }
.tobb-lap li a .ikon { font-size: 1.3rem; }
.tobb-lap li a .jelzo { top: 4px; right: 6px; }
.tobb-lap li a.kilep { color: var(--rozsda); }
.tobb-hatter {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms ease;
}
.tobb-hatter.nyitva { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------- toast */

.toastok {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(var(--nav-magas) + 12px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.nincs-nav ~ .toastok, body.nincs-nav .toastok { bottom: calc(16px + env(safe-area-inset-bottom)); }
.toast {
  pointer-events: auto;
  background: var(--panel-2);
  color: var(--szoveg);
  border-left: 4px solid var(--borostyan);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--arnyek);
  font-size: .95rem;
  animation: tn-toast-be 200ms ease-out;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.toast.siker { border-left-color: var(--siker); }
.toast.hiba { border-left-color: var(--rozsda); }
.toast.info { border-left-color: var(--kek); }
.toast.eltunik { animation: tn-toast-ki 250ms ease-in forwards; }
@keyframes tn-toast-be { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tn-toast-ki { to { opacity: 0; transform: translateY(8px); } }

/* -------------------------------------------------------------- egyebek */

.szamporog { transition: color 300ms ease; }
.szamporog.no { color: var(--siker); }
.szamporog.csokken { color: var(--rozsda); }

.ures { text-align: center; color: var(--szoveg-halvany); padding: 20px 8px; font-style: italic; }

.uzenet-lista .tetel { align-items: flex-start; cursor: pointer; }
.uzenet-lista .tetel.olvasatlan .tetel-nev { color: var(--borostyan); }
.uzenet-lista .tetel.olvasatlan::before { content: "●"; color: var(--borostyan); font-size: .7rem; margin-top: 6px; }
.uzenet-szoveg { white-space: pre-wrap; word-break: break-word; }

.chat-lista { display: flex; flex-direction: column; gap: 6px; max-height: 60dvh; overflow-y: auto; padding: 4px 0; }
.chat-sor { background: var(--panel-2); border-radius: 10px; padding: 6px 10px; word-break: break-word; }
.chat-sor b { color: var(--borostyan); margin-right: 6px; }
.chat-sor small { float: right; margin-left: 8px; }
.chat-ir { display: flex; gap: 8px; margin-top: 10px; }
.chat-ir input { flex: 1 1 auto; }

.toplista-sor { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--vonal); }
.toplista-sor:last-child { border-bottom: 0; }
.toplista-sor .hely { font-weight: 700; color: var(--szoveg-halvany); text-align: center; }
.toplista-sor.dobogo .hely { color: var(--borostyan); font-size: 1.1rem; }
.toplista-sor.en { background: rgba(240, 179, 35, .08); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

.visszaszamlalo { font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; }

.rally-eredmeny { border-left: 4px solid var(--borostyan); padding-left: 12px; margin: 10px 0; }
.rally-eredmeny.nyert { border-left-color: var(--siker); }
.rally-eredmeny.vesztett { border-left-color: var(--rozsda); }
.lefolyas { white-space: pre-wrap; }

.kinalat-kocsi { display: flex; gap: 12px; align-items: center; }
.kinalat-kocsi .kep { flex: 0 0 120px; }
.kinalat-kocsi .kep svg { width: 120px; height: auto; }

.modositok li { padding: 4px 0; border-bottom: 1px dashed var(--vonal); display: flex; justify-content: space-between; gap: 8px; }
.modositok li:last-child { border-bottom: 0; }
.modositok li b.dragabb { color: var(--rozsda); }
.modositok li b.olcsobb { color: var(--siker); }
.modositok { list-style: none; padding: 0; margin: 0; }

.ma-sor { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ma-sor span { background: var(--panel-2); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }

.kuldetes { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--vonal); }
.kuldetes:last-child { border-bottom: 0; }
.kuldetes .pipa { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--vonal); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.kuldetes.kesz .pipa { background: var(--siker); border-color: var(--siker); color: #fff; }
.kuldetes.kesz .kuldetes-nev { text-decoration: line-through; color: var(--szoveg-halvany); }

.belepes-lap { max-width: 400px; margin: 24px auto 0; }
.belepes-lap .logo { text-align: center; margin-bottom: 20px; }
.belepes-lap .logo h1 { font-size: 1.8rem; }
.belepes-lap .logo h1 span { color: var(--borostyan); }
.belepes-lap .logo svg { width: 240px; margin: 0 auto 8px; display: block; }

.kartya-kep { width: 100%; border-radius: var(--sugar-kicsi); border: 1px solid var(--vonal); display: block; }

@media (min-width: 720px) {
  .also-nav { max-width: 720px; margin: 0 auto; border-left: 1px solid var(--vonal); border-right: 1px solid var(--vonal); }
  .tobb-lap { max-width: 720px; margin: 0 auto; }
}

/* ---------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .trabant.megy .tn-kerek, .trabant.megy .tn-fust, .trabant.billeg, .trabant.felvillan { animation: none !important; }
  .tobb-lap { transition: none; }
}

/* --- Bolt: termékfotó (a régi játék 65 valódi alkatrészfotója) ------------ */
.bolt .tetel { display: flex; gap: 12px; align-items: flex-start; }
.tetel-kep {
  flex: 0 0 72px; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
  background: #232a33; display: flex; align-items: center; justify-content: center;
}
.tetel-kep img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tetel-kep.nincs-kep span {
  font-size: 26px; font-weight: 700; color: #6b7480; font-variant-numeric: tabular-nums;
}
@media (max-width: 420px) {
  .tetel-kep { flex-basis: 56px; width: 56px; height: 56px; }
}

/* --- Belépő: a valódi Trabant, nem jelzésszerű rajz ---------------------- */
.belepes-lap .logo .trabant { max-width: 420px; margin: 0 auto 4px; display: block; }
@media (max-width: 480px) { .belepes-lap .logo .trabant { max-width: 100%; } }

/* --- Felpróbálás: a saját kocsi a kiválasztott tétellel ------------------- */
.proba-ablak {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(8, 10, 13, .78);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: proba-be .14s ease-out;
}
.proba-ablak[hidden] { display: none; }
@keyframes proba-be { from { opacity: 0 } to { opacity: 1 } }

.proba-doboz {
  background: #1c222a; border: 1px solid #2c333c; border-radius: 14px;
  width: min(680px, 100%); max-height: 90vh; overflow: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.proba-fejlec {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #2c333c;
}
.proba-zar {
  background: none; border: 0; color: #9aa4b2; font-size: 26px; line-height: 1;
  cursor: pointer; padding: 0 6px; min-width: 44px; min-height: 44px;
}
.proba-zar:hover { color: #e8eaed; }
.proba-kep { padding: 12px 16px; text-align: center; }
.proba-kep svg { width: 100%; height: auto; max-height: 52vh; }
.proba-lab {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px solid #2c333c;
}
.proba-valto { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.proba-sugo { font-size: 13px; }

/* a bolti gomb, ami megnyitja */
.proba-gomb {
  background: transparent; border: 1px solid #f0b323; color: #f0b323;
  border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer;
  margin-left: 6px; min-height: 28px;
}
.proba-gomb:hover { background: #f0b323; color: #14181d; }

body.ablak-nyitva { overflow: hidden; }

@media (max-width: 480px) {
  .proba-doboz { width: 100%; }
  .proba-kep svg { max-height: 44vh; }
}

/* ------------------------------------------------ folyamatban lévő művelet

   Közös komponens (layout_folyamat): haladássáv + visszaszámláló mindenhez,
   ami időbe telik — munka, túra, mosás, szerelés, vontatás, javítás. */

.folyamat { border-left: 3px solid var(--borostyan); }

.folyamat-sav {
  height: 10px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 10px 0 8px;
}

.folyamat-sav span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--borostyan-sotet), var(--borostyan));
  transition: width 1s linear;
}

.folyamat-ido { margin: 0 0 4px; }
.folyamat-ido b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.folyamat-kozben { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .folyamat-sav span { transition: none; }
}

/* ------------------------------------------------- karosszéria-változatok */

.tipus-kartya {
  background: var(--panel-2);
  border: 1px solid var(--vonal);
  border-radius: var(--sugar-kicsi);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.tipus-kartya.sajat { border-color: var(--borostyan); }
.tipus-fej { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tipus-hatasok { display: flex; flex-wrap: wrap; gap: 5px; }

.tipus-hatas {
  font-size: .8rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--vonal);
  white-space: nowrap;
}
.tipus-hatas.jo { color: var(--siker); border-color: color-mix(in srgb, var(--siker) 45%, var(--vonal)); }
.tipus-hatas.rossz { color: var(--rozsda); border-color: color-mix(in srgb, var(--rozsda) 45%, var(--vonal)); }

.tipus-halado { display: flex; align-items: center; gap: 10px; }
.tipus-halado .folyamat-sav { flex: 1; margin: 0; }

.tipus-elonezet { margin: -4px 0 6px; }
.tipus-elonezet svg { width: 100%; max-width: 300px; height: auto; display: block; }

/* A haladássávon finom, mozgó csík: látsszon, hogy tényleg dolgozik valami.
   Csak akkor, ha a művelet még tart (a kész sávon zavaró lenne). */
.folyamat-sav span {
  background-image:
    linear-gradient(90deg, var(--borostyan-sotet), var(--borostyan)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .16) 0 10px, transparent 10px 22px);
  background-size: 100% 100%, 44px 100%;
  animation: folyamat-csik 1.1s linear infinite;
}

@keyframes folyamat-csik {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 0, 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .folyamat-sav span { animation: none; background-image: linear-gradient(90deg, var(--borostyan-sotet), var(--borostyan)); }
}

/* Megosztás gomb (ikon + felirat) és a garázsbeli megosztás-sor a kocsi alatt. */
.tn-megoszt { display: inline-flex; align-items: center; gap: 6px; }
.tn-megoszt svg { flex: 0 0 auto; width: 17px; height: 17px; max-width: none; }
.kocsi-megoszt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin: 6px 0 0; }
