/* ===== Alapok ===== */
:root {
  --hr-navy: #0B3350;
  --hr-navy-dark: #072538;
  --hr-red: #C8202F;
  --hr-cream: #F3EEE1;
  --hr-stone: #EAE2CE;
  --hr-terracotta: #A8562E;
  --hr-white: #FFFDF8;
  --hr-gold: #C89B3C;
  --hr-line: #DCD2BC;
  --hr-ink: #1C2B33;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: var(--hr-cream);
  color: var(--hr-ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(200, 32, 47, .12);
}

.tartalom {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-left)) calc(16px + env(safe-area-inset-bottom));
}

/* Gombok mobilon: kényelmes koppintási felület, nincs kék kiemelés */
button {
  touch-action: manipulation;
  -webkit-appearance: none;
}

/* ===== Telepítési sáv ===== */
.telepites-sav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--hr-navy);
  color: var(--hr-white);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  line-height: 1.5;
}

.telepites-sav span { opacity: .82; font-size: .82rem; }

.telepites-gombok {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.telepit-gomb {
  background: var(--hr-gold);
  color: var(--hr-navy-dark);
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: bold;
  font-size: .88rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.telepit-megse {
  background: none;
  border: none;
  color: inherit;
  opacity: .6;
  font-size: 1rem;
  cursor: pointer;
  padding: 10px;
  line-height: 1;
}

#ios-utmutato { position: relative; padding-right: 44px; }
#ios-utmutato .telepit-megse { position: absolute; top: 6px; right: 6px; color: var(--hr-ink); }

h1, h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

/* ===== Sakktáblacsík (šahovnica) ===== */
.sahovnica {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
}
.sahovnica span { flex: 1 0 12px; height: 12px; }
.sahovnica span:nth-child(odd)  { background: var(--hr-white); }
.sahovnica span:nth-child(even) { background: var(--hr-red); }

/* ===== Fejléc / logó ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 3px solid var(--hr-navy);
  margin-bottom: 16px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-jel { font-size: 2.2rem; line-height: 1; }

h1 {
  font-size: 1.7rem;
  color: var(--hr-navy);
  letter-spacing: .5px;
}

.alcim { font-size: .78rem; color: #8b8579; }

.streak {
  background: rgba(200, 155, 60, .16);
  border: 1px solid var(--hr-gold);
  color: var(--hr-terracotta);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: bold;
  font-size: .85rem;
  white-space: nowrap;
}

/* ===== Figyelmeztetés ===== */
.figyelmeztetes {
  background: #fff8e1;
  border: 1px solid var(--hr-gold);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  line-height: 1.55;
}

/* ===== Módváltó ===== */
.modvalto {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.mod-gomb {
  flex: 1;
  padding: 12px 6px;
  font-size: .92rem;
  border: 2px solid var(--hr-navy);
  background: var(--hr-white);
  color: var(--hr-navy);
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
}

.mod-gomb.aktiv { background: var(--hr-navy); color: var(--hr-white); }

/* ===== Szűrők ===== */
.tema-gombok {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tema-gomb {
  padding: 8px 14px;
  border: 1px solid var(--hr-line);
  background: var(--hr-white);
  border-radius: 999px;
  cursor: pointer;
  font-size: .82rem;
  font-family: inherit;
  color: var(--hr-navy);
}

.tema-gomb.aktiv {
  background: var(--hr-red);
  color: #fff;
  border-color: var(--hr-red);
}

#kereso {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid var(--hr-line);
  border-radius: 10px;
  background: var(--hr-white);
  font-family: inherit;
}

.lista-szamlalo {
  font-size: .78rem;
  color: #8b8579;
  margin: 8px 0 14px;
  text-align: right;
}

.mod-bevezeto {
  font-size: .9rem;
  line-height: 1.55;
  color: #55606a;
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--hr-gold);
}

/* ===== Kártyák (lista mód) ===== */
.kartya {
  background: var(--hr-white);
  border: 1px solid var(--hr-line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(11, 51, 80, .06);
}

.kartya-fejlec {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.horvat {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.12rem;
  font-weight: bold;
  color: var(--hr-navy);
}

.felvett { font-size: .8rem; opacity: .75; }

.magyar { margin-top: 4px; font-size: .92rem; }

.kiejtes {
  margin-top: 4px;
  font-style: italic;
  color: #8b8579;
  font-size: .86rem;
}

.hang-gombok {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.hang-gomb {
  border: 1px solid var(--hr-line);
  background: var(--hr-stone);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--hr-navy);
}

.hang-gomb:active { background: var(--hr-gold); }

.nyelvtan-nyito {
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--hr-terracotta);
  cursor: pointer;
  font-size: .88rem;
  padding: 0;
  font-family: inherit;
}

.nyelvtan {
  margin-top: 10px;
  padding: 11px 13px;
  background: #faf5ea;
  border-left: 3px solid var(--hr-terracotta);
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  line-height: 1.6;
}

.nyelvtan em { color: var(--hr-navy); font-style: italic; }
.nyelvtan strong { color: var(--hr-terracotta); }

.nincs-talalat { text-align: center; color: #8b8579; padding: 20px; }

/* ===== Gyakorló mód ===== */
.gyakorlo-statusz {
  text-align: center;
  margin-bottom: 10px;
  color: #8b8579;
  font-size: .88rem;
}

.gyakorlo-kartya {
  background: var(--hr-white);
  border: 1px solid var(--hr-line);
  border-radius: 16px;
  padding: 28px 20px;
  box-shadow: 0 4px 12px rgba(11, 51, 80, .1);
  text-align: center;
}

.gy-tema {
  font-size: .76rem;
  color: var(--hr-terracotta);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.gy-magyar { font-size: 1.3rem; margin-bottom: 20px; }

.gy-horvat {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--hr-navy);
  margin-bottom: 6px;
}

.gy-kiejtes { font-style: italic; color: #8b8579; margin-bottom: 12px; }

.gy-nyelvtan {
  margin-top: 16px;
  padding: 11px 13px;
  background: #faf5ea;
  border-left: 3px solid var(--hr-terracotta);
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  text-align: left;
  line-height: 1.6;
}

.gy-nyelvtan em { color: var(--hr-navy); }
.gy-nyelvtan strong { color: var(--hr-terracotta); }

#gyakorlo-mod .hang-gombok { justify-content: center; }

.felfed-gomb {
  margin-top: 20px;
  padding: 14px 28px;
  font-size: 1.05rem;
  background: var(--hr-navy);
  color: var(--hr-white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

.ertekeles { display: flex; gap: 10px; margin-top: 20px; }

.ertekelo-gomb {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
}

.tudtam { background: #d9ecdd; color: #1d6b33; }
.nemtudtam { background: #f7dcdd; color: var(--hr-red); }

/* ===== Számok és Nyelvtan mód – közös blokkok ===== */
.temablokk {
  background: var(--hr-white);
  border: 1px solid var(--hr-line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(11, 51, 80, .06);
}

.blokk-cim {
  font-size: 1.15rem;
  color: var(--hr-navy);
  border-bottom: 2px solid var(--hr-terracotta);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.blokk-leiras {
  font-size: .88rem;
  color: #55606a;
  line-height: 1.55;
  margin-bottom: 14px;
}

/* ===== Számtáblázat ===== */
.szam-tabla { margin-bottom: 12px; }

.szam-sor {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #f0ebdf;
}

.szam-sor:first-child { border-top: none; }
.szam-szoveg .horvat { font-size: 1.02rem; }
.szam-szoveg .magyar { font-size: .86rem; color: #55606a; }
.szam-szoveg .kiejtes { font-size: .8rem; }

/* ===== Nyelvtan mód ===== */
.nyt-blokk { padding: 0; overflow: hidden; }

.nyt-nyito {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--hr-navy);
  text-align: left;
}

.nyt-jel { color: var(--hr-terracotta); font-size: .85rem; flex-shrink: 0; }

.nyt-tartalom {
  padding: 0 18px 18px;
  font-size: .9rem;
  line-height: 1.65;
}

.nyt-tartalom p { margin-bottom: 10px; }
.nyt-tartalom ul { margin: 0 0 10px 20px; }
.nyt-tartalom li { margin-bottom: 5px; }
.nyt-tartalom em { color: var(--hr-navy); font-style: italic; }
.nyt-tartalom strong { color: var(--hr-terracotta); }
.nyt-tartalom s { color: #b09f8a; }

.nyt-pelda {
  background: #faf5ea;
  border-left: 3px solid var(--hr-gold);
  border-radius: 0 8px 8px 0;
  padding: 10px 13px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

.nyt-tabla {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 14px;
  font-size: .86rem;
}

.nyt-tabla th {
  background: var(--hr-navy);
  color: var(--hr-white);
  text-align: left;
  padding: 7px 9px;
  font-weight: bold;
}

.nyt-tabla td {
  padding: 7px 9px;
  border-bottom: 1px solid #f0ebdf;
  vertical-align: top;
}

.nyt-tabla tr:nth-child(even) td { background: #faf7f0; }

/* ===== Egyéb ===== */
.rejtett { display: none !important; }

footer {
  text-align: center;
  color: #8b8579;
  font-size: .82rem;
  margin: 28px 0 14px;
}

footer a { color: var(--hr-terracotta); }

/* ===== Mobil ===== */
@media (max-width: 560px) {
  .tartalom { padding-left: 12px; padding-right: 12px; }

  h1 { font-size: 1.35rem; }
  .alcim { font-size: .72rem; }
  .logo-jel { font-size: 1.8rem; }
  .streak { padding: 5px 11px; font-size: .78rem; }

  /* A négy módgomb két sorban, nagy koppintható felülettel */
  .modvalto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .mod-gomb { padding: 13px 6px; font-size: .9rem; }

  .kartya { padding: 14px; }
  .horvat { font-size: 1.06rem; }
  .hang-gomb { padding: 11px 13px; }

  .gyakorlo-kartya { padding: 22px 16px; }
  .gy-magyar { font-size: 1.18rem; }
  .gy-horvat { font-size: 1.35rem; }
  .felfed-gomb { width: 100%; }

  .temablokk { padding: 15px; }
  .nyt-nyito { padding: 15px; font-size: 1rem; }
  .nyt-tartalom { padding: 0 15px 15px; }

  /* Széles táblázatok külön görgethetők – a lap sosem csúszik oldalra */
  .nyt-tabla {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: .82rem;
  }
  .nyt-tabla th, .nyt-tabla td { padding: 6px 8px; }

  .telepites-sav { flex-direction: column; align-items: stretch; text-align: left; }
  .telepites-gombok { justify-content: space-between; }
  .telepit-gomb { flex: 1; }
}

/* Nagyon keskeny készülékek */
@media (max-width: 360px) {
  .mod-gomb { font-size: .82rem; }
  .szam-sor { gap: 6px; }
}

/* Önálló appként indítva nincs böngészősáv – kicsit több hely felül */
@media (display-mode: standalone) {
  .tartalom { padding-top: max(16px, env(safe-area-inset-top)); }
}
