.set {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 120px;
}
.grp {
  background: var(--sf);
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px var(--ln);
  margin-bottom: 22px;
  overflow: hidden;
}
.gr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--ln);
  width: 100%;
  min-height: 44px;
}
.gr:last-child {
  border: 0;
}
.gr .l {
  flex: 1;
}
.gr input {
  border: 0;
  background: none;
  color: var(--tx);
  font: inherit;
  text-align: right;
  flex: 1;
  min-width: 0;
}
.sw {
  width: 40px;
  height: 24px;
  border-radius: 99px;
  background: var(--ln);
  position: relative;
  transition: 0.2s;
  flex: none;
}
.sw:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
}
.sw.on {
  background: #34c759;
}
.sw.on:after {
  left: 18px;
}
.dnw {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 6px auto 14px;
}
.sw2 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sw2 button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--sf);
  box-shadow: 0 0 0 1px var(--ln);
}
.sw2 .on {
  box-shadow: 0 0 0 2.5px var(--tx);
}
.emg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emg button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--sf2);
  font-size: 24px;
  text-align: center;
  display: grid;
  place-items: center;
}
.emg .on {
  box-shadow: 0 0 0 2.5px var(--ac);
}
.pfw {
  max-width: 880px;
  margin: 0 auto;
  padding: 26px 32px 140px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 44px;
  align-items: start;
}
.pnv {
  position: sticky;
  top: 0;
}
.pid {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.pid b {
  display: block;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
}
.pid span {
  color: var(--mu);
  font-size: 13px;
}
.pnv nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pnv nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  font-weight: 550;
  color: var(--mu);
  transition:
    background 0.15s,
    color 0.15s;
}
.pnv nav button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pnv nav button:hover {
  background: var(--sf2);
  color: var(--tx);
}
.pnv nav button.on {
  background: color-mix(in srgb, var(--ac) 14%, transparent);
  color: var(--ac);
}
.pph {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.ppd {
  color: var(--mu);
  margin: 3px 0 14px;
}
.pro {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 0.5px solid var(--ln);
}
.pro.col {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.prt {
  flex: 1;
  min-width: 0;
}
.prt b {
  display: block;
  font-weight: 600;
}
.prt span {
  display: block;
  color: var(--mu);
  font-size: 13px;
  margin-top: 2px;
}
.prc {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  max-width: 60%;
}
.pro.col .prc {
  max-width: none;
}
label.btn {
  cursor: pointer;
}
.pin {
  width: 240px;
  padding: 8px 11px;
  border: 1px solid var(--ln);
  border-radius: 8px;
  background: var(--sf);
  color: var(--tx);
  font: inherit;
}
.pin:focus {
  border-color: var(--ac);
}
.pcn.fi {
  animation: pfi 0.3s ease;
}
@keyframes pfi {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (max-width: 760px) {
  .pfw {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pnv {
    position: static;
  }
  .pnv nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ===== Innstillinger v3 ===== */
.dkrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dkprev {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.avl {
  font-weight: 650;
  color: var(--mu);
}
.emg button.emn {
  width: auto;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}
.plainsw {
  gap: 9px;
  max-width: 330px;
}
.plainsw button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  transition: transform 0.15s;
}
.plainsw button:hover {
  transform: scale(1.12);
}
.plainsw button.off {
  background: repeating-conic-gradient(var(--ln) 0 25%, var(--sf) 0 50%) 0
    0/10px 10px;
}
.semchips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.semchips .chip {
  margin: 0;
  padding: 4px 11px;
}
.sems {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sems i {
  font-style: normal;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 650;
  background: var(--sf2);
  color: var(--mu);
}
.sems i.done {
  background: color-mix(in srgb, var(--ac) 22%, transparent);
  color: var(--ac);
}
.sems i.cur {
  background: var(--ac);
  color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 30%, transparent);
}
.lgs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.lgb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px;
  border-radius: 14px;
  background: var(--sf);
  box-shadow: 0 0 0 0.5px var(--ln);
  transition:
    transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1),
    box-shadow 0.2s;
}
.lgb:hover {
  transform: translateY(-2px);
}
.lgb.on {
  box-shadow: 0 0 0 2px var(--ac);
}
.lgb i {
  font-style: normal;
  font-weight: 800;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--ac);
  color: #fff;
  margin-bottom: 8px;
}
.lgb small {
  color: var(--mu);
}

/* ===== Skole: årstrinn og semester ===== */
.pro.prog {
  gap: 0;
}
.prog .progr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.prog .progl {
  width: 92px;
  flex: none;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--mu);
}
.prog .sems {
  margin-top: 16px;
}

.prog .seg2 button {
  white-space: nowrap;
  padding: 5px 14px;
}

.pcn .seg2 button {
  white-space: nowrap;
}

/* Valgknapper i innstillinger: mer luft mellom ordene og tykkere boks */
.pcn .seg2 {
  padding: 5px;
  gap: 6px;
  border-radius: 14px;
}
.pcn .seg2 button,
.pcn .prog .seg2 button {
  padding: 11px 26px;
  border-radius: 10px;
  font-size: 13.5px;
  white-space: nowrap;
}
.pcn .seg2 .gld {
  border-radius: 10px;
}
.pcn .seg2 .on {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.lgb i.flg {
  display: block;
  width: 34px;
  height: 24px;
  padding: 0;
  background: none;
  font-size: 0;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.lgb i.flg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cfl {
  display: inline-block;
  width: 22px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  vertical-align: -3px;
  margin-right: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
}
.cfl svg {
  display: block;
  width: 100%;
  height: 100%;
}
.pcn .seg2 {
  width: auto !important;
}
