/* ZooBits – brettspill-stil: himmel, blekk og klistremerker. Trekanten er merket vårt. */
:root{
  --ink:#22205a; --ink2:#4a4785; --sky:#d9eeff; --sky2:#bfe0ff; --paper:#fff;
  --sun:#ffc93c; --sun-d:#e0a400; --grape:#6c4df6; --grape-d:#4b2fd0;
  --ok:#14a86a; --bad:#e5484d; --muted:#6b6a96;
  --c0:#f0466e; --c1:#1e88e5; --c2:#ffb000; --c3:#10a870;
  --blue:#2563eb; --red:#dc2626;
  --line:3px solid var(--ink); --lift:0 4px 0 var(--ink); --lift-s:0 3px 0 var(--ink);
  --head:"Baloo 2",system-ui,sans-serif; --body:"Nunito",system-ui,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;font-family:var(--body);color:var(--ink)}
body{background-color:var(--sky);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M20 30l10-17 10 17z' fill='%2322205a' opacity='.06'/%3E%3Cpath d='M78 92l12-21 12 21z' fill='%2322205a' opacity='.05'/%3E%3C/svg%3E");min-height:100vh}
button{font:inherit;cursor:pointer;border:0;color:inherit}
input,textarea,select{font:inherit;color:var(--ink)}
:focus-visible{outline:3px solid var(--grape);outline-offset:3px}
.screen{display:none;min-height:100vh;padding:24px}
.screen.active{display:flex;flex-direction:column}
.center{align-items:center;justify-content:center;text-align:center}
h1,h2,h3,.big,.result,.btn{font-family:var(--head)}
.logo{font-family:var(--head);font-weight:800;font-size:clamp(48px,10vw,92px);letter-spacing:-1px;color:var(--ink);margin:0 0 4px;line-height:1;display:inline-flex;align-items:center;gap:.18em}
.logo::before{content:"";width:.66em;height:.6em;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 60'%3E%3Cpath d='M33 5L62 55H4z' fill='%23ffc93c' stroke='%2322205a' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.logo span{color:inherit}
.tagline{color:var(--ink2);margin:6px 0 26px;font-size:19px;font-weight:700}
.card{background:var(--paper);border:var(--line);border-radius:20px;padding:24px;box-shadow:0 6px 0 var(--ink);width:100%;max-width:460px}
.card.wide{max-width:980px}
.field{width:100%;font-size:26px;padding:14px 18px;border-radius:14px;border:var(--line);text-align:center;font-weight:800;outline:none;margin-bottom:14px;background:#f6f9ff}
.field:focus{background:#fff;box-shadow:0 0 0 4px var(--sky2)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 22px;border-radius:14px;font-weight:800;font-size:21px;background:var(--grape);color:#fff;border:var(--line);box-shadow:var(--lift);transition:transform .06s,box-shadow .06s;line-height:1.1}
.btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}
.btn.full{width:100%}
.btn.ghost{background:#fff;color:var(--ink)}
.btn.yellow{background:var(--sun);color:var(--ink)}
.btn.red{background:var(--bad)}
.btn.small{padding:7px 13px;font-size:16px;border-radius:11px;box-shadow:var(--lift-s)}
.btn:disabled{opacity:.45;cursor:default;transform:none}
.err{color:var(--bad);font-weight:800;min-height:24px;margin:6px 0 0}
.white{color:var(--ink)}
.muted{color:var(--muted)}
.big{font-size:clamp(30px,5vw,52px);font-weight:800;color:var(--ink);margin:6px 0;line-height:1.1}
.pill{display:inline-block;background:#fff;border:var(--line);color:var(--ink);border-radius:999px;padding:6px 18px;font-weight:800;font-size:20px;margin:6px;box-shadow:var(--lift-s)}
.spinner{width:52px;height:52px;border-radius:50%;border:6px solid var(--sky2);border-top-color:var(--ink);animation:spin 1s linear infinite;margin:20px auto}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pop{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===== Svaralternativer (Lynquiz) ===== */
.answers{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%;flex:1}
.ans{border-radius:18px;color:#fff;font-weight:800;font-size:clamp(19px,3vw,30px);padding:16px 20px;display:flex;align-items:center;gap:14px;text-align:left;min-height:110px;border:var(--line);box-shadow:0 5px 0 var(--ink);font-family:var(--head);line-height:1.15}
.ans .shape{font-size:1.3em;line-height:1;flex:none;width:1.6em;height:1.6em;border-radius:50%;background:rgba(255,255,255,.25);display:grid;place-items:center}
.ans:active{transform:translateY(4px);box-shadow:0 1px 0 var(--ink)}
.c0{background:var(--c0)}.c1{background:var(--c1)}.c2{background:var(--c2);color:var(--ink)}.c3{background:var(--c3)}
.ans.dim{opacity:.3}
.ans.right{outline:5px solid var(--sun);outline-offset:3px}
.qbox{background:#fff;border:var(--line);border-radius:20px;padding:18px 22px;font-size:clamp(22px,3.4vw,34px);font-weight:800;text-align:center;margin-bottom:16px;box-shadow:0 6px 0 var(--ink);font-family:var(--head)}
.timerbar{height:14px;background:#fff;border:var(--line);border-radius:99px;overflow:hidden;margin-bottom:14px}
.timerbar > i{display:block;height:100%;background:var(--sun);width:100%;transition:width .2s linear}
.result{font-size:clamp(38px,8vw,72px);font-weight:800;color:#fff;margin:0;line-height:1}
.resultbox{border-radius:24px;padding:32px 28px;width:100%;max-width:520px;border:var(--line);box-shadow:0 6px 0 var(--ink);color:#fff}
.resultbox .white{color:#fff}
.resultbox.ok{background:var(--ok)}.resultbox.bad{background:var(--bad)}.resultbox.none{background:var(--muted)}

/* ===== Lærer: oversikt og bygger ===== */
#s-edit{max-width:1180px;width:100%;margin:0 auto}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px;flex-wrap:wrap}
.topbar .logo{font-size:44px;margin:0}
.dashhead{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:4px 0 14px;flex-wrap:wrap}
.dashhead h2{font-size:30px;margin:0;line-height:1}
.dashhead p{margin:4px 0 0;color:var(--ink2);font-weight:700}
.setlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.setcard{background:#fff;border:var(--line);border-radius:20px;padding:18px 18px 16px;display:flex;flex-direction:column;gap:6px;box-shadow:0 5px 0 var(--ink);position:relative;overflow:hidden}
.setcard::after{content:"";position:absolute;right:-14px;top:-10px;width:70px;height:62px;background:var(--tc,var(--sun));clip-path:polygon(50% 0,100% 100%,0 100%);opacity:.9}
.setcard h3{margin:0;font-size:23px;line-height:1.15;padding-right:44px}
.setcard .meta{color:var(--muted);font-weight:700;font-size:15px}
.setcard .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.setcard .row .btn:first-child{flex:1}
.linkbtn{background:none;font-weight:800;color:var(--ink2);padding:6px 8px;border-radius:8px;font-size:15px;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px}
.linkbtn:hover{background:var(--sky)}
.linkbtn.danger{color:var(--bad)}
.emptybox{background:#fff;border:3px dashed var(--ink2);border-radius:20px;padding:34px;text-align:center;font-size:19px;font-weight:700}
.qcard{border:var(--line);border-radius:18px;padding:16px;margin-bottom:16px;background:#f6f9ff;box-shadow:var(--lift-s)}
.qcard .qhead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.qcard .qhead b{font-family:var(--head);font-size:20px}
.qcard textarea{width:100%;font-size:19px;padding:10px 12px;border-radius:12px;border:var(--line);resize:vertical;min-height:56px;font-weight:700;background:#fff}
.altgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.alt{display:flex;align-items:center;gap:8px;border-radius:14px;padding:6px 8px;border:var(--line)}
.alt input[type=text]{flex:1;min-width:0;border:0;border-radius:9px;padding:10px;font-size:16px;font-weight:700}
.alt input[type=radio]{width:26px;height:26px;accent-color:var(--ink)}
.alt .shape{color:#fff;font-size:20px;width:26px;text-align:center}
.alt.c2 .shape{color:var(--ink)}
.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.input{font-size:18px;padding:11px 14px;border-radius:12px;border:var(--line);width:100%;background:#fff}
label.lbl{font-weight:800;font-size:15px;color:var(--ink2);display:block;margin:12px 0 6px}
.modal{position:fixed;inset:0;background:rgba(34,32,90,.55);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}
.modal.open{display:flex}
.modal .card{max-width:620px;max-height:92vh;overflow:auto}
.modes{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:8px 0 6px}
.mode{border:var(--line);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:6px;cursor:pointer;background:#fff;text-align:left;width:100%;box-shadow:var(--lift-s);position:relative}
.mode.sel{background:var(--sun)}
.mode.sel::after{content:"✓";position:absolute;right:10px;top:8px;font-weight:900;font-size:20px}
.mode.soon{opacity:.45;cursor:default;box-shadow:none;border-style:dashed}
.mode .ico{font-size:34px;line-height:1}
.mode b{display:block;font-size:20px;font-family:var(--head)}
.mode .muted{font-size:14px;color:var(--ink2);line-height:1.3}
.opts{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:12px 0 16px;font-weight:800}

/* ===== Vertsskjerm (storskjerm, mørk for projektor) ===== */
.screen.host{background:var(--ink);color:#fff;padding:22px}
.host .btn.ghost{background:#fff;color:var(--ink)}
.joinbar{display:flex;gap:26px;align-items:center;justify-content:center;flex-wrap:wrap;background:#2f2c74;border-radius:24px;padding:18px 28px;margin-bottom:18px;border:3px solid #4a4785}
.joinbar .code{font-family:var(--head);font-size:clamp(52px,7vw,92px);font-weight:800;letter-spacing:6px;color:var(--sun);line-height:1}
.qr{background:#fff;padding:12px;border-radius:16px}
.names{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-content:flex-start;flex:1;padding:10px}
.name{background:#fff;color:var(--ink);font-weight:800;font-size:22px;padding:8px 18px;border-radius:999px;animation:pop .3s ease;cursor:pointer;border:var(--line)}
.name.off{opacity:.45}
.name:hover{background:#ffe1e1}
.hostq{font-family:var(--head);font-size:clamp(30px,4.5vw,54px);font-weight:800;text-align:center;background:#fff;color:var(--ink);border-radius:24px;padding:20px 28px;margin:0 0 18px;line-height:1.15}
.hostmid{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.count{width:120px;height:120px;border-radius:50%;background:var(--grape);border:4px solid #fff;display:flex;align-items:center;justify-content:center;font-size:52px;font-weight:800;font-family:var(--head)}
.answered{font-size:24px;font-weight:800;text-align:center}
.bars{display:flex;gap:18px;align-items:flex-end;justify-content:center;height:220px;flex:1}
.bar{width:90px;border-radius:12px 12px 0 0;display:flex;align-items:flex-start;justify-content:center;color:#fff;font-weight:900;font-size:26px;padding-top:6px;min-height:40px;transition:height .5s}
.board{max-width:760px;width:100%;margin:0 auto}
.brow{display:flex;justify-content:space-between;align-items:center;background:#fff;color:var(--ink);border-radius:14px;padding:12px 20px;margin-bottom:10px;font-size:26px;font-weight:800;animation:pop .3s ease;font-family:var(--head)}
.brow:first-child{background:var(--sun)}
.podium{display:flex;align-items:flex-end;justify-content:center;gap:16px;margin:20px 0}
.pod{width:180px;border-radius:16px 16px 0 0;color:var(--ink);text-align:center;padding:14px 8px;font-weight:900}
.pod .pn{font-size:24px;word-break:break-word}.pod .ps{font-size:18px;opacity:.9}.pod .pp{font-size:56px;font-family:var(--head)}
.hostbtns{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:auto;padding-top:16px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 20px;border-radius:12px;font-weight:800;z-index:99;opacity:0;transition:opacity .3s;pointer-events:none}
.toast.on{opacity:1}

/* ===== Dyr ===== */
.animalgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:12px;width:100%;max-width:780px}
.animalbtn{background:#fff;border:var(--line);border-radius:18px;padding:10px 6px 8px;display:flex;flex-direction:column;align-items:center;gap:2px;font-weight:800;font-size:17px;box-shadow:var(--lift-s)}
.animalbtn:hover{background:var(--sun)}
.animalbtn:active{transform:translateY(3px);box-shadow:none}
.animalbtn:disabled{opacity:.5}
.teampill{background:#fff}
.teampill.b{background:var(--blue);color:#fff}.teampill.r{background:var(--red);color:#fff}
.teampill.small{display:inline-block;font-size:13px;font-weight:800;padding:1px 10px;border-radius:99px;border:2px solid var(--ink)}
.stat{display:flex;justify-content:space-between;font-size:20px;padding:9px 0;border-bottom:2px solid var(--sky)}
.stat:last-child{border:0}

/* ===== Borgkrigen – elev ===== */
.borg{padding:12px 14px 0;gap:10px;--team:var(--grape);--enemy:var(--muted)}
.borg[data-team="b"]{--team:var(--blue);--enemy:var(--red)}
.borg[data-team="r"]{--team:var(--red);--enemy:var(--blue)}
.bbar{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:stretch}
.bme,.bgold,.btime{background:#fff;border:var(--line);border-radius:16px;box-shadow:var(--lift-s);padding:6px 12px;display:flex;align-items:center;gap:10px}
.bme{border-left:12px solid var(--team)}
.bme b{font-family:var(--head);font-size:21px;line-height:1;display:block}
.bme small{font-weight:800;color:var(--team);font-size:14px}
.bgold{flex-direction:column;align-items:flex-end;justify-content:center;gap:0;padding:4px 16px;background:var(--sun)}
.bgold b{font-family:var(--head);font-size:clamp(28px,4.5vw,38px);line-height:1}
.bgold small{font-weight:800;font-size:13px}
.btime{flex-direction:column;justify-content:center;gap:0;padding:4px 14px}
.btime small{font-weight:800;font-size:12px;color:var(--muted)}
.btime b{font-family:var(--head);font-size:26px;line-height:1}
.btime.hurry{background:var(--bad);color:#fff}.btime.hurry small{color:#fff}
.bcastles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cst{background:#fff;border:var(--line);border-radius:14px;padding:6px 12px 8px;font-weight:800;font-size:14px}
.cst .top{display:flex;justify-content:space-between;gap:6px}
.cst .top small{color:var(--muted)}
.hpbar{position:relative;height:14px;background:#e8ecf7;border:2px solid var(--ink);border-radius:99px;overflow:hidden;margin-top:4px}
.hpbar.big{height:22px}
.hpbar i{position:absolute;left:0;top:0;bottom:0;transition:width .4s}
.hpbar u{position:absolute;left:0;bottom:0;height:40%;background:#a8a29e;transition:width .4s}
.cst.mine i{background:var(--team)}.cst.theirs i{background:var(--enemy)}
.hb{background:#3b82f6}.hr{background:#ef4444}
.bmain{flex:1;display:flex;flex-direction:column;min-height:0}
.bpane{display:flex;flex-direction:column;flex:1;position:relative;gap:12px}
.bpane[hidden]{display:none}
.qcard2{background:#fff;border:var(--line);border-radius:20px;box-shadow:0 5px 0 var(--ink);padding:14px 20px 18px;text-align:center}
.qmeta{display:flex;justify-content:space-between;font-weight:800;color:var(--muted);font-size:15px;margin-bottom:6px}
.qmeta .streak{color:#ea580c}
.qtext{font-family:var(--head);font-size:clamp(24px,4vw,40px);font-weight:800;line-height:1.15}
.agrid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px;flex:1;max-height:440px;min-height:220px}
.agrid .ans{min-height:92px;height:100%}
.agrid .ans:disabled{cursor:default}
.bfb{position:absolute;inset:0;display:none;align-items:center;justify-content:center;z-index:3}
.bfb.on{display:flex}
.fbcard{background:#fff;border:var(--line);border-radius:24px;box-shadow:0 6px 0 var(--ink);padding:22px 34px;text-align:center;animation:pop .22s ease;min-width:300px}
.fbcard .ico{width:76px;height:76px;border-radius:50%;margin:0 auto 6px;display:grid;place-items:center;font-size:44px;color:#fff;border:var(--line)}
.bfb.ok .ico{background:var(--ok)}.bfb.bad .ico{background:var(--bad)}
.fbcard h3{font-size:40px;margin:0;line-height:1}
.fbcard p{margin:8px 0 0;font-size:20px;font-weight:800}
.btabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px 0 14px;position:sticky;bottom:0;background:linear-gradient(transparent,var(--sky) 30%)}
.btab{background:#fff;border:var(--line);border-radius:14px;font-family:var(--head);font-weight:800;font-size:19px;padding:10px 6px;box-shadow:var(--lift-s);position:relative}
.btab.on{background:var(--ink);color:#fff}
.btab .dot{position:absolute;top:-7px;right:-5px;background:var(--sun);border:2px solid var(--ink);border-radius:99px;font-size:12px;padding:0 7px;color:var(--ink)}
.rolepick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rolebtn{background:#fff;border:var(--line);border-radius:16px;font-family:var(--head);font-weight:800;font-size:22px;padding:10px 14px;display:flex;flex-direction:column;gap:0;box-shadow:var(--lift-s);text-align:left}
.rolebtn small{font-family:var(--body);font-size:14px;font-weight:700;color:var(--muted)}
.rolebtn.on{background:var(--team);color:#fff}.rolebtn.on small{color:#fff}
.shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.shopitem{background:#fff;border:var(--line);border-radius:16px;padding:12px 14px;display:flex;align-items:center;gap:12px;text-align:left;box-shadow:var(--lift-s)}
.shopitem:active{transform:translateY(3px);box-shadow:none}
.shopitem:disabled{opacity:.45}
.shopitem.up{background:#fff6d6}
.sico{font-size:34px}
.sname{flex:1;font-family:var(--head);font-weight:800;font-size:20px;line-height:1.1}
.sname small{display:block;font-family:var(--body);font-weight:700;font-size:14px;color:var(--muted);margin-top:2px}
.spris{font-weight:900;font-size:17px;white-space:nowrap;background:var(--sun);border:2px solid var(--ink);border-radius:99px;padding:2px 10px}
.shoplbl{font-family:var(--head);font-size:20px;margin:4px 0 -4px;grid-column:1/-1}
.coopcard{background:#fff;border:var(--line);border-radius:22px;box-shadow:0 5px 0 var(--ink);padding:18px 20px;display:grid;grid-template-columns:auto 1fr;gap:6px 16px;align-items:center}
.coopcard .big2{font-size:60px;grid-row:span 2}
.coopcard h3{margin:0;font-size:28px;line-height:1}
.coopcard p{margin:0;color:var(--ink2);font-weight:700}
.coopcard .prog{grid-column:1/-1;margin-top:8px}
.coopcard .prog .hpbar{height:22px}
.coopcard .prog .hpbar i{background:var(--team)}
.coopcard .prog b{font-family:var(--head);font-size:19px}
.coopcard .act{grid-column:1/-1;display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:8px}
.coopcard.done{background:#eafff3}
.coopnote{background:#fff;border:2px dashed var(--ink2);border-radius:14px;padding:10px 14px;font-weight:700}
.btoast{position:fixed;left:50%;bottom:86px;transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;padding:12px 20px;border-radius:14px;font-weight:800;font-size:18px;opacity:0;transition:.25s;pointer-events:none;z-index:9;text-align:center;max-width:90vw;border:3px solid #fff}
.btoast.on{opacity:1;transform:translateX(-50%)}
.btoast.bad{background:var(--bad)}

/* ===== Borgkrigen – lærer ===== */
.teamcols{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;flex:1;min-height:260px}
.teamcol{border-radius:20px;padding:12px;background:#2f2c74;border:3px dashed transparent;display:flex;flex-direction:column}
.teamcol.b{background:#1e3a8a}.teamcol.r{background:#7f1d1d}
.teamcol.over{border-color:#fff}
.teamcol h3{margin:0 0 8px;font-size:24px;text-align:center}
.tchips{display:flex;flex-wrap:wrap;gap:8px;align-content:flex-start;justify-content:center}
.tchip{display:flex;align-items:center;gap:6px;background:#fff;color:var(--ink);border-radius:99px;padding:3px 8px 3px 4px;font-weight:800;font-size:17px;cursor:grab;animation:pop .3s ease;user-select:none}
.tchip.off{opacity:.45}
.tchip .x{color:#999;font-size:13px;padding:2px 4px;cursor:pointer}
.tchip .x:hover{color:var(--bad)}
.teamcol .empty{opacity:.6;text-align:center;width:100%}
.bhost{display:flex;flex-direction:column;flex:1;gap:8px;height:calc(100vh - 44px)}
.bhud{display:grid;grid-template-columns:1fr auto 1fr;gap:20px;align-items:center}
.hudname{font-size:24px;font-weight:800;font-family:var(--head)}
.hudname small{font-size:16px;opacity:.85}
.hudteam.r{text-align:right}
.hudteam.r .hpbar{transform:scaleX(-1)}
.hudnum{font-weight:800;opacity:.85;font-size:15px;margin-top:2px}
.hudcoop{font-weight:800;font-size:15px;color:var(--sun)}
.bhud .hpbar{border-color:#fff;background:rgba(255,255,255,.15)}
.hudtime{font-family:var(--head);font-size:50px;font-weight:800;background:#2f2c74;border-radius:18px;padding:2px 22px;min-width:150px;text-align:center;border:3px solid #4a4785}
.hudtime.hurry{background:var(--bad);animation:pop .5s ease infinite alternate}
.bstage{flex:1;position:relative;display:flex;align-items:center;justify-content:center;min-height:0}
.bstage canvas{border-radius:18px;border:3px solid #4a4785}
.bend{position:absolute;inset:0;display:none;align-items:center;justify-content:center}
.endcard{background:#fff;color:var(--ink);border-radius:24px;padding:24px 30px;text-align:center;border:var(--line);box-shadow:0 8px 0 var(--ink);max-width:900px;animation:pop .4s ease}
.endcard h2{font-size:52px;margin:0 0 14px;line-height:1}
.endcols{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;text-align:left;margin-bottom:18px}
.endcols h3{margin:0 0 6px}
.erow{display:flex;align-items:center;gap:6px;font-weight:700;font-size:17px;margin:4px 0}
.erow span{flex:1}
.bfoot{display:flex;justify-content:space-between;align-items:center;gap:12px}
.bfoot .inline{flex-wrap:nowrap;flex:none}
.feed{display:flex;gap:8px;flex-wrap:wrap;min-height:34px;max-height:76px;overflow:hidden;flex:1}
.fi{background:rgba(255,255,255,.15);border-radius:99px;padding:5px 12px;font-weight:700;font-size:15px;animation:pop .3s ease}
.fi.b{background:#1d4ed8}.fi.r{background:#b91c1c}

@media (max-width:700px){
  .answers,.agrid{grid-template-columns:1fr}.altgrid{grid-template-columns:1fr}.ans{min-height:76px}
  .rolepick,.bcastles{grid-template-columns:1fr}
  .bbar{grid-template-columns:1fr auto}.btime{grid-column:2}
  .btab{font-size:16px}
}

/* ===== Lærerside: velkomst, dyreparade og maskoter ===== */
.dash{padding-bottom:150px}
.userchip{font-weight:800;background:#fff;border:var(--line);border-radius:99px;padding:5px 14px 5px 6px;display:inline-flex;align-items:center;gap:8px;box-shadow:var(--lift-s)}
.userchip img{width:28px;height:28px;border-radius:50%;border:2px solid var(--ink)}
.hero{display:grid;grid-template-columns:minmax(300px,1fr) 1.15fr;background:#fff;border:var(--line);border-radius:26px;box-shadow:0 6px 0 var(--ink);overflow:hidden;margin-bottom:26px;min-height:250px}
.hero-text{padding:26px 28px;display:flex;flex-direction:column;justify-content:center;gap:4px}
.hero-text h2{font-size:clamp(34px,4vw,48px);margin:0;line-height:1}
.hero-text p{margin:0 0 14px;font-size:19px;font-weight:700;color:var(--ink2)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.hero-stats{display:flex;gap:18px;margin-top:16px;font-weight:700;color:var(--ink2)}
.hero-stats b{font-family:var(--head);font-size:26px;color:var(--ink);margin-right:4px}
.hero-art{position:relative;border-left:var(--line);background:linear-gradient(#8fd0ff,#cdeaff 62%);overflow:hidden;min-height:250px}
.hero-art .scene{position:absolute;inset:0;width:100%;height:100%}
.hero-art .crit{position:absolute;bottom:14px;transform-origin:50% 100%;animation:bob 2.4s ease-in-out infinite alternate}
.hero-art .crit svg{display:block}
@keyframes bob{from{transform:translateY(0)}to{transform:translateY(-6px)}}
.dashhead{align-items:center}
.dashhead .search{max-width:300px}
.setcard{padding-top:22px;overflow:visible}
.setcard::after{display:none}
.setcard .mascot{position:absolute;right:10px;top:-34px;filter:drop-shadow(0 3px 0 rgba(34,32,90,.25))}
.setcard .band{position:absolute;left:0;right:0;top:0;height:10px;background:var(--tc,var(--sun));border-radius:17px 17px 0 0;border-bottom:3px solid var(--ink)}
.setcard h3{padding-right:70px;margin-top:4px}
.setlist{padding-top:30px;row-gap:46px}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{background:var(--sky);border-radius:99px;padding:2px 10px;font-weight:800;font-size:14px;color:var(--ink2)}
.parade{position:fixed;left:0;right:0;bottom:0;height:120px;pointer-events:none;z-index:0;display:none}
body:has(#s-dash.active) .parade{display:block}
.parade .hill{position:absolute;inset:auto 0 0 0;height:64px;width:100%}
.parade .crit{position:absolute;bottom:22px;animation:bob 2.6s ease-in-out infinite alternate}
.screen{position:relative;z-index:1}


/* AI-dialog */
.aicard{max-width:760px}
.aihead{display:flex;justify-content:space-between;align-items:center;gap:12px}
.aigrid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.aiload{position:absolute;inset:0;background:rgba(255,255,255,.96);border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;font-weight:800;font-size:18px;padding:20px}
.aiload[hidden]{display:none}
.aiload .row{display:flex;gap:10px}
.aiload .row span{animation:bob .5s ease-in-out infinite alternate}
.aicard{position:relative}
@media (max-width:820px){.hero{grid-template-columns:1fr}.hero-art{border-left:0;border-top:var(--line)}.aigrid{grid-template-columns:1fr 1fr}}

/* ZooBits-logo */
.brand{margin:0 0 4px;line-height:0}
.brand img{width:min(520px,86vw);height:auto;display:block}
.brand.small img{width:210px}
#s-join .brand img{width:min(480px,82vw)}

/* Innlogging med illustrasjon */
.loginhero{padding:16px;background:radial-gradient(120% 90% at 50% 0%,#9a5cf6 0%,#7b45ee 55%,#5a2fd0 100%);align-items:center;justify-content:center;gap:10px}
.loginart{position:relative;width:min(96vw,calc((100vh - 70px) * 1672 / 941),1300px);aspect-ratio:1672/941;border-radius:28px;overflow:hidden;box-shadow:0 10px 0 rgba(34,32,90,.55)}
.loginart img{width:100%;height:100%;display:block}
.loginhit{position:absolute;left:29.6%;top:66.4%;width:40.8%;height:12.8%;border-radius:999px;background:transparent;transition:transform .08s,box-shadow .15s;cursor:pointer}
.loginhit:hover{box-shadow:0 0 0 4px rgba(255,255,255,.85),0 0 24px 6px rgba(255,214,90,.7)}
.loginhit:active{transform:translateY(2px)}
.loginhit:focus-visible{outline:4px solid #ffc93c;outline-offset:4px}
.loginerr{background:#fff;border-radius:12px;padding:6px 14px;min-height:0}
.loginerr:empty{display:none}

/* ===== Lærerside (mockup: banner, sidemeny, kort) ===== */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
body:has(#s-dash.active),body:has(#s-edit.active){background:linear-gradient(180deg,#d6c8fc 0%,#e7e0fd 60%,#efeafe 100%)}
.tdash{padding:0;min-height:100vh;position:relative;--sw:16.45vw}
.tbanner{position:relative;line-height:0}
.tbanner-art{width:100%;height:auto;display:block}
.tnav{position:absolute;top:1%;right:1.1%;display:flex;gap:.9vw;align-items:center;line-height:1.2}
.tpill{display:inline-flex;align-items:center;gap:.55em;background:rgba(58,28,140,.72);color:#fff;font-family:var(--head);font-weight:700;font-size:clamp(13px,1.15vw,19px);padding:.45em 1.1em .45em .5em;border-radius:999px;border:2px solid rgba(255,255,255,.12)}
.tpill:hover{background:rgba(58,28,140,.9)}
.tpill .ico{width:1.55em;height:1.55em;border-radius:50%;border:2px solid #fff;display:grid;place-items:center;font-size:.85em}
.tuser{position:relative}
.tuserbtn .av{width:2em;height:2em;border-radius:50%;border:3px solid #fff;background:#7b55e6;display:grid;place-items:center;overflow:hidden;font-size:.9em}
.tuserbtn .av img{width:100%;height:100%;object-fit:cover}
.tuserbtn .chev{opacity:.85}
.tmenu{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(40,20,110,.25);padding:6px;min-width:170px;z-index:30;line-height:1.2}
.tmenu[hidden]{display:none}
.tmenu button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:10px;font-weight:800;color:var(--ink);background:none}
.tmenu button:hover{background:#f1ecff}
.tmenu button.danger{color:var(--bad)}
.rowmenu{position:absolute;right:auto}
.twelcome{position:absolute;left:19.6%;top:58%;color:#fff;line-height:1.15}
.twelcome h2{margin:0;font-size:clamp(22px,2.45vw,44px);text-shadow:0 3px 0 rgba(40,20,110,.35)}
.twelcome p{margin:.35em 0 0;font-weight:700;font-size:clamp(12px,1.2vw,20px);opacity:.95}
.tside{position:absolute;left:0;top:9.87vw;width:var(--sw);bottom:0;background:linear-gradient(180deg,#352a80 0%,#2c2170 60%,#2a1f66 100%);border-radius:0 22px 0 0;padding:2.6vw .6vw 20px;display:flex;flex-direction:column;gap:.5vw;z-index:2}
.tsi{display:flex;align-items:center;gap:.8em;color:#fff;background:none;font-family:var(--head);font-weight:700;font-size:clamp(14px,1.35vw,22px);padding:.55em .8em;border-radius:16px;text-align:left}
.tsi .i{width:1.6em;text-align:center;font-size:1.05em}
.tsi:hover{background:rgba(255,255,255,.08)}
.tsi.on{background:linear-gradient(180deg,#a684ff,#8b64f2);box-shadow:0 4px 0 rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.35)}
.tsi small,.qa small{margin-left:auto;font-size:11px;background:rgba(255,255,255,.15);padding:2px 8px;border-radius:99px;font-family:var(--body);font-weight:800}
.tsi.soon{opacity:.65}
.tmain{margin-left:calc(var(--sw) + 1.6vw);padding:.6vw 1.6vw 30px 0;position:relative;z-index:1}
.tview[hidden]{display:none}
.tbig{display:grid;grid-template-columns:1fr 1fr;gap:1.4vw;margin-bottom:1.8vw}
.bigcard{display:flex;align-items:center;gap:1.2vw;text-align:left;border-radius:26px;padding:1.1vw 1.6vw;border:4px solid #fff;box-shadow:0 8px 24px rgba(80,50,170,.18);min-height:13vw;transition:transform .12s}
.bigcard:hover{transform:translateY(-3px)}
.bigcard.create{background:linear-gradient(160deg,#ffe58f 0%,#ffd45a 100%)}
.bigcard.sets{background:linear-gradient(160deg,#f3eeff 0%,#e3d9ff 100%)}
.bigcard img{height:clamp(96px,9.5vw,180px);width:auto;flex:none;border-radius:14px;-webkit-mask-image:radial-gradient(ellipse 52% 52% at 50% 50%,#000 78%,transparent 100%);mask-image:radial-gradient(ellipse 52% 52% at 50% 50%,#000 78%,transparent 100%)}
.bigcard span{flex:1;display:flex;flex-direction:column;gap:.4em;min-width:180px}
.bigcard b{font-family:var(--head);font-size:clamp(22px,2.2vw,38px);line-height:1.05;color:var(--ink)}
.bigcard small{font-size:clamp(14px,1.2vw,19px);font-weight:600;color:#3b3670}
.bigcard i{font-style:normal;flex:none;width:2.6vw;height:2.6vw;min-width:40px;min-height:40px;border-radius:50%;background:#6c3ff0;color:#fff;display:grid;place-items:center;font-size:26px;font-weight:900;box-shadow:0 3px 0 #4b2bb0}
.tlower{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(250px,1fr);gap:1.4vw;align-items:start}
.tpanel{background:#fff;border-radius:24px;padding:18px 20px;box-shadow:0 8px 24px rgba(80,50,170,.14)}
.tphead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.tphead h3{margin:0;font-size:clamp(20px,1.7vw,28px);display:flex;align-items:center;gap:10px}
.tphead.big{margin:4px 0 16px}.tphead.big h2{margin:0;font-size:34px}
.tphead .search{max-width:320px}
.ph{width:1.4em;height:1.4em;display:grid;place-items:center}
.tlink{background:#f4f0ff;color:#4b2bb0;font-weight:800;padding:6px 14px;border-radius:99px}
.setrows{display:flex;flex-direction:column;border:2px solid #efe9fd;border-radius:16px;overflow:hidden}
.setrows:empty{display:none}
.setrow{display:grid;grid-template-columns:54px minmax(150px,1.8fr) minmax(90px,.8fr) minmax(80px,.7fr) minmax(130px,1fr) 46px 40px;align-items:center;gap:12px;padding:10px 12px;border-top:2px solid #f3eefe;cursor:pointer}
.setrow:first-child{border-top:0}
.setrow:hover{background:#faf8ff}
.sicon{width:50px;height:46px;border-radius:12px;display:grid;place-items:center;overflow:hidden;background:#f1ecff}
.sicon img{width:100%;height:100%;object-fit:cover}
.sicon.emo{font-size:26px}
.sicon.ani svg{margin-top:4px}
.stitle{font-family:var(--head);font-weight:800;font-size:clamp(16px,1.35vw,22px);color:var(--ink);line-height:1.1}
.aitag{font-family:var(--body);font-size:12px;background:#fff4c7;border-radius:99px;padding:1px 7px;vertical-align:middle}
.scount,.swhen{color:#4a4580;font-weight:600;font-size:15px;white-space:nowrap}
.subchip{background:#ece5ff;color:#4b2bb0;font-weight:800;font-size:14px;border-radius:10px;padding:4px 12px}
.splay{width:40px;height:40px;border-radius:50%;background:#f1ecff;color:#5b34d6;font-size:16px;box-shadow:0 2px 0 #d9cdfb}
.splay:hover{background:#6c3ff0;color:#fff}
.smore{background:none;color:#4a4580;font-weight:900;letter-spacing:1px;font-size:16px;border-radius:8px;padding:6px}
.smore:hover{background:#f1ecff}
.qactions{display:flex;flex-direction:column;gap:10px}
.qa{display:flex;align-items:center;gap:14px;background:#fff;border:2px solid #e6defd;border-radius:14px;padding:12px 14px;font-family:var(--head);font-weight:800;font-size:clamp(16px,1.3vw,21px);color:var(--ink);box-shadow:0 3px 0 #e6defd;text-align:left}
.qa span{font-size:24px;width:30px;text-align:center}
.qa i{margin-left:auto;font-style:normal;font-size:22px;color:#4b2bb0}
.qa:hover{border-color:#b9a4fb}
.qa.soon{opacity:.6}
.qa.soon small{background:#f1ecff;color:#4b2bb0}
.tstats{display:flex;gap:16px;margin-top:14px;color:#4a4580;font-weight:700}
.tstats b{font-family:var(--head);font-size:24px;color:var(--ink);margin-right:4px}
.titlerow{display:grid;grid-template-columns:1fr 200px;gap:10px}
.helplist{font-size:17px;line-height:1.5;padding-left:22px}
.helplist li{margin-bottom:8px}
@media (max-width:1320px){.setrow{grid-template-columns:50px minmax(120px,1.8fr) minmax(70px,.7fr) minmax(120px,1fr) 44px 38px}.setrow .scount{display:none}}
@media (max-width:1000px){
  .tdash{--sw:0px}
  .tside{position:static;width:auto;flex-direction:row;overflow-x:auto;border-radius:0;padding:8px}
  .tsi{font-size:15px;white-space:nowrap}
  .tmain{margin:0;padding:14px}
  .tbig,.tlower{grid-template-columns:1fr}
  .tnav .tpill{font-size:12px}
  .setrow{grid-template-columns:46px 1fr 40px 36px}.scount,.ssub,.swhen{display:none}
  .titlerow{grid-template-columns:1fr}
}

/* ===== Elevsider (mockup: lilla himmel, gress, store svarknapper) ===== */
body.kid{background:linear-gradient(180deg,#6a34ee 0%,#8d5ff3 32%,#b9a3f7 70%,#d3c6fc 100%) fixed;color:#fff}
.kidbg{position:fixed;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.kidbg .bush{position:absolute;left:0;right:0;bottom:0;width:100%;height:auto;max-height:26vh;object-fit:cover;object-position:top}
.cloud{position:absolute;width:150px;height:46px;background:#fff;border-radius:40px;opacity:.55}
.cloud::before,.cloud::after{content:"";position:absolute;background:#fff;border-radius:50%}
.cloud::before{width:62px;height:62px;left:22px;top:-30px}.cloud::after{width:48px;height:48px;left:72px;top:-20px}
.cloud.c1{top:9%;left:4%}.cloud.c2{top:15%;right:6%;transform:scale(.8)}.cloud.c3{top:42%;left:-40px;transform:scale(.6);opacity:.35}
body.kid .screen{position:relative;z-index:1}
.kid .big,.kid .result{color:#fff;text-shadow:0 3px 0 rgba(40,20,110,.35)}
.kid .tagline{color:#f1ecff}
.kid .tagline a{color:#ffe27a!important}
.kid .card{border-color:#3b1d8f;box-shadow:0 8px 0 #3b1d8f}
.kid .pill{border-color:#3b1d8f}
.kid #s-join .err,.kid .err{color:#ffd1d1}
.kid .card .err{color:var(--bad)}
.kid .animalbtn{border-color:#3b1d8f;box-shadow:0 4px 0 #3b1d8f}
.kid .spinner{border-color:rgba(255,255,255,.3);border-top-color:#fff}
/* spørsmålskort med dyr som kikker over kanten */
.kq{max-width:920px;margin:0 auto;width:100%}
.qwrap{position:relative;margin:66px 0 14px;flex:none}
.peek{position:absolute;top:-66px;z-index:0;line-height:0;width:84px}
.peek.l{left:7%}.peek.r{right:7%}
.peek svg{display:block}
.paw{position:absolute;width:24px;height:16px;border-radius:12px 12px 8px 8px;top:-9px;z-index:3;border:2px solid rgba(0,0,0,.18)}
.paw.l.a{left:calc(7% + 8px)}.paw.l.b{left:calc(7% + 52px)}.paw.r.a{right:calc(7% + 52px)}.paw.r.b{right:calc(7% + 8px)}
.paw[data-ani=rev]{background:#f97316}.paw[data-ani=frosk]{background:#22c55e}
.qcard3{position:relative;z-index:2;background:linear-gradient(180deg,#fff 0%,#f7f3ff 100%);border:4px solid #3b1d8f;border-radius:30px;box-shadow:0 7px 0 #a58cf0,0 12px 24px rgba(40,20,110,.25);padding:20px 24px 22px;text-align:center;color:var(--ink)}
.qchip{display:inline-block;background:#efe8ff;border:2px solid #d9ccff;color:#4b2bb0;font-family:var(--head);font-weight:800;font-size:18px;border-radius:99px;padding:2px 22px;margin-bottom:6px}
.qcard3 .streak{position:absolute;right:18px;top:16px;font-weight:800;color:#ea580c;font-size:15px}
.qcard3 .qtext{font-family:var(--head);font-size:clamp(26px,4.4vw,46px);font-weight:800;line-height:1.12}
.kq .timerbar{border-color:#3b1d8f;margin-bottom:4px}
/* svarknapper: store, blanke stolper */
.kq .answers,.kq .agrid{display:flex;flex-direction:column;gap:12px;flex:none;max-height:none;min-height:0}
.kq .ans{min-height:clamp(64px,9.5vh,96px);height:auto;border-radius:28px;border:3px solid #2a1466;padding:10px 24px 10px 14px;font-size:clamp(24px,3.6vw,38px);color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.18);box-shadow:0 6px 0 rgba(42,20,102,.9),inset 0 3px 0 rgba(255,255,255,.35);position:relative;overflow:hidden;gap:22px}
.kq .ans::after{content:"";position:absolute;left:10px;right:10px;top:6px;height:38%;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,0));pointer-events:none}
.kq .ans:active{transform:translateY(4px);box-shadow:0 2px 0 rgba(42,20,102,.9)}
.kq .ans .shape{width:62px;height:62px;font-size:32px;background:rgba(255,255,255,.28);border-radius:50%}
.kq .c0{background:linear-gradient(180deg,#ff6584 0%,#f43f6a 55%,#dc2a55 100%)}
.kq .c1{background:linear-gradient(180deg,#2aa8ff 0%,#0d84f0 55%,#0a68d0 100%)}
.kq .c2{background:linear-gradient(180deg,#ffd23a 0%,#ffb20f 55%,#f59a00 100%);color:#fff}
.kq .c2 .shape{color:#22205a}
.kq .c3{background:linear-gradient(180deg,#3ad97b 0%,#16b95c 55%,#0f9e4b 100%)}
.kq .ans.dim{opacity:.35}
/* Borgkrigen-hode og status */
.borg{padding:10px 14px 0;gap:8px}
.borg[data-team]{background:none}
.khead{display:flex;justify-content:space-between;align-items:center;gap:10px}
.klogo{height:clamp(54px,8vh,84px);width:auto;filter:drop-shadow(0 3px 0 rgba(40,20,110,.3))}
.kright{display:flex;gap:10px;align-items:center}
.coinpill{display:flex;align-items:center;gap:10px;background:linear-gradient(180deg,#4b23b5,#341785);border:3px solid #ffc93c;border-radius:999px;padding:5px 18px 5px 5px;box-shadow:0 4px 0 rgba(40,20,110,.5);color:#fff}
.coinpill img{width:46px;height:46px}
.coinpill b{font-family:var(--head);font-size:clamp(26px,3.6vw,36px);line-height:1}
.coinpill small{font-weight:800;font-size:12px;opacity:.85;max-width:60px;line-height:1.1}
.ktime{background:rgba(52,23,133,.75);border:3px solid rgba(255,255,255,.35);border-radius:16px;padding:4px 14px;text-align:center;line-height:1}
.ktime small{display:block;font-size:11px;font-weight:800;opacity:.8}
.ktime b{font-family:var(--head);font-size:26px}
.ktime.hurry{background:var(--bad)}
.kstatus{display:grid;grid-template-columns:auto 1fr 1fr;gap:8px;align-items:stretch}
.kme{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.95);color:var(--ink);border:3px solid #3b1d8f;border-radius:16px;padding:2px 12px 2px 4px}
.kme b{font-family:var(--head);font-size:18px;display:block;line-height:1}
.kme small{font-weight:800;font-size:12px;color:var(--team)}
.borg .cst{border-color:#3b1d8f;color:var(--ink);padding:5px 10px 6px}
.borg{height:100vh;height:100dvh;min-height:0;overflow:hidden}
.borg .bmain{flex:1;min-height:0;display:flex;flex-direction:column}
.borg #paneQ{flex:1;min-height:0}
.borg #paneShop,.borg #paneCoop{overflow-y:auto;flex:1;min-height:0;padding-bottom:6px}
.borg .agrid{flex:1;min-height:0}
.borg .agrid .ans{flex:1 1 0;min-height:44px;max-height:96px}
.borg .qwrap{margin-top:62px}
.borg .btabs{position:static;flex:none}
.borg .bfb{inset:-10px -6px}
.btabs{background:none;padding:10px 0 16px;gap:10px}
.btab{display:flex;flex-direction:column;align-items:center;gap:2px;border:3px solid #3b1d8f;border-radius:22px;box-shadow:0 5px 0 #3b1d8f;background:#fff;color:var(--ink);font-size:clamp(15px,2.2vw,21px);padding:8px 6px 10px;line-height:1.05}
.btab .ti{font-size:28px;line-height:1}
.btab.on{background:linear-gradient(180deg,#5a2fd0,#3b1d8f);color:#fff;border-color:#2a1466;box-shadow:0 5px 0 #2a1466}
.btab .dot{top:-10px;right:-8px;width:30px;height:30px;display:grid;place-items:center;font-size:17px;border:3px solid #22205a;padding:0}
.rolebtn,.shopitem,.coopcard,.coopnote{border-color:#3b1d8f}
.borg .shoplbl,.borg .bpane > .muted{color:#fff}
.borg .coopnote{background:rgba(255,255,255,.92);color:var(--ink)}
@media (max-width:700px){.kstatus{grid-template-columns:1fr 1fr}.kme{grid-column:1/-1}.qcard3{padding:12px 14px 14px}.kq .ans .shape{width:48px;height:48px;font-size:24px}}
@media (max-height:760px){.klogo{height:48px}.qcard3 .qtext{font-size:clamp(22px,3.6vw,34px)}.btab .ti{font-size:22px}.btab{padding:5px 6px 7px}}
.kid .rolebtn,.kid .shopitem,.kid .coopcard,.kid .btab:not(.on){color:var(--ink)}
.kid .rolebtn.on{color:#fff}
.kid .shopitem:disabled{opacity:.55;background:#efeaff}
.kid .tagline{color:#fff;text-shadow:0 2px 0 rgba(40,20,110,.45)}
.kid .resultbox{border-color:#3b1d8f;box-shadow:0 8px 0 #3b1d8f}
.kid .stat{color:var(--ink)}

/* ===== Castle Clash storskjerm: ny ramme og topp ===== */
.screen.host{background:radial-gradient(120% 80% at 50% 0%,#3a2a8f 0%,#22195e 60%,#1a1450 100%)}
.bhud{grid-template-columns:1fr auto 1fr;align-items:end}
.hudmid{display:flex;flex-direction:column;align-items:center;gap:2px;position:relative}
.hudlogo{height:62px;width:auto;margin-bottom:-6px;filter:drop-shadow(0 3px 0 rgba(0,0,0,.35));position:relative;z-index:1}
.hudtime{font-size:52px;border:3px solid #8f6cf5;background:linear-gradient(180deg,#3b2a92,#271c6e);box-shadow:0 0 0 3px rgba(143,108,245,.25),0 6px 0 rgba(0,0,0,.3);border-radius:20px;padding:0 26px;position:relative}
.hudtime::before,.hudtime::after{content:"";position:absolute;top:50%;width:34px;height:28px;margin-top:-14px;background:linear-gradient(#ffd23a,#ffd23a) 0 50%/16px 4px no-repeat,linear-gradient(#ffd23a,#ffd23a) 10px 8%/14px 4px no-repeat,linear-gradient(#ffd23a,#ffd23a) 10px 92%/14px 4px no-repeat}
.hudtime::before{left:-44px}.hudtime::after{right:-44px;transform:scaleX(-1)}
.hudname{font-size:30px;display:flex;align-items:center;gap:8px}
.hudteam.r .hudname{justify-content:flex-end}
.bhud .hpbar.big{height:26px;border:3px solid #e9e4ff;background:#1b1450}
.bhud .hpbar i.hb{background:linear-gradient(180deg,#5fd0ff,#1e88f0)}
.bhud .hpbar i.hr{background:linear-gradient(180deg,#ff6b6b,#e11d2e)}
.bhud .hpbar u{background:#cfd4da}
.hudnum{font-size:17px}
.hudcoop{font-size:17px;color:#ffd23a}
.bstage canvas{border-radius:26px;border:4px solid #a78bfa;box-shadow:0 0 0 4px rgba(167,139,250,.25),0 0 30px rgba(167,139,250,.35)}
.fi{font-size:16px;padding:7px 14px;display:inline-flex;align-items:center;gap:8px;border:2px solid rgba(255,255,255,.25)}
.fi.b{background:linear-gradient(180deg,#3b82f6,#1d4ed8)}.fi.r{background:linear-gradient(180deg,#ef4444,#b91c1c)}
.fico{font-size:18px}
.bfoot .btn.ghost.small{font-size:17px;padding:9px 16px}
#bCoop{display:flex;flex-direction:column;gap:14px}
/* svarsiden: alle fire svar skal alltid få plass over fanene */
.borg #paneQ{display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain}
.borg .agrid{gap:clamp(6px,1.4vh,12px);padding-bottom:6px}
.borg .agrid .ans{min-height:40px;padding-top:4px;padding-bottom:4px}
.borg .btabs{padding-bottom:max(12px,env(safe-area-inset-bottom))}
@media (max-height:760px){
  .borg{gap:6px}
  .borg .qwrap{margin:46px 0 10px}
  .borg .peek{top:-46px;width:60px}
  .borg .paw{width:18px;height:12px;top:-7px}
  .borg .paw.l.b{left:calc(7% + 38px)}.borg .paw.r.a{right:calc(7% + 38px)}
  .borg .qcard3{padding:10px 18px 12px}
  .borg .qchip{font-size:14px;margin-bottom:2px}
  .borg .kq .ans .shape,.borg .ans .shape{width:42px;height:42px;font-size:22px}
  .borg .ans{font-size:clamp(20px,3vw,30px)}
  .borg .cst,.borg .kme{padding-top:2px;padding-bottom:3px}
}
@media (max-height:600px){.borg .peek,.borg .paw{display:none}.borg .qwrap{margin-top:4px}}
@media (max-height:760px){.borg .peek svg{width:100%;height:auto}.borg .peek{height:46px;overflow:hidden}}
/* kapteinvalg */
.bvote{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(30,16,70,.55);backdrop-filter:blur(3px)}
.bvote[hidden]{display:none}
.bvote .vcard{background:#fff;border-radius:28px;padding:22px 24px;max-width:760px;width:100%;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 12px 0 rgba(60,30,120,.35);border:4px solid #facc15;color:#2a1b5c}
.bvote .vtop{display:flex;justify-content:space-between;align-items:center;gap:12px}
.bvote h2{margin:0;font-size:clamp(22px,3.4vw,32px)}
.bvote .vtime{background:#7c3aed;color:#fff;font-weight:900;border-radius:999px;padding:6px 14px;font-size:20px;font-variant-numeric:tabular-nums}
.bvote p{margin:8px 0 14px;font-size:17px}
.bvote .vgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px}
.bvote .vbtn{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px;border-radius:18px;border:3px solid #e4defa;background:#f7f4ff;font:inherit;font-weight:800;color:#2a1b5c;cursor:pointer;min-height:44px}
.bvote .vbtn span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bvote .vbtn.on{border-color:#facc15;background:#fef9c3}
.bvote .vbtn i{font-style:normal;font-size:13px;color:#a16207}
.bvote .vbtn:focus-visible{outline:3px solid #7c3aed;outline-offset:2px}
.bvote .vnote{color:#6b5ca8;font-weight:700;margin:14px 0 0}
.setrow .swhen{overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (min-width:1321px){.setrow{grid-template-columns:54px minmax(150px,1.6fr) minmax(90px,.7fr) minmax(80px,.7fr) minmax(170px,1.1fr) 46px 40px}}
/* innlogging med e-post */
.emailbtn{background:#fff;color:#4c2bb0;box-shadow:0 5px 0 rgba(40,15,110,.35);font-size:17px;padding:12px 22px}
.emailbtn:hover{background:#f5f0ff}
.emlinks{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:14px 0 0}
.linkbtn{background:none;border:0;padding:4px 0;font:inherit;font-weight:800;color:#6d3df0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.linkbtn:focus-visible{outline:3px solid #7c3aed;outline-offset:2px;border-radius:4px}
#emailModal .err:empty{display:none}
/* admin: lærere */
.adminstats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
.astat{background:#fff;border-radius:18px;padding:14px 18px;box-shadow:0 4px 0 rgba(90,60,180,.12);display:flex;flex-direction:column}
.astat b{font-size:30px;color:#2a1b5c;line-height:1.1}.astat span{color:#6b5ca8;font-weight:700}
.admrow{display:grid;grid-template-columns:minmax(120px,1.2fr) minmax(160px,1.6fr) 90px 120px 150px 80px;gap:12px;align-items:center;padding:10px 12px;border-top:2px solid #f3eefe;font-weight:600;color:#2a1b5c}
.admrow.head{border-top:0;color:#6b5ca8;font-size:14px;font-weight:800}
.admrow span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admrow .aname{font-weight:800}.admrow a{color:#5b34d6}
@media (max-width:900px){.adminstats{grid-template-columns:repeat(2,1fr)}.admrow{grid-template-columns:1fr 1fr}.admrow span:nth-child(n+3){font-size:13px;color:#6b5ca8}.admrow.head{display:none}}
