/* TabteKilo – lyst Apple-inspireret design med friske grønne frugtfarver */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg2: #F5F8F2;          /* let grøn-grå flade */
  --card: #ffffff;
  --line: #E8EDE4;
  --text: #1C1C1E;
  --text2: #6B7266;
  --text3: #9AA195;
  --apple: #34C759;        /* æblegrøn */
  --kiwi: #5DB83A;         /* kiwi */
  --lime: #A8D84E;         /* lime */
  --mint: #2FBF8F;         /* mynte */
  --leaf: #1E7A3C;         /* mørk bladgrøn til tekst */
  --soft: #EAF7E4;         /* lysegrøn baggrund */
  --soft2: #F2FAEE;
  --citrus: #F2B530;       /* bruges sparsomt til advarsler */
  --red: #E5484D;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(30, 60, 20, .04), 0 6px 24px rgba(30, 60, 20, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, "Nunito", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
img, svg, video, canvas { max-width: 100%; }
a { color: var(--leaf); text-decoration: none; }
button { font: inherit; color: inherit; }

.wrap { max-width: 560px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px 32px; }
body.has-tabbar .wrap { padding-bottom: calc(96px + var(--safe-b)); }

/* Typografi */
.eyebrow { font-size: 15px; font-weight: 500; color: var(--text2); margin: 0; }
h1.title { font-family: var(--round); font-size: 34px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 16px; line-height: 1.08; }
h2 { font-family: var(--round); font-size: 21px; font-weight: 750; letter-spacing: -.015em; margin: 30px 0 10px; }
.legend .val, .weight-grid .v, .stat .v, .water-count, .macro b, .timer-ring .t b, .landing-hero h1, .slice-num b { font-family: var(--round); }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.muted { color: var(--text2); }
.small { font-size: 14px; }
.tiny { font-size: 12px; color: var(--text3); }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }
.green { color: var(--leaf); }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.topbar .actions { display: flex; gap: 8px; padding-top: 6px; }

/* Kort */
.card { background: var(--bg2); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.card.soft { background: var(--soft2); border-color: #DDEFD3; box-shadow: none; }
.card.fresh { background: linear-gradient(135deg, #F0FAE8 0%, #E3F6EA 100%); border-color: #D5EECB; box-shadow: none; }
.card.warn { background: #FFF8E8; border-color: #F6E2B2; box-shadow: none; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.link-sm { font-size: 15px; font-weight: 600; color: var(--leaf); background: none; border: 0; padding: 4px 0; cursor: pointer; }

/* Ringe */
.rings-card { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: center; }
.rings { position: relative; width: 148px; height: 148px; }
.rings svg { position: absolute; inset: 0; margin: auto; }
.rings svg.r2 { top: 18px; left: 18px; }
.rings svg.r3 { top: 36px; left: 36px; }
.ring .track { stroke: #EEF3EA; }
.ring.kcal .bar { stroke: var(--apple); }
.ring.prot .bar { stroke: var(--lime); }
.ring.steps .bar { stroke: var(--mint); }
.ring .bar { transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ring.over .bar { stroke: var(--citrus); }
.legend { display: grid; gap: 10px; min-width: 0; }
.legend .row { min-width: 0; }
.legend .lbl { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.legend .val { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.legend .val small { font-size: 14px; font-weight: 500; color: var(--text2); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.kcal { background: var(--apple); } .dot.prot { background: var(--lime); } .dot.steps { background: var(--mint); }

/* Vægtkort */
.weight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.weight-grid .k { font-size: 12px; color: var(--text2); font-weight: 600; }
.weight-grid .v { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.weight-grid .v.big { color: var(--leaf); }
.progress { height: 10px; background: #E9F1E4; border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lime), var(--apple)); }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 14px; border: 0; font-size: 17px; font-weight: 600; cursor: pointer; text-align: center; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--apple); color: #fff; }
.btn.secondary { background: var(--soft); color: var(--leaf); }
.btn.ghost { background: transparent; color: var(--leaf); }
.btn.danger { background: #FDECEC; color: var(--red); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); color: var(--leaf); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Hurtig-tilføj */
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.qa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; border-radius: 18px; border: 0; background: var(--bg2); font-size: 14px; font-weight: 600; color: var(--leaf); cursor: pointer; }
.qa .ic { width: 28px; height: 28px; }
.qa.main { background: var(--apple); color: #fff; border-color: var(--apple); }

/* Vand */
.water { display: flex; align-items: center; gap: 12px; }
.water .glasses { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.glass { width: 22px; height: 28px; border-radius: 4px 4px 8px 8px; border: 2px solid #CFE6F3; background: #fff; position: relative; overflow: hidden; }
.glass.full::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 75%; background: linear-gradient(180deg, #8ED2F2, #4BB3E6); }
.water-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #E6F5FC; color: #1E86B8; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; cursor: pointer; flex: none; }
.water-btn:active { transform: scale(.92); background: #CDEBF8; }
.water-count { font-size: 22px; font-weight: 700; }

/* Lister (iOS grouped) */
.list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.list .item:last-child { border-bottom: 0; }
.list .item .main { flex: 1; min-width: 0; }
.list .item .name { font-weight: 500; overflow-wrap: anywhere; }
.list .item .meta { font-size: 13px; color: var(--text2); }
.list .item .end { text-align: right; font-weight: 600; white-space: nowrap; }
.list a.item, .list button.item { color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; font: inherit; }
.list .item .chev { color: var(--text3); }
.list .item.cheat { background: #FFFBF0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--leaf); }
.badge.cheat { background: #FFF1CC; color: #8A5A00; }
.badge.gray { background: #F0F2EE; color: var(--text2); }

/* Pill */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--soft); color: var(--leaf); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.pill.closed { background: #F0F2EE; color: var(--text2); }

/* Formularer */
label.fl { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=search], textarea, select {
  width: 100%; font: inherit; font-size: 17px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: #FAFCF8; color: var(--text); outline: none; -webkit-appearance: none; appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--apple); background: #fff; box-shadow: 0 0 0 4px rgba(52,199,89,.14); }
textarea { min-height: 96px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.input-unit { position: relative; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 15px; pointer-events: none; }
.input-unit input { padding-right: 46px; }
.error { background: #FDECEC; color: #B4232A; padding: 12px 14px; border-radius: 14px; margin: 10px 0; font-size: 15px; }
.ok { background: var(--soft); color: var(--leaf); padding: 12px 14px; border-radius: 14px; margin: 10px 0; font-size: 15px; }

/* Segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #F0F3EE; padding: 3px; border-radius: 12px; gap: 2px; margin-bottom: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label, .seg a, .seg button { text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text2); cursor: pointer; border: 0; background: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg input:checked + label, .seg .on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Chips (ombrydes – ingen sidescroll) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 15px; cursor: pointer; user-select: none; transition: all .15s; }
.chip.on { background: var(--apple); color: #fff; border-color: var(--apple); }
.chip input { display: none; }
.chip:has(input:checked) { background: var(--apple); color: #fff; border-color: var(--apple); }

/* Hurtigvalg-gitter i tilføj-arket */
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 10px 12px; text-align: left; cursor: pointer; min-height: 62px; }
.pick .n { font-weight: 600; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.pick .m { font-size: 12px; color: var(--text2); margin-top: 2px; }
.pick:active, .pick.sel { border-color: var(--apple); background: var(--soft2); }
.portion { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 10px; }

/* Ark (bottom sheet) */
.sheet-bg { position: fixed; inset: 0; background: rgba(20, 30, 15, .32); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh; background: #fff; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .32s cubic-bezier(.2,.9,.25,1); z-index: 51; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.sheet { visibility: hidden; transition: transform .32s cubic-bezier(.2,.9,.25,1), visibility 0s linear .32s; }
.sheet.open { transform: translateY(0); visibility: visible; transition: transform .32s cubic-bezier(.2,.9,.25,1), visibility 0s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: #D9DED5; margin: 8px auto 2px; flex: none; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 8px; flex: none; }
.sheet .sheet-head h3 { margin: 0; font-size: 19px; }
.sheet .sheet-body { overflow-y: auto; overflow-x: hidden; padding: 4px 16px calc(20px + var(--safe-b)); -webkit-overflow-scrolling: touch; }

/* Tabbar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + var(--safe-b)); background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--text3); padding: 4px 0; min-width: 0; }
.tabbar a.on { color: var(--apple); }

/* Statistik */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.stat { background: var(--bg2); border-radius: 16px; padding: 12px 10px; text-align: center; min-width: 0; }
.stat .v { font-size: 20px; font-weight: 700; }
.stat .k { font-size: 12px; color: var(--text2); font-weight: 600; }

/* Graf */
.chart { width: 100%; height: 160px; display: block; }
.chart .line { stroke: var(--apple); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .dot { fill: #fff; stroke: var(--apple); stroke-width: 3; }
.chart .goal-line { stroke: var(--lime); stroke-dasharray: 5 5; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart .lbl { font-size: 10px; fill: var(--text3); }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; align-items: end; height: 120px; padding-top: 8px; }
.bars .b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bars .b span { width: 100%; max-width: 26px; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, var(--lime), var(--apple)); min-height: 3px; }
.bars .b span.over { background: linear-gradient(180deg, #F7CF6B, var(--citrus)); }
.bars .b span.cheat { background: repeating-linear-gradient(45deg, #F7CF6B 0 4px, #F2B530 4px 8px); }
.bars .b em { font-style: normal; font-size: 11px; color: var(--text3); }

/* Opskrifter */
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rcard { display: block; color: var(--text); }
.rcard .ph { border-radius: 18px; overflow: hidden; }
.rcard .ph { aspect-ratio: 4/3; background: linear-gradient(140deg, #EAF7E1, #D9F1E4); display: flex; align-items: center; justify-content: center; color: var(--kiwi); position: relative; }
.rcard .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard .ph .ic { width: 38px; height: 38px; opacity: .8; }
.rcard .ph .done { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--apple); color: #fff; display: flex; align-items: center; justify-content: center; }
.rcard .ph .done .ic { width: 16px; height: 16px; opacity: 1; }
.rcard .tx { padding: 8px 2px 4px; }
.rcard .t { font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.rcard .m { font-size: 12px; color: var(--text2); margin-top: 4px; }
.hero { border-radius: 24px; overflow: hidden; margin: 0 -16px 14px; aspect-ratio: 16/10; background: linear-gradient(140deg, #E6F6DC, #D3F0E2); display: flex; align-items: center; justify-content: center; color: var(--kiwi); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .ic { width: 64px; height: 64px; opacity: .7; }
.macro { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; text-align: center; }
.macro div { background: var(--bg2); border-radius: 14px; padding: 10px 4px; }
.macro b { display: block; font-size: 18px; }
.macro span { font-size: 11px; color: var(--text2); font-weight: 600; }
.macro .hl { background: var(--soft); color: var(--leaf); }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps-list li { counter-increment: s; position: relative; padding: 0 0 14px 42px; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--leaf); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--apple); flex: none; }
.check.done .name { text-decoration: line-through; color: var(--text3); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--bg2); border-radius: 12px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #fff; color: var(--leaf); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.stepper b { min-width: 30px; text-align: center; }

/* Udfordring */
.challenge { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.challenge .rings { width: 76px; height: 76px; }
.challenge .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }

/* Træning */
.wcard { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.wcard .wi { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(140deg, #E3F6D8, #CDEFDD); color: var(--leaf); display: flex; align-items: center; justify-content: center; flex: none; }
.wcard .wi .ic { width: 26px; height: 26px; }
.wcard .main { flex: 1; min-width: 0; }
.wcard .t { font-weight: 600; }
.wcard .m { font-size: 13px; color: var(--text2); }
.wcard.today { background: var(--soft2); border-radius: 18px; padding: 12px; border-bottom-color: transparent; margin: 4px -12px; }
.wcard.done .wi { background: var(--apple); color: #fff; }
.zone { display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.zone:last-child { border-bottom: 0; }
.zone .bar { width: 8px; height: 40px; border-radius: 4px; }
.zone .r { font-weight: 700; font-size: 18px; white-space: nowrap; }
.z1 { background: #CFEFC0; } .z2 { background: var(--lime); } .z3 { background: var(--kiwi); } .z4 { background: #1E9E4A; }

.timer-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.timer-ring { position: relative; width: 260px; height: 260px; max-width: 76vw; max-height: 76vw; }
.timer-ring svg { width: 100%; height: 100%; }
.timer-ring .t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-ring .t b { font-size: 64px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-ring .t span { font-size: 14px; color: var(--text2); font-weight: 600; margin-top: 6px; }
.timer-phase { font-size: 26px; font-weight: 700; text-align: center; margin: 16px 0 4px; letter-spacing: -.01em; }
.timer-note { color: var(--text2); text-align: center; min-height: 22px; }
.timer-next { margin-top: 10px; font-size: 14px; color: var(--text3); text-align: center; }
.timer-ctrl { display: grid; grid-template-columns: 64px 1fr 64px; gap: 14px; align-items: center; width: 100%; margin-top: 22px; }
.timer-ctrl .icon-btn { width: 64px; height: 64px; }
.tprog { width: 100%; height: 6px; border-radius: 99px; background: #EEF3EA; overflow: hidden; margin-top: 18px; }
.tprog span { display: block; height: 100%; background: var(--apple); width: 0; transition: width .4s; }
body.phase-work .timer-ring .bar { stroke: var(--apple); }
body.phase-rest .timer-ring .bar { stroke: #8ED2F2; }
body.phase-warm .timer-ring .bar { stroke: var(--lime); }

/* Selfies */
.selfie-player { position: relative; border-radius: 22px; overflow: hidden; background: #F0F5EC; aspect-ratio: 3/4; }
.selfie-player canvas { width: 100%; height: 100%; display: block; }
.selfie-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.selfie-grid div { aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; background: var(--bg2); position: relative; }
.selfie-grid img { width: 100%; height: 100%; object-fit: cover; }
.selfie-grid span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; background: rgba(255,255,255,.88); padding: 1px 5px; border-radius: 6px; font-weight: 600; }

/* Hvilepuls skala */
.rhr-scale { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 3px; margin: 10px 0 4px; }
.rhr-scale div { height: 8px; border-radius: 4px; background: #E9EFE5; }
.rhr-scale div.on { background: var(--apple); }
.rhr-scale div.on.mid { background: var(--lime); }
.rhr-scale div.on.hi { background: var(--citrus); }

/* Velkomst / login */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(140deg, var(--lime), var(--apple)); display: flex; align-items: center; justify-content: center; color: #fff; }
.landing-hero { text-align: left; padding: 24px 0 8px; }
.landing-hero h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 12px; }
.landing-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--kiwi), var(--apple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.feature .fi { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); color: var(--leaf); display: flex; align-items: center; justify-content: center; flex: none; }

/* Onboarding */
.ob-step { display: none; }
.ob-step.on { display: block; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 16px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 4px; background: #DCE4D6; transition: all .25s; }
.ob-dots i.on { width: 22px; background: var(--apple); }
.plates { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.plate { border: 2px solid var(--line); border-radius: 18px; padding: 10px 4px; text-align: center; cursor: pointer; background: #fff; }
.plate i { display: block; margin: 4px auto 6px; border-radius: 50%; border: 2px solid #CFE5C4; background: radial-gradient(circle, #fff 55%, #F2F8EE 56%); }
.plate b { font-size: 15px; }
.plate small { display: block; font-size: 11px; color: var(--text2); }
.plate.on, .plate:has(input:checked) { border-color: var(--apple); background: var(--soft2); }
.plate input { display: none; }
.counter { font-weight: 700; color: var(--leaf); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade { animation: fadeUp .35s ease both; }

.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: rgba(28,28,30,.92); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; opacity: 0; transition: all .25s; z-index: 80; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--apple); animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.sp { height: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
code.tok { display: block; background: var(--bg2); padding: 10px 12px; border-radius: 12px; font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }
ol.howto { padding-left: 20px; margin: 8px 0; } ol.howto li { margin-bottom: 6px; }

/* Limeskiven – appens kendetegn */
.slice-wrap { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.slice { position: relative; width: 236px; height: 236px; }
.slice svg { width: 100%; height: 100%; display: block; }
.slice .rind { fill: #2E8B3F; }
.slice .pith { fill: #F4FAE9; }
.slice .seg { fill: #E7F2D8; transition: fill .3s; }
.slice .seg.on { fill: #9BD13B; }
.slice .seg.part { fill: #C6E58E; }
.slice.over .rind { fill: #E58A1F; }
.slice.over .seg.on { fill: #F7B23B; }
.slice .core { fill: #fff; }
.slice-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.slice-num b { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.slice-num span { font-size: 13px; color: var(--text2); margin-top: 4px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .slice.anim .seg.on, .slice.anim .seg.part { animation: segIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 45ms); transform-origin: 50% 50%; }
}
@keyframes segIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.slice-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); width: 100%; text-align: center; margin-top: 10px; }
.slice-meta div { min-width: 0; }
.slice-meta b { display: block; font-family: var(--round); font-size: 19px; font-weight: 750; }
.slice-meta small { font-size: 12.5px; color: var(--text2); }
.meter { margin: 14px 0 0; }
.meter .top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 8px; }
.meter .top b { font-weight: 650; }
.meter .track { height: 8px; border-radius: 99px; background: #EEF3E9; overflow: hidden; }
.meter .track span { display: block; height: 100%; border-radius: 99px; background: var(--lime); }
.meter.steps .track span { background: var(--mint); }
.section { padding: 16px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
:focus-visible { outline: 3px solid rgba(52,199,89,.45); outline-offset: 2px; border-radius: 8px; }

/* Ringe uden om limeskiven: protein, skridt, træning */
.slice.ringed { width: 300px; height: 300px; max-width: calc(100vw - 32px); max-height: calc(100vw - 32px); }
.ring-track { stroke: #EEF3E9; }
.ring-track.r-prot { stroke: #F4F7E2; } .ring-track.r-steps { stroke: #E5F6EF; } .ring-track.r-train { stroke: #FDEEDD; }
.ring-bar { transition: stroke-dashoffset .9s cubic-bezier(.2,.8,.2,1); }
.ring-bar.r-prot { stroke: #C3D82F; } .ring-bar.r-steps { stroke: #2FBF8F; } .ring-bar.r-train { stroke: #F28C28; }
.ring-legend { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; width: 100%; margin-top: 12px; }
.ring-legend div { background: var(--bg2); border-radius: 14px; padding: 9px 10px; min-width: 0; }
.ring-legend .l { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text2); font-weight: 600; }
.ring-legend .l i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ring-legend b { display: block; font-family: var(--round); font-size: 17px; font-weight: 750; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring-legend small { font-size: 12px; color: var(--text2); font-weight: 500; }
.i-prot { background: #C3D82F; } .i-steps { background: #2FBF8F; } .i-train { background: #F28C28; }
