:root {
  --bg: #0e0f12;
  --flate: #17191e;
  --flate2: #20232a;
  --kant: #2b2f38;
  --tekst: #f3f4f6;
  --dempet: #9aa1ad;
  --aksent: #ff6b3d;
  --aksent-tekst: #1a0a04;
  --aksent-svak: rgba(255, 107, 61, 0.16);
  --ok: #3ecf8e;
  --ok-svak: rgba(62, 207, 142, 0.15);
  --advarsel: #f5b83d;
  --advarsel-svak: rgba(245, 184, 61, 0.14);
  --fare: #ff6b6b;
  --radius: 16px;
  --bredde: 640px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tekst);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1,
h2,
p {
  margin: 0;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}

a {
  color: var(--aksent);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: inherit;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--aksent);
  outline-offset: 2px;
}

section {
  margin-top: 26px;
}

.ikon {
  flex: none;
  display: block;
}

/* ---------- Ramme ---------- */

.app {
  --faner-h: 0px;
  --banner-h: 0px;
  --trygg: env(safe-area-inset-bottom, 0px);
  max-width: var(--bredde);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.app.med-faner {
  --faner-h: calc(58px + env(safe-area-inset-bottom, 0px));
  --trygg: 0px;
}

.app.med-banner {
  --banner-h: 42px;
}

.skjerm {
  padding: 0 16px calc(var(--faner-h) + var(--banner-h) + var(--trygg) + 28px);
}

.skjerm.med-bunnlinje {
  padding-bottom: calc(var(--faner-h) + var(--banner-h) + var(--trygg) + 100px);
}

.skjerm.okt {
  padding-bottom: calc(var(--trygg) + 180px);
}

.oppstart {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--kant);
  border-top-color: var(--aksent);
  animation: snurr 0.8s linear infinite;
}

@keyframes snurr {
  to {
    transform: rotate(360deg);
  }
}

.topp {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  margin: 0 -16px 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
  background: rgba(14, 15, 18, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topp-tittel {
  flex: 1;
  min-width: 0;
  padding-left: 4px;
}

.topp h1 {
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topp-hoyre {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hjem-topp {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 16px;
}

.hjem-topp h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.faner {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: var(--bredde);
  margin: 0 auto;
  height: var(--faner-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(20, 22, 27, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--kant);
}

.faner a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--dempet);
  font-size: 11px;
  font-weight: 600;
}

.faner a.pa {
  color: var(--aksent);
}

.oktbanner {
  position: fixed;
  z-index: 29;
  left: 0;
  right: 0;
  bottom: var(--faner-h);
  max-width: var(--bredde);
  margin: 0 auto;
  height: calc(42px + var(--trygg));
  padding: 0 16px var(--trygg);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--aksent);
  color: var(--aksent-tekst);
  font-weight: 700;
  font-size: 14px;
}

.oktbanner .voks {
  flex: 1;
}

.puls {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  animation: puls 1.6s ease-in-out infinite;
}

@keyframes puls {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.bunnlinje {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: calc(var(--faner-h) + var(--banner-h));
  max-width: var(--bredde);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + var(--trygg));
  background: linear-gradient(to top, var(--bg) 70%, rgba(14, 15, 18, 0));
}

.app.med-banner .bunnlinje {
  bottom: calc(var(--faner-h) + var(--banner-h) + var(--trygg));
  padding-bottom: 10px;
}

/* ---------- Tekst og små hjelpere ---------- */

.dempet {
  color: var(--dempet);
}

.liten {
  font-size: 13px;
}

.midt {
  text-align: center;
  margin-top: 16px;
}

.luft {
  margin-top: 14px;
}

.mellom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mellom h2 {
  margin-bottom: 0;
}

.mellom + .utstyrsliste,
.mellom + .fremdrift {
  margin-top: 10px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.to-linjer {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.etikett {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dempet);
  margin-bottom: 6px;
}

.ingress {
  font-size: 17px;
  margin-top: 14px;
}

.ingress + p {
  margin-top: 10px;
}

.lenke {
  color: var(--aksent);
  font-weight: 600;
}

.antall-linje {
  margin: 12px 0 8px;
}

/* ---------- Knapper ---------- */

.knapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
}

.knapp.primar {
  background: var(--aksent);
  color: var(--aksent-tekst);
}

.knapp.sekundar {
  background: var(--flate2);
  color: var(--tekst);
}

.knapp.fare {
  background: transparent;
  color: var(--fare);
  border: 1px solid var(--kant);
}

.knapp.bred {
  display: flex;
  width: 100%;
}

.knapp.voks {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.knapp.liten {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 10px;
}

.knapperad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.knapperad > .knapp {
  flex: 1 1 0;
  padding: 0 10px;
}

.ikonknapp {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--tekst);
}

.ikonknapp.liten {
  width: 36px;
  height: 36px;
  color: var(--dempet);
}

.ikonknapp.fylt {
  background: var(--aksent);
  color: var(--aksent-tekst);
  border-radius: 50%;
}

.ikonknapp.aktiv {
  color: var(--advarsel);
}

/* ---------- Kort ---------- */

.kort {
  display: block;
  background: var(--flate);
  border: 1px solid var(--kant);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--tekst);
}

.kort + .kort {
  margin-top: 12px;
}

.kort p + p {
  margin-top: 6px;
}

.kort .segment + p {
  margin-top: 10px;
}

.lenkekort,
.oppsummering,
.aktiv-kort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.lenkekort {
  margin-top: 12px;
}

.lenkekort strong,
.lenkekort .dempet,
.oppsummering strong {
  display: block;
}

.aktiv-kort {
  background: var(--aksent);
  border-color: var(--aksent);
  color: var(--aksent-tekst);
  margin-bottom: 14px;
}

.aktiv-tekst {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tips {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--aksent-svak);
  color: var(--tekst);
  font-size: 14px;
}

.tips span {
  flex: 1;
}

.utforsk {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.utforsk .ikon {
  color: var(--aksent);
  margin-bottom: 6px;
}

.rutenett2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rutenett2 .kort + .kort {
  margin-top: 0;
}

.ferdig-kort {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ok-svak);
  border-color: transparent;
  margin-bottom: 16px;
}

.ferdig-kort .ikon {
  color: var(--ok);
}

.ferdig-kort strong,
.ferdig-kort span {
  display: block;
}

.varsel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--advarsel-svak);
  font-size: 14px;
}

/* ---------- Valg ---------- */

.segment {
  display: flex;
  background: var(--flate2);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.segment button {
  flex: 1;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  color: var(--dempet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment button.pa {
  background: var(--aksent);
  color: var(--aksent-tekst);
}

.sted-info {
  margin-top: 10px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 10px -16px 0;
  padding: 0 16px 2px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chips.bryt {
  flex-wrap: wrap;
  overflow: visible;
  margin: 10px 0 0;
  padding: 0;
}

.chips.tette {
  gap: 6px;
}

.kort .chips:not(.bryt) {
  margin-left: -16px;
  margin-right: -16px;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--flate2);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.pa {
  background: var(--aksent-svak);
  border-color: var(--aksent);
  color: var(--aksent);
}

.chips.tette .chip {
  min-width: 44px;
  justify-content: center;
  padding: 0 10px;
}

.forslag-rutenett {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.forslag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 74px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--flate);
  border: 1px solid var(--kant);
}

.forslag-navn {
  font-weight: 700;
}

.sokefelt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 6px 0 14px;
  border-radius: 12px;
  background: var(--flate2);
  color: var(--dempet);
}

section > .sokefelt,
.kort + .sokefelt {
  margin-top: 16px;
}

.sokefelt input {
  flex: 1;
  min-width: 0;
  height: 46px;
  background: none;
  border: 0;
  outline: 0;
  color: var(--tekst);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.sokefelt input::-webkit-search-cancel-button {
  display: none;
}

.felt {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--kant);
  background: var(--flate2);
  color: var(--tekst);
  font-size: 16px;
}

textarea.felt {
  resize: vertical;
  line-height: 1.4;
}

.inline-skjema {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.inline-skjema .felt {
  flex: 1;
  min-width: 0;
}

.bryter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.bryter input {
  width: 22px;
  height: 22px;
  accent-color: var(--aksent);
}

.teller {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--kant);
}

.teller-etikett {
  font-weight: 600;
}

.teller-knapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.teller-knapper .ikonknapp {
  background: var(--flate2);
}

.teller-verdi {
  min-width: 64px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.teller-verdi small {
  font-size: 13px;
  font-weight: 600;
  color: var(--dempet);
}

/* ---------- Lister ---------- */

.liste {
  background: var(--flate);
  border: 1px solid var(--kant);
  border-radius: var(--radius);
  overflow: hidden;
}

.liste + .knapp {
  margin-top: 12px;
}

.rad {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 68px;
  color: var(--tekst);
}

.rad + .rad {
  border-top: 1px solid var(--kant);
}

.rad-lenke {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--tekst);
}

.rad.enkel {
  padding: 12px 14px;
  gap: 12px;
}

.rad-nr {
  flex: none;
  width: 18px;
  text-align: center;
  color: var(--dempet);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rad-tekst {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.rad-navn {
  font-weight: 600;
  line-height: 1.25;
}

.rad-hoyre {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 10px;
}

.mini {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--flate2);
}

.mini.tom {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dempet);
}

.merke {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--flate2);
  color: var(--dempet);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.merke.ok {
  background: var(--ok-svak);
  color: var(--ok);
}

.merke.advarsel {
  background: var(--advarsel-svak);
  color: var(--advarsel);
  margin-top: 3px;
}

.merker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 6px;
}

.tall-rad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tall {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--flate);
  border: 1px solid var(--kant);
}

.tall strong {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tabell {
  padding: 4px 16px;
}

.tabell-rad {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-variant-numeric: tabular-nums;
}

.tabell-rad + .tabell-rad {
  border-top: 1px solid var(--kant);
}

.tabell-rad span:last-child {
  text-align: right;
}

.tom-tilstand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 20px 28px;
  text-align: center;
  color: var(--dempet);
}

.tom-tittel {
  color: var(--tekst);
  font-weight: 700;
  font-size: 17px;
}

/* ---------- Kroppskart ---------- */

.kropp {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.kropp-figur {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.kropp svg {
  display: block;
  max-width: 100%;
}

.kropp .m {
  fill: #3a3f4b;
  stroke: var(--flate);
  stroke-width: 0.6;
  transition: fill 0.15s;
}

.kropp .m.ingen {
  fill: #2a2e37;
}

.kropp .m.trykk {
  cursor: pointer;
}

.kropp .m.sek {
  fill: rgba(255, 107, 61, 0.42);
}

.kropp .m.pa {
  fill: var(--aksent);
}

.kart-kort {
  margin-top: 14px;
  padding-top: 12px;
}

.kart-topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
}

.kart-topp .etikett {
  margin-bottom: 0;
}

.muskel-kort {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.muskel-kort .kropp {
  flex: none;
  gap: 8px;
  margin-top: 0;
}

.muskel-kort .etikett {
  margin: 10px 0 2px;
}

.muskel-kort .etikett:first-child {
  margin-top: 0;
}

/* ---------- Øvelsesbilde ---------- */

.anim {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.anim img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anim img.b {
  animation: veksle 2.6s ease-in-out infinite;
}

.anim.stoppet img.b {
  animation: none;
  opacity: 0;
}

.anim.stoppet img.b.vis {
  opacity: 1;
}

@keyframes veksle {
  0%,
  38% {
    opacity: 0;
  }
  50%,
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.anim-merke {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(14, 15, 18, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.anim.tom {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flate);
  border: 1px solid var(--kant);
  aspect-ratio: 2 / 1;
}

.anim.tom .kropp {
  margin: 0;
}

.anim + .dempet {
  margin-top: 6px;
}

.krav {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
}

.krav .ikon {
  margin-top: 2px;
}

.krav.ok .ikon {
  color: var(--ok);
}

.krav.mangler .ikon {
  color: var(--advarsel);
}

.steg,
.punkter {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steg;
}

.steg li {
  position: relative;
  padding: 0 0 14px 40px;
  counter-increment: steg;
}

.steg li::before {
  content: counter(steg);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--aksent-svak);
  color: var(--aksent);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.punkter li {
  position: relative;
  padding: 0 0 10px 22px;
}

.punkter li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aksent);
}

.punkter.feil li::before {
  background: var(--advarsel);
}

/* ---------- Ark og meldinger ---------- */

.ark-bakgrunn {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

.ark {
  width: 100%;
  max-width: var(--bredde);
  max-height: 88vh;
  overflow-y: auto;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: var(--flate);
  border-top: 1px solid var(--kant);
  animation: opp 0.2s ease-out;
}

@keyframes opp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
}

.ark-topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ark-topp h2 {
  margin: 0;
}

.ark .liste {
  background: var(--flate2);
  margin-top: 12px;
}

.melding {
  position: fixed;
  z-index: 60;
  left: 16px;
  right: 16px;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  max-width: calc(var(--bredde) - 32px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f3f4f6;
  color: #14161a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: ned 0.2s ease-out;
}

@keyframes ned {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
}

.melding button {
  flex: none;
  color: #c2410c;
  font-weight: 800;
}

/* ---------- Aktiv økt ---------- */

.trinn {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 12px;
  padding: 2px 16px;
  scrollbar-width: none;
}

.trinn::-webkit-scrollbar {
  display: none;
}

.trinn button,
.trinn a {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--flate2);
  color: var(--dempet);
  font-weight: 700;
  font-size: 14px;
  border: 2px solid transparent;
}

.trinn button.ferdig {
  background: var(--ok-svak);
  color: var(--ok);
}

.trinn button.pa {
  border-color: var(--aksent);
  color: var(--tekst);
}

.okt-tittel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
}

.okt-tittel h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 2px;
}

.sist {
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.sist .etikett {
  display: inline;
  margin-right: 6px;
}

.sett-tabell {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sett-rad {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: var(--flate);
  border: 1px solid var(--kant);
}

.sett-rad.neste {
  border-color: var(--aksent);
}

.sett-rad.ferdig {
  background: var(--ok-svak);
  border-color: transparent;
}

.sett-nr {
  flex: none;
  width: 26px;
  text-align: center;
  font-weight: 800;
  color: var(--dempet);
}

.sett-felt {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--flate2);
}

.sett-rad.ferdig .sett-felt {
  background: rgba(255, 255, 255, 0.06);
}

.sett-felt input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 46px;
  background: none;
  border: 0;
  outline: 0;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sett-felt small {
  flex: none;
  color: var(--dempet);
  font-size: 13px;
  font-weight: 600;
}

.hake-knapp {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 46px;
  border-radius: 10px;
  background: var(--flate2);
  color: var(--dempet);
}

.hake-knapp.pa {
  background: var(--ok);
  color: #06281a;
}

.vektvalg {
  margin-top: 14px;
}

.vektvalg .etikett {
  margin-bottom: 0;
}

.vektvalg .chips {
  margin-top: 6px;
}

.fold {
  margin-top: 16px;
  padding: 6px 16px;
}

.fold .steg {
  padding: 8px 0 2px;
}

.nedtelling {
  position: fixed;
  z-index: 26;
  left: 12px;
  right: 12px;
  bottom: calc(72px + var(--trygg));
  max-width: calc(var(--bredde) - 24px);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #262a33;
  border: 1px solid var(--kant);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.nedtelling-fyll {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--aksent-svak);
  transition: width 0.25s linear;
}

.nedtelling.arbeid .nedtelling-fyll {
  background: var(--ok-svak);
}

.nedtelling-innhold {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 10px 16px;
}

.nedtelling-tekst {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nedtelling-tekst small {
  color: var(--dempet);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nedtelling-tekst strong {
  font-size: 26px;
  font-weight: 800;
}

.nedtelling .knapp {
  background: rgba(255, 255, 255, 0.1);
  padding: 0 10px;
}

/* ---------- Logg ---------- */

.stolper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 130px;
  margin-top: 8px;
}

.stolpe {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.stolpe-tall {
  font-size: 12px;
  font-weight: 700;
  min-height: 16px;
}

.stolpe-fyll {
  width: 100%;
  max-width: 34px;
  border-radius: 6px 6px 2px 2px;
  background: #4a5060;
  flex: 0 1 auto;
}

.stolpe-fyll.na {
  background: var(--aksent);
}

.stolpe-uke {
  font-size: 10px;
  white-space: nowrap;
}

/* ---------- Utstyr ---------- */

.fremdrift {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--flate2);
  overflow: hidden;
}

.fremdrift span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--aksent);
  transition: width 0.3s;
}

.ikonrad {
  display: flex;
}

.utstyrsliste {
  background: var(--flate);
  border: 1px solid var(--kant);
  border-radius: var(--radius);
  overflow: hidden;
}

.utstyr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-right: 6px;
}

.utstyr + .utstyr {
  border-top: 1px solid var(--kant);
}

.utstyr-valg {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 6px 8px 14px;
  font-weight: 600;
}

.boks {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #4a5060;
  color: var(--aksent-tekst);
}

.utstyr.pa .boks {
  background: var(--aksent);
  border-color: var(--aksent);
}

.vekter {
  flex: 1 1 100%;
  padding: 4px 8px 14px 14px;
}

.vekter .etikett {
  margin-bottom: 0;
}

/* ---------- Bredere skjermer ---------- */

@media (min-width: 700px) {
  body {
    background: #08090b;
  }

  .app {
    background: var(--bg);
    border-left: 1px solid var(--kant);
    border-right: 1px solid var(--kant);
  }

  .skjerm {
    padding-left: 24px;
    padding-right: 24px;
  }

  .topp {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim img.b,
  .puls,
  .ark,
  .melding {
    animation: none;
  }

  .anim img.b {
    opacity: 0;
  }
}

/* ---------- Hele økta ---------- */

.fremgang {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.fremgang .fremdrift {
  flex: 1;
  margin-top: 0;
}

.oktliste {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oktkort {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 6px 10px;
  border-radius: var(--radius);
  background: var(--flate);
  border: 1px solid var(--kant);
}

.oktkort.neste {
  border-color: var(--aksent);
}

.oktkort.ferdig {
  background: var(--ok-svak);
  border-color: transparent;
}

.oktkort.ferdig .rad-navn {
  color: var(--dempet);
}

.oktkort-lenke {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  color: var(--tekst);
  border-radius: 12px;
}

.rundhake {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: transparent;
  position: relative;
}

.rundhake::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 2px solid #4a5060;
}

.rundhake.pa {
  color: #06281a;
}

.rundhake.pa::before {
  background: var(--ok);
  border-color: var(--ok);
}

.rundhake .ikon {
  position: relative;
}

.prikker {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.prikker i {
  width: 16px;
  height: 5px;
  border-radius: 3px;
  background: #3a3f4b;
}

.prikker i.pa {
  background: var(--ok);
}

.kutt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.under-h2 {
  margin: -6px 0 10px;
}

/* ---------- Forslag til i dag ---------- */

.dagens {
  margin-bottom: 12px;
  border-color: var(--aksent);
}

.dagens-rad {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dagens-tekst {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dagens-tekst strong {
  font-size: 19px;
  line-height: 1.25;
}

.dagens-bilder {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow: hidden;
}

.dagens-bilder .mini {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

/* ---------- Trykkfølelse ---------- */

.knapp,
.chip,
.forslag,
.ikonknapp,
.hake-knapp,
.rundhake,
.segment button,
.trinn button,
.utforsk,
.lenkekort,
.oppsummering {
  transition:
    transform 0.08s ease-out,
    background-color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}

.knapp:active,
.forslag:active,
.utforsk:active,
.lenkekort:active,
.oppsummering:active {
  transform: scale(0.97);
}

.chip:active,
.ikonknapp:active,
.hake-knapp:active,
.rundhake:active,
.trinn button:active {
  transform: scale(0.9);
}

.rad-lenke,
.oktkort-lenke,
.utstyr-valg,
.dagens-tekst {
  transition: background-color 0.15s;
}

.rad-lenke:active,
.oktkort-lenke:active,
.utstyr-valg:active {
  background: rgba(255, 255, 255, 0.05);
}

.hake-knapp.pa .ikon,
.rundhake.pa .ikon {
  animation: sprett 0.25s ease-out;
}

@keyframes sprett {
  0% {
    transform: scale(0.4);
  }
  70% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

.ark {
  overscroll-behavior: contain;
}

.ark .chips {
  margin-bottom: 12px;
}

.ark .dempet strong {
  color: var(--tekst);
}

@media (prefers-reduced-motion: reduce) {
  .hake-knapp.pa .ikon,
  .rundhake.pa .ikon {
    animation: none;
  }
}
