/* Sólarvefurinn — einfalt og rólegt útlit.
   Ein áhersluliti (sólgul/brún), engir litaðir kassar. „Auðlesið“ er stilling sem stækkar
   textann, eykur bil og skiptir um letur fyrir þá sem eiga auðveldara með að lesa þannig. */
:root {
  --bg: #fcfbf8; --panel: #ffffff; --ink: #1f2933; --muted: #5b6672; --line: #dcd8cf;
  --acc: #b45309; --acc-soft: #f7ecdc; --ok: #166534; --bad: #b42318;
  --lesa: #f6efe2; --profa: #eaf0f6; --soft: #e7ebf0;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --size: 17px; --lh: 1.65; --maxw: 46rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14181c; --panel: #1b2127; --ink: #eceff2; --muted: #9aa6b2; --line: #333c45;
  --acc: #f0a54a; --acc-soft: #2a2218; --ok: #5fd08a; --bad: #ff8a80;
  --lesa: #241e16; --profa: #19232d; --soft: #26303a;
  color-scheme: dark;
}
:root.audles {
  --font: "Lexend", "Segoe UI", system-ui, sans-serif;
  --size: 20px; --lh: 1.9; --maxw: 40rem;
  --bg: #fbf7ea; --lesa: #f3e8cc; --profa: #e6eef6;
}
:root.audles[data-theme="dark"] { --bg: #14181c; --lesa: #241e16; --profa: #19232d; }
:root.audles body { letter-spacing: .02em; word-spacing: .1em; }
:root.audles p, :root.audles li { max-width: 38rem; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--size); line-height: var(--lh); }
a { color: var(--acc); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
.mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: .85em; }

/* ---------- Toppur ---------- */
.topp { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.topp-inn { max-width: 60rem; margin: 0 auto; padding: .6rem 1.2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.vma { display: flex; margin-right: -.6rem; }
/* Aðeins merkið sjálft, án ártala og nafns (heila myndin er í fætinum) */
.vma img { width: 35px; height: 24px; display: block; }
:root[data-theme="dark"] .vma { background: #fff; border-radius: 6px; padding: 2px 4px; }
.merki { font-weight: 800; text-decoration: none; color: var(--ink); font-size: 1.1em; margin-right: auto; }
.merki span { color: var(--acc); }
.topp a.valmynd { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9em; }
.topp a.valmynd:hover, .topp a.valmynd.virkt { color: var(--ink); }
.takki { font: inherit; font-size: .8em; font-weight: 600; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; cursor: pointer; }
.takki[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); }

main { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }

/* ---------- Forsíða ---------- */
.heimur h1 { font-size: 2em; margin-bottom: .4em; }
.heimur .inngangur { color: var(--muted); font-size: 1.05em; max-width: 36rem; }
.leid { list-style: none; padding: 0; margin: 2rem 0 0; }
.leid li { border-top: 1px solid var(--line); }
.leid li:last-child { border-bottom: 1px solid var(--line); }
.leid a { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .8rem; align-items: baseline; padding: 1rem .2rem; text-decoration: none; color: var(--ink); }
.leid a:hover { background: var(--acc-soft); }
.leid .nr { font-weight: 800; color: var(--acc); }
.leid .titill { font-weight: 700; }
.leid .undir { display: block; color: var(--muted); font-size: .88em; font-weight: 400; }
.leid .staða { font-size: .85em; color: var(--muted); white-space: nowrap; }
.leid .staða.klarad { color: var(--ok); font-weight: 700; }
.athugasemd { margin-top: 2.5rem; color: var(--muted); font-size: .92em; }

/* ---------- Verkefnasíða ---------- */
.brauð { color: var(--muted); font-size: .85em; margin-bottom: .6rem; }
.brauð a { color: var(--muted); }
.verk h1 { font-size: 1.9em; margin-bottom: .6rem; }
.markmid { font-size: 1.08em; margin: 0 0 1.4rem; padding-left: 1rem; border-left: 4px solid var(--acc); }
.byrja { margin-bottom: 2rem; }
.verk section { margin-top: 2.6rem; }
.verk section > h2 { font-size: 1.15em; letter-spacing: .14em; color: var(--acc); font-weight: 800; margin-bottom: .2rem; }
.verk section > .undirtexti { color: var(--muted); margin-bottom: 1.2rem; font-size: .95em; }

/* GERA */
.spurn { margin: 0 0 1.4rem; }
.spurn .texti { margin-bottom: .5rem; }
.spurn .texti b.n { color: var(--acc); margin-right: .4em; }
.svarlina { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.svarlina input[type=text] { font: inherit; width: 8rem; padding: .35em .6em; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.svarlina input[type=text]:focus { outline: none; border-color: var(--acc); }
.svarlina .eining { color: var(--muted); }
.takki-adal { font: inherit; font-weight: 700; background: var(--acc); color: #fff; border: none; border-radius: 8px; padding: .4em 1em; cursor: pointer; }
:root[data-theme="dark"] .takki-adal { color: #1a1206; }
.takki-lit { font: inherit; font-size: .9em; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .35em .8em; cursor: pointer; color: var(--ink); }
.valkostir { display: grid; gap: .4rem; margin: .3rem 0 .6rem; }
.valkostir label { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.endurgjof { margin-top: .5rem; min-height: 1.4em; }
.endurgjof.rett { color: var(--ok); font-weight: 700; }
.endurgjof.rangt { color: var(--bad); }
.lausn { margin-top: .6rem; padding: .7rem 1rem; background: var(--acc-soft); border-radius: 8px; font-size: .95em; }
.lausn .skref { display: block; }
.reikn { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .92em; }

/* PRÓFA */
.stod { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; background: var(--panel); margin-bottom: 1.4rem; }
.stod h3 { font-size: 1em; margin-bottom: .6rem; }
.stod svg { width: 100%; height: auto; display: block; }
.stod .stjorn { display: grid; gap: .8rem; margin: .8rem 0; }
.stod .stjorn label { display: grid; grid-template-columns: 11rem 1fr 6rem; gap: .8rem; align-items: center; font-size: .92em; }
.stod .stjorn label output { font-family: Consolas, monospace; text-align: right; }
.stod input[type=range] { width: 100%; accent-color: var(--acc); }
.maelingar { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .6rem; margin: .6rem 0; }
.maeling { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.maeling .gildi { font-family: Consolas, monospace; font-size: 1.25em; font-weight: 700; }
.maeling .nafn { font-size: .8em; color: var(--muted); }
.varud { border-left: 4px solid var(--bad); padding: .1rem 0 .1rem 1rem; margin: 1rem 0; font-size: .95em; }
.varud b { color: var(--bad); }
.maeliblad { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: 1rem; }
.maeliblad h3 { font-size: 1em; }
.maeliblad ol { padding-left: 1.3rem; }
.maeliblad table { border-collapse: collapse; width: 100%; font-size: .92em; margin: .6rem 0; }
.maeliblad th, .maeliblad td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }
.maeliblad td input { font: inherit; width: 100%; border: none; background: transparent; color: var(--ink); border-bottom: 1px solid var(--line); }


/* ---------- Svæði: hvað á ég að gera hér? ---------- */
.lykill { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; margin: 0 0 1.6rem; font-size: .85em; color: var(--muted); }
.lykill span { display: inline-flex; align-items: center; gap: .4rem; }
.lykill i { width: 1.1rem; height: 1.1rem; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.lykill i.lesa { background: var(--lesa); } .lykill i.gera { background: var(--bg); } .lykill i.profa { background: var(--profa); }
.verk .zone { border-radius: 14px; padding: 1.2rem 1.4rem; margin-top: 1.6rem; }
.verk .zone.lesa { background: var(--lesa); }
.verk .zone.gera { background: var(--bg); border: 1px solid var(--line); }
.verk .zone.profa { background: var(--profa); }
.zone-merki { font-size: .78em; font-weight: 800; letter-spacing: .14em; color: var(--acc); margin-bottom: .6rem; }
.zone-merki b { color: var(--ink); letter-spacing: .02em; font-weight: 600; margin-left: .5rem; }
.verk .zone > h2 { margin-top: 0; }
.verk .zone.lesa .byrja, .verk .zone.lesa .afhverju { margin-bottom: 0; }
.verk .zone .stod { background: var(--panel); border-color: var(--line); }
.verk .zone.profa .maeliblad { border-top-color: var(--line); }

/* ---------- Myndir ---------- */
.mynd { margin: 1.2rem 0 0; }
.mynd svg { width: 100%; height: auto; display: block; background: var(--panel); border-radius: 10px; padding: .4rem; }
.mynd figcaption { color: var(--muted); font-size: .85em; margin-top: .4rem; }
.mynd svg text { fill: var(--ink); font-family: inherit; font-size: 12px; }
.mynd svg .l { stroke: var(--ink); fill: none; stroke-width: 1.6; }
.mynd svg .lm { stroke: var(--muted); fill: none; stroke-width: 1.2; }
.mynd svg .fs { fill: var(--soft); stroke: var(--ink); stroke-width: 1.4; }
.mynd svg .fa { fill: var(--acc-soft); stroke: var(--acc); stroke-width: 1.6; }
.mynd svg .ca { stroke: var(--acc); fill: none; stroke-width: 2.4; }
.mynd svg text.ta { fill: var(--acc); font-weight: 700; }
.mynd svg text.tm { fill: var(--muted); }
.mynd svg .badge circle { fill: var(--acc); }
.mynd svg .badge text { fill: #fff; font-weight: 800; text-anchor: middle; }
.mynd svg a { cursor: pointer; }
.mynd svg a:hover .badge circle { fill: var(--ink); }
.heimur .mynd { margin: 1.6rem 0 0; }

/* AF HVERJU */
.afhverju { max-width: 38rem; }

/* Þú kannt þetta */
.kannt { list-style: none; padding: 0; }
.kannt li { padding: .35rem 0 .35rem 1.8rem; position: relative; }
.kannt li::before { content: ""; position: absolute; left: 0; top: .65rem; width: 1rem; height: 1rem; border: 2px solid var(--acc); border-radius: 4px; }
.kannt li.haka::before { background: var(--acc); }

details.dypra { margin-top: 2.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
details.dypra summary { cursor: pointer; font-weight: 700; color: var(--acc); }
details.dypra > div { margin-top: .8rem; }

.naest { display: flex; justify-content: space-between; margin-top: 3rem; gap: 1rem; }
.naest a { text-decoration: none; font-weight: 700; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.naest a:hover { border-color: var(--acc); }

/* Hjálp */
.hjalp h1 { font-size: 1.8em; margin-bottom: 1rem; }
.hjalp h2 { font-size: 1.1em; margin: 2rem 0 .5rem; color: var(--acc); }
.hjalp table { border-collapse: collapse; width: 100%; font-size: .92em; }
.hjalp th, .hjalp td { border-bottom: 1px solid var(--line); padding: .5rem .5rem; text-align: left; vertical-align: top; }

/* ---------- Fótur ---------- */
.fotur { border-top: 1px solid var(--line); }
.fotur-inn { max-width: 60rem; margin: 0 auto; padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; color: var(--muted); }
.fotur-lina { display: flex; align-items: center; gap: .9rem; }
.fotur-skil { width: 1px; height: 1.6rem; background: var(--line); }
.fotur-inn p { margin: 0; font-size: .75em; line-height: 1.6; }
.fotur-vma img { height: 32px; width: auto; display: block; }
:root[data-theme="dark"] .fotur-vma { background: #fff; border-radius: 6px; padding: .2rem .4rem; }
.fb { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9em; text-decoration: none; color: #1877f2; }
.fb:hover { text-decoration: underline; }
:root[data-theme="dark"] .fb { color: #6aa5ff; }

/* ---------- Leikur: Eltu sólina ---------- */
.leikir { margin-top: 2.2rem; scroll-margin-top: 5rem; }
.leikir h2 { font-size: 1.15em; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); font-weight: 800; }
.leikhlekkur { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .8rem; align-items: center; margin-top: .8rem; padding: 1rem 1.1rem; border: 2px solid var(--acc); border-radius: 12px; background: var(--acc-soft); text-decoration: none; color: var(--ink); }
.leikhlekkur:hover { background: var(--panel); }
.leikhlekkur .sol { font-size: 1.6em; color: var(--acc); }
.leikhlekkur .undir { display: block; color: var(--muted); font-size: .88em; }
.leikhlekkur .or { font-weight: 700; color: var(--acc); white-space: nowrap; }

main.leikur { max-width: 60rem; }
.leikur h1 { font-size: 2em; margin-bottom: .4em; }
.leikur .inngangur { color: var(--muted); max-width: 40rem; }
.leikreitur { display: grid; border-radius: 12px; overflow: hidden; background: #16263d; margin-top: 1.2rem; }
.leikreitur > * { grid-area: 1 / 1; }
.leikreitur canvas { width: 100%; display: block; touch-action: none; cursor: crosshair; outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.leikreitur canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--acc); }
.yfirlag { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(10, 18, 30, .55); }
.yfirlag[hidden] { display: none; }
.spjald { background: var(--panel); color: var(--ink); border-radius: 12px; padding: 1.1rem 1.3rem; width: 100%; max-width: 34rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.spjald h2 { font-size: 1.15em; margin-bottom: .7rem; }
.manudir { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin-bottom: .9rem; }
.manudur { font: inherit; text-align: left; background: var(--bg); color: var(--ink); border: 2px solid var(--line); border-radius: 10px; padding: .5rem .7rem; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; }
.manudur span { font-size: .78em; color: var(--muted); line-height: 1.35; }
.manudur .met { color: var(--acc); font-weight: 700; }
.manudur[aria-pressed="true"] { border-color: var(--acc); background: var(--acc-soft); }
.nafnform { margin: .8rem 0 .2rem; padding: .8rem .9rem; border-radius: 10px; background: var(--acc-soft); }
.nafnform[hidden] { display: none; }
.nafnform label { display: block; font-weight: 700; margin-bottom: .4rem; }
.nafnlina { display: flex; gap: .5rem; }
.nafnlina input { font: inherit; font-size: 1.1em; font-weight: 600; flex: 1; min-width: 0; padding: .35em .6em; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); }
.nafnlina input:focus { outline: none; border-color: var(--acc); }
.nafnform p { margin: .35rem 0 0; }
.reglur { margin: 0 0 .9rem; padding-left: 1.2rem; font-size: .88em; }
.reglur li { margin-bottom: .2rem; }
.takki-adal.stor { font-size: 1.1em; padding: .5em 1.6em; }
.spjald .endurgjof { margin: .4rem 0 0; min-height: 0; }
.lokstig { font-size: 2.6em; font-weight: 800; color: var(--acc); line-height: 1.1; margin: 0 0 .2rem; }
.samanburdur { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5rem 0; margin: .6rem 0; font-size: .92em; }
.samanburdur div { display: flex; justify-content: space-between; gap: 1rem; }
.samanburdur div b { font-family: Consolas, monospace; }
.samanburdur p { margin: .4rem 0 0; }
.takkalina { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
.stjornlina { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .7rem 0; }
.stjornlina .takki-lit:disabled { opacity: .45; cursor: default; }
.aflstika { height: 6px; background: var(--soft); border-radius: 3px; margin-top: .3rem; overflow: hidden; }
.aflstika i { display: block; height: 100%; width: 0; background: var(--acc); }
.ferill { margin: 1rem 0 0; }
.ferill canvas { width: 100%; display: block; }
.ferill figcaption { color: var(--muted); font-size: .82em; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.ferill figcaption > span { white-space: nowrap; }
.ferill .lit { display: inline-block; width: 1.4rem; height: 3px; margin-right: .4rem; vertical-align: middle; }
.leikur .maelingar { grid-template-columns: repeat(5, 1fr); }
.ferill .lit.thu { background: var(--acc); }
.ferill .lit.kjor { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }
.ferill .lit.fastur { background: #8a96a3; }
.leikur .zone { border-radius: 14px; padding: 1.2rem 1.4rem; margin-top: 2rem; }
.leikur .zone.lesa { background: var(--lesa); }
.leikur .zone.gera { background: var(--bg); border: 1px solid var(--line); }
.flipar { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.flipi { font: inherit; font-size: .9em; font-weight: 600; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .25em .9em; cursor: pointer; }
.flipi[aria-pressed="true"] { background: var(--acc-soft); border-color: var(--acc); }
.flipar.smair .flipi { font-size: .78em; }
.tafla { list-style: none; padding: 0; margin: .6rem 0; }
.tafla li { display: grid; grid-template-columns: 2.4rem 1fr auto 4rem; gap: .6rem; align-items: baseline; padding: .4rem .3rem; border-bottom: 1px solid var(--line); }
.tafla li:first-child .saeti { color: var(--acc); }
.tafla .saeti { font-weight: 800; color: var(--muted); }
.tafla .nafn { font-weight: 700; overflow-wrap: anywhere; }
.tafla .wh { font-family: Consolas, monospace; font-weight: 700; text-align: right; }
.tafla .hittni { color: var(--muted); font-size: .85em; text-align: right; }
.tafla li.eg { background: var(--acc-soft); }
.tafla li.tomt { display: block; color: var(--muted); font-size: .9em; border-bottom: none; }

/* ---------- Leikur: Snjór og skuggar ---------- */
/* Sviðið er mynd (himinn, þak, hús), svo litirnir eru fastir óháð þema */
.snjoreitur { background: #9cc8ec; max-width: 42rem; margin-left: auto; margin-right: auto; }
.svid { position: relative; isolation: isolate; display: flex; flex-direction: column; background: linear-gradient(#7fb6e6, #cfe6f8 38%); }
.svid.snjokoma::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background-image: radial-gradient(#fff 1.6px, transparent 2.2px), radial-gradient(#fff 1.2px, transparent 1.8px);
  background-size: 46px 46px, 31px 31px; background-position: 0 0, 15px 11px; animation: snjofall 1.4s linear infinite; }
@keyframes snjofall { to { background-position: -10px 46px, 5px 42px; } }
.himinn { position: relative; height: 5rem; }
.himinn .sol { position: absolute; right: 12%; top: .9rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 28px 8px rgba(255, 215, 94, .7); }
.skylag { position: absolute; inset: 0 .8rem; }
.sky { position: absolute; top: 1.3rem; height: 2rem; background: #fff; border-radius: 999px; box-shadow: 0 2px 0 rgba(0, 0, 0, .05); }
.sky::before, .sky::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.sky::before { width: 45%; height: 160%; left: 15%; bottom: 20%; }
.sky::after { width: 35%; height: 130%; right: 15%; bottom: 25%; }
.hud { position: absolute; top: .5rem; font-weight: 800; font-size: 1em; color: #fff; background: rgba(20, 40, 70, .55); border-radius: 999px; padding: .05em .6em; z-index: 2; }
.hud.vinstri { left: .8rem; } .hud.haegri { right: .8rem; }
.thak { position: relative; padding: .8rem; background: repeating-linear-gradient(0deg, #8a3b2b 0 10px, #7a3123 10px 12px); border-top: 6px solid #5e2419; }
.panelar { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.panell { position: relative; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; cursor: pointer; border: 3px solid #d5dbe1; border-radius: 4px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  background-color: #1d3a63; background-image: linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px), linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 55%);
  background-size: 16.66% 33.33%, 16.66% 33.33%, 100% 100%; }
.panell:disabled { cursor: default; }
.panell:focus-visible { outline: 3px solid #ffd75e; outline-offset: 2px; }
.panell.smellt { animation: smellur .18s ease-out; }
@keyframes smellur { 50% { transform: scale(.94); } }
.snjolag { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #f8fbff; border-radius: 40% 55% 0 0 / 18% 22% 0 0; box-shadow: inset 0 3px 0 #fff, inset 0 -6px 10px rgba(150, 180, 210, .35); transition: height .15s; }
.laufblad, .skitur, .fugl { position: absolute; display: none; line-height: 1; }
.laufblad { font-size: 1.3em; }
.laufblad.l0 { left: 14%; top: 18%; transform: rotate(-20deg); } .laufblad.l1 { left: 55%; top: 40%; transform: rotate(25deg); } .laufblad.l2 { left: 30%; top: 58%; }
.panell[data-lauf="1"] .l0, .panell[data-lauf="2"] .l0, .panell[data-lauf="2"] .l1, .panell[data-lauf="3"] .laufblad { display: block; }
.skitur { width: 26%; height: 30%; background: radial-gradient(circle at 45% 45%, #fff 0 38%, #e9e6dc 39% 55%, transparent 56%), radial-gradient(circle at 75% 70%, #f4f2ea 0 18%, transparent 19%); }
.skitur.s0 { left: 58%; top: 12%; } .skitur.s1 { left: 18%; top: 45%; }
.panell[data-skitur="1"] .s0, .panell[data-skitur="2"] .skitur { display: block; }
.fugl { left: 50%; top: 4%; font-size: 1.8em; transform: translateX(-50%); }
.panell.fuglinn .fugl { display: block; animation: fuglhopp .5s ease-in-out infinite alternate; }
.panell.brattskitur .fugl { animation: fuglskelfur .12s linear infinite alternate; }
@keyframes fuglhopp { to { transform: translate(-50%, -4px); } }
@keyframes fuglskelfur { from { transform: translate(-56%, 0) rotate(-6deg); } to { transform: translate(-44%, 0) rotate(6deg); } }
.pafl { position: absolute; right: 4px; bottom: 3px; font: 700 .7em Consolas, monospace; color: #fff; background: rgba(0, 0, 0, .45); padding: 0 4px; border-radius: 3px; z-index: 1; }
.panell .nr { position: absolute; left: 4px; top: 2px; font-size: .7em; font-weight: 800; color: rgba(255, 255, 255, .6); z-index: 1; }
.hopp { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: .85em; color: #fff; text-shadow: 0 1px 3px #000; pointer-events: none; z-index: 2; animation: hopp .8s ease-out forwards; }
@keyframes hopp { to { transform: translate(-50%, -2.2rem); opacity: 0; } }
.skuggalag { position: absolute; inset: .8rem; pointer-events: none; }
.skuggi { position: absolute; top: -.3rem; bottom: -.3rem; background: rgba(15, 25, 45, .5); border-radius: 30px; filter: blur(4px); }
.husveggur { background: #efe3c8; border-top: 4px solid #5e2419; padding: .7rem .8rem .8rem; color: #2a2118; }
.hus { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.taeki { display: flex; flex-direction: column; align-items: center; padding: .35rem .2rem; border-radius: 10px; background: #2d2a26; opacity: .55; filter: grayscale(1); transition: opacity .2s, filter .2s, box-shadow .2s; }
.taeki .takn { font-size: 1.6em; line-height: 1.2; }
.taeki .tnafn { font-size: .72em; font-weight: 700; color: #f4ecd8; }
.taeki.kveikt { opacity: 1; filter: none; background: #4a3f22; box-shadow: 0 0 14px 2px rgba(255, 215, 94, .75); }
.husafl { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; margin-top: .6rem; font-size: .85em; font-weight: 700; }
.husafl .aflstika { margin: 0; height: 10px; background: #d6c7a6; }
.husafl .aflstika i { background: #e2a400; }
.husafl b { font-family: Consolas, monospace; }
.tafnreglur { list-style: none; padding: 0; margin: 0 0 .8rem; font-size: .92em; }
.tafnreglur li { position: relative; padding: .15rem 0 .15rem 2rem; }
.tafnreglur li span { position: absolute; left: 0; top: .1rem; font-size: 1.25em; }

@media (max-width: 600px) {
  .leikhlekkur { grid-template-columns: 2rem 1fr; }
  .leikhlekkur .or { display: none; }
  /* Í síma: merki, nafn og takkar í efri línu, valmyndin í þeirri neðri */
  .topp-inn { gap: .45rem .9rem; padding: .5rem 1rem; }
  .topp .takki { order: 2; }
  .topp a.valmynd { order: 3; }
  .leikur-sida .topp { position: static; }   /* í síma þarf himinninn allan skjáinn */
  .yfirlag { padding: .5rem; }
  .spjald { padding: .9rem 1rem; }
  .manudir { grid-template-columns: 1fr; }
  .manudur { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; }
  .leikur .maelingar { grid-template-columns: 1fr 1fr; }
  .leikur .maelingar .maeling:last-child { grid-column: 1 / -1; }
  .stjornlina #flattTakki { flex: 1 1 100%; font-size: 1.05em; font-weight: 700; padding: .7em 1em; }
  .tafla li { grid-template-columns: 2rem 1fr auto 3.2rem; gap: .4rem; }
  .stod .stjorn label { grid-template-columns: 1fr; gap: .2rem; }
  .stod .stjorn label output { text-align: left; }
}
@media print {
  .topp, .naest, .fb, .takki-adal, .takki-lit, .stjorn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
}

/* ---------- Dýpra: Srí Lanka (lengri grein fyrir 5.–6. önn) ---------- */
/* Litir grafa, prófaðir fyrir litblindu og birtuskil í hvoru þema fyrir sig */
:root { --g-sol: #b45309; --g-sol-ljos: #e8b98a; --g-net: #2f6db3; --g-net-ljos: #a9c3e4; --g-rist: #ebe7df; }
:root[data-theme="dark"] { --g-sol: #d27c24; --g-sol-ljos: #7a4d22; --g-net: #5a95ea; --g-net-ljos: #2e4a70; --g-rist: #2a323a; }
main.grein { max-width: 50rem; }
.yfirfyrirsogn { font-size: .78em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin: 0 0 .4rem; }
.grein h1 { font-size: 2em; margin-bottom: .5em; }
.grein .inngangur { color: var(--muted); font-size: 1.05em; max-width: 40rem; }
.efnisyfirlit { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 0; }
.efnisyfirlit a { font-size: .85em; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .2em .8em; }
.efnisyfirlit a:hover { border-color: var(--acc); background: var(--acc-soft); }
.grein section { margin-top: 3rem; scroll-margin-top: 4.5rem; }
.grein section > h2 { font-size: 1.4em; margin-bottom: .9rem; display: flex; align-items: baseline; gap: .6rem; }
.kaflanr { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--acc); color: #fff; font-size: .7em; font-weight: 800; transform: translateY(-.1em); }
:root[data-theme="dark"] .kaflanr { color: #1a1206; }
.undirkafli { font-size: 1.08em; margin: 1.8rem 0 .5rem; }
.grein ul, .grein ol { padding-left: 1.3rem; }
.grein li { margin-bottom: .3rem; }
.aminning { border-left: 4px solid var(--acc); background: var(--lesa); padding: .7rem 1rem; border-radius: 0 10px 10px 0; font-size: .95em; }
.formula { background: var(--lesa); border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0 1.4rem; }
.formula .reikn { font-size: 1.15em; font-weight: 700; margin-bottom: .3rem; }
.formula p { margin: 0; }

/* Lykiltölur */
.flisar { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .7rem; margin: 0 0 1.4rem; }
.flis { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; background: var(--panel); }
.flis-gildi { font-size: 1.5em; font-weight: 700; line-height: 1.2; }
.flis-nafn { font-size: .82em; color: var(--muted); margin-top: .2rem; }
.tolubox { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .7rem; margin: 1.2rem 0; }
.tolubox > div { border-top: 3px solid var(--acc); padding-top: .4rem; }
.tb-gildi { display: block; font-size: 1.3em; font-weight: 700; }
.tb-nafn { display: block; font-size: .82em; color: var(--muted); }

/* Tímalína */
.timalina { list-style: none; padding: 0 !important; margin: 1.2rem 0; border-left: 2px solid var(--line); }
.timalina li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .8rem; padding: .45rem 0 .45rem 1rem; position: relative; margin: 0; }
.timalina li::before { content: ""; position: absolute; left: -6px; top: .95rem; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--bg); }
.timalina .tk { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-weight: 700; font-size: .9em; color: var(--acc); padding-top: .1em; }
.astaedur li { margin-bottom: .45rem; }

/* Gröf */
.graf { margin: 1.2rem 0 .3rem; }
.graf svg { display: block; max-width: 100%; overflow: visible; }
.graf-texti { font-size: .85em; color: var(--muted); margin-bottom: 1.4rem; }
.graf-skyring { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82em; color: var(--muted); margin-bottom: .4rem; }
.graf-skyring span { display: inline-flex; align-items: center; gap: .4rem; }
.graf-skyring .lyk { width: .8rem; height: .8rem; border-radius: 3px; }
.graf-skyring .lyk-lina { width: 1.2rem; height: 2px; border-radius: 1px; }
.lyk.sol, .lyk-lina.sol { background: var(--g-sol); } .lyk.sol-ljos { background: var(--g-sol-ljos); }
.lyk.net, .lyk-lina.net { background: var(--g-net); } .lyk.net-ljos { background: var(--g-net-ljos); }
.graf svg text { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.graf svg text.g-nafn { fill: var(--ink); font-size: 13px; }
.graf svg text.g-gildi { fill: var(--ink); font-weight: 700; font-size: 13px; }
.graf svg text.g-vidmid-texti { fill: var(--muted); font-size: 11px; }
.graf svg .g-rist { stroke: var(--g-rist); stroke-width: 1; }
.graf svg .g-ass { stroke: var(--line); stroke-width: 1; }
.graf svg .g-vidmid { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.graf svg .g-kross { stroke: var(--muted); stroke-width: 1; }
.graf svg .g-hit { fill: transparent; cursor: default; outline: none; }
.graf svg .g-hit:focus-visible { stroke: var(--acc); stroke-width: 2; }
.graf svg .g-stong.sol { fill: var(--g-sol); } .graf svg .g-stong.sol-ljos { fill: var(--g-sol-ljos); }
.graf svg .g-stong.net { fill: var(--g-net); } .graf svg .g-stong.net-ljos { fill: var(--g-net-ljos); }
.graf svg .g-stong.lyft { filter: brightness(1.12); }
.graf svg .g-lina { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graf svg .g-lina.sol { stroke: var(--g-sol); } .graf svg .g-lina.net { stroke: var(--g-net); }
.graf svg .g-punktur { stroke: var(--panel); stroke-width: 2; }
.graf svg .g-punktur.sol { fill: var(--g-sol); } .graf svg .g-punktur.net { fill: var(--g-net); }
.hermir .graf svg .g-punktur { stroke: var(--panel); }
.graf-tafla { margin-top: .4rem; font-size: .85em; }
.graf-tafla summary { cursor: pointer; color: var(--muted); }
.graf-tafla table { border-collapse: collapse; margin-top: .4rem; }
.graf-tafla th, .graf-tafla td { border-bottom: 1px solid var(--line); padding: .25rem .8rem .25rem 0; text-align: left; font-variant-numeric: tabular-nums; }
.graf-abending { position: fixed; z-index: 50; pointer-events: none; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; font-size: .82em; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); max-width: 18rem; }
.graf-abending b { display: block; white-space: pre-line; font-variant-numeric: tabular-nums; }
.graf-abending span { color: var(--muted); }

/* Hermar */
.hermir { margin: 1.4rem 0; }
.hermir > p.small { margin-bottom: .6rem; }
.hermir .flipar { margin: .2rem 0 .4rem; }
.aflstika.stor { height: 14px; border-radius: 7px; margin: .6rem 0 .2rem; position: relative; background: linear-gradient(90deg, var(--g-sol-ljos) var(--mest, 0%), var(--soft) var(--mest, 0%)); }
.aflstika.stor i { background: var(--g-sol); border-radius: 7px 0 0 7px; position: relative; z-index: 1; }

/* Spurningar og heimildir */
.spurningar > li { margin-bottom: 1rem; }
.spurningar p { margin-bottom: .3rem; }
.spurningar details summary { cursor: pointer; font-weight: 700; color: var(--acc); font-size: .9em; }
.spurningar details > *:not(summary) { margin: .4rem 0 0; padding: .6rem .9rem; background: var(--acc-soft); border-radius: 8px; font-size: .95em; }
.spurningar details p + p { margin-top: .3rem; }
.heimildir li { margin-bottom: .25rem; overflow-wrap: anywhere; }

/* Forsíða: tengill á dýpra efni */
.dypra-hlekkur { border-color: var(--line); background: var(--panel); }
.dypra-hlekkur:hover { border-color: var(--acc); background: var(--acc-soft); }

@media (max-width: 600px) {
  .grein h1 { font-size: 1.6em; }
  .timalina li { grid-template-columns: 1fr; gap: 0; }
  .flis-gildi { font-size: 1.3em; }
  .dypra-hlekkur .or { display: none; }
}
