/* Kviz linkovi (/k) — isti vizuelni jezik kao /kviz-generator i admin. */
:root {
  --navy: #1D3557; --navy2: #162E4E; --gold: #C29B47; --gold-ink: #B89040; --cream: #F5EBE0;
  --ink: #22303f; --muted: #6b7688; --dim: #9aa4b2;
  --surface: #fff; --surface2: #f4eee4; --surface3: #faf6ef; --line: #e4dccd; --line2: #d9cfbd;
  --green: #3E7D57; --red: #B85C4F; --amber: #e3b45e; --cream-dim: #c9c2b3;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Manrope', system-ui, sans-serif; background: var(--cream); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Baloo 2', system-ui, sans-serif; margin: 0; }
a { color: var(--navy); font-weight: 700; }
a:hover { color: var(--gold-ink); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.wrap { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.top { display: flex; align-items: center; gap: .8rem; margin: .5rem 0 1.4rem; flex-wrap: wrap; }
.logo { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.5rem; color: var(--navy); }
.logo b { color: var(--gold); }
.lead { color: var(--muted); font-size: .95rem; margin: .2rem 0 0; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; box-shadow: 0 2px 10px rgba(29,53,87,.05); }
.card + .card { margin-top: 1.1rem; }
.card h2 { font-size: 1.05rem; color: var(--navy); margin: 0 0 .7rem; display: flex; align-items: center; gap: .5rem; }
label.lbl { display: block; font-weight: 700; font-size: .82rem; color: var(--navy); margin: .8rem 0 .3rem; }
label.lbl:first-child { margin-top: 0; }
.field { width: 100%; background: var(--surface3); color: var(--ink); border: 1.5px solid var(--line2); border-radius: 11px; padding: .6rem .75rem; font: inherit; font-size: 1rem; min-height: 44px; }
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194,155,71,.18); }
textarea.field { min-height: 64px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .7rem; }
@media (max-width: 560px) { .row2, .row3 { grid-template-columns: 1fr; } }
.hint { font-size: .78rem; color: var(--muted); margin: .35rem 0 0; }
.err { color: var(--red); font-weight: 700; font-size: .85rem; margin: .5rem 0 0; }

.btn { border: none; border-radius: 11px; font: inherit; font-weight: 700; padding: .6rem 1rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-gold { background: var(--gold); color: #3a2e12; }
.btn-ghost { background: var(--surface2); color: var(--navy); border: 1.5px solid var(--line2); }
.btn-danger { background: rgba(184,92,79,.1); color: var(--red); border: 1.5px solid var(--red); }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; min-height: 38px; border-radius: 9px; }
.btn-wide { width: 100%; }
a.back { font-size: .9rem; text-decoration: none; }

.pill { font-size: .72rem; font-weight: 800; border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.pill-active { color: var(--green); background: rgba(62,125,87,.12); }
.pill-scheduled { color: #8a6f2c; background: rgba(194,155,71,.16); }
.pill-expired { color: var(--muted); background: var(--surface2); }
.pill-locked { color: var(--navy); background: var(--surface2); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--navy); color: var(--cream); padding: .6rem 1rem; border-radius: 10px; font-weight: 700; font-size: .9rem; opacity: 0; transition: opacity .2s; z-index: 50; pointer-events: none; max-width: calc(100vw - 2rem); }
.toast.show { opacity: 1; }
.toast.err { background: var(--red); }
.loading { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty { text-align: center; color: var(--muted); padding: 1.4rem; border: 1.5px dashed var(--line2); border-radius: 12px; }

/* ---- 1a: lista ---- */
.links { display: flex; flex-direction: column; gap: .5rem; }
.link-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto auto; align-items: center; gap: .9rem; background: var(--surface3); border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .8rem; }
.tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.link-name { font-weight: 800; font-size: 1rem; color: var(--navy); }
.link-url { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-meta { font-size: .8rem; color: var(--muted); }
.link-count { display: flex; flex-direction: column; align-items: flex-end; padding-right: .4rem; }
.link-count b { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.3rem; color: var(--navy); line-height: 1; }
.link-count span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.link-acts { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .link-row { grid-template-columns: 44px minmax(0,1fr) auto; }
  .link-acts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---- Okvir šireg ekrana (čarobnjak, uređivanje) ---- */
.shell { max-width: 1280px; margin: 0 auto; }
.shell-pad { padding: 1.5rem 2rem 0; display: flex; align-items: center; gap: 1rem; }
.shell-title { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.3rem; color: var(--navy); flex: 1; }
.steps { padding: 1rem 2rem 0; display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; }
.step { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border-radius: 12px; border: 1.5px solid var(--line); color: var(--muted); }
.step .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .82rem; background: var(--surface2); color: var(--muted); flex: none; }
.step span:last-child { font-weight: 800; font-size: .9rem; }
.step.on { background: #fff; border-color: var(--gold); color: var(--navy); }
.step.on .dot { background: var(--navy); color: var(--cream); }
.step.done .dot { background: rgba(62,125,87,.14); color: var(--green); }
@media (max-width: 640px) { .steps { grid-template-columns: repeat(2,1fr); padding: 1rem 1rem 0; } .shell-pad { padding: 1.2rem 1rem 0; } }

.basics { padding: 1.2rem 2rem 1.6rem; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .basics { grid-template-columns: 1fr; padding: 1.2rem 1rem; } }
.footbar { position: sticky; bottom: 0; border-top: 1.5px solid var(--line); background: rgba(245,235,224,.96); backdrop-filter: blur(8px); padding: .8rem 2rem; display: flex; justify-content: flex-end; align-items: center; gap: .6rem; z-index: 5; }
.footbar .note { flex: 1; font-size: .82rem; color: var(--muted); font-weight: 700; }

.slugbox { display: flex; align-items: stretch; border: 1.5px solid var(--line2); border-radius: 11px; overflow: hidden; background: var(--surface3); }
.slugbox:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194,155,71,.18); }
.slugbox .pre { padding: .6rem .2rem .6rem .75rem; background: var(--surface2); color: var(--muted); font-size: .92rem; display: flex; align-items: center; white-space: nowrap; }
.slugbox input { flex: 1; min-width: 0; border: none; background: transparent; padding: .6rem .5rem; font-size: .92rem; color: var(--navy); font-weight: 700; outline: none; min-height: 44px; }
.slugbox .state { display: flex; align-items: center; padding: 0 .75rem; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.state.ok { color: var(--green); }
.state.bad { color: var(--red); }

.pin { display: grid; grid-template-columns: repeat(4,48px); gap: .4rem; }
.pin input { height: 52px; width: 48px; border-radius: 11px; background: var(--surface3); border: 1.5px solid var(--line2); text-align: center; font-family: 'Baloo 2'; font-weight: 700; font-size: 1.5rem; color: var(--navy); padding: 0; }
.pin input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194,155,71,.18); }
.pin-row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.pin-row .hint { margin: 0; max-width: 300px; line-height: 1.4; }

.drop { height: 110px; border-radius: 12px; border: 1.5px dashed var(--line2); background: repeating-linear-gradient(135deg, var(--surface3) 0 10px, var(--surface2) 10px 20px); display: grid; place-items: center; color: var(--muted); font-size: .82rem; font-weight: 700; cursor: pointer; position: relative; overflow: hidden; text-align: center; padding: .5rem; }
.drop.over { border-color: var(--gold); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop .x { position: absolute; top: 6px; right: 6px; z-index: 1; }
.icons { display: flex; gap: .4rem; flex-wrap: wrap; }
.icons button { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.25rem; background: var(--surface3); border: 1.5px solid var(--line2); padding: 0; }
.icons button.on { border: 2px solid var(--gold); }
.swatches { display: flex; gap: .45rem; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: none; padding: 0; }
.swatches button.on { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--gold); }

/* Telefonski pregled (navy, kao kontroler) */
.preview-col { display: flex; flex-direction: column; gap: .6rem; position: sticky; top: 1rem; }
.preview-col > span { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.phone { border-radius: 22px; background: #162e4e radial-gradient(400px 260px at 50% -12%, rgba(194,155,71,.16), transparent 60%); padding: 14px; color: #faf6f0; }
.phone-card { border-radius: 18px; overflow: hidden; background: #1d3557; border: 1px solid rgba(245,235,224,.1); }
.phone-cover { height: 120px; display: grid; place-items: center; color: rgba(250,246,240,.7); font-size: .75rem; font-weight: 700; background-size: cover; background-position: center; }
.phone-cover.blank { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px); }
.phone-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.phone-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.phone-title { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.25rem; line-height: 1.1; overflow-wrap: anywhere; }
.phone-msg { font-size: .75rem; font-weight: 700; color: var(--cream-dim); }
.phone-input { margin-top: 10px; height: 44px; border-radius: 14px; background: #1d3557; border: 1.5px solid rgba(245,235,224,.2); display: flex; align-items: center; padding: 0 12px; color: #8a91a2; font-weight: 800; font-size: .9rem; }
.phone-btn { margin-top: 8px; height: 46px; border-radius: 14px; background: #c29b47; color: #162e4e; display: grid; place-items: center; font-weight: 800; }

/* ---- Uređivanje ---- */
.ed-head { background: var(--navy); color: var(--cream); padding: .9rem 1.6rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ed-head .t { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.ed-head .t b { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.2rem; line-height: 1.1; }
.ed-head .t span { font-size: .8rem; color: var(--cream-dim); }
.ed-head .badge { font-size: .75rem; font-weight: 800; color: var(--amber); background: rgba(227,180,94,.14); padding: 4px 10px; border-radius: 8px; }
.ed-head .meta { font-size: .8rem; font-weight: 700; color: var(--cream-dim); }
.ed-head a { color: var(--cream-dim); font-size: .85rem; }
.tabs { display: flex; gap: .3rem; padding: 0 1.6rem; background: #fff; border-bottom: 1.5px solid var(--line); overflow-x: auto; }
.tabs button { padding: .8rem 1rem; font-weight: 800; font-size: .92rem; color: var(--muted); border: none; background: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--gold); }

.qgrid { display: grid; grid-template-columns: 230px minmax(0,1fr) 340px; min-height: 640px; }
@media (max-width: 1100px) { .qgrid { grid-template-columns: 1fr; } .qgrid > * { border: none !important; border-bottom: 1.5px solid var(--line) !important; } }
.qside { padding: 1.1rem 1rem; border-right: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 1.2rem; }
.sec-lbl { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.src { display: flex; flex-direction: column; gap: .2rem; }
.src button { display: flex; justify-content: space-between; padding: .5rem .65rem; border-radius: 9px; border: none; background: transparent; color: var(--navy); font-weight: 700; font-size: .88rem; text-align: left; }
.src button.on { background: var(--navy); color: var(--cream); font-weight: 800; }
.src button span { opacity: .7; }
.checks label { display: flex; align-items: center; gap: .5rem; padding: .3rem .2rem; font-size: .86rem; cursor: pointer; }
.checks label b { flex: 1; font-weight: 700; color: var(--navy); }
.checks label span { color: var(--muted); font-size: .78rem; }
.box { width: 18px; height: 18px; border-radius: 5px; flex: none; display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; background: #fff; border: 1.5px solid var(--line2); }
.box.on { background: var(--gold); border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { padding: .3rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 700; border: 1.5px solid var(--line2); background: var(--surface3); color: var(--muted); }
.chip.on { border-color: var(--gold); background: rgba(194,155,71,.16); color: #8a6f2c; }

.qmid { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.searchrow { display: flex; gap: .6rem; }
.searchrow input { flex: 1; min-width: 0; background: #fff; }
.banner { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 12px; background: rgba(194,155,71,.12); border: 1.5px solid rgba(194,155,71,.4); }
.banner span { flex: 1; font-size: .86rem; font-weight: 700; color: var(--navy); }
.qrows { display: flex; flex-direction: column; gap: .4rem; }
.qrow { display: flex; align-items: center; gap: .7rem; background: var(--surface3); border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem .75rem; cursor: pointer; text-align: left; width: 100%; font: inherit; color: var(--ink); }
.qrow.on { background: #fff; border-color: rgba(194,155,71,.6); }
.qrow .box { width: 22px; height: 22px; border-radius: 6px; font-size: .8rem; }
.qtype { font-size: .72rem; font-weight: 800; color: var(--navy); background: var(--surface2); border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.qmain { flex: 1; min-width: 0; }
.qtext { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qhint { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qpack { font-size: .76rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.iconbtn { background: var(--surface2); border: 1.5px solid var(--line2); border-radius: 9px; width: 34px; height: 34px; font-size: .9rem; padding: 0; flex: none; color: var(--navy); }
.more { text-align: center; color: var(--muted); font-size: .82rem; font-weight: 700; padding: .4rem; }

.qright { background: #fff; border-left: 1.5px solid var(--line); padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem; }
.qright-head { display: flex; align-items: baseline; justify-content: space-between; }
.qright-head b { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.qright-head span { font-size: .82rem; font-weight: 800; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface2); border-radius: 11px; padding: 3px; }
.seg button { padding: .45rem; border-radius: 9px; border: none; background: transparent; font-size: .82rem; font-weight: 800; color: var(--navy); }
.seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(29,53,87,.12); }
.draw { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 700; color: var(--navy); flex-wrap: wrap; }
.draw input { width: 64px; text-align: center; padding: .3rem .4rem; border-radius: 9px; border: 1.5px solid var(--gold); font-weight: 800; font-size: .95rem; color: var(--navy); min-height: 36px; }
.sel { display: flex; flex-direction: column; gap: .35rem; max-height: 420px; overflow-y: auto; }
.sel-row { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 10px; background: var(--surface3); border: 1.5px solid var(--line); }
.sel-row.dragging { opacity: .4; }
.sel-row.over { border-color: var(--gold); }
.grip { color: var(--dim); font-weight: 800; letter-spacing: -2px; cursor: grab; user-select: none; }
.sel-num { font-weight: 800; color: var(--gold); min-width: 1.6rem; font-size: .86rem; }
.sel-text { flex: 1; min-width: 0; font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-type { font-size: .7rem; font-weight: 800; color: var(--navy); background: var(--surface2); border-radius: 20px; padding: 1px 7px; white-space: nowrap; }
.sel-x { background: none; border: none; color: var(--muted); font-size: 1rem; padding: 0 .2rem; min-width: 24px; }
.rules { border-top: 1.5px solid var(--line); padding-top: .9rem; display: flex; flex-direction: column; gap: .6rem; }
.rule { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 700; color: var(--navy); flex-wrap: wrap; }
.timers { display: flex; gap: .25rem; }
.timers button { padding: .25rem .5rem; border-radius: 8px; font-size: .78rem; font-weight: 800; background: var(--surface2); color: var(--navy); border: none; }
.timers button.on { background: var(--navy); color: var(--cream); }
.toggle { width: 40px; height: 24px; border-radius: 999px; background: var(--line2); position: relative; border: none; padding: 0; flex: none; }
.toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on { background: var(--green); }
.toggle.on::after { left: 19px; }
.rule select { padding: .25rem .4rem; border-radius: 8px; border: 1.5px solid var(--line2); font-weight: 800; color: var(--navy); background: #fff; }
/* Right under the rules — the column stretches to the bank list's height, so
   pushing the button to its bottom hid it below 100+ rows. */
.qright .save { margin-top: .2rem; }
.dirty { font-size: .78rem; font-weight: 800; color: #8a6f2c; text-align: center; }

/* ---- Modal (1d) ---- */
.modal-bg { position: fixed; inset: 0; background: rgba(22,46,78,.45); z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem; overflow-y: auto; }
.modal { width: 560px; max-width: 100%; background: var(--cream); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(29,53,87,.25); }
.modal-head { padding: 1rem 1.2rem; display: flex; align-items: center; gap: .6rem; border-bottom: 1.5px solid var(--line); background: #fff; }
.modal-head b { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.15rem; color: var(--navy); flex: 1; }
.modal-body { padding: 1.1rem 1.2rem; }
.note { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: .84rem; line-height: 1.45; }
.opt-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.opt-row input[type=radio] { width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
.grp { display: none; }
.grp.on { display: block; }
.mediaprev { max-width: 150px; max-height: 110px; border-radius: 10px; margin-top: .5rem; display: block; }
.modal-acts { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* ---- 1e Gotovo ---- */
.done { max-width: 560px; margin: 2rem auto; padding: 1.6rem 1.4rem; background: var(--cream); display: flex; flex-direction: column; gap: 1rem; }
.kicker { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.big { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.6rem; line-height: 1.1; color: var(--navy); }
.done-grid { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 1rem; }
@media (max-width: 520px) { .done-grid { grid-template-columns: 1fr; } }
.qr { width: 150px; height: 150px; border-radius: 12px; background: var(--cream); border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: .78rem; font-weight: 700; text-align: center; overflow: hidden; }
.qr svg, .qr img { width: 100%; height: 100%; }
.copyrow { display: flex; gap: .4rem; }
.copyrow span { flex: 1; min-width: 0; padding: .55rem .7rem; border-radius: 10px; background: var(--surface3); border: 1.5px solid var(--line2); font-size: .84rem; color: var(--navy); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinshow { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.6rem; letter-spacing: .2em; color: var(--navy); }

/* ---- 1f Statistika ---- */
.st-grid { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: 640px; }
.st-side { min-width: 0; padding: 1.1rem 1rem; border-right: 1.5px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.st-games { display: flex; flex-direction: column; gap: .5rem; }
.st-game { display: flex; flex-direction: column; gap: .35rem; padding: .6rem .7rem; border-radius: 12px; background: transparent; border: 1.5px solid var(--line); text-align: left; font: inherit; color: var(--ink); width: 100%; }
.st-game.on { background: #fff; border-color: var(--gold); }
.st-game-h { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.st-game-h b { font-weight: 800; font-size: .9rem; color: var(--navy); }
.st-game-h span, .st-game-m > span:last-child { font-size: .74rem; color: var(--muted); font-weight: 700; }
.st-game-m { display: flex; align-items: center; gap: .35rem; }
.st-game-w { font-size: .76rem; font-weight: 800; color: #8a6f2c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faces { display: flex; padding-left: 5px; }
.mini { width: 22px; height: 22px; border-radius: 50%; margin-left: -5px; border: 2px solid #fff; display: grid; place-items: center; font-size: .7rem; flex: none; }
.st-all { margin-top: .4rem; padding: .6rem .7rem; border-radius: 12px; border: 1.5px dashed var(--line2); background: transparent; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); text-align: left; }
.st-all.on { border-style: solid; border-color: var(--gold); background: #fff; color: var(--navy); }
.st-main { padding: 1.1rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.st-main .card + .card { margin-top: 0; }
@media (max-width: 900px) {
  .st-grid { grid-template-columns: minmax(0,1fr); }
  .st-side { border-right: none; border-bottom: 1.5px solid var(--line); }
  .st-games { flex-direction: row; overflow-x: auto; padding-bottom: .2rem; }
  .st-game { min-width: 190px; }
  .st-main { padding: 1rem; }
}
.st-insights { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
@media (max-width: 700px) { .st-insights { grid-template-columns: 1fr; } }
.ins { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ins b { font-weight: 800; font-size: .95rem; color: var(--navy); overflow-wrap: anywhere; }
.ins > span:last-child { font-size: .8rem; color: var(--muted); }

/* 1a: tabela odgovora */
.mx-tools { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; font-size: .76rem; font-weight: 700; color: var(--muted); }
.legend { display: flex; align-items: center; gap: .3rem; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-left: .4rem; }
.legend i:first-child { margin-left: 0; }
.seg-sm { display: inline-grid; grid-template-columns: auto auto; }
.seg-sm button { padding: .25rem .6rem; font-size: .76rem; }
.mx-tools select { font-size: .78rem; font-weight: 800; color: var(--navy); border: 1.5px solid var(--line2); border-radius: 8px; padding: .2rem .4rem; background: #fff; }
.mx-scroll { overflow-x: auto; padding-bottom: .3rem; }
.mx { display: grid; gap: 4px; align-items: stretch; }
.mx-head { padding: .4rem .35rem; border-radius: 9px; background: var(--surface3); border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; font: inherit; }
.mx-head.on { background: rgba(194,155,71,.14); border-color: var(--gold); }
.mx-head b { font-weight: 800; font-size: .82rem; color: var(--gold); }
.mx-head .t { font-size: .66rem; font-weight: 800; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-head .p { font-size: .7rem; font-weight: 800; }
.mx-ph { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); align-self: end; text-align: right; padding-bottom: .4rem; }
.mx-name { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: 0 .3rem 0 0; background: none; border: none; font: inherit; text-align: left; color: var(--navy); }
.mx-name span:last-child { font-weight: 800; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-name:hover span:last-child { text-decoration: underline; }
.face { width: 28px; height: 28px; border-radius: 30%; display: grid; place-items: center; font-size: .95rem; flex: none; }
.face.big { width: 52px; height: 52px; font-size: 1.7rem; }
.mx-cell { min-height: 44px; border-radius: 9px; padding: .3rem .4rem; display: flex; align-items: center; gap: .3rem; min-width: 0; }
.mx-cell.pick { outline: 2px solid var(--gold); }
.mx-cell.only { justify-content: center; }
.mx-cell.only .tag { background: none; font-size: .85rem; }
.mx-cell .tag { font-size: .66rem; font-weight: 800; padding: 1px 5px; border-radius: 5px; flex: none; background: rgba(255,255,255,.55); }
.mx-cell .lb { font-size: .76rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-pts { text-align: right; align-self: center; font-family: 'Baloo 2'; font-weight: 700; font-size: 1.05rem; color: var(--navy); }

/* 1a: jedno pitanje */
.qd-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.qd-head .num { font-weight: 800; color: var(--gold); }
.qd-head h2 { font-size: 1.1rem; margin: 0; flex: 1; min-width: 200px; }
.qd-head .sum { font-size: .8rem; font-weight: 700; color: var(--muted); }
.qd-right { margin: -.3rem 0 .7rem; font-size: .84rem; color: var(--muted); }
.qd-right b { color: var(--green); }
.qd-list { display: flex; flex-direction: column; gap: .45rem; }
.qd-row { display: grid; grid-template-columns: auto minmax(0,260px) minmax(0,1fr) auto; gap: .7rem; align-items: center; padding: .45rem .6rem; border-radius: 12px; background: var(--surface3); border: 1.5px solid var(--line); }
.qd-row.nolead { grid-template-columns: minmax(0,260px) minmax(0,1fr) auto; }
.qd-row.ok { background: rgba(62,125,87,.08); border-color: rgba(62,125,87,.45); }
.qd-row .tx { font-weight: 700; font-size: .92rem; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-row .bar { height: 12px; }
.letter { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--surface2); color: var(--navy); }
.letter.ok { background: var(--green); color: #fff; }
.who { display: flex; align-items: center; gap: .3rem; min-width: 120px; justify-content: flex-end; flex-wrap: wrap; padding-left: 5px; }
.who b { font-size: .85rem; color: var(--navy); min-width: 1.4rem; text-align: right; }
@media (max-width: 640px) {
  .qd-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .qd-row.nolead { grid-template-columns: minmax(0,1fr) auto; }
  .qd-row .bar { display: none; }
  .who { min-width: 0; }
}
.axis { position: relative; margin: 0 1.2rem; }
.axis-in { position: relative; height: 110px; }
.axis .line { position: absolute; left: 0; right: 0; top: 70px; height: 6px; border-radius: 999px; background: var(--surface2); }
.axis .mark { position: absolute; top: 20px; bottom: 18px; width: 2px; background: var(--gold); }
.axis .mark-l { position: absolute; top: 0; transform: translateX(-50%); font-size: .76rem; font-weight: 800; color: #8a6f2c; white-space: nowrap; }
.axis .dot { position: absolute; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 30%; display: grid; place-items: center; font-size: .85rem; }
.axis .end { position: absolute; bottom: 0; font-size: .74rem; color: var(--muted); font-weight: 700; }
.axis .end.l { left: 0; }
.axis .end.r { right: 0; }

/* 1b: igrač kroz sve partije */
.pl-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pl-t { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.pl-t b { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.4rem; line-height: 1.1; color: var(--navy); }
.pl-t span { font-size: .84rem; color: var(--muted); font-weight: 700; }
.pg { display: flex; flex-direction: column; gap: .7rem; }
.pg-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 70px; gap: .7rem; align-items: center; }
@media (max-width: 640px) { .pg-row { grid-template-columns: 1fr auto; } .pg-cells { grid-column: 1 / -1; grid-row: 2; } }
.pg-t { display: flex; flex-direction: column; }
.pg-t b { font-size: .86rem; color: var(--navy); }
.pg-t span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.pg-cells { display: flex; gap: 4px; flex-wrap: wrap; }
.pg-cell { min-width: 44px; max-width: 120px; height: 30px; line-height: 30px; padding: 0 .4rem; border-radius: 8px; text-align: center; font-size: .72rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-pts { text-align: right; font-family: 'Baloo 2'; font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.stats-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .stats-2 { grid-template-columns: 1fr; } }
.pt { display: flex; flex-direction: column; gap: .55rem; }
.pt-row { display: grid; grid-template-columns: 80px minmax(0,1fr) 44px; gap: .6rem; align-items: center; }
.pt-row span { font-size: .82rem; font-weight: 700; color: var(--navy); }
.pt-row b { text-align: right; font-size: .84rem; color: var(--navy); }
.miss { display: flex; flex-direction: column; gap: .55rem; }
.miss-row { display: flex; flex-direction: column; gap: 2px; padding: .5rem .65rem; border-radius: 10px; background: var(--surface3); border: 1.5px solid var(--line); }
.miss-row .q { font-size: .84rem; font-weight: 700; color: var(--ink); }
.miss-row .q small { color: var(--muted); font-weight: 700; }
.miss-row .a { font-size: .78rem; color: var(--muted); }
.miss-row .no { color: var(--red); }
.miss-row .yes { color: var(--green); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; gap: .5rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head select { font-size: .8rem; font-weight: 800; color: var(--navy); border: 1.5px solid var(--line2); border-radius: 8px; padding: .2rem .4rem; background: #fff; }
.ptable-h, .prow { display: grid; grid-template-columns: 28px minmax(0,1fr) 70px 72px; gap: .5rem; align-items: center; }
.ptable-h { padding: 0 .5rem .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ptable-h span:nth-child(n+3), .prow span:nth-child(n+3) { text-align: right; }
.prows { display: flex; flex-direction: column; gap: .3rem; }
.prow { padding: .45rem .5rem; border-radius: 10px; background: var(--surface3); border: 1.5px solid var(--line); cursor: pointer; width: 100%; font: inherit; color: var(--ink); text-align: left; }
.prow.top { background: rgba(194,155,71,.1); border-color: rgba(194,155,71,.5); }
.prow.picked { border-color: var(--navy); }
.prow .nm { font-weight: 800; font-size: .9rem; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .nm small { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; }
.prow .pts { font-family: 'Baloo 2'; font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.ok1 { background: rgba(62,125,87,.14); color: var(--green); }
.ok0 { background: rgba(184,92,79,.14); color: var(--red); }
.okn { background: var(--surface2); color: var(--muted); }
.qstat { display: grid; grid-template-columns: minmax(0,1fr) 180px 44px; gap: .7rem; align-items: center; }
@media (max-width: 560px) { .qstat { grid-template-columns: minmax(0,1fr) 80px 40px; } }
.qstat .tx { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qstat .mt { font-size: .76rem; color: var(--muted); }
.bar { height: 10px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.bar div { height: 100%; border-radius: 999px; }
.qstat .pc { text-align: right; font-weight: 800; font-size: .88rem; color: var(--navy); }
.qstats { display: flex; flex-direction: column; gap: .55rem; }

.narrow { max-width: 640px; margin: 1.2rem auto; padding: 0 1rem 2rem; }
.lock { max-width: 420px; margin: 3rem auto; }
.danger-zone { border-color: rgba(184,92,79,.4); }
