/* Madlog — skrevet i hånden efter docs/DESIGN.md.
   Farverne er DESIGN.md's tokens. Ret dem her og ingen andre steder. */

@font-face {
  font-family: 'DM Sans';
  src: url('/fonte/dmsans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --ink: #111418;
  --muted: #5F6570;
  --line: #EEF0F3;
  --fill: #F0F1F4;
  --track: #E4E6EA;
  --kant: #E6E8EC;
  --accent: #F6B49A;

  --groen: #DDF0C8;   --groen-tekst: #2F4A12;   --groen-staerk: #5E9A2E;
  --fersken: #FBD9CB; --fersken-tekst: #6E2D12; --fersken-staerk: #E0703F;
  --lilla: #E7E0FB;   --lilla-tekst: #3F3180;   --lilla-staerk: #7B5FDB;
  --blaa: #D4EAF5;    --blaa-tekst: #174157;    --blaa-staerk: #3C8FC0;

  --skygge-kort: 0 8px 24px rgba(17, 20, 24, 0.05);
  --skygge-knap: 0 4px 14px rgba(17, 20, 24, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.4 'DM Sans', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
a { color: var(--ink); }

h1, h2 { margin: 0; font-weight: 800; }
h1 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: 20px; letter-spacing: -0.02em; }

.side {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lille { font-size: 14px; color: var(--muted); }
.fed { font-weight: 700; }
.svag { font-size: 16px; font-weight: 500; color: var(--muted); }
.stort { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.enhed { font-size: 12px; font-weight: 500; color: var(--muted); }
.tom { margin: 0; color: var(--muted); }
.blok { display: flex; flex-direction: column; gap: 12px; }

/* --- Pastelfarver -------------------------------------------------------- */
.groen   { background: var(--groen);   color: var(--groen-tekst); }
.fersken { background: var(--fersken); color: var(--fersken-tekst); }
.lilla   { background: var(--lilla);   color: var(--lilla-tekst); }
.blaa    { background: var(--blaa);    color: var(--blaa-tekst); }
.graa    { background: var(--line);    color: var(--muted); }

/* --- Top og avatar ------------------------------------------------------- */
.top { display: flex; align-items: center; gap: 12px; }
.top-navn { flex-grow: 1; display: flex; flex-direction: column; gap: 1px; }
.navn { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.avatar {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.lille-avatar { width: 36px; height: 36px; font-size: 15px; }
.avatar.stor {
  width: 96px; height: 96px; font-size: 38px;
  border: 4px solid var(--card);
  box-shadow: 0 8px 24px rgba(17, 20, 24, 0.08);
}

.rund {
  flex-shrink: 0;
  width: 48px; height: 48px;
  padding: 0; border: 0; border-radius: 999px;
  background: var(--card);
  box-shadow: var(--skygge-knap);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.side-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; }
.side-titel { font-size: 16px; font-weight: 700; letter-spacing: 0; text-align: center; }

/* --- Ugestrimmel --------------------------------------------------------- */
.titel-linje { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.uge { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.uge-dag {
  height: 68px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 600;
}
.uge-tal { font-size: 16px; font-weight: 700; color: var(--ink); }
.uge-dag.valgt { background: var(--accent); color: var(--fersken-tekst); font-weight: 700; }
.uge-dag.valgt .uge-tal { font-weight: 800; }
.uge-dag.fremtid { background: transparent; }
.uge-dag.fremtid .uge-tal { font-weight: 500; color: var(--muted); }

/* --- Kort ---------------------------------------------------------------- */
.kort {
  background: var(--card);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--skygge-kort);
}

.ring-kort { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; flex-shrink: 0; width: 132px; height: 132px; }
.ring svg { display: block; }
.ring-tal {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-tal .stort { font-size: 26px; }
.ring-tal .lille { font-size: 12px; }
.ring-liste { margin: 0; flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.ring-liste div { display: flex; flex-direction: column; gap: 1px; }
.ring-liste dt { font-size: 13px; color: var(--muted); }
.ring-liste dd { margin: 0; font-size: 18px; font-weight: 700; }

/* Pastelfelterne to og to */
.to-felter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.felt {
  border-radius: 24px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.felt-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.felt-ikon {
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  display: flex; align-items: center; justify-content: center;
}
.felt-tal { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 500; }
.felt-note { font-size: 13px; font-weight: 500; }
.felt > .fed { font-size: 13px; }
.felt > .stort { font-size: 28px; }
.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); overflow: hidden; }
.bar div { height: 8px; border-radius: 999px; background: var(--groen-staerk); }

/* Liste med måltider */
.liste { padding: 6px 16px; display: flex; flex-direction: column; }
.raekke { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.raekke + .raekke { border-top: 1px solid var(--line); }
.raekke-ikon {
  flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.raekke-tekst { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.raekke-tekst .lille { font-size: 13px; }
.raekke-tekst .fed { font-size: 16px; }

/* Tabel med udregningen */
.tabel { padding: 8px 20px; display: flex; flex-direction: column; }
.tabel div {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; font-size: 15px; color: #3A3F47;
}
.tabel div + div { border-top: 1px solid var(--line); }
.tabel strong { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tabel .hjaelp { margin: 0 0 12px; }
.tag {
  font-size: 11px; font-weight: 800;
  color: var(--groen-tekst); background: var(--groen);
  padding: 3px 8px; border-radius: 999px;
  margin-left: 4px; white-space: nowrap;
}

/* --- Profil -------------------------------------------------------------- */
.profil-hoved { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.navn-stort { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.centreret { justify-content: center; }
.chip-knap, .chip span {
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--kant);
  background: var(--card);
  font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center;
  cursor: pointer;
}
.chip-knap.valgt, .chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input, .segment input, .valg input { position: absolute; opacity: 0; pointer-events: none; }
.chip input:focus-visible + span,
.segment input:focus-visible + span,
.valg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.linje-knap {
  width: 100%; min-height: 60px;
  padding: 0 16px 0 10px;
  border: 0; border-radius: 22px;
  background: var(--card);
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; text-align: left;
  cursor: pointer;
}
.linje-ikon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px;
  background: var(--fill);
  display: flex; align-items: center; justify-content: center;
}

/* --- Formularer ---------------------------------------------------------- */
.velkommen { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-top: 24px; }
.velkommen.venstre { align-items: flex-start; text-align: left; padding-top: 8px; }
.velkommen p { margin: 0; }
.maerke {
  width: 64px; height: 64px; border-radius: 999px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}

.formular { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; }
.formular legend { padding: 0; }
.trin-titel { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; float: left; width: 100%; }
.felt-label { font-size: 14px; font-weight: 700; margin-top: 8px; }
.hjaelp { font-size: 13px; color: var(--muted); }
.fejl { margin: 0; font-size: 14px; font-weight: 600; color: #B3261E; }

.input {
  width: 100%; height: 52px;
  padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--fill);
  font-size: 16px; font-weight: 600;
}
.input:focus { outline: none; border-color: var(--ink); background: var(--card); }

.med-enhed { position: relative; }
.med-enhed span {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 15px; font-weight: 600; color: var(--muted); pointer-events: none;
}
.med-enhed .input { padding-right: 76px; }

.vaelg-person { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vaelg-person legend { margin-bottom: 8px; font-size: 14px; }
.chip { position: relative; }

.segment {
  display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column;
  padding: 4px; border-radius: 999px; background: var(--track);
}
.segment label { position: relative; }
.segment span {
  height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--muted);
  cursor: pointer;
}
.segment input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(17, 20, 24, 0.08); }

.valg-liste { display: flex; flex-direction: column; gap: 8px; }
.valg { position: relative; }
.valg span {
  min-height: 56px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--kant);
  display: flex; align-items: center;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
}
.valg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.tempo { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.knap {
  width: 100%; height: 58px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 16px; font-weight: 700; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
}
.knap.sekundaer { background: var(--card); color: var(--ink); box-shadow: var(--skygge-knap); }
.formular .knap { margin-top: 12px; }

/* Introens trin: med JavaScript vises ét ad gangen. */
.intro { display: flex; flex-direction: column; gap: 16px; }
.trin-prikker { display: none; gap: 6px; }
.trin-prikker span { flex: 1; height: 6px; border-radius: 999px; background: var(--track); }
.trin-knapper { display: flex; gap: 12px; }
.trin-knapper [data-tilbage], .trin-knapper [data-naeste] { display: none; }

.js .trin-prikker { display: flex; }
.js .trin { display: none; }
.js .trin.vist { display: flex; }
.js .trin-knapper [data-naeste] { display: flex; }
.js .trin-knapper [data-gem] { display: none; }
.js .intro.foerste [data-tilbage] { display: none; }
.js .intro:not(.foerste) [data-tilbage] { display: flex; }
.js .intro.sidste [data-naeste] { display: none; }
.js .intro.sidste [data-gem] { display: flex; }
.js .trin-prikker span.naaet { background: var(--ink); }
.skjult { display: none !important; }

/* --- Menuen i bunden ----------------------------------------------------- */
.menu {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: calc(100% - 32px); max-width: 448px;
  height: 68px; padding: 8px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(17, 20, 24, 0.10);
  display: flex; align-items: center; justify-content: space-between;
}
.menu-punkt {
  width: 48px; height: 48px; border-radius: 999px;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
}
.menu-punkt.valgt {
  width: auto; height: 52px; padding: 0 18px 0 14px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700;
}
.menu-log { width: 52px; height: 52px; background: var(--accent); color: var(--ink); }
.menu-punkt.kommer { opacity: 0.35; }

/* --- Log måltid ---------------------------------------------------------- */
.chips.rul {
  flex-wrap: nowrap; overflow-x: auto;
  margin: 0 -20px; padding: 0 20px 4px;
  scrollbar-width: none;
}
.chips.rul::-webkit-scrollbar { display: none; }
a.chip-knap { text-decoration: none; color: var(--ink); flex-shrink: 0; }
a.chip-knap.valgt { color: #fff; }

.besked-ok {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 22px;
  background: var(--groen); color: var(--groen-tekst); font-size: 14px;
}
.besked-ok span:nth-child(2) { flex-grow: 1; }
.besked-ok a { color: var(--groen-tekst); font-weight: 700; }

.soeg {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 20px;
  border-radius: 999px; background: var(--card);
  box-shadow: var(--skygge-knap); color: var(--muted);
}
.soeg input { flex-grow: 1; min-width: 0; height: 40px; border: 0; background: transparent; font-size: 16px; color: var(--ink); outline: none; }
.soeg:focus-within { box-shadow: 0 0 0 2px var(--ink); }

.log-form { display: flex; flex-direction: column; gap: 16px; }
.valgt-vare { border-radius: 28px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.valgt-top { display: flex; justify-content: space-between; align-items: center; }
.valgt-top a { font-size: 14px; font-weight: 700; color: var(--fersken-tekst); }
.tag.hvid { background: var(--card); color: var(--fersken-tekst); margin: 0; font-size: 12px; padding: 5px 10px; }
.valgt-navn { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.valgt-tal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.valgt-tal div { background: rgba(255, 255, 255, 0.7); border-radius: 20px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.valgt-tal .stort { font-size: 22px; }
.segment.lys { background: rgba(255, 255, 255, 0.55); }
.segment.lys span { color: var(--fersken-tekst); font-size: 14px; }

.enhed-ny summary { font-size: 14px; font-weight: 700; cursor: pointer; }
.enhed-ny[open] summary { margin-bottom: 10px; }
.enhed-felter { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.formular .enhed-felter { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.enhed-felter > span { font-weight: 700; }
.enhed-felter .med-enhed .input { padding-right: 36px; }
.enhed-felter .med-enhed span { right: 16px; }
.knap.lille-knap { width: auto; height: 52px; padding: 0 18px; margin: 0; }

.hvem { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.person { display: flex; align-items: center; gap: 12px; }
.person-tekst { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.person-tekst .lille { font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper button {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.stepper button[data-trin="1"] { background: var(--ink); color: #fff; }
.stepper-felt { display: flex; flex-direction: column; align-items: center; width: 64px; }
.stepper-felt input {
  width: 100%; border: 0; background: transparent; text-align: center;
  font-size: 18px; font-weight: 800; padding: 0; outline: none;
}
.stepper-felt input:focus { text-decoration: underline; }
.stepper-felt span { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: -2px; }

.kontakt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 15px; font-weight: 600; cursor: pointer; position: relative;
}
.kontakt input { position: absolute; opacity: 0; pointer-events: none; }
.kontakt-knap { position: relative; flex-shrink: 0; width: 52px; height: 30px; border-radius: 999px; background: var(--track); transition: background .15s; }
.kontakt-knap::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: left .15s;
}
.kontakt input:checked + .kontakt-knap { background: var(--ink); }
.kontakt input:checked + .kontakt-knap::after { left: 25px; }
.kontakt input:focus-visible + .kontakt-knap { outline: 2px solid var(--ink); outline-offset: 2px; }
.anden { display: none; }
.hvem:has([data-og-for]:checked) .anden { display: block; }

.knap.stor-knap { height: 60px; font-size: 17px; }

.rund-lille {
  flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: var(--fill); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.rund-lille.moerk { background: var(--ink); color: #fff; }
a.raekke, a.raekke-tekst { text-decoration: none; color: var(--ink); }
.pil-ikon { color: var(--muted); flex-shrink: 0; }
.klip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcal-tal { white-space: nowrap; }
.genveje { display: flex; flex-direction: column; gap: 8px; }
.genveje .linje-knap { text-decoration: none; color: var(--ink); }

.gitter-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lille-felt { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lille-felt .input { padding: 0 52px 0 16px; }
.lille-felt .med-enhed span { right: 16px; font-size: 13px; }
.svag-lille { font-weight: 500; color: var(--muted); }
.centreret-tekst { text-align: center; }
.tekst-knap { border: 0; background: none; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--muted); text-decoration: underline; cursor: pointer; }
.uge-skift { display: flex; align-items: center; gap: 6px; }
.uge-skift .rund-lille { width: 36px; height: 36px; background: var(--card); }
/* Pilene er 36 px at se på, men trykfladen er 44 px (DESIGN.md). */
.uge-skift .rund-lille { position: relative; }
.uge-skift .rund-lille::after { content: ''; position: absolute; inset: -4px; }
/* Små tekstlinks får også en trykflade på 44 px. */
.valgt-top a, .besked-ok a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin: -12px -8px; }
.enhed-ny summary { padding: 12px 0; }
/* Overskriften og månedspilene skal kunne stå på én linje ned til 360 px. */
.titel-linje { gap: 8px; }
.titel-linje h1 { white-space: nowrap; font-size: clamp(24px, 7.4vw, 30px); }
.uge-skift { flex-shrink: 0; }

/* --- Trin 2: opskrifter, batches, forslag og tallerken -------------------- */
.flex-1 { flex: 1; min-width: 0; }
.luft { padding: 14px 0; }
.inline { display: inline; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px;
  background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6570' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center; }

/* Opskriftskort to og to (design/Opskrifter.dc.html) */
.gitter-kort { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opskrift-kort { position: relative; min-height: 180px; border-radius: 26px; color: var(--ink); }
.opskrift-kort.fremhaevet { box-shadow: 0 0 0 3px var(--ink); }
.opskrift-link {
  width: 100%; height: 100%; min-height: 180px; padding: 16px;
  border: 0; background: none; font: inherit; text-align: left; color: inherit; text-decoration: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
}
.opskrift-kort .felt-ikon { width: 40px; height: 40px; }
.opskrift-tekst { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.opskrift-navn { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.opskrift-linje { font-size: 13px; opacity: .85; }
.opskrift-kort .tag.hvid { font-size: 11px; padding: 3px 8px; }
.opskrift-kort.groen .opskrift-linje, .opskrift-kort.groen .tag { color: var(--groen-tekst); }
.opskrift-kort.fersken .opskrift-linje, .opskrift-kort.fersken .tag { color: var(--fersken-tekst); }
.opskrift-kort.lilla .opskrift-linje, .opskrift-kort.lilla .tag { color: var(--lilla-tekst); }
.opskrift-kort.blaa .opskrift-linje, .opskrift-kort.blaa .tag { color: var(--blaa-tekst); }
.opskrift-ret {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.75); color: var(--ink);
}
.opskrift-kort.ny {
  min-height: 180px; padding: 16px; border: 2px dashed var(--track); background: transparent;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none;
}
.opskrift-kort.ny .felt-ikon { background: var(--card); }

.ny-beholder summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.ny-beholder summary::-webkit-details-marker { display: none; }
.ny-beholder[open] summary { margin-bottom: 8px; }
.ny-beholder .formular { padding: 0; box-shadow: none; }

/* Opskrift-editoren */
.valg .valg-hjaelp { display: block; font-size: 13px; font-weight: 500; opacity: .7; margin-left: 8px; }
.valg span:has(.valg-hjaelp) { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.segment.smal span { font-size: 13px; }
.farver { display: flex; gap: 12px; }
.farve { position: relative; }
.farve input { position: absolute; opacity: 0; pointer-events: none; }
.farve span { display: block; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; border: 3px solid transparent; }
.farve.groen span { background: var(--groen); }
.farve.fersken span { background: var(--fersken); }
.farve.lilla span { background: var(--lilla); }
.farve.blaa span { background: var(--blaa); }
.farve input:checked + span { border-color: var(--ink); }
.farve input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.tag { align-self: flex-start; margin-left: 0; }

.ingrediens { gap: 10px; }
.lille-maengde { display: flex; align-items: center; gap: 4px; flex-shrink: 0; height: 44px; padding: 0 12px; border-radius: 999px; background: var(--fill); }
.lille-maengde input { width: 52px; border: 0; background: transparent; text-align: right; font-size: 15px; font-weight: 700; outline: none; }
.lille-maengde span { font-size: 13px; font-weight: 600; color: var(--muted); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lille-maengde:focus-within { box-shadow: 0 0 0 2px var(--ink); }

/* Batch (design/Batch.dc.html) */
.batch-top { display: flex; flex-direction: column; gap: 6px; }
.tre-felter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tre-felter .felt { border-radius: 22px; padding: 14px; gap: 4px; }
.tre-felter .stort { font-size: 22px; }
.tre-felter .fed { font-size: 12px; }
.tre-felter .felt-note { font-size: 12px; }
.portion { display: flex; flex-direction: column; gap: 12px; }
.resultat { border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.resultat .stort { font-size: 28px; }
.tabel.smal { padding: 0; box-shadow: none; }

/* Forslag på forsiden: kort der kan swipes sidelæns */
.karrusel {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none;
}
.karrusel::-webkit-scrollbar { display: none; }
.forslag {
  flex-shrink: 0; width: 256px; scroll-snap-align: start;
  border-radius: 26px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.forslag .tag.hvid { font-size: 12px; padding: 5px 10px; }
.forslag.groen .tag, .forslag.groen .forslag-linje { color: var(--groen-tekst); }
.forslag.fersken .tag, .forslag.fersken .forslag-linje { color: var(--fersken-tekst); }
.forslag.lilla .tag, .forslag.lilla .forslag-linje { color: var(--lilla-tekst); }
.forslag.blaa .tag, .forslag.blaa .forslag-linje { color: var(--blaa-tekst); }
.forslag-navn { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; line-height: 1.15; }
.forslag-linje { font-size: 14px; }
.pille-knap {
  margin-top: 6px; height: 44px; padding: 0 18px 0 14px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer;
}

.moerkt-kort { background: var(--ink); color: #fff; border-radius: 28px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.moerkt-kort .flex-1 { display: flex; flex-direction: column; gap: 6px; }
.moerkt-titel { font-size: 18px; font-weight: 700; }
.moerkt-tekst { font-size: 14px; color: #C9CDD3; line-height: 1.4; }
.accent-knap {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 999px;
  background: var(--accent); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.rest-linje { margin: 0; }
.rest-linje strong { color: var(--ink); }

/* Vej på tallerken */
.lille-soeg { box-shadow: none; background: var(--fill); height: 52px; }
.vaelg-raekke { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.stort-tal { margin: 0; font-size: 18px; font-weight: 800; text-align: center; }
.knap:disabled { opacity: .35; cursor: default; }
/* hidden skal vinde over display: flex og grid i klasserne ovenfor. */
[hidden] { display: none !important; }

/* --- Trin 3: fremskridt, vejning, fri dag og dagens knapper --------------- */
a.felt { text-decoration: none; color: var(--lilla-tekst); }
.traen-bar { display: grid; gap: 6px; }
.traen-bar span { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); }
.traen-bar span.fyldt { background: var(--lilla-staerk); }
.fri-tag { margin: 4px 0 0; background: var(--accent); color: var(--fersken-tekst); }

.dag-knapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dag-knapper .hel { grid-column: 1 / -1; }
.knap.mellem { height: 52px; font-size: 14px; }
.dag-knapper form .knap { width: 100%; }
.knap.aktiv { background: var(--accent); box-shadow: none; }

.valg-knap {
  width: 100%; min-height: 64px; padding: 10px 22px; border: 1px solid var(--kant); border-radius: 26px;
  background: var(--card); text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.valg-knap.valgt { background: var(--ink); color: #fff; border-color: var(--ink); }
.valg-knap.valgt .lille { color: #C9CDD3; }
.stort-felt { height: 64px; font-size: 24px; font-weight: 800; }

.segment-link {
  height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none;
}
.segment-link.valgt { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(17, 20, 24, 0.08); }
.avatar-knap { padding: 0; }
.avatar-knap.valgt { box-shadow: 0 0 0 3px var(--ink); }

.graf-kort { display: flex; flex-direction: column; gap: 12px; }
.graf-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.graf-tal { display: flex; flex-direction: column; gap: 2px; }
.kaempe { font-size: 38px; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.tag-stor { flex-shrink: 0; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.vaegt-graf { width: 100%; height: auto; display: block; font-family: 'DM Sans', system-ui, sans-serif; overflow: visible; }
.graf-akse { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -6px; }

.soejler { position: relative; height: 136px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 14px; }
.soejle { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 136px; }
.soejle span { font-size: 12px; color: var(--muted); line-height: 20px; }
.soejle-bar { width: 20px; border-radius: 999px; background: var(--fersken-staerk); }
.soejle-bar.fri { background: var(--accent); }
.soejle-bar.tom { background: var(--track); }
.maal-linje { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); opacity: .45; }
.forklaring { margin: 0; line-height: 1.5; }

.input-med-knap { display: flex; gap: 10px; }
.input-med-knap .knap.lille-knap { flex-shrink: 0; }
.uge-traening { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0; }
.uge-traening > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.traen-prik { width: 38px; height: 38px; border-radius: 999px; background: var(--fill); display: flex; align-items: center; justify-content: center; }
.traen-prik.traent { background: var(--lilla-staerk); color: #fff; }
.traen-prik.i-dag { border: 2px solid var(--lilla-staerk); background: transparent; }
.traen-form { display: flex; flex-direction: column; gap: 12px; }
.traen-form .chip span { height: 40px; padding: 0 14px; font-size: 13px; }

.streget { text-decoration: line-through; color: var(--muted) !important; font-weight: 600 !important; }
.indstillinger { display: flex; flex-direction: column; gap: 8px; }
.indstillinger .linje-knap { text-decoration: none; color: var(--ink); }
.blok-tekst { display: block; font-size: 15px; font-weight: 600; }
.indstillinger .lille { font-size: 12px; }

/* --- Trin 4: stregkode og påmindelse -------------------------------------- */
.kamera { position: relative; border-radius: 28px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.kamera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kamera-ramme { position: absolute; inset: 30% 12%; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); }
