:root {
  --paper: #fbf7ee;
  --paper-2: #f3ecdc;
  --ink: #1f2a24;
  --ink-2: #5b655c;
  --line: #e2d8c3;
  --teal: #1b7f86;
  --teal-2: #136269;
  --red: #d33a3f;
  --glass: rgba(251, 247, 238, .93);
  --shadow: 0 10px 30px rgba(10, 25, 40, .28), 0 2px 6px rgba(10, 25, 40, .14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #173f63; font-family: Outfit, system-ui, sans-serif; color: var(--ink); }
#map { position: fixed; inset: 0; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 60%, rgba(8, 25, 40, .3) 100%); }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- gumbi ---------- */
.card { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .7); border-radius: 18px; box-shadow: var(--shadow); }
.btn { border: 0; border-radius: 11px; padding: 11px 18px; font-size: 15px; font-weight: 600; background: var(--paper-2); color: var(--ink); transition: transform .12s, background .15s; }
.btn:hover { transform: translateY(-1px); background: #ebe2cc; }
.btn.primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(27, 127, 134, .35); }
.btn.primary:hover { background: var(--teal-2); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.link { background: none; border: 0; color: var(--teal); font-size: 12px; padding: 0; text-decoration: underline; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }

.logo { width: 44px; height: 44px; border-radius: 50%; flex: none; background:
  linear-gradient(160deg, transparent 52%, #e9c98a 53%, #c98650 70%, #7fae55 71%), radial-gradient(circle at 30% 30%, #3b80a6, #16466f); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.brand p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

/* ---------- prijava ---------- */
.screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.screen > * { pointer-events: auto; }
.login-card { width: min(380px, 100%); padding: 26px 26px 22px; animation: rise .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 12px; margin: 20px 0 14px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 500; color: var(--ink-2); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; font-weight: 500; }
label input, .code-input { display: block; width: 100%; margin-top: 5px; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; color: var(--ink); outline: none; }
label input:focus, #answer:focus, .code-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27, 127, 134, .15); }
.code-input { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-size: 26px; font-weight: 700; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- gornja traka ---------- */
.topbar { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; z-index: 3; }
.topbar > * { pointer-events: auto; }
.pill { display: flex; align-items: center; gap: 8px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; box-shadow: var(--shadow); padding: 5px 12px 5px 5px; font-size: 13px; }
.brand-pill .logo { width: 26px; height: 26px; }
button.brand-pill { border: 0; font-family: inherit; color: var(--ink); cursor: pointer; transition: transform .12s; }
button.brand-pill:hover { transform: translateY(-1px); }
button.brand-pill:active { transform: scale(.97); }
.brand-pill b { font-size: 16px; letter-spacing: -.3px; }
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.me-pill { padding: 6px 12px; gap: 10px; }
.me-pill span { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-row { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--glass); box-shadow: var(--shadow); font-size: 17px; display: grid; place-items: center; padding: 0; }
.icon-btn:hover { background: #fff; }
.icon-btn.off { opacity: .45; filter: grayscale(1); }
#answer.bad { background: #fbe3e3; border-color: #e7a3a5; animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---------- donja kartica ---------- */
.sheet { position: fixed; left: 12px; bottom: 12px; width: 340px; max-height: calc(100% - 120px); display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; z-index: 2; animation: up .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }
.crumbs { padding: 10px 14px 0; font-size: 12px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs { align-items: center; }
.crumbs button { background: none; border: 0; padding: 0; color: var(--teal); font-size: 12px; }
.crumbs button.back { width: 30px; height: 30px; margin: -4px 4px -4px -4px; border-radius: 50%; background: var(--paper-2); color: var(--ink); font-size: 17px; font-weight: 700; display: grid; place-items: center; }
.crumbs button.back:hover { background: #e8dfc9; }
#sheetMain { padding: 2px 14px 10px; }
#sheetMain h2 { font-size: 19px; margin: 2px 0 0; letter-spacing: -.3px; line-height: 1.2; }
#sheetMain .sub { color: var(--ink-2); font-size: 13px; margin: 2px 0 10px; }
.play-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.play-row .btn { padding: 10px 8px; }
.list-toggle { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: left; display: flex; justify-content: space-between; }
.list-toggle::after { content: "▾"; transition: transform .2s; }
.sheet.open .list-toggle::after { transform: rotate(180deg); }
.sheet-list { display: none; overflow-y: auto; padding: 0 8px 10px; min-height: 0; }
.sheet.open .sheet-list { display: block; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.list li:hover, .list li.hov { background: rgba(27, 127, 134, .1); }
.list li.grad { font-weight: 600; }
.list li small { color: var(--ink-2); font-size: 11px; }
/* "Više područja" */
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.multi-tg { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 4px 9px 4px 5px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.multi-tg .sw { width: 26px; height: 15px; border-radius: 999px; background: #cfd5cc; position: relative; transition: background .2s; }
.multi-tg .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.multi-tg.on { border-color: #e2b623; color: #6b5200; background: #fff6d2; }
.multi-tg.on .sw { background: #e2b623; }
.multi-tg.on .sw::after { transform: translateX(11px); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; max-height: 76px; overflow-y: auto; }
.chip { border: 0; border-radius: 999px; padding: 3px 9px; background: #ffe58a; color: #4d3b00; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.list.multi li::before { content: ''; flex: none; width: 15px; height: 15px; margin-right: 8px; border: 1.6px solid #b9bfb4; border-radius: 4px; background: #fff; }
.list.multi li { justify-content: flex-start; }
.list.multi li small { margin-left: auto; }
.list.multi li.picked { background: #fff3c4; }
.list.multi li.picked::before { content: '✓'; border-color: #e2b623; background: #e2b623; color: #fff; font-size: 11px; line-height: 13px; text-align: center; font-weight: 800; }

.tip { position: fixed; pointer-events: none; z-index: 5; background: rgba(15, 30, 40, .88); color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; transform: translate(12px, 12px); white-space: nowrap; }

/* ---------- kviz ---------- */
.quizbar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: min(920px, calc(100% - 20px)); display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; box-shadow: var(--shadow); z-index: 3; }
.qbtn { flex: none; height: 40px; min-width: 40px; border: 0; border-radius: 10px; background: var(--paper-2); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; color: var(--ink); }
.qbtn.danger { background: #f6dddd; color: #9b1c22; }
.qtitle { display: flex; flex-direction: column; min-width: 0; max-width: 200px; padding: 0 4px; }
.qtitle b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qtitle span { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#answer { flex: 1; min-width: 0; height: 40px; padding: 0 12px; font-size: 16px; border-radius: 10px; border: 1.5px solid var(--line); outline: none; background: #fff; transition: background .3s; }
#answer.ok { background: #dff3e2; }
#answer:disabled { background: var(--paper-2); }
.qstat { display: flex; flex-direction: column; align-items: center; min-width: 52px; line-height: 1.1; }
.qstat b { font-size: 16px; font-variant-numeric: tabular-nums; }
.qstat span { font-size: 10px; color: var(--ink-2); }
.qstat b.warn { color: var(--red); }

.players { position: fixed; right: 10px; top: 66px; width: 220px; padding: 12px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; box-shadow: var(--shadow); z-index: 2; }
.players h3 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; align-items: baseline; }
.players h3 code { font-size: 17px; letter-spacing: 3px; color: var(--teal); }
.prow { display: flex; align-items: center; gap: 7px; padding: 4px 2px; font-size: 14px; }
.prow .dot, .pdot { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); flex: none; display: inline-block; }
.prow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .nm.off { opacity: .45; }
.prow b { font-variant-numeric: tabular-nums; }
.players .lobby-info { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.players .btn { margin-top: 8px; }

/* ---------- online igrači i pozivi ---------- */
.online-btn { position: relative; font-size: 13px; }
.online-btn .badge { background: #2a9d3c; top: -4px; right: -6px; }
.online-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.on-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.on-row .on-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a9d3c; flex: none; box-shadow: 0 0 0 3px rgba(42,157,60,.18); }
.on-row .on-dot.busy { background: #f08c00; box-shadow: 0 0 0 3px rgba(240,140,0,.18); }
.on-row .on-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.on-row b { font-size: 14px; }
.on-row .on-btns { display: flex; gap: 6px; flex: none; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.on-row small { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-card { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 16px)); padding: 14px 16px; z-index: 30; animation: drop .4s cubic-bezier(.2, .8, .2, 1); }
.invite-card h4 { margin: 0 0 2px; font-size: 16px; }
.invite-card p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.invite-card .inv-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- gost s nadimkom ---------- */
.guest-row { display: flex; gap: 8px; margin-top: 8px; }
.guest-row input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 16px; outline: none; background: #fff; }
.guest-row input:focus { border-color: var(--teal); }

/* ---------- popis soba ---------- */
.rr-code { font-size: 11px; letter-spacing: 1px; background: var(--paper-2); padding: 0 4px; border-radius: 4px; }
.players h3 .room-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; margin-right: 8px; }
.code-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.code-row span { font-size: 13px; color: var(--ink-2); flex: none; }
.code-row input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 18px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; text-align: center; outline: none; }
.code-row input:focus { border-color: var(--teal); }
.rr-pw { display: flex; gap: 6px; align-items: center; }
.rr-pw input { width: 120px; padding: 7px 9px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 15px; outline: none; }
.rr-pw input:focus { border-color: var(--teal); }
.prow .rdy { font-size: 12px; color: #2a9d3c; font-weight: 700; }
.prow .rdy.no { color: var(--ink-2); font-weight: 400; }
.specs { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.btn.ready-on { background: #dff3e2; color: #1d6b2c; }
.lobby-map { font-size: 12px; margin-top: 6px; line-height: 1.3; }
.lobby-map b { font-size: 13px; }
.lobby-map small { display: block; color: var(--ink-2); font-size: 11px; }
.players .suggest-btn { margin-top: 8px; background: #fff3d6; color: #8a5a00; border: 1.5px dashed #e3b04b; }
.players .suggest-btn:hover { background: #ffe9b8; }
.lobby-hint { font-size: 11px; color: var(--ink-2); text-align: center; margin-top: 3px; }
.players h3 .p-tools { display: flex; gap: 4px; margin-left: 8px; align-self: center; }
.icon-btn.xs { width: 28px; height: 28px; font-size: 13px; box-shadow: none; background: var(--paper-2); position: relative; flex: none; }
.icon-btn.xs .badge { font-size: 9px; min-width: 14px; height: 14px; line-height: 14px; top: -4px; right: -5px; }
.players .lobby-multi { margin-top: 6px; }
.players .lobby-multi .multi-tg { margin: 0; font-size: 12px; }
.pickbar .multi-tg { margin: 0; }
.pickbar button:disabled { opacity: .5; }
.icon-actions { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.icon-btn.sm { width: 34px; height: 34px; font-size: 15px; box-shadow: none; background: var(--paper-2); flex: none; }
.icon-actions .grow { flex: 1; margin: 0; }
.players .icon-actions .btn { margin-top: 0; }
/* smanjeni chat: samo traka sa zadnjom porukom */
.chat.mini { height: auto; cursor: pointer; }
.chat.mini .chat-log, .chat.mini .chat-form { display: none; }
.chat.mini .chat-head { border-bottom: 0; padding: 8px 12px; }
.chat.mini .chat-x { display: none; }
.chat-peek { display: none; flex: 1; min-width: 0; margin: 0 8px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat.mini .chat-peek { display: block; }
.badge.static { position: static; box-shadow: none; }
.room-list { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; margin-bottom: 14px; }
.room-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.room-row.busy { opacity: .75; }
.rr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rr-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-main small { font-size: 12px; color: var(--ink-2); }
.st-wait { color: #2a9d3c; font-weight: 600; }
.st-play { color: #c26a00; font-weight: 600; }
.newroom { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.nr-title { font-size: 14px; }
.seg { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 11px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.code-like { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 16px; outline: none; }
.code-like:focus { border-color: var(--teal); }

/* ---------- odabir karte u lobbyju ---------- */
.pickbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100% - 20px)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; box-shadow: var(--shadow); z-index: 5; animation: up .3s; }
.pick-info { display: flex; flex-direction: column; min-width: 0; }
.pick-info small { color: var(--ink-2); font-size: 11px; }
.pick-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-log .accept { margin-top: 4px; }

/* ---------- chat ---------- */
.chat-btn { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e63946; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; animation: pop .3s; }
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.25); } }
.chat { position: fixed; right: 10px; bottom: 10px; width: 300px; height: 340px; display: flex; flex-direction: column; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; box-shadow: var(--shadow); z-index: 4; overflow: hidden; animation: up .3s; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-x { border: 0; background: none; font-size: 16px; color: var(--ink-2); padding: 2px 6px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.chat-log .msg { line-height: 1.35; word-wrap: break-word; }
.chat-log .msg.mine { text-align: right; }
.chat-log .msg.mine span.txt { background: rgba(27, 127, 134, .12); }
.chat-log .msg span.txt { display: inline-block; padding: 3px 9px; border-radius: 10px; background: #fff; margin-top: 1px; }
.chat-log .sys { font-size: 12px; color: var(--ink-2); text-align: center; font-style: italic; }
.chat-log .empty-chat { color: var(--ink-2); font-size: 13px; text-align: center; margin: auto; }
.chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 16px; outline: none; }
.chat-form input:focus { border-color: var(--teal); }
.chat-send { width: 40px; height: 38px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font-size: 16px; }

.countdown { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 130px; font-weight: 700; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.4); z-index: 4; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(10, 25, 35, .4); z-index: 10; }
.modal-card { width: min(520px, 100%); max-height: calc(100% - 24px); overflow-y: auto; padding: 22px; animation: rise .4s cubic-bezier(.2, .8, .2, 1); }
.modal-card h2 { margin: 0 0 4px; font-size: 22px; }
.modal-card .sub { color: var(--ink-2); margin: 0 0 14px; font-size: 14px; }
.big-score { display: flex; gap: 10px; margin: 8px 0 16px; }
.big-score div { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.big-score b { display: block; font-size: 24px; }
.big-score span { font-size: 11px; color: var(--ink-2); }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lb th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); font-weight: 600; padding: 6px; border-bottom: 1px solid var(--line); }
table.lb td { padding: 7px 6px; border-bottom: 1px solid #efe7d6; font-variant-numeric: tabular-nums; }
table.lb tr.mine td { background: rgba(27, 127, 134, .1); font-weight: 600; }
table.lb .r { text-align: right; }
.medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--paper-2); }
.medal.m1 { background: #f2c94c; } .medal.m2 { background: #d9dde3; } .medal.m3 { background: #e0a46d; }
.guest-tag { font-size: 10px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; margin-left: 4px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; flex-wrap: wrap; }
.empty { color: var(--ink-2); font-size: 14px; padding: 12px 0; }
.modal-card a { color: var(--teal); }
.modal-card table.lb td { vertical-align: top; font-size: 13px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 20; pointer-events: none; }
.toast { background: rgba(15, 30, 40, .92); color: #fff; padding: 7px 13px; border-radius: 10px; font-size: 14px; animation: rise .3s; white-space: nowrap; }
.toast.err { background: #9b1c22; }

/* ---------- animirani markeri ---------- */
.boat { width: 34px; height: 60px; position: relative; pointer-events: none; }
.boat svg { position: absolute; left: 0; top: 0; filter: drop-shadow(0 2px 2px rgba(0, 20, 40, .45)); animation: bob 3s ease-in-out infinite; }
.boat .wake { position: absolute; left: 50%; top: 34px; width: 46px; height: 70px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.7), rgba(255,255,255,0) 70%); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .8; animation: wake 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(1px) rotate(2deg); } }
@keyframes wake { 50% { opacity: .5; transform: translateX(-50%) scaleX(1.12); } }
.falcon { width: 64px; height: 64px; pointer-events: none; }
.falcon .wing { transform-origin: 32px 30px; animation: flap 3.2s ease-in-out infinite; }
@keyframes flap { 0%, 55%, 100% { transform: scaleX(1); } 62% { transform: scaleX(.55); } 70% { transform: scaleX(1); } 77% { transform: scaleX(.55); } 85% { transform: scaleX(1); } }
.falcon-shadow { width: 64px; height: 64px; opacity: .22; filter: blur(2.5px); pointer-events: none; }
.pulse { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--c, #1d6fd8); animation: pulse 1s ease-out forwards; pointer-events: none; }
@keyframes pulse { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.maplibregl-ctrl-bottom-right { margin: 0 4px 4px 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---------- mobitel ---------- */
/* prijava na mobitelu: forma gore (tipkovnica je dolje), može se pomicati, ništa se ne reže */
@media (max-width: 760px), (max-height: 640px) {
  .screen { place-items: start center; overflow-y: auto; padding: 12px 12px 40vh; pointer-events: auto; }
  .login-card { padding: 18px 18px 16px; margin-top: 8px; }
  .login-card .brand h1 { font-size: 24px; }
  .login-card .logo { width: 36px; height: 36px; }
  .login-card .tabs { margin: 14px 0 10px; }
  .login-card label { margin-bottom: 8px; }
  .login-card .or { margin: 10px 0; }
}
.guest-row .btn { flex: none; padding: 11px 16px; }

.share-btn { width: 100%; margin: 4px 0 10px; background: #fff3c4; color: #7a5a00; border: 1.5px solid #e2b623; font-weight: 700; }
.share-btn:hover { background: #ffe9a0; }

/* ---------- općina dana ---------- */
.learn-btn { position: relative; }
.badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 1px; right: 1px; }
.learn { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(520px, calc(100% - 20px)); max-height: 52vh; overflow: auto; padding: 14px 16px 14px; z-index: 4; animation: up .3s;
  background: linear-gradient(180deg, #fffdf5, #fbf4df); border: 1px solid #ecdcae; border-radius: 16px; box-shadow: var(--shadow); }
.lr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.lr-tag { font-size: 12px; font-weight: 700; color: #8a5a00; background: #ffeeb8; padding: 3px 9px; border-radius: 999px; }
.lr-x { border: 0; background: transparent; font-size: 16px; width: 32px; height: 32px; border-radius: 50%; color: var(--ink-2); }
.lr-x:hover { background: rgba(0,0,0,.06); }
.learn h2 { margin: 4px 0 2px; font-size: 22px; }
.lr-fact { font-size: 15px; line-height: 1.45; margin: 8px 0 6px; }
.lr-q { font-size: 17px; line-height: 1.45; margin: 10px 0 6px; font-style: italic; }
.lr-q.plain { font-style: normal; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.lr-q small { font-size: 13px; font-weight: 500; color: #c2410c; }
.lr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.lr-opt { min-height: 46px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid #e6d6a8; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .1s, background .2s; }
.lr-opt:hover:not(:disabled) { background: #fff6dc; }
.lr-opt:active:not(:disabled) { transform: scale(.97); }
.lr-opt:disabled { cursor: default; }
.lr-opt.bad { background: #f6dddd; border-color: #e3a3a5; color: #9b1c22; text-decoration: line-through; opacity: .8; }
.lr-opt.ok { background: #dff3e2; border-color: #2a9d3c; color: #1d6b2a; animation: pop .3s; }
.lr-opt.show { background: #ffe9cf; border-color: #e67700; color: #8a4500; }
.lr-msg { font-size: 14px; color: var(--ink-2); margin: 4px 0 2px; min-height: 20px; }
.lr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--ink-2); margin: 6px 0 2px; }
.lr-meta .link { font-size: 13px; }
.lr-btns { display: flex; gap: 8px; margin-top: 10px; }
.lr-btns .grow { flex: 1; }
.lr-btns .btn:disabled { opacity: .4; }
.lr-place { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lr-pop { font-weight: 700; font-size: 15px; color: #c2410c; white-space: nowrap; }
.lr-bar { height: 6px; border-radius: 3px; background: #efe4c4; overflow: hidden; margin: 4px 0 2px; }
.lr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f0a35e, #c2410c); border-radius: 3px; transition: width .5s; }
.lr-src { font-size: 12px; color: var(--teal); }
.lr-hint { display: block; text-align: center; color: var(--ink-2); font-size: 11px; margin-top: 6px; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0; max-height: 50vh; overflow: auto; }
.stamp { border: 2px dashed #c2410c; border-radius: 12px; padding: 10px; text-align: center; color: #8a2c08; background: #fff7ec; transform: rotate(-1.5deg); display: flex; flex-direction: column; gap: 3px; }
.stamp:nth-child(even) { transform: rotate(1.5deg); }
.stamp b { font-size: 14px; }
.stamp small { font-size: 11px; opacity: .8; }
.stamp i { font-style: normal; font-size: 11px; margin-left: 6px; opacity: .8; }
.stamp.big { margin: 10px auto; max-width: 260px; padding: 14px; animation: stampIn .5s cubic-bezier(.2,1.6,.4,1); }
.stamp.big b { font-size: 18px; }
@keyframes stampIn { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } to { transform: rotate(-1.5deg); opacity: 1; } }

@media (max-width: 760px) {
  .learn { bottom: 8px; padding: 12px; max-height: 58vh; }
  .learn h2 { font-size: 19px; }
  .lr-fact { font-size: 14px; }
  .sheet { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 55%; }
  .topbar { top: 8px; left: 8px; right: 8px; flex-wrap: wrap; align-items: center; row-gap: 8px; }
  /* uski zaslon: 1. red GeoKviz + ime, 2. red sve ikone (inače ikone i "Odjava" izlaze iz ekrana) */
  .top-right { display: contents; }
  .me-pill { margin-left: auto; min-width: 0; }
  .icon-row { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .quizbar { top: 6px; width: calc(100% - 12px); gap: 6px; padding: 5px; border-radius: 12px; }
  .qtitle, .qstat span, .qbtn .txt { display: none; }
  .qbtn { height: 38px; min-width: 38px; padding: 0 10px; }
  #answer { height: 38px; padding: 0 10px; }
  .qstat { min-width: 0; padding: 0 2px; }
  .qstat b { font-size: 14px; }
  .players { top: 56px; left: 6px; right: 6px; width: auto; padding: 6px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
  .players h3 { margin: 0; font-size: 12px; gap: 6px; }
  .players h3 code { font-size: 14px; }
  .players .prow { padding: 2px 0; font-size: 13px; }
  .players .lobby-info, .players .btn { flex-basis: 100%; }
  .maplibregl-ctrl-bottom-right { display: none; }
  .chat { left: 6px; right: 6px; bottom: 6px; width: auto; height: 46%; }
  .countdown { font-size: 100px; }
}
