/* app.css – telefon tekmovalca */
:root {
  --modra: #1F3A5F; --zelena: #2E6B3A; --rdeca: #C0262D; --rumena: #E8B33A;
  --vojak: #3E6B35; --vodnik: #A0611A; --porocnik: #1F3A5F;
  --ozadje: #F3F1EC; --karta: #FFFFFF; --besedilo: #16191D; --sivo: #5F6670; --rob: #D9D5CC;
  --skupina: var(--modra);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--ozadje); color: var(--besedilo); font-size: 17px; line-height: 1.45;
  min-height: 100vh; padding-bottom: calc(84px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
.skrij { display: none !important; }
button { font: inherit; cursor: pointer; }

header {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--skupina); color: #fff; position: sticky; top: 0; z-index: 5;
}
header .znak { width: 44px; height: 40px; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
header .znak:empty { display: none; }
header .znak svg { width: 40px; height: 36px; }
header .ime { flex: 1; min-width: 0; }
header .ime b { display: block; font-size: 19px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .ime i { display: block; font-style: normal; font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jezik { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 6px 10px; font-weight: 700; font-size: 14px; }

.vrstica { display: flex; justify-content: space-between; gap: 6px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--rob); font-size: 14.5px; font-variant-numeric: tabular-nums; position: sticky; top: 64px; z-index: 4; }
.vrstica b { font-size: 17px; }
.vrstica .sivo { color: var(--sivo); }

main { padding: 14px; max-width: 560px; margin: 0 auto; }
.karta { background: var(--karta); border: 1px solid var(--rob); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.karta h2 { margin: 0 0 8px; font-size: 20px; }
.karta h3 { margin: 0 0 6px; font-size: 15px; text-transform: uppercase; letter-spacing: .6px; color: var(--sivo); }
.karta p { margin: 0 0 10px; }
.karta p:last-child { margin-bottom: 0; }
.velik { font-size: 44px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 1px; line-height: 1.1; }
.sredina { text-align: center; }
.sivo { color: var(--sivo); }
.mali { font-size: 14px; }

.gumb {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 16px 14px; margin: 10px 0 0;
  background: var(--modra); color: #fff; font-size: 19px; font-weight: 700; text-align: center;
}
.gumb.skeniraj { background: var(--zelena); font-size: 22px; padding: 20px 14px; }
.gumb.drugi { background: #fff; color: var(--modra); border: 2px solid var(--modra); font-size: 17px; padding: 12px; }
.gumb.tih { background: transparent; color: var(--sivo); border: 1px solid var(--rob); font-size: 15px; padding: 10px; font-weight: 600; }
.gumb:disabled { opacity: .45; }
.vrsta2 { display: flex; gap: 10px; } .vrsta2 > * { flex: 1; }

.namig { font-size: 20px; line-height: 1.4; font-weight: 600; }
.namig img, .naloga img.slika { display: block; max-width: 100%; border-radius: 8px; margin: 10px auto 0; }
.ziva { margin-top: 12px; padding: 12px; border-radius: 10px; background: #EEF3EE; border: 1px solid #CFE0CF; text-align: center; }
.ziva b { display: block; font-size: 30px; font-variant-numeric: tabular-nums; }
.ziva i { font-style: normal; font-size: 13.5px; color: var(--sivo); }
.razlaga { background: #FFF8E6; border: 1px solid #F0DDA5; border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: 15.5px; }

.naloga .tema { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--sivo); margin-bottom: 6px; }
.naloga .koda { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px; font-weight: 800; color: var(--modra); background: #EEF1F5; border-radius: 8px; padding: 10px; margin: 6px 0 8px; word-break: break-word; text-align: center; }
.naloga .legenda { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: #444; margin-bottom: 8px; }
.naloga .vprasanje { font-size: 19px; font-weight: 650; }
.odg { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 2px solid var(--rob); border-radius: 12px; padding: 14px; margin-top: 10px; font-size: 18px; font-weight: 600; color: var(--besedilo); min-height: 60px; }
.odg img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.odg .crka { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--modra); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.odg.napacno { border-color: var(--rdeca); background: #FBEAEA; opacity: .6; }
.odg.pravilno { border-color: var(--zelena); background: #E9F4EA; }
.pomoc { background: #EEF1F5; border-radius: 10px; padding: 12px; margin-top: 12px; font-size: 15.5px; }

.klic { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(243,241,236,.94); border-top: 1px solid var(--rob); z-index: 6; }
.klic button { width: 100%; max-width: 560px; display: block; margin: 0 auto; border: 0; border-radius: 12px; background: var(--rdeca); color: #fff; font-weight: 800; font-size: 19px; letter-spacing: 1.5px; padding: 15px; }

.skener { position: fixed; inset: 0; background: #000; z-index: 20; display: flex; align-items: center; justify-content: center; }
.skener video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.skener .okvir { position: absolute; width: min(72vw, 72vh); height: min(72vw, 72vh); border: 4px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 4000px rgba(0,0,0,.35); }
.skenerNavodilo { position: absolute; left: 16px; right: 16px; bottom: calc(40px + env(safe-area-inset-bottom)); text-align: center; color: #fff; font-size: 18px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.skenerZapri { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 24px; font-weight: 800; }

.obvestilo { position: fixed; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 30; max-width: 540px; margin: 0 auto; padding: 14px 16px; border-radius: 12px; background: #16191D; color: #fff; font-size: 17px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.obvestilo.dobro { background: var(--zelena); } .obvestilo.slabo { background: var(--rdeca); } .obvestilo.opozorilo { background: #8A5A00; color: #fff; border: 0; }

.okno { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.oknoVsebina { background: #fff; border-radius: 16px; padding: 18px; width: 100%; max-width: 520px; margin-bottom: env(safe-area-inset-bottom); }
.oknoVsebina h2 { margin: 0 0 8px; }

.kartica { display: flex; gap: 14px; align-items: center; }
.kartica .znak { width: 88px; height: 80px; flex: none; display: flex; align-items: center; justify-content: center; }
.kartica .znak svg { width: 88px; height: 80px; }
.kartica b { font-size: 26px; display: block; }
.trak { height: 8px; border-radius: 4px; background: var(--skupina); margin-bottom: 12px; }
.seznam { list-style: none; padding: 0; margin: 0; }
.seznam li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #EEE; font-variant-numeric: tabular-nums; }
.seznam li:last-child { border-bottom: 0; }
.misija { font-size: 30px; font-weight: 900; letter-spacing: 1px; color: var(--zelena); text-align: center; margin: 4px 0 10px; }
.opozorilo { background: #FBEAEA; border: 1px solid #E6B3B5; border-radius: 10px; padding: 12px; color: #6B1015; }
.stanjeZveze { position: fixed; bottom: calc(80px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: #8A5A00; color: #fff; border-radius: 20px; padding: 4px 12px; font-size: 13px; z-index: 7; }
@keyframes tresi { 0%,100% { transform: translateX(0) } 20%,60% { transform: translateX(-8px) } 40%,80% { transform: translateX(8px) } }
.tresi { animation: tresi .4s; }
