/* Angol Kaland: papír-matricás stílus (tintakontúr + eltolt árnyék), mobilra tervezve */
:root {
  --tinta: #1d1830;
  --papir: #fff8ec;
  --kartya: #ffffff;
  --halvany: #f3eee3;
  --szurke: #6d6880;
  --nap: #ffc83d;
  --menta: #2fc98a;
  --menta-h: #dff7ec;
  --korall: #ff6b5b;
  --korall-h: #ffe4e0;
  --eg: #4f8cff;
  --eg-h: #e3edff;
  --lila: #7b5cff;
  --lila-h: #ece7ff;
  --arnyek: 4px 4px 0 var(--tinta);
  --kor: 6px 16px 7px 14px / 14px 7px 15px 8px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--papir); }
body { margin: 0; min-height: 100vh; font-family: 'Figtree', system-ui, sans-serif; font-weight: 500; color: var(--tinta); background: var(--papir);
  font-size: 17px; line-height: 1.45; }
#app { max-width: 560px; margin: 0 auto; padding: 14px 16px calc(40px + env(safe-area-inset-bottom)); }
h1, h2, h3, .cim { font-family: 'Grandstander', system-ui, sans-serif; font-weight: 800; line-height: 1.12; margin: 0; letter-spacing: -.2px; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--eg); }
.betolt { padding: 80px 0; text-align: center; color: var(--szurke); }
.halk { color: var(--szurke); font-size: 15px; }
.kozep { text-align: center; }
.sor { display: flex; align-items: center; gap: 10px; }
.sor.ter { justify-content: space-between; }
.oszlop { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: 14px; } .mt2 { margin-top: 24px; }
.rejtett { display: none !important; }

/* kártya */
.kartya { background: var(--kartya); border: 2.5px solid var(--tinta); border-radius: var(--kor); box-shadow: var(--arnyek); padding: 16px; }
.kartya.nap { background: #fff3c8; } .kartya.menta { background: var(--menta-h); } .kartya.lila { background: var(--lila-h); } .kartya.eg { background: var(--eg-h); }
.kartya.korall { background: var(--korall-h); }
.cimke { display: inline-block; font-family: 'Grandstander', sans-serif; font-weight: 600; font-size: 13px; border: 2px solid var(--tinta);
  border-radius: 4px 10px 4px 10px; padding: 1px 9px 2px; background: var(--nap); transform: rotate(-1.5deg); }

/* gombok */
.gomb { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 18px; border: 2.5px solid var(--tinta);
  border-radius: 8px 18px 9px 16px / 16px 9px 17px 10px; background: var(--nap); box-shadow: var(--arnyek); font-family: 'Grandstander', sans-serif;
  font-weight: 800; font-size: 18px; cursor: pointer; text-decoration: none; color: var(--tinta); transition: transform .08s, box-shadow .08s; white-space: nowrap; flex: none; }
.indito .gomb, .oszlop .gomb, .gomb.teljes { white-space: normal; }
.gomb:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }
.gomb.teljes { width: 100%; }
.gomb.menta { background: var(--menta); } .gomb.eg { background: var(--eg); color: #fff; } .gomb.lila { background: var(--lila); color: #fff; }
.gomb.feher { background: #fff; } .gomb.korall { background: var(--korall); color: #fff; }
.gomb.kicsi { min-height: 40px; padding: 6px 12px; font-size: 15px; box-shadow: 3px 3px 0 var(--tinta); }
.gomb:disabled { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; padding: 6px 2px; color: var(--szurke); text-decoration: underline; cursor: pointer; font-size: 15px; }

/* fejléc */
.fej { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.fej .avatar { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--tinta); border-radius: 50%; box-shadow: 3px 3px 0 var(--tinta); }
.fej .nev { flex: 1; min-width: 0; }
.fej .nev b { font-family: 'Grandstander', sans-serif; font-size: 20px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csillag-szam { font-family: 'Grandstander', sans-serif; font-weight: 800; font-size: 20px; background: #fff; border: 2.5px solid var(--tinta); border-radius: 30px;
  padding: 4px 12px; box-shadow: 3px 3px 0 var(--tinta); white-space: nowrap; }
.vissza { background: #fff; border: 2.5px solid var(--tinta); border-radius: 50%; width: 46px; height: 46px; font-size: 22px; box-shadow: 3px 3px 0 var(--tinta); cursor: pointer; flex: none; }

/* belépés */
.logo { text-align: center; padding: 34px 0 10px; }
.logo .jel { font-size: 64px; display: inline-block; transform: rotate(-6deg); }
.logo h1 { font-size: 40px; margin-top: 6px; }
.logo p { margin-top: 6px; color: var(--szurke); }
.racs-avatar { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.racs-avatar button { background: #fff; border: 2.5px solid var(--tinta); border-radius: var(--kor); box-shadow: 3px 3px 0 var(--tinta); padding: 10px 4px; cursor: pointer; }
.racs-avatar button span { font-size: 38px; display: block; }
.racs-avatar button b { font-family: 'Grandstander', sans-serif; font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.racs-avatar button.valasztott { background: var(--nap); }
.pin-pontok { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pin-pontok i { width: 20px; height: 20px; border: 2.5px solid var(--tinta); border-radius: 50%; }
.pin-pontok i.tele { background: var(--tinta); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pinpad button { height: 62px; font-family: 'Grandstander', sans-serif; font-weight: 800; font-size: 26px; background: #fff; border: 2.5px solid var(--tinta);
  border-radius: 12px; box-shadow: 3px 3px 0 var(--tinta); cursor: pointer; }
.pinpad button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }
.mezo { width: 100%; padding: 12px 14px; border: 2.5px solid var(--tinta); border-radius: 10px; background: #fff; font-size: 18px; outline: none; }
.mezo:focus { box-shadow: 0 0 0 3px var(--nap); }
textarea.mezo { min-height: 110px; resize: vertical; }
label.felirat { font-weight: 700; display: block; margin-bottom: 6px; }

/* nagy indító gombok */
.indito { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.indito .gomb { flex-direction: column; min-height: 104px; font-size: 17px; text-align: center; line-height: 1.15; }
.indito .gomb span { font-size: 34px; }

/* verseny */
.rang { list-style: none; margin: 10px 0 0; padding: 0; }
.rang li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 2px dotted #cfc8b8; }
.rang li:last-child { border-bottom: 0; }
.rang .hely { font-family: 'Grandstander', sans-serif; font-weight: 800; width: 30px; text-align: center; }
.rang .av { font-size: 24px; }
.rang .nv { flex: 1; font-weight: 700; }
.rang .cs { font-family: 'Grandstander', sans-serif; font-weight: 800; }
.rang li.en { background: var(--nap); border-radius: 10px; border-bottom-color: transparent; }
.rang li.kihagy { justify-content: center; color: var(--szurke); padding: 0; border: 0; }

/* leckék */
.lecke-kartya { display: block; text-decoration: none; color: inherit; }
.lecke-kartya .unit { font-size: 13px; }
.lecke-kartya h3 { margin: 8px 0 4px; }
.sav { height: 12px; border: 2px solid var(--tinta); border-radius: 10px; background: #fff; overflow: hidden; margin-top: 8px; }
.sav i { display: block; height: 100%; background: var(--menta); }

/* fülek */
.fulek { display: flex; gap: 8px; margin: 14px 0; }
.fulek button { flex: 1; padding: 10px; border: 2.5px solid var(--tinta); border-radius: 12px 12px 4px 4px; background: #fff; font-family: 'Grandstander', sans-serif;
  font-weight: 800; font-size: 16px; cursor: pointer; }
.fulek button.aktiv { background: var(--nap); box-shadow: 3px 3px 0 var(--tinta); }

/* magyarázat */
.szo { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 2px dotted #e2dccd; }
.szo:last-child { border-bottom: 0; }
.szo .hang { flex: none; }
.szo .en { font-weight: 800; font-size: 18px; }
.szo .hu { color: var(--szurke); }
.szo .pelda { font-size: 15px; margin-top: 2px; }
.szo .pelda i { color: var(--szurke); font-style: normal; }
.hang { width: 44px; height: 44px; border: 2.5px solid var(--tinta); border-radius: 50%; background: var(--eg-h); font-size: 19px; cursor: pointer; box-shadow: 2px 2px 0 var(--tinta); }
.nyt p { margin-top: 8px; }
.nyt ul { margin: 10px 0 0; padding-left: 20px; }
.nyt li { margin: 4px 0; }
.figyelj { margin-top: 10px; background: var(--korall-h); border: 2px solid var(--tinta); border-radius: 10px; padding: 8px 12px; font-weight: 700; }

/* lejátszó */
.halado { display: flex; gap: 4px; margin-bottom: 14px; }
.halado i { flex: 1; height: 10px; border: 2px solid var(--tinta); border-radius: 6px; background: #fff; }
.halado i.jo { background: var(--menta); } .halado i.rossz { background: var(--korall); } .halado i.most { background: var(--nap); }
.feladat-cim { font-family: 'Grandstander', sans-serif; font-weight: 800; font-size: 15px; color: var(--szurke); }
.kerdes { font-size: 21px; font-weight: 700; margin: 8px 0 16px; }
.valaszok { display: grid; gap: 10px; }
.valasz { text-align: left; min-height: 56px; padding: 12px 14px; border: 2.5px solid var(--tinta); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--tinta);
  font-size: 18px; font-weight: 700; cursor: pointer; }
.valasz.jelolt { background: var(--nap); }
.valasz.jo { background: var(--menta); } .valasz.rossz { background: var(--korall); color: #fff; }
.nagy-hang { display: block; margin: 6px auto 18px; width: 96px; height: 96px; font-size: 42px; border-width: 3px; box-shadow: 4px 4px 0 var(--tinta); }
.ih-gombok { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paros .oszlop { gap: 10px; }
.paros button { min-height: 52px; padding: 8px; border: 2.5px solid var(--tinta); border-radius: 12px; background: #fff; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 2px 2px 0 var(--tinta); }
.paros button.kijelolt { outline: 4px solid var(--nap); outline-offset: 1px; }
.paros button.rossz { background: var(--korall-h); }
.mondat-beiras { font-size: 21px; font-weight: 700; line-height: 2.1; }
.mondat-beiras input { width: 8.5em; max-width: 60%; padding: 4px 8px; border: 2.5px solid var(--tinta); border-radius: 8px; font-size: 20px; font-weight: 700; text-align: center; background: #fff; }
.chipek { display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; }
.chip { padding: 8px 14px; border: 2.5px solid var(--tinta); border-radius: 10px; background: #fff; font-weight: 800; font-size: 18px; cursor: pointer; box-shadow: 2px 2px 0 var(--tinta); }
.chip.hasznalt { visibility: hidden; }
.cel-sor { border: 2.5px dashed var(--tinta); border-radius: 12px; padding: 8px; background: #fffdf6; margin-bottom: 14px; min-height: 116px; align-content: flex-start; }
.cel-sor:empty::before { content: 'Koppints a szavakra a helyes sorrendben'; color: var(--szurke); font-size: 15px; padding: 8px; display: block; }
.visszajelzes { margin-top: 16px; padding: 14px; border: 2.5px solid var(--tinta); border-radius: var(--kor); box-shadow: var(--arnyek); }
.visszajelzes.jo { background: var(--menta-h); } .visszajelzes.rossz { background: var(--korall-h); }
.visszajelzes h3 { margin-bottom: 4px; }
.lent { position: sticky; bottom: 0; padding: 14px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--papir) 30%); }
.vege { text-align: center; padding: 20px 0; }
.vege .nagy { font-size: 72px; }
.pop { animation: pop .45s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* készülés */
.lepesek { list-style: none; padding: 0; margin: 18px 0 0; }
.lepesek li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--szurke); font-weight: 700; }
.lepesek li.kesz { color: var(--tinta); } .lepesek li.most { color: var(--tinta); }
.lepesek li i { width: 26px; height: 26px; border: 2.5px solid var(--tinta); border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; background: #fff; }
.lepesek li.kesz i { background: var(--menta); }
.lepesek li.most i { background: var(--nap); animation: lukt 1s infinite alternate; }
@keyframes lukt { to { transform: scale(1.18); } }
.elonezet { width: 100%; max-height: 300px; object-fit: contain; border: 2.5px solid var(--tinta); border-radius: 12px; background: #fff; }

/* értesítő sáv */
#uzenet { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(140%); max-width: 92vw; padding: 12px 18px;
  background: var(--tinta); color: #fff; border-radius: 14px; font-weight: 700; transition: transform .25s; z-index: 50; text-align: center; }
#uzenet { visibility: hidden; opacity: 0; transition: transform .25s, opacity .25s, visibility .25s; }
#uzenet.lathato { transform: translateX(-50%) translateY(0); visibility: visible; opacity: 1; }
#uzenet:empty { display: none; }

/* töltésjelző: felül futó csík */
#tolt { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent 0%, var(--eg) 30%, var(--lila) 50%, var(--menta) 70%, transparent 100%); background-size: 50% 100%;
  background-repeat: no-repeat; }
#tolt.fut { opacity: 1; animation: csik 1.1s linear infinite; }
@keyframes csik { from { background-position: -50% 0; } to { background-position: 150% 0; } }
/* a megnyomott gomb pörög, amíg a kérés tart */
.dolgozik { position: relative; pointer-events: none; color: transparent !important; }
.dolgozik::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 3px solid var(--tinta);
  border-right-color: transparent; border-radius: 50%; animation: forog .7s linear infinite; }
@keyframes forog { to { transform: rotate(360deg); } }
/* szülői kimutatás */
.stat-sor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--halvany); border: 2px solid var(--tinta); border-radius: 12px; padding: 8px 6px; text-align: center; }
.stat b { display: block; font-family: 'Grandstander', sans-serif; font-size: 26px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--szurke); }
.diagram { margin-top: 8px; }
.oszlopok { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 130px; align-items: end; border-bottom: 2px solid var(--tinta); }
.oszlop-d { all: unset; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.oszlop-d .rud { width: 70%; background: var(--eg); border-radius: 4px 4px 0 0; }
.oszlop-d .ertek { font-size: 12px; font-weight: 800; min-height: 16px; }
.oszlop-d .nap { position: absolute; bottom: -20px; font-size: 12px; color: var(--szurke); }
.oszlop-d .nap.ma { color: var(--tinta); font-weight: 800; }
.oszlop-d:focus-visible .rud, .oszlop-d:hover .rud { background: var(--lila); }
.diagram-reszlet { margin-top: 26px; min-height: 20px; }
.lecke-sor { padding: 8px 0; border-bottom: 2px dotted #e2dccd; } .lecke-sor:last-child { border-bottom: 0; }
.lecke-sor a { color: inherit; text-decoration: none; }
.tipus-sor { display: grid; grid-template-columns: 112px 1fr 44px; gap: 8px; align-items: center; margin: 6px 0; font-size: 15px; }
.tipus-sav { height: 12px; border: 2px solid var(--tinta); border-radius: 8px; background: #fff; overflow: hidden; }
.tipus-sav i { display: block; height: 100%; background: var(--eg); }
.tipus-sor b { text-align: right; }
.hiba-lista { list-style: none; margin: 6px 0 0; padding: 0; }
.hiba-lista li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 2px dotted #e2dccd; font-size: 15px; }
.hiba-lista li b { color: #138a5c; text-align: right; }
.jutalom { padding: 8px 0; border-bottom: 2px dotted #e2dccd; } .jutalom.atadva, .jutalom.lejart { opacity: .55; }
details > summary { list-style: none; cursor: pointer; } details > summary::-webkit-details-marker { display: none; }

/* adatkezelési tájékoztató */
.adatk ul { margin: 8px 0 0; padding-left: 20px; } .adatk li { margin: 6px 0; } .adatk h3 { margin-bottom: 6px; }

/* kabalafigura-képek */
.kep { display: block; max-width: 100%; height: auto; }
.kep.hos-nagy { width: 260px; margin: 0 auto -6px; }
.kep.kozepes { width: 190px; margin: 0 auto; }
.kep.vege-kep { width: 230px; margin: 0 auto; }
.kep.ikon-kep { width: 50px; height: 50px; margin: -4px 8px -4px -4px; flex: none; }
.jelenet { position: relative; text-align: center; margin: 4px 0 8px; }
.jelenet-kep { width: 240px; height: 240px; object-fit: contain; display: block; margin: 0 auto; transition: opacity .25s, transform .25s;
  animation: lebeg 3s ease-in-out infinite; }
.jelenet-kep.elhalvanyul { opacity: 0; transform: scale(.94); }
@keyframes lebeg { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.buborek { position: relative; display: inline-block; max-width: 92%; background: #fff; border: 2.5px solid var(--tinta); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--tinta); padding: 10px 14px; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.buborek::after { content: ''; position: absolute; left: 50%; bottom: -11px; width: 18px; height: 18px; background: #fff;
  border-right: 2.5px solid var(--tinta); border-bottom: 2.5px solid var(--tinta); transform: translateX(-50%) rotate(45deg); }
/* várakozó képernyő */
.varo-ikon { font-size: 56px; animation: ugral 1.2s ease-in-out infinite; }
@keyframes ugral { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.haladas { height: 18px; border: 2.5px solid var(--tinta); border-radius: 12px; background: #fff; overflow: hidden; }
.haladas i { display: block; height: 100%; width: 3%; background: repeating-linear-gradient(45deg, var(--menta) 0 12px, #5fdca8 12px 24px);
  transition: width 1s linear; animation: csikos 1s linear infinite; background-size: 34px 34px; }
@keyframes csikos { to { background-position: 34px 0; } }

/* táblázatos admin */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: 10px 0; border-bottom: 2px dotted #e2dccd; }
.lista li:last-child { border-bottom: 0; }
.kod { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 20px; letter-spacing: 2px; background: #fff; border: 2px dashed var(--tinta); border-radius: 8px; padding: 2px 10px; }
.figy { background: var(--korall-h); border: 2.5px solid var(--tinta); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.racs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.szam-kartya { text-align: center; } .szam-kartya b { font-family: 'Grandstander', sans-serif; font-size: 28px; display: block; }

@media (min-width: 600px) { #app { padding-top: 28px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
