/* Hjernet – online-delen (login, profil, lektier) */
.acct-in { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; }
html[data-theme="dark"] .acct-in { background: #1F6FD6; }
.login-box { max-width: 560px; }
.login-form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.login-form label { font-weight: 700; margin-top: 8px; }
.login-form input[type=text], .login-form input[type=email], .login-form input[type=password] { font-size: 1.1rem; padding: 12px 14px; }
.login-form .btn { align-self: flex-start; margin-top: 14px; }
.role-pick { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.role-pick legend { font-weight: 700; padding: 0 6px; }
.role-pick label { font-weight: 600; margin: 0; display: flex; gap: 8px; align-items: baseline; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 16px; }
.profile-grid h2 { margin-top: 0; font-size: 1.2rem; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.announce { background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--ink); border-radius: 12px; padding: 12px 16px; font-weight: 700; margin-bottom: 16px; }
.homework { margin-bottom: 20px; }
.homework h2 { margin-top: 0; }
.hw-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.hw-list li:first-child { border-top: 0; }
.hw-list small { display: block; font-size: .9rem; }

/* ---------- Opstart og besøgende ---------- */
body.booting #main, body.booting #nav, body.booting .foot { visibility: hidden; }
body.booting::after { content: "Henter Hjernet …"; position: fixed; inset: 0; display: grid; place-items: center; font: 700 1.2rem var(--font); color: var(--navy); }
body.guest #nav, body.guest .top .stats > :not(#acctBtn):not(#themeBtn), body.guest .foot a[href="#mig"] { display: none !important; }
.acct-guest { width: auto !important; padding: 0 16px !important; border-radius: 999px !important; background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important; }
html[data-theme="dark"] .acct-guest { background: #1F6FD6 !important; border-color: #1F6FD6 !important; }
.acct-txt { font-weight: 700; white-space: nowrap; }

/* ---------- Forsiden for besøgende ---------- */
.landing { display: flex; flex-direction: column; gap: 24px; }
.land-cta { margin-top: 18px; gap: 10px; }
.land-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 16px; }
.land-cards h2 { margin-top: 0; }
.prose h2 { font-size: 1.2rem; margin: 22px 0 6px; } .prose h2:first-child { margin-top: 0; } .prose p, .prose li { max-width: 72ch; }

/* ---------- Billeder ved spørgsmål ---------- */
.qimg { margin: 10px 0 14px; }
.qimg img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); }
.qimg figcaption { font-size: .78rem; margin-top: 4px; color: var(--ink); opacity: .85; }
.explain { background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }

/* ---------- Kort ---------- */
.hjmap { width: 100%; aspect-ratio: 4 / 3.3; max-height: 70vh; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.hjm-pin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 1rem var(--font); background: #1F6FD6; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; padding: 0; }
.hjm-pin.right { background: #097D5A; } .hjm-pin.wrong { background: #B42E2E; } .hjm-pin.dim { opacity: .55; }
.hjm-pin.guess { background: #B42E2E; width: 22px; height: 22px; } div.hjm-pin { cursor: default; }
.hjm-pin:focus-visible { outline: 3px solid #F2C14E; outline-offset: 2px; }

/* ---------- Resultatskærme og fakta ---------- */
.facts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.fact { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px; align-items: start; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px; }
.fact .qimg { margin: 0; } .fact .qimg img { max-height: 160px; } .fact p { margin: 4px 0 0; }
.fact:not(:has(.qimg)) { grid-template-columns: 1fr; }
@media (max-width: 600px) { .fact { grid-template-columns: 1fr; } }
/* Forsiden for besøgende: ingen brødkrummer, mindre illustration */
/* brødkrummer vises også for gæster (fx Log ind og delte kort) – forsiden for gæster har ingen */

/* =====================================================
   Den røde tråd: Lær · Spil · Mig
   ===================================================== */
.learn-today { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-color: var(--blue) !important; background: var(--blue-soft); }
.learn-today h2 { margin: 0 0 2px; } .learn-today p { margin: 0; }
.learn-today.done { border-color: var(--mint-dark) !important; background: var(--mint-soft); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; }
.learn-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; }
.learn-card:hover, .learn-card:focus-visible { border-color: var(--blue); background: var(--blue-soft); }
.learn-card b { font-size: 1.1rem; color: var(--navy); }
.lc-e { font-size: 1.8rem; line-height: 1; } .lc-e .ic { width: 1.8rem; height: 1.8rem; color: var(--blue); }
.lc-ex { font-size: .92rem; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: 10px; }
.mine-grid.big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.mine { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px; }
.mine:hover, .mine:focus-visible { border-color: var(--blue); }
.mine > span { font-size: 1.4rem; } .mine > span .ic { width: 1.5rem; height: 1.5rem; color: var(--blue); }
.mine b { color: var(--navy); } .mine small { font-size: .88rem; }
.why summary { cursor: pointer; font-weight: 700; color: var(--navy); } .why ul { margin: 8px 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.flow-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.flow-head .lc-e { font-size: 2.4rem; } .flow-head .lc-e .ic { width: 2.6rem; height: 2.6rem; }
.flow-head h1 { margin: 0 0 4px !important; }
.tech-line { margin: 0; max-width: 70ch; background: var(--blue-soft); border: 2px solid var(--blue-line); border-radius: 10px; padding: 8px 12px; }
.flow-form { display: flex; flex-direction: column; gap: 10px; }
.flow-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.flow-form input, .flow-form textarea { font-size: 1.05rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.flow-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; }
.fig-prev { align-self: end; padding-bottom: 8px; }
.flow-done { padding: 20px 0; } .flow-done .lead { max-width: 56ch; margin-left: auto !important; margin-right: auto !important; }
.tool-intro { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px solid var(--blue-line); background: var(--blue-soft); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; }
.tool-intro p { margin: 0; flex: 1 1 18rem; } .tool-intro > span { font-size: 1.4rem; } .tool-intro > span .ic { color: var(--blue); }
.next-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 2px solid var(--blue) !important; border-radius: 12px; padding: 10px 14px; margin-top: 16px; background: var(--card); }
.next-step b { color: var(--navy); } .next-step span { flex: 1 1 14rem; }

/* ---------- Forlad spillet ---------- */
.leave-ov, .lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(8, 18, 34, .72); }
.leave-dlg { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 16px; padding: 24px; max-width: 440px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.leave-dlg h2 { margin: 0 0 8px; } .leave-dlg p { margin: 0 0 16px; }
/* ---------- Billeder i stor visning ---------- */
.lightbox { background: rgba(4, 10, 20, .85); cursor: zoom-out; }
.lb-in { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(1100px, 100%); cursor: default; }
.lb-in figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lb-in img { max-width: 100%; max-height: 78vh; border-radius: 10px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-in figcaption { color: #fff; font-size: .9rem; text-align: center; }
.lb-close { background: #fff !important; color: #0B1422 !important; border-color: #fff !important; }
.img-open { all: unset; cursor: zoom-in; display: inline-block; border-radius: 10px; }
.img-open:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.img-open.thumb { flex: none; margin-right: 8px; line-height: 0; }
.qimg .img-open img { display: block; }

/* ---------- Lærer-oprettelse: klassetrin ---------- */
.grade-pick { border: 1.5px solid var(--blue-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; margin: 4px 0 8px; }
.grade-pick legend { font-weight: 700; padding: 0 4px; }
.gp-track { display: flex; flex-direction: column; gap: 6px; } .gp-track > b { font-size: .9rem; }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-chip { position: relative; display: inline-flex; }
.gp-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gp-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; font-size: .9rem; }
.gp-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.gp-chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.grade-pick[hidden] { display: none !important; }
.gp-chip input:checked + span { background: #1A66C9 !important; border-color: #1A66C9 !important; color: #fff !important; }
