/* Trickfilm — mørkt biograftema med gul "klaptræ"-accent */
:root {
  --bg: #16121f;
  --bg2: #211b2e;
  --flade: #2c2440;
  --flade2: #3a3054;
  --kant: #4a3f66;
  --tekst: #f6f1ff;
  --daemp: #b5a9cf;
  --gul: #ffd23f;
  --gul-moerk: #e0b400;
  --roed: #ff4d5e;
  --groen: #3ddc97;
  --blaa: #5ab0ff;
  --lilla: #b98cff;
  --radius: 16px;
  --skygge: 0 8px 30px rgba(0, 0, 0, 0.45);
  --sikker-top: env(safe-area-inset-top, 0px);
  --sikker-bund: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--tekst);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body[data-side="optag"] { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
:focus-visible { outline: 3px solid var(--gul); outline-offset: 2px; }
h1, h2, h3 { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; margin: 0; }
[hidden] { display: none !important; }

/* ---------- Knapper ---------- */
.knap {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: 0.55em 1.1em;
  background: var(--flade2); border: 1px solid var(--kant); border-radius: 999px;
  color: var(--tekst); text-decoration: none; font-weight: 600;
  transition: transform 0.08s, background 0.15s;
}
.knap:active { transform: scale(0.96); }
.knap.primaer { background: var(--gul); color: #1d1500; border-color: var(--gul-moerk); }
.knap.fare { background: transparent; color: var(--roed); border-color: color-mix(in srgb, var(--roed) 50%, transparent); }
.knap.stor { min-height: 56px; font-size: 1.15rem; }
.lille-knap { min-height: 36px; padding: 0.3em 0.8em; font-size: 0.9rem; }
.ikon-knap {
  width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none;
  background: rgba(0, 0, 0, 0.35); border: 0; border-radius: 50%; font-size: 1.25rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rund-knap {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--kant);
  background: var(--flade); font-size: 1.3rem; display: inline-grid; place-items: center; flex: none;
}
.rund-knap.faerdig { background: var(--groen); color: #002914; border-color: transparent; font-weight: 900; }
.knaprad { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.stak { display: flex; flex-direction: column; gap: 14px; }
.lille-tekst { font-size: 0.85rem; color: var(--daemp); margin: 0; }
.center { text-align: center; }
.etiket { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--daemp); font-weight: 700; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 0.4em 0.85em; min-height: 36px; border-radius: 999px;
  border: 1px solid var(--kant); background: var(--flade); color: var(--tekst); font-weight: 600; font-size: 0.92rem;
  white-space: nowrap;
}
.chip.aktiv { background: var(--gul); color: #1d1500; border-color: var(--gul); }

.felt {
  width: 100%; min-height: 48px; padding: 0.5em 0.8em; border-radius: 12px;
  border: 1px solid var(--kant); background: var(--bg2); font-size: 1.05rem;
}
.lille-felt { width: auto; min-height: 38px; padding: 0.2em 0.5em; font-size: 0.95rem; }
input[type="number"].lille-felt { width: 4.2em; }
.vippe { display: inline-flex; align-items: center; gap: 0.4em; min-height: 40px; font-weight: 500; }
.vippe input { width: 22px; height: 22px; accent-color: var(--gul); }
.skyder { display: flex; align-items: center; gap: 10px; }
.skyder input, .skyder-input { flex: 1; accent-color: var(--gul); min-height: 32px; }

/* ---------- Forside ---------- */
#app { min-height: 100%; }
body[data-side="forside"] #app { max-width: 960px; margin: 0 auto; padding: calc(var(--sikker-top) + 20px) 16px calc(var(--sikker-bund) + 40px); }
.forside-top { text-align: center; margin: 12px 0 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo h1 {
  font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 900; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--gul), #ff8a3d 50%, var(--roed));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-klap { font-size: clamp(2.2rem, 8vw, 3.2rem); display: inline-block; animation: klap 2.6s ease-in-out infinite; transform-origin: 20% 80%; }
@keyframes klap { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(0); } }
.slogan { color: var(--daemp); margin: 6px 0 0; }

.ny-film {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 84px; border-radius: 22px; border: 2px dashed var(--gul);
  background: color-mix(in srgb, var(--gul) 10%, transparent); color: var(--gul);
  font-size: 1.35rem; font-weight: 800; margin-bottom: 20px;
}
.ny-film .plus { font-size: 2rem; line-height: 1; }
.ny-film:active { transform: scale(0.98); }

.filmgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.filmkort { background: var(--bg2); border: 1px solid var(--kant); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.kort-hoved { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; }
.kort-billede { aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; overflow: hidden; }
.kort-billede img { width: 100%; height: 100%; object-fit: cover; }
.kort-tom { font-size: 2.5rem; opacity: 0.4; }
.kort-tekst { padding: 10px 12px 4px; }
.kort-tekst h3 { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kort-tekst p { margin: 2px 0 0; color: var(--daemp); font-size: 0.88rem; }
.kort-knapper { display: flex; justify-content: flex-end; gap: 6px; padding: 4px 8px 8px; }
.kort-knapper .ikon-knap { background: var(--flade); }
.tom-liste { grid-column: 1 / -1; text-align: center; color: var(--daemp); padding: 24px; border-radius: var(--radius); background: var(--bg2); }
.tips { margin-top: 32px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--kant); }
.tips h2 { font-size: 1.15rem; margin-bottom: 8px; color: var(--gul); }
.tips ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--daemp); }
.tips b { color: var(--tekst); }
.demo-link { display: block; margin: 18px auto 0; background: none; border: 0; color: var(--gul); text-decoration: underline; text-underline-offset: 3px; }
.plads { text-align: center; margin-top: 18px; }

/* ---------- Optag ---------- */
.optag { position: fixed; inset: 0; display: flex; flex-direction: column; background: #000; }
.scene { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.scene video, .scene .spoegelse, .scene .kig { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.scene video.spejl { transform: scaleX(-1); }
.spoegelse { pointer-events: none; mix-blend-mode: normal; }
.kig { z-index: 3; background: #000; }
.gitter {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.35) calc(33.33% - 0.5px), rgba(255,255,255,0.35) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255,255,255,0.35) calc(66.66% - 0.5px), rgba(255,255,255,0.35) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255,255,255,0.35) calc(33.33% - 0.5px), rgba(255,255,255,0.35) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255,255,255,0.35) calc(66.66% - 0.5px), rgba(255,255,255,0.35) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px));
}
.blitz { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.blitz.blink { animation: blitz 0.35s ease-out; }
@keyframes blitz { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.nedtael {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none;
  font: 900 min(40vw, 40vh)/1 ui-rounded, system-ui, sans-serif; color: #fff;
  text-shadow: 0 0 40px rgba(0,0,0,0.7), 0 4px 0 rgba(0,0,0,0.4);
}
.nedtael.puls { animation: puls 1s ease-out; }
@keyframes puls { 0% { transform: scale(1.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(0.85); opacity: 0.2; } }
.status-pille {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
  background: rgba(0,0,0,0.65); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  max-width: calc(100% - 24px); text-align: center; width: max-content; border-radius: 18px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.kamera-fejl { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; text-align: center; padding: 24px; z-index: 7; background: var(--bg); }
.optag-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px; padding: calc(var(--sikker-top) + 8px) 10px 8px;
  background: linear-gradient(rgba(0,0,0,0.6), transparent);
}
.optag-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; text-shadow: 0 1px 3px #000; }
.optag-titel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taeller { font-size: 0.82rem; color: #ddd; }
.top-knapper { display: flex; gap: 4px; }
.top-knapper .ikon-knap { width: 40px; height: 40px; font-size: 1.1rem; }
.optag-bund { background: var(--bg); padding: 10px 12px calc(var(--sikker-bund) + 12px); display: flex; flex-direction: column; gap: 10px; }
.tilstande { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; overflow: visible; }
.tilstande .chip { padding: 6px 2px; border-radius: 14px; min-height: 54px; min-width: 0; }
.tilstand-indhold { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tilstand-emoji { font-size: 1.3rem; line-height: 1; }
.tilstand-navn { font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tilstand-panel { min-height: 44px; }
.panel-rader { display: flex; flex-direction: column; gap: 8px; }
.panel-rad { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-rad > span:first-child { flex: none; font-size: 0.85rem; color: var(--daemp); min-width: 4.2em; }
.plan-rad { flex-wrap: wrap; gap: 8px 14px; }
.plan-rad label { display: inline-flex; align-items: center; gap: 6px; color: var(--daemp); font-size: 0.9rem; }
.panel-tekst { margin: 0; color: var(--daemp); font-size: 0.9rem; text-align: center; }
.maaler { position: relative; height: 12px; border-radius: 6px; background: var(--flade); overflow: hidden; }
.maaler-fyld { height: 100%; width: 0; background: var(--groen); border-radius: 6px; transition: width 0.05s linear; }
.maaler-fyld.over { background: var(--gul); }
.maaler-streg { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--roed); }
.lukker-rad { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.lukker-rad .venstre { display: flex; gap: 10px; align-items: center; }
.lukker-rad .hoejre { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.sidste-thumb {
  position: relative; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; border: 2px solid var(--kant);
  background: var(--flade); padding: 0; display: grid; place-items: center; font-size: 1.4rem; flex: none;
}
.sidste-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-tal { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,0.7); border-radius: 6px; padding: 0 5px; font-size: 0.72rem; font-weight: 700; }
.lukker {
  position: relative; width: 82px; height: 82px; border-radius: 50%; border: 0; padding: 0; background: none; flex: none;
}
.lukker-ring { position: absolute; inset: 0; border-radius: 50%; border: 5px solid #fff; }
.lukker-kerne { position: absolute; inset: 9px; border-radius: 50%; background: #fff; transition: all 0.2s; }
.lukker:active .lukker-kerne { transform: scale(0.88); }
.lukker.auto .lukker-kerne { background: var(--gul); }
.lukker.auto .lukker-kerne::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #1d1500; font-size: 1.5rem; padding-left: 4px; }
.lukker[data-tilstand="klap"] .lukker-kerne::after { content: "👏"; padding-left: 0; font-size: 1.8rem; }
.lukker[data-tilstand="selv"] .lukker-kerne::after { content: "⏲"; padding-left: 0; font-size: 1.8rem; }
.lukker.koerer .lukker-kerne { inset: 24px; border-radius: 8px; background: var(--roed); }
.lukker.koerer .lukker-kerne::after { content: ""; }
.lukker.koerer .lukker-ring { border-color: var(--roed); animation: roter 2s linear infinite; border-top-color: transparent; }
@keyframes roter { to { transform: rotate(360deg); } }
.moerk-skaerm { position: fixed; inset: 0; background: #000; z-index: 50; display: grid; place-items: center; }
.moerk-skaerm::after { content: attr(data-tekst) "\A\A Tryk for at vise kameraet"; white-space: pre-wrap; text-align: center; color: #555; font-size: 0.9rem; padding: 24px; }

@media (orientation: landscape) and (max-height: 600px) {
  .optag { flex-direction: row; }
  .optag-bund { width: min(360px, 42vw); overflow-y: auto; padding: calc(var(--sikker-top) + 60px) 12px 12px; }
  .optag-top { right: min(360px, 42vw); }

}

/* ---------- Redigering ---------- */
body[data-side="rediger"] #app { min-height: 100%; }
.rediger { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.rediger-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(var(--sikker-top) + 8px) 12px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--flade);
}
.rediger-top .ikon-knap { background: var(--flade); }
.titel-knap { flex: 1; min-width: 0; background: none; border: 0; text-align: left; font-weight: 800; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 4px; }
.lav-film { flex: none; }
.rediger-krop { display: grid; gap: 16px; padding: 12px 12px calc(var(--sikker-bund) + 24px); }
@media (min-width: 900px) {
  .rediger-krop { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .spiller-kolonne { position: sticky; top: 76px; }
}
.spiller-kolonne, .redskab-kolonne { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.skaerm-ramme { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--skygge); }
.skaerm { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; margin: 0 auto; }
.spil-stor {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255, 210, 63, 0.92); color: #1d1500;
  font-size: 2rem; padding-left: 6px; box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.spiller-knapper { display: flex; align-items: center; gap: 8px; }
.rund-knap.spil { background: var(--gul); color: #1d1500; border-color: transparent; width: 60px; height: 60px; font-size: 1.5rem; }
.tid { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--daemp); font-weight: 600; }
.indstil-rad { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.indstil-rad .chips { flex: 1; min-width: 0; }
.stil-rad { flex-wrap: nowrap; }
.billed-knapper { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.billed-info { font-weight: 700; margin-right: auto; font-variant-numeric: tabular-nums; }

.tidslinje-rulle {
  overflow-x: auto; overflow-y: hidden; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--kant);
  padding: 8px 0 10px; scrollbar-color: var(--kant) transparent; overscroll-behavior-x: contain;
}
.tidslinje { position: relative; min-width: 100%; margin: 0 8px; }
.billed-raekke { position: relative; height: 62px; }
.celle {
  position: absolute; top: 0; width: 64px; height: 56px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #000;
}
.celle img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.celle-nr { position: absolute; left: 2px; bottom: 1px; font-size: 0.65rem; font-weight: 700; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.celle.holdt { opacity: 0.75; }
.celle.holdt::before { content: "⧉"; position: absolute; right: 3px; top: 1px; font-size: 0.7rem; text-shadow: 0 0 3px #000; }
.celle.valgt { border-color: var(--gul); box-shadow: 0 0 0 2px var(--gul); }
.spor-omraade { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.spor { position: relative; height: 38px; border-radius: 8px; background: repeating-linear-gradient(90deg, transparent 0 67px, rgba(255,255,255,0.04) 67px 68px); }
.spor::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: rgba(255,255,255,0.03); }
.klip {
  position: absolute; top: 2px; height: 34px; border-radius: 8px; display: flex; align-items: center; gap: 4px;
  padding: 0 8px; overflow: hidden; white-space: nowrap; font-size: 0.82rem; font-weight: 700; color: #120c1c;
  background: var(--blaa); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.2); touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab; z-index: 1;
}
.klip.sjov { background: var(--gul); }
.klip.action { background: #ff8a5c; }
.klip.dyr { background: var(--groen); }
.klip.stemning { background: var(--lilla); }
.klip.musik { background: linear-gradient(90deg, #ff7ac6, #b98cff); }
.klip.stemme { background: #7fe3ff; }
.klip.mangler { background: repeating-linear-gradient(45deg, #666 0 6px, #555 6px 12px); color: #ddd; }
.klip.traekkes { opacity: 0.85; box-shadow: 0 6px 18px rgba(0,0,0,0.6); z-index: 5; cursor: grabbing; transform: scale(1.04); }
.klip-emoji { font-size: 1rem; }
.klip-navn { overflow: hidden; text-overflow: ellipsis; }
.klip-fx { font-size: 0.85rem; }
.spillehoved { position: absolute; top: -4px; bottom: -6px; left: 0; width: 2px; background: var(--roed); pointer-events: none; z-index: 3; box-shadow: 0 0 6px var(--roed); }
.spillehoved::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--roed); }

.lyd-knapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stor-lyd { flex-direction: column; border-radius: var(--radius); min-height: 84px; gap: 2px; }
.stor-emoji { font-size: 1.9rem; }
.hjaelp { text-align: center; }

/* ---------- Ark (bundark) ---------- */
.ark-bag { position: fixed; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity 0.25s; z-index: 100; }
.ark-bag.vis { opacity: 1; }
.ark {
  position: fixed; left: 50%; bottom: 0; z-index: 101; width: min(560px, 100%);
  max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg2); border-radius: 22px 22px 0 0; border: 1px solid var(--kant); border-bottom: 0;
  transform: translate(-50%, 100%); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
  box-shadow: var(--skygge); padding-bottom: var(--sikker-bund);
}
.ark.vis { transform: translate(-50%, 0); }
.ark.hoej { height: 80vh; height: 80dvh; }
.ark-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px; }
.ark-top h2 { font-size: 1.2rem; }
.ark-top .ikon-knap { background: var(--flade); width: 38px; height: 38px; font-size: 1rem; }
.ark-krop { overflow-y: auto; padding: 8px 16px 20px; flex: 1; }
.ark.hoej .ark-krop > .stak { height: 100%; }
@media (min-width: 700px) {
  .ark { bottom: auto; top: 50%; border-radius: 22px; border-bottom: 1px solid var(--kant); transform: translate(-50%, -40%); opacity: 0; transition: transform 0.25s, opacity 0.2s; }
  .ark.vis { transform: translate(-50%, -50%); opacity: 1; }
}

.lydgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; overflow-y: auto; flex: 1; min-height: 0; align-content: start; padding: 2px; }
.lydflise {
  position: relative; aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--kant); background: var(--flade);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
}
.lydflise.valgt { border-color: var(--gul); background: color-mix(in srgb, var(--gul) 14%, var(--flade)); }
.lydflise.henter .flise-emoji { animation: hop 0.5s ease-in-out infinite alternate; }
@keyframes hop { to { transform: translateY(-6px); } }
.flise-emoji { font-size: 2rem; line-height: 1; }
.flise-navn { font-size: 0.8rem; font-weight: 600; text-align: center; line-height: 1.15; }
.flise-maerke { position: absolute; top: 4px; right: 7px; font-size: 0.75rem; color: var(--daemp); }

.indtal .optag-midte { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.optag-knap { width: 92px; height: 92px; border-radius: 50%; border: 5px solid #fff; background: none; display: grid; place-items: center; padding: 0; }
.optag-prik { width: 62px; height: 62px; border-radius: 50%; background: var(--roed); transition: all 0.2s; }
.optag-knap.optager .optag-prik { width: 34px; height: 34px; border-radius: 8px; }
.optag-knap.optager { animation: optagPuls 1.2s ease-in-out infinite; }
@keyframes optagPuls { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--roed) 35%, transparent); } }
.optage-tid { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.2rem; }

.fremskridt { height: 14px; border-radius: 7px; background: var(--flade); overflow: hidden; }
.fremskridt-fyld { height: 100%; width: 0; background: linear-gradient(90deg, var(--gul), #ff8a3d); transition: width 0.2s; }
.resultat { width: 100%; border-radius: 12px; background: #000; max-height: 50vh; }

/* ---------- Diverse ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--sikker-bund) + 24px); transform: translate(-50%, 30px); z-index: 200;
  background: #fff; color: #120c1c; padding: 10px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--skygge);
  opacity: 0; pointer-events: none; transition: all 0.25s; max-width: calc(100% - 32px); text-align: center;
}
.toast.vis { opacity: 1; transform: translate(-50%, 0); }
body[data-side="optag"] .toast { bottom: calc(var(--sikker-bund) + 240px); }
.opdatering { position: fixed; top: calc(var(--sikker-top) + 10px); left: 50%; transform: translateX(-50%); z-index: 300; background: var(--gul); color: #1d1500; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; box-shadow: var(--skygge); }
.fejlside { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
