/* STUDIUM WORTSCHATZ BOOSTER – vizuelni identitet */
:root {
  --cream: #FAF6F0;
  --sage: #D9E3D6;
  --mint: #BCE5D3;
  --rose: #E8D5D5;
  --beige: #E7DDD5;
  --gold: #D4AF65;
  --gold-deep: #9C7A2E;       /* zlatna za tekst – dovoljan kontrast */
  --green: #103D32;
  --green-2: #1D5A4A;
  --white: #FFFFFF;
  --ink: #103D32;
  --muted: #4E6A60;
  --ok: #1E7A55;
  --ok-bg: #DDF3E8;
  --bad: #A2413B;
  --bad-bg: #F6E1DF;
  --warn-bg: #FBF0D9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 22px rgba(16, 61, 50, .08), 0 1px 3px rgba(16, 61, 50, .06);
  --shadow-hover: 0 12px 30px rgba(16, 61, 50, .14);
  --nav-h: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--cream);
  background-image: radial-gradient(1200px 500px at 10% -10%, rgba(188,229,211,.45), transparent 60%),
                    radial-gradient(900px 500px at 110% 10%, rgba(232,213,213,.45), transparent 60%);
  background-attachment: fixed;
  line-height: 1.5; font-size: 16px;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-weight: 800; }
h2 { font-weight: 700; font-size: 1.35rem; }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 .8em; }
a { color: var(--green-2); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Snijeg & dekoracije ---------- */
#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.flake { position: absolute; top: -20px; color: #fff; text-shadow: 0 0 4px rgba(16,61,50,.25); opacity: .75;
  animation: fall linear infinite; font-size: 12px; user-select: none; }
@keyframes fall { to { transform: translate3d(var(--drift, 30px), 110vh, 0) rotate(240deg); } }
.garland { display: block; width: 100%; height: 34px; }
.bulb { animation: twinkle 3.2s ease-in-out infinite; transform-origin: center; }
.bulb:nth-child(3n) { animation-delay: -1.1s; } .bulb:nth-child(3n+1) { animation-delay: -2.2s; }
@keyframes twinkle { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.star-twinkle { animation: twinkle 4s ease-in-out infinite; }

/* ---------- Layout ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + 28px); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(250,246,240,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212,175,101,.35); }
.topbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px 16px; }
.brand { display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; color: var(--green); }
.brand small { letter-spacing: .32em; font-weight: 700; font-size: .66rem; color: var(--gold-deep); }
.brand b { font-weight: 800; font-size: 1rem; letter-spacing: .02em; }
.nav-desktop { display: none; margin-left: auto; gap: 4px; }
.nav-desktop a, .nav-bottom a { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav-desktop a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; font-size: .9rem; display: flex; gap: 6px; align-items: center; }
.nav-desktop a.active, .nav-desktop a:hover { background: var(--white); color: var(--green); box-shadow: var(--shadow); }
.nav-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(255,255,255,.97); border-top: 1px solid var(--beige); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(16,61,50,.06); }
.nav-bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .64rem; padding: 4px 0; border-radius: 10px; }
.nav-bottom a.active { color: var(--green); background: var(--sage); }
.nav-bottom svg, .nav-desktop svg { width: 22px; height: 22px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (min-width: 1040px) {
  .nav-desktop { display: flex; }
  .nav-bottom { display: none; }
  .shell { padding-bottom: 48px; }
  .top-actions { margin-left: 8px; }
}

/* ---------- Komponente ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem; min-height: 44px;
  background: var(--green); color: #fff; transition: transform .15s ease, box-shadow .15s ease, background .15s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.gold { background: linear-gradient(135deg, #E2C27F, var(--gold)); color: var(--green); }
.btn.ghost { background: var(--white); color: var(--green); border: 1.5px solid var(--sage); }
.btn.soft { background: var(--sage); color: var(--green); }
.btn.rose { background: var(--rose); color: var(--green); }
.btn.sm { padding: 7px 14px; min-height: 36px; font-size: .85rem; }
.btn.icon { padding: 0; width: 44px; border-radius: 50%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--sage); color: var(--green); }
.tag.gold { background: #F5E7C6; color: var(--gold-deep); }
.tag svg { width: 14px; height: 14px; flex: none; }
.tag.rose { background: var(--rose); }
.grid { display: grid; gap: 14px; }
.progress { height: 10px; border-radius: 999px; background: var(--beige); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #7FCBA8); border-radius: inherit; transition: width .5s ease; }
.progress.gold > span { background: linear-gradient(90deg, #EBD39B, var(--gold)); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .9rem; }
.input, textarea.input, select.input { width: 100%; border: 1.5px solid var(--beige); background: #fff; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 1rem; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,101,.25); }
textarea.input { min-height: 90px; resize: vertical; }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--warn-bg); font-size: .92rem; }
.notice.ok { background: var(--ok-bg); } .notice.bad { background: var(--bad-bg); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.loader { display: grid; place-items: center; min-height: 50vh; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--sage); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 26px; margin: 16px 0 18px; padding: 22px 20px 20px;
  background: linear-gradient(150deg, var(--green) 0%, #174C3F 60%, #1E5C4C 100%); color: #fff; box-shadow: var(--shadow); }
.hero .kicker { letter-spacing: .4em; font-weight: 700; font-size: .78rem; color: var(--gold); }
.hero h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); letter-spacing: .01em; margin: 2px 0 4px; }
.hero .claim { font-weight: 600; color: var(--mint); margin-bottom: 12px; }
.hero .motivation { max-width: 620px; color: #E9F2EE; font-size: .98rem; }
.hero .fir { position: absolute; right: -10px; bottom: -8px; width: 170px; opacity: .9; pointer-events: none; }
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.result-hero > *:not(.hero-stars):not(.fir) { position: relative; }
.result-hero .fir { position: absolute; right: -10px; bottom: -8px; width: 150px; opacity: .8; }
.hero .row { position: relative; z-index: 2; }

/* ---------- Statistika ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--white); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 1.45rem; font-weight: 800; }
.stat .l { font-size: .76rem; color: var(--muted); font-weight: 600; }
.stat svg { width: 22px; height: 22px; color: var(--gold-deep); }
.continue-card { display: grid; gap: 14px; align-items: center; }
@media (min-width: 720px) { .continue-card { grid-template-columns: 1.4fr 1fr; } }
.countdown { display: flex; gap: 8px; }
.countdown div { background: var(--cream); border-radius: 12px; padding: 8px 10px; min-width: 56px; text-align: center; }
.countdown b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Kalendar ---------- */
.cal-head { margin: 26px 0 12px; }
.calendar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 520px) { .calendar { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .calendar { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1060px) { .calendar { grid-template-columns: repeat(6, 1fr); } }
.lc { position: relative; min-height: 178px; border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column;
  background: var(--white); box-shadow: var(--shadow); border: 2px solid transparent; transition: transform .2s ease, box-shadow .2s ease;
  text-align: left; cursor: pointer; overflow: hidden; }
.lc:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.lc .lnum { font-size: .66rem; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.lc .ldate { font-size: .74rem; font-weight: 600; color: var(--muted); }
.lc .lday { position: absolute; right: 10px; top: 6px; font-size: 1.9rem; font-weight: 800; color: rgba(16,61,50,.08); }
.lc .licon { width: 34px; height: 34px; flex: none; margin: 8px 0 6px; color: var(--green); }
.lc .lfoot svg { width: 18px; height: 18px; flex: none; }
.lc .ltitle { font-weight: 700; font-size: .86rem; line-height: 1.2; }
.lc .ltheme { font-size: .72rem; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.lc .lfoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .72rem; font-weight: 700; }
.lc.locked { background: linear-gradient(160deg, #F1ECE5, var(--beige)); cursor: default; box-shadow: none; }
.lc.locked:hover { transform: none; }
.lc.locked .licon { color: #8E9A94; }
.lc.locked .lfoot { color: #6F7B75; }
.lc.available { border-color: var(--gold); background: linear-gradient(170deg, #FFFDF7, #FBF3E0); }
.lc.available .cta { color: var(--gold-deep); }
.lc.available::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(160px 80px at 100% 0, rgba(212,175,101,.25), transparent 70%); }
.lc.started { border-color: var(--mint); }
.lc.completed { background: linear-gradient(170deg, #E9F7F0, var(--mint)); }
.lc.completed .check { width: 22px; height: 22px; color: var(--ok); }
.lc.prep { background: linear-gradient(160deg, #FFFFFF, var(--rose)); cursor: default; }
.lc .mini { height: 6px; border-radius: 99px; background: var(--beige); overflow: hidden; margin-top: 6px; }
.lc .mini span { display: block; height: 100%; background: var(--gold); }
.lc.today { box-shadow: 0 0 0 3px rgba(212,175,101,.35), var(--shadow); }

/* ---------- Lekcija ---------- */
.lesson-top { position: sticky; top: 0; z-index: 25; background: rgba(250,246,240,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--beige); }
.lesson-top-inner { max-width: 860px; margin: 0 auto; padding: 8px 16px; }
.steps { display: flex; gap: 4px; margin-top: 8px; }
.steps button { flex: 1; height: 8px; border: 0; padding: 0; border-radius: 99px; background: var(--beige); cursor: pointer; }
.steps button.done { background: var(--mint); }
.steps button.current { background: var(--gold); }
.lesson-wrap { max-width: 860px; margin: 0 auto; padding: 16px 16px 40px; }
.sec-head { margin: 6px 0 14px; }
.sec-head .tag { margin-bottom: 6px; }
.ex-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.ex-head { margin-bottom: 14px; }
.ex-head .instr { color: var(--muted); font-size: .92rem; margin: 0; }
.ex-head .ref { font-size: .72rem; color: var(--gold-deep); font-weight: 600; margin-top: 4px; }
.ex-progress { font-size: .78rem; font-weight: 700; color: var(--muted); }
.prompt { font-size: 1.12rem; font-weight: 700; margin: 6px 0 14px; }
.prompt.de { font-size: 1.3rem; }
.options { display: grid; gap: 10px; }
.opt { text-align: left; background: var(--cream); border: 2px solid var(--beige); border-radius: 14px; padding: 13px 15px; cursor: pointer;
  font-weight: 600; transition: border-color .15s, background .15s, transform .1s; min-height: 50px; }
.opt:hover:not(:disabled) { border-color: var(--gold); background: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt:disabled { cursor: default; }
.fb { margin-top: 14px; border-radius: 14px; padding: 12px 14px; font-size: .94rem; display: none; }
.fb.show { display: block; animation: pop .25s ease; }
.fb.ok { background: var(--ok-bg); } .fb.bad { background: var(--bad-bg); } .fb.info { background: var(--warn-bg); }
.fb b.big { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.fb .expected { margin-top: 6px; font-weight: 700; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ex-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.audio-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.big-play { width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--green-2), var(--green));
  color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.big-play svg { width: 36px; height: 36px; }
.speak { border: 0; background: var(--sage); color: var(--green); border-radius: 50%; width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle; flex: none; }
.speak svg { width: 18px; height: 18px; }

/* tastatura sa specijalnim znakovima */
.dekeys { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.dekeys button { min-width: 42px; height: 40px; border-radius: 10px; border: 1.5px solid var(--beige); background: #fff; font-weight: 700; cursor: pointer; }
.dekeys button:hover { border-color: var(--gold); }

/* gap tekst */
.gap-line { font-size: 1.08rem; line-height: 2.3; }
.gap-input { display: inline-block; min-width: 110px; width: auto; border: 0; border-bottom: 2.5px solid var(--gold); background: #FFFBF1;
  border-radius: 8px 8px 0 0; padding: 4px 8px; font-size: 1.02rem; font-weight: 600; margin: 0 2px; }
.gap-input:focus { outline: none; background: #FFF4D8; }
.gap-input.ok { border-color: var(--ok); background: var(--ok-bg); }
.gap-input.bad { border-color: var(--bad); background: var(--bad-bg); }
.gap-input.near { border-color: #C9962F; background: var(--warn-bg); }
.item-block { padding: 14px 0; border-bottom: 1px dashed var(--beige); }
.item-block:last-child { border-bottom: 0; }
.item-prompt { font-size: .9rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }

/* slika uz zadatak */
.task-img { display: block; width: min(260px, 70vw); aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 2px solid var(--beige); margin: 0 auto 12px; background: #fff; }

/* bank / drag */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--cream); border-radius: 14px; min-height: 60px; border: 2px dashed var(--beige); }
.chip { padding: 9px 14px; border-radius: 12px; background: #fff; border: 2px solid var(--beige); font-weight: 700; cursor: grab; user-select: none; touch-action: manipulation; }
.chip.sel { border-color: var(--gold); background: #FFF6DE; box-shadow: 0 0 0 3px rgba(212,175,101,.25); }
.chip.used { visibility: hidden; }
.slot { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; min-height: 38px; padding: 4px 10px; border-radius: 10px;
  border: 2px dashed var(--gold); background: #FFFBF1; vertical-align: middle; cursor: pointer; font-weight: 700; margin: 2px; }
.slot.filled { border-style: solid; background: #fff; }
.slot.active { box-shadow: 0 0 0 3px rgba(212,175,101,.35); }
.slot.ok { border-color: var(--ok); background: var(--ok-bg); }
.slot.bad { border-color: var(--bad); background: var(--bad-bg); }
.slot.over, .chips.over { background: #FFF1CC; }

/* satzbau */
.answer-zone { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 14px; background: #F4FAF7; border: 2px solid var(--mint); margin-bottom: 12px; }
.answer-zone.ok { background: var(--ok-bg); border-color: var(--ok); }
.answer-zone.bad { border-color: var(--bad); }
.chip.misplaced { border-color: var(--bad); }

/* match */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .col { display: grid; gap: 8px; align-content: start; }
.mcard { padding: 11px 12px; border-radius: 12px; border: 2px solid var(--beige); background: var(--cream); font-weight: 600; cursor: pointer; text-align: left; min-height: 48px; font-size: .92rem; }
.mcard.sel { border-color: var(--gold); background: #FFF6DE; }
.mcard.done { border-color: var(--ok); background: var(--ok-bg); cursor: default; opacity: .75; }
.mcard.wrong { border-color: var(--bad); background: var(--bad-bg); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* memory */
.memory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .memory { grid-template-columns: repeat(4, 1fr); } }
.mem { display: block; position: relative; height: 104px; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 14px; }
@media (min-width: 640px) { .mem { height: 120px; } }
.mem-in { display: block; position: absolute; inset: 0; }
.mem-f, .mem-b { position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; padding: 8px; text-align: center; font-size: .82rem; font-weight: 700; line-height: 1.25;
  transition: opacity .25s ease, transform .25s ease; }
.mem-f { background: linear-gradient(140deg, var(--green), var(--green-2)); color: var(--gold); }
.mem-f svg { width: 34px; height: 34px; }
.mem-b { background: #fff; border: 2px solid var(--beige); opacity: 0; transform: scale(.92); }
.mem.open .mem-f, .mem.found .mem-f { opacity: 0; transform: scale(.92); }
.mem.open .mem-b, .mem.found .mem-b { opacity: 1; transform: none; }
.mem.open .mem-b { border-color: var(--gold); }
.mem.found .mem-b { border-color: var(--ok); background: var(--ok-bg); }
.mem:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* flashcards */
.flash { perspective: 1000px; height: 250px; cursor: pointer; margin-bottom: 14px; }
.flash-in { position: relative; height: 100%; transition: transform .55s; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; }
.flash.flipped .flash-in { transform: rotateY(180deg); }
.flash-f, .flash-b { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.flash-f { background: linear-gradient(150deg, #fff, var(--cream)); border: 2px solid var(--beige); }
.flash-b { background: linear-gradient(150deg, #F2FAF6, var(--mint)); transform: rotateY(180deg); border: 2px solid var(--mint); }
.flash .big { font-size: 1.35rem; font-weight: 800; }
.flash .hint { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.flash-rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.flash-rate .btn { padding: 10px 6px; font-size: .82rem; }

/* točak */
.wheel-wrap { display: grid; place-items: center; position: relative; margin: 6px auto 12px; width: min(300px, 80vw); }
.wheel-wrap svg.wheel { width: 100%; height: auto; transition: transform 3.2s cubic-bezier(.17,.67,.2,1); }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 30px; height: 34px; z-index: 2; }

/* vješala – snjegović */
.hang { display: grid; gap: 14px; }
@media (min-width: 640px) { .hang { grid-template-columns: 200px 1fr; align-items: center; } }
.snowman { width: 180px; height: 200px; margin: 0 auto; }
.snowman .part { transition: opacity .4s, transform .4s; }
.snowman .part.gone { opacity: 0; transform: translateY(14px); }
.word { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin: 8px 0 14px; }
.word .wgroup { display: inline-flex; gap: 3px; flex-wrap: nowrap; }
.word .ch { width: 21px; height: 36px; border-bottom: 3px solid var(--green); display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; }
@media (min-width: 640px) { .word .ch { width: 28px; height: 40px; } .word .wgroup { gap: 5px; } }
.kbd { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.kbd button { width: 36px; height: 40px; border-radius: 9px; border: 1.5px solid var(--beige); background: #fff; font-weight: 700; cursor: pointer; }
.kbd button.hit { background: var(--ok-bg); border-color: var(--ok); }
.kbd button.miss { background: var(--bad-bg); border-color: var(--bad); opacity: .6; }

/* rezultati */
.result-hero { text-align: center; padding: 26px 18px; border-radius: 26px; background: linear-gradient(160deg, var(--green), #1D5A4A); color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.result-hero h1 { color: var(--gold); letter-spacing: .04em; font-size: clamp(1.5rem, 6vw, 2.4rem); }
.result-hero .stars svg { width: 40px; height: 40px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
@media (min-width: 640px) { .result-grid { grid-template-columns: repeat(5, 1fr); } }

/* badge */
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .badges { grid-template-columns: repeat(3, 1fr); } }
.badge { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--cream); border: 2px solid var(--beige); }
.badge.on { background: linear-gradient(150deg, #FFF8E6, #F5E7C6); border-color: var(--gold); }
.badge .medal { width: 42px; height: 42px; flex: none; }
.badge:not(.on) .medal { filter: grayscale(1); opacity: .45; }
.badge b { font-size: .86rem; display: block; }
.badge span { font-size: .74rem; color: var(--muted); }

/* tabele */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th, table.t td { padding: 9px 8px; border-bottom: 1px solid var(--beige); text-align: left; vertical-align: top; }
table.t th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* vokabular */
.vocab-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--beige); }
.vocab-item .de { font-weight: 700; }
.vocab-item .bs { color: var(--muted); }
.vocab-item .ex { grid-column: 1 / -1; font-size: .86rem; font-style: italic; color: var(--green-2); }
details.acc { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
details.acc > summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc[open] > summary { border-bottom: 1px solid var(--beige); }
details.acc > div { padding: 6px 18px 16px; }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.auth .card { width: 100%; max-width: 420px; }
.auth .hero { margin: 0 0 16px; }

/* overlay poklon */
#overlay { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(16,61,50,.55); backdrop-filter: blur(3px); }
#overlay.show { display: grid; }
.gift { width: 180px; height: 180px; }
.gift .lid { transform-origin: 50% 100%; animation: lid 1.1s .25s ease forwards; }
.gift .spark { opacity: 0; animation: spark 1s .7s ease forwards; }
@keyframes lid { to { transform: translateY(-46px) rotate(-14deg); } }
@keyframes spark { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
.gift-label { color: #fff; text-align: center; font-weight: 800; letter-spacing: .1em; margin-top: 10px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; width: 100vw; height: 100vh; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 70; background: rgba(16,61,50,.45); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); padding: 20px; max-width: 760px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-hover); }

/* certifikat */
.cert { background: #fff; border-radius: 10px; padding: 34px 26px; text-align: center; border: 10px solid var(--cream); outline: 2px solid var(--gold); outline-offset: -18px; position: relative; max-width: 860px; margin: 0 auto; }
.cert .k { letter-spacing: .4em; color: var(--gold-deep); font-weight: 800; font-size: .8rem; }
.cert h1 { font-size: clamp(1.5rem, 5vw, 2.4rem); }
.cert .name { font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800; color: var(--green); border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 20px 4px; margin: 12px 0; }
.cert .disclaimer { font-size: .72rem; color: var(--muted); margin-top: 22px; }
@media print {
  body { background: #fff; }
  .topbar, .nav-bottom, #snow, .no-print, .skip { display: none !important; }
  .shell { padding: 0; }
  .cert { box-shadow: none; }
}

/* admin */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.admin-tabs a { padding: 8px 14px; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 700; color: var(--muted); box-shadow: var(--shadow); font-size: .88rem; }
.admin-tabs a.active { background: var(--green); color: #fff; }
.ex-admin { border: 1px solid var(--beige); border-radius: 14px; padding: 12px; margin: 10px 0; background: #fff; }
.ex-admin.off { opacity: .55; }
.ex-admin pre { white-space: pre-wrap; font-size: .76rem; background: var(--cream); padding: 8px; border-radius: 8px; max-height: 220px; overflow: auto; }
.item-admin { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed var(--beige); font-size: .86rem; }
.item-admin.off { opacity: .5; text-decoration: line-through; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; cursor: pointer; }

/* smanjeno kretanje */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #snow { display: none; }
}
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
html.reduce-motion #snow { display: none; }
