:root {
  --fs: 28px;              /* základná veľkosť písma, mení sa v nastaveniach */
  --bg: #fdfaf3;
  --ink: #1b1b1b;
  --blue: #1f4e79;
  --tile: #ffffff;
  --ok: #2e8b3e;
  --ok-bg: #d8f3dc;
  --bad: #c0392b;
  --bad-bg: #fbe3e0;
  --hint: #f4b400;
  --radius: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: "Roboto", "Noto Sans", Arial, sans-serif; font-size: var(--fs);
  user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; }

#topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--blue); color: #fff; min-height: 84px; }
#title { flex: 1; font-size: 1.1em; font-weight: 700; text-align: center; }
.bar-btn { background: #fff; color: var(--blue); border-radius: 16px; padding: 10px 20px;
  font-size: .9em; font-weight: 700; min-height: 64px; }
.gear { background: transparent; color: rgba(255,255,255,.35); font-size: .8em; padding: 8px; }

#app { padding: 20px; max-width: 1200px; margin: 0 auto; }

/* Domovská obrazovka */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.menu-tile { background: var(--tile); border-radius: var(--radius); padding: 24px 16px; min-height: 200px;
  box-shadow: 0 3px 0 #d9d2c0, 0 6px 16px rgba(0,0,0,.08); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; font-weight: 700; }
.menu-tile .ic { font-size: 3em; line-height: 1; }
.menu-tile .sub { font-weight: 400; font-size: .65em; color: #666; }
.menu-tile:active { transform: translateY(3px); box-shadow: 0 0 0 #d9d2c0; }

/* Úloha */
.progress { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.progress span { width: 22px; height: 22px; border-radius: 50%; background: #ddd; }
.progress span.ok { background: var(--ok); }
.progress span.hint { background: var(--hint); }
.progress span.cur { outline: 4px solid var(--blue); }
.prompt { text-align: center; font-size: 1.15em; font-weight: 700; margin: 6px 0 16px; line-height: 1.3; }
.stimulus { text-align: center; font-size: 6em; line-height: 1.15; margin: 4px 0 18px; }
.stimulus img { max-height: 32vh; max-width: 80%; border-radius: var(--radius); }
.stimulus.small { font-size: 3.2em; }
.sentence { text-align: center; font-size: 1.35em; margin: 10px 0 24px; }
.sentence .gap { display: inline-block; min-width: 4em; border-bottom: 4px solid var(--blue); }

.choices { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choice { background: var(--tile); border-radius: var(--radius); min-height: 120px; padding: 16px;
  font-size: 1.15em; font-weight: 700; border: 5px solid #cfc7b2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.choice.pic { font-size: 4.2em; min-height: 180px; }
.choice.pic img { max-height: 150px; max-width: 100%; }
.choice.correct { background: var(--ok-bg); border-color: var(--ok); }
.choice.wrong { background: var(--bad-bg); border-color: var(--bad); opacity: .55; }
.choice.hint { border-color: var(--hint); animation: pulse 1s infinite; }
.choice:disabled { cursor: default; }
.yesno { grid-template-columns: 1fr 1fr; }
.yesno .choice { min-height: 170px; font-size: 1.6em; }
.yes { color: var(--ok); } .no { color: var(--bad); }

.feedback { text-align: center; font-size: 1.3em; font-weight: 700; min-height: 1.6em; margin-top: 18px; }
.feedback.ok { color: var(--ok); } .feedback.bad { color: var(--bad); }

/* Zoraďovanie */
.answer-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: 100px;
  border: 4px dashed #cfc7b2; border-radius: var(--radius); padding: 12px; margin-bottom: 22px; }
.answer-row .chip { background: var(--ok-bg); border: 4px solid var(--ok); border-radius: 16px;
  padding: 12px 18px; font-weight: 700; }

/* Pexeso */
.memory { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 820px; margin: 0 auto; }
.card { aspect-ratio: 1; border-radius: var(--radius); background: var(--blue); color: #fff;
  font-size: 2.6em; display: flex; align-items: center; justify-content: center; text-align: center; }
.card.open { background: var(--tile); color: var(--ink); border: 5px solid #cfc7b2; }
.card.open.word { font-size: .95em; font-weight: 700; padding: 6px; }
.card.done { background: var(--ok-bg); border-color: var(--ok); color: var(--ink); }

/* Koniec */
.end { text-align: center; padding-top: 30px; }
.end .big { font-size: 5em; }
.end .row { display: flex; gap: 20px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.btn { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 20px 40px;
  font-weight: 700; min-height: 90px; min-width: 240px; }
.btn.light { background: #fff; color: var(--blue); border: 4px solid var(--blue); }

/* Nastavenia */
.settings { font-size: 22px; }
.settings h2 { margin: 26px 0 10px; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid #e3dccb; }
.settings select, .settings input { font-size: 22px; padding: 6px; }
.settings table { width: 100%; border-collapse: collapse; }
.settings td, .settings th { padding: 8px; border-bottom: 1px solid #e3dccb; text-align: left; }
.settings .btn { font-size: 22px; min-height: 64px; min-width: 0; padding: 12px 24px; margin: 8px 8px 0 0; }
.muted { color: #777; font-size: .85em; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #333; color: #fff;
  padding: 14px 24px; border-radius: 14px; font-size: 20px; z-index: 10; }

@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(244,180,0,.35); } }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.shake { animation: shake .35s 2; }
@keyframes pop { 50% { transform: scale(1.08); } }
.pop { animation: pop .4s; }
