.hm {
  background: var(--cv)
    radial-gradient(circle, var(--dot) 1.4px, transparent 1.8px) 0 0/24px 24px;
}
.cv {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
#stg {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.pv {
  height: 70px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 0 0 0.5px var(--ln);
  background: var(--cv)
    radial-gradient(circle, var(--dot) 1.4px, transparent 1.8px) 0 0/24px 24px;
}
.cpk {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  flex: none;
}
.cpk::-webkit-color-swatch-wrapper {
  padding: 0;
}
.cpk::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ln);
}
.it.dg.bad {
  outline: 3px solid #ff3b30;
  outline-offset: 2px;
}
.it {
  position: absolute;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.it:not(.dg) {
  transition:
    left 0.3s cubic-bezier(0.3, 1, 0.4, 1),
    top 0.3s cubic-bezier(0.3, 1, 0.4, 1),
    box-shadow 0.2s,
    transform 0.2s;
}
.w {
  background: var(--sf);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.w:hover {
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.07),
    0 18px 38px rgba(0, 0, 0, 0.08);
}
.it.dg {
  transform: scale(1.025);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25) !important;
  cursor: grabbing;
  transition: none;
}
.wh {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--mu);
  margin-bottom: 8px;
}
.wh i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.wh svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.t2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.sub {
  color: var(--mu);
  font-size: 13px;
  margin-top: 4px;
}
.ac {
  color: var(--ac);
  font-weight: 600;
}
.it .x {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.55);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
  padding: 0;
}
.it:hover .x {
  opacity: 1;
}
.w .x {
  right: 10px;
  top: 10px;
  visibility: hidden;
}
.st .x,
.dwi .x {
  left: 7px;
  top: 4px;
  background: #ff5f57;
  font-size: 0;
}
.st .x:hover,
.dwi .x:hover {
  font-size: 12px;
}
.st {
  width: 190px;
  height: 128px;
  border-radius: 6px 6px 14px 6px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.15),
    0 12px 24px rgba(0, 0, 0, 0.14);
  color: #2a2400;
  display: flex;
  flex-direction: column;
}
.sh {
  height: 22px;
  cursor: grab;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 6px 6px 0 0;
  flex: none;
  position: relative;
}
.tx {
  flex: 1;
  padding: 6px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  outline: 0;
  overflow: auto;
  user-select: text;
  -webkit-user-select: text;
  font-family:
    "Bradley Hand",
    "Segoe Print",
    "Noteworthy",
    -apple-system,
    sans-serif;
}
.tx:empty:before {
  content: attr(data-ph);
  opacity: 0.4;
}
.pal {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  opacity: 0;
  transition: opacity 0.15s;
}
.st:hover .pal,
.st:focus-within .pal {
  opacity: 1;
}
.cd {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.wk {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-top: -2px;
}
.wk button {
  padding: 2px 0;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.wk span {
  display: block;
  font-size: 11px;
  color: var(--mu);
  font-weight: 600;
}
.wk .td {
  color: #fff;
  background: var(--ac);
}
.wk .td span {
  color: rgba(255, 255, 255, 0.8);
}
.wk i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin: 1px auto 0;
}
.yd {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 6px);
  gap: 3px;
  margin-top: 12px;
}
.yd i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ln);
}
.yd i.p {
  background: var(--ac);
  opacity: 0.8;
}
.yd i.t {
  background: var(--ac);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--ac) 35%, transparent);
}
.qt {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.tb.big {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.008em;
  line-height: 1.4;
  height: 76px;
  padding: 6px 28px 0;
  gap: 10px;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
}
.tb.big .gt {
  flex: 1;
  min-width: 0;
}
.tb.big h1 {
  font-size: 30px;
  font-weight: 780;
  letter-spacing: -0.038em;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb.big small {
  font-size: 14px;
  margin-top: 2px;
}
.ab {
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
  background: var(--sf);
  color: var(--tx);
  box-shadow:
    0 0 0 0.5px var(--ln),
    0 1px 2px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  flex: none;
}
.ab:hover {
  background: var(--sf2);
}
.ab:active {
  transform: scale(0.97);
}
.ab svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ab.pr {
  background: var(--ac);
  color: #fff;
  box-shadow: none;
}
.ab.pr:hover {
  background: var(--ac);
  filter: brightness(1.08);
}
.ab.ic {
  width: 34px;
  padding: 0;
}
.anc {
  position: relative;
  flex: none;
}
.w .t2 {
  padding-bottom: 4px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes wig {
  from {
    transform: rotate(-0.7deg);
  }
  to {
    transform: rotate(0.7deg);
  }
}
.dwi {
  background: var(--sf);
  border-radius: 20px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dwi .sh {
  background: var(--sf2);
  border-radius: 0;
  height: 26px;
}
.dw {
  display: block;
  margin: 6px 10px 0;
  border-radius: 10px;
  background: var(--sf2);
  cursor: crosshair;
  touch-action: none;
}
.dtl {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
}
.cd.sel {
  outline: 2px solid var(--ac);
  outline-offset: 1px;
}
.pb {
  height: 10px;
  border-radius: 99px;
  background: var(--sf2);
  overflow: hidden;
  margin-top: 10px;
}
.pb i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ac);
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rf {
  position: absolute;
  right: 40px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--mu);
  text-align: center;
  font-size: 16px;
  line-height: 26px;
}
.rf:hover {
  background: var(--sf2);
}
.nr {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  font-size: 14px;
  line-height: 1.45;
}
.nr i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}
.nr b {
  font-weight: 620;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nr span {
  color: var(--mu);
  font-size: 12.5px;
  white-space: nowrap;
}
.nr.f span {
  color: var(--ac);
  font-weight: 600;
}
.nr.ps {
  opacity: 0.45;
}
.nr.ps b {
  text-decoration: line-through;
}
.wn {
  font-size: 11px;
  font-weight: 600;
  color: var(--mu);
  opacity: 0.85;
}
.mo {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 7px;
}
.mo span {
  flex: 1;
  font-size: 12px;
  color: var(--mu);
  font-weight: 600;
  white-space: nowrap;
}
.mo button {
  width: 28px;
  height: 26px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  opacity: 0.55;
  filter: grayscale(0.7);
  transition:
    transform 0.15s,
    opacity 0.15s,
    background 0.15s;
}
.mo button:hover {
  opacity: 1;
  filter: none;
  background: var(--sf2);
}
.mo button.on {
  opacity: 1;
  filter: none;
  background: color-mix(in srgb, var(--ac) 18%, transparent);
  box-shadow: 0 0 0 1.5px var(--ac);
  transform: scale(1.12);
}
.sr {
  margin-top: 2px;
}
input.sk {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #34c759, #ffcc00, #ff3b30);
  outline: 0;
  margin: 8px 0 7px;
  cursor: pointer;
}
input.sk::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--sc, #34c759);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
input.sk:active::-webkit-slider-thumb {
  transform: scale(1.15);
}
.sl3 {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--mu);
  font-weight: 600;
}
.sl3 .on {
  color: var(--tx);
}
@keyframes wIn {
  0% {
    opacity: 0;
    transform: translateY(46px) scale(0.88);
    filter: blur(12px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  75% {
    transform: translateY(-7px) scale(1.025);
  }
  100% {
    transform: none;
  }
}
@keyframes wd {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    filter: blur(10px);
  }
}
@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 0 transparent;
  }
  45% {
    text-shadow: 0 0 26px color-mix(in srgb, var(--ac) 75%, transparent);
  }
}
@keyframes pop2 {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(24px);
  }
}
@keyframes fadein {
  from {
    opacity: 0;
  }
}
.intro {
  animation: fadein 0.6s ease;
}
.intro .it {
  animation: wIn 0.95s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
  animation-delay: calc(var(--k, 0) * 80ms + 0.45s);
}
.wd {
  display: inline-block;
}
.intro .wd {
  animation: wd 0.9s cubic-bezier(0.2, 1.25, 0.3, 1) backwards;
  animation-delay: calc(var(--w, 0) * 130ms + 0.1s);
}
.intro .nm.wd {
  animation:
    wd 0.9s cubic-bezier(0.2, 1.25, 0.3, 1) backwards,
    glow 2s ease-in-out;
  animation-delay: calc(var(--w, 0) * 130ms + 0.1s), 0.9s;
}
.intro .tb.big small {
  animation: up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.7s backwards;
}
.intro .tb.big .ab,
.intro .tb.big .anc,
.intro .tb.big .avb {
  animation: up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1s backwards;
}
.avb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  flex: none;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px var(--ln);
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.avb:hover {
  transform: scale(1.08);
}
.avb .av {
  width: 100% !important;
  height: 100% !important;
}

/* ===== Hjem v3 ===== */

/* Veldig liten hover-animasjon på boksene (av i rediger-modus, der de vingler) */
.cv:not(.ed) .w:not(.dg) {
  transition:
    left 0.3s cubic-bezier(0.3, 1, 0.4, 1),
    top 0.3s cubic-bezier(0.3, 1, 0.4, 1),
    box-shadow 0.25s,
    transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.cv:not(.ed) .w:not(.dg):hover {
  transform: translateY(-3px) scale(1.012);
}
.w .wh i {
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.w:hover .wh i {
  transform: rotate(-9deg) scale(1.15);
}
.w .nr {
  transition: transform 0.2s;
}
.w:hover .nr {
  transform: translateX(2px);
}

/* Huskelapp-tekst, veldig liten, i toppen av lappen */
.sh {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sh .shl {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.38;
  pointer-events: none;
}
.st .sh .x {
  position: absolute;
}

/* Klokke ved siden av datoen */
.clk {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--tx);
  opacity: 0.8;
}

/* Notater og frister: flere linjer */
.nr.sm {
  padding: 1px 0;
  font-size: 13.5px;
  line-height: 1.4;
}
.nr.sm b {
  font-weight: 560;
}

/* Plain bakgrunn: ingen prikker */
#app.hm.plain {
  background: var(--cv) !important;
}
#app[data-pl="dark"] .tb.big .gt {
  --tx: #f5f5f7;
  --mu: #c4c4cc;
  color: #f5f5f7;
}
.week .we,
.wk .we span {
  color: #ff3b30;
}
.wk .we.td span {
  color: rgba(255, 255, 255, 0.85);
}

/* Tekst direkte på bakgrunnen: svart på lys bakgrunn (hvit, krem, lys blå ...) */
#app[data-pl="light"] .tb.big .gt {
  --tx: #1d1d1f;
  --mu: #5f5f66;
  color: #1d1d1f;
}
#app[data-pl="light"] .tb.big .gt .nm {
  color: var(--ac);
}

/* ---------- Side 2 ---------- */
.pgb {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ac);
  color: #fff;
  z-index: 6;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ac) 45%, transparent);
  transition:
    transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1),
    box-shadow 0.2s;
  animation: pgpop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.pgb.r {
  right: 12px;
}
.pgb.l {
  left: 12px;
}
.pgb svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s;
}
.pgb:hover {
  transform: scale(1.12);
}
.pgb.r:hover svg {
  transform: translateX(2px);
}
.pgb.l:hover svg {
  transform: translateX(-2px);
}
.pgb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ac);
  animation: pgring 2.4s ease-out infinite;
}
@keyframes pgring {
  from {
    transform: scale(1);
    opacity: 0.55;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
@keyframes pgpop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
.pgl {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 650;
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--sf2);
  color: var(--mu);
  z-index: 6;
}
.pgem {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 0 80px 60px;
  color: var(--mu);
  pointer-events: none;
}
.pgem b {
  font-size: 18px;
  color: var(--tx);
}
.btn.pgadd {
  display: block;
  margin: 4px auto 0;
}

/* Skolens arbeidsside og linjens semesterlinje står på samme høyde nederst i boksen */
.w .lk,
.w .lsub {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  line-height: 1.3;
}
.w .lsub {
  right: 16px;
}

/* ---------- Slett-knappen (×): to streker som snurrer, sirkelen blir rød ---------- */
.it .x {
  width: 22px;
  height: 22px;
  font-size: 0;
  color: transparent;
  background: rgba(60, 60, 67, 0.5);
  backdrop-filter: blur(6px);
  transition:
    opacity 0.15s,
    background 0.2s,
    transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1),
    box-shadow 0.2s;
}
.it .x::before,
.it .x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 2px;
  margin: -1px 0 0 -5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.it .x::before {
  transform: rotate(45deg);
}
.it .x::after {
  transform: rotate(-45deg);
}
.it .x:hover {
  background: #ff3b30 !important;
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(255, 59, 48, 0.5);
}
.it .x:hover::before {
  transform: rotate(135deg);
}
.it .x:hover::after {
  transform: rotate(45deg);
}
.it .x:active {
  transform: scale(0.94);
}
/* Lapper og tegninger: rød prikk som før, strekene vises først ved hover */
.st .x::before,
.st .x::after,
.dwi .x::before,
.dwi .x::after {
  opacity: 0;
  width: 8px;
  margin-left: -4px;
}
.st .x:hover::before,
.st .x:hover::after,
.dwi .x:hover::before,
.dwi .x:hover::after {
  opacity: 1;
}
.st .x,
.dwi .x {
  width: 18px;
  height: 18px;
  backdrop-filter: none;
}
.w .lsub {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tips og motivasjon */
.qt {
  animation: up 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  padding-right: 8px;
}
.qt.lg {
  font-size: 16.5px;
}
.qk {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  letter-spacing: 0;
  color: #fff;
  background: var(--ac);
}
.qk.k-mot {
  background: #ff2d55;
}
.qk.k-tips {
  background: #34c759;
}
.qk.k-fun {
  background: #5856d6;
}
.qk.k-humor {
  background: #ff9500;
}
.qk.k-live {
  background: #007aff;
}
.w .wn:has(.qk) {
  opacity: 1;
  margin-right: 66px;
}

/* Skolekort med lange navn: navnet på én linje, undertittelen på maks to, arbeidssiden nederst */
.w .sc-n,
.w .sc-f {
  margin-right: 52px;
}
.w .sc-f {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.3;
  margin-top: 3px;
}

/* Emoji-knappene i «Året»: ingen standard knappe-padding, så ringen sitter midt rundt emojien */
.mo button {
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  font-family:
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.mo .mw {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: none;
  width: 150px;
  margin-right: 8px;
}
.mo .mw small {
  font-size: 10px;
  font-weight: 600;
  color: var(--mu);
  line-height: 1.2;
  white-space: nowrap;
}
.mo .mw input {
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 7px;
  background: var(--sf2);
  width: 100%;
}
.mo .me2 {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 1px;
}

/* Liten/stor-knappen vises bare i Rediger */
.w .rsz {
  display: none;
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 3;
  font-size: 11px;
  font-weight: 650;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--ac);
  color: #fff;
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.w .rsz:hover {
  transform: scale(1.07);
}
.cv.ed .w .rsz {
  display: block;
}
.cv.ed .wxi {
  display: none;
}

/* Små versjoner */
.w.sm .qt {
  font-size: 14.5px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.w.sm .rf {
  right: 36px;
}
.w.sm .wn:has(.qk) {
  margin-right: 60px;
}
.w.sm .nr {
  font-size: 13px;
}
.w.sm .wk button {
  font-size: 15px;
}
.w.sm .mo {
  gap: 0;
  justify-content: space-between;
}
.w.sm .mo button {
  width: 21px;
  font-size: 14px;
}

/* «innleveringer» nederst i Frister */
.wsub {
  position: absolute;
  left: 16px;
  bottom: 11px;
  font-size: 10.5px;
  color: var(--mu);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* Dagens ord: ren pille uten hvit ramme */
.mo .mw {
  width: 168px;
  gap: 3px;
}
.mo .mw .wbx {
  position: relative;
  display: block;
}
.mo .mw input {
  height: 28px;
  padding: 0 40px 0 11px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--sf2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.mo .mw input::placeholder {
  font-weight: 500;
  color: var(--mu);
  opacity: 0.7;
}
.mo .mw input:focus,
.mo .mw input:focus-visible {
  outline: none;
  border-color: var(--ac);
  background: var(--sf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 22%, transparent);
}
.mo .mw .wcn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: var(--mu);
  pointer-events: none;
  opacity: 0.7;
}

/* Fullskjerm: mer luft over toppen, myk overgang */
.tb.big {
  transition:
    padding 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.isfs .tb.big {
  padding-top: 30px;
  height: 104px;
}
html.isfs .hm .stg,
html.isfs #app.hm > .st {
  margin-top: 12px;
}
.fsfx {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--fx, 90%) var(--fy, 6%),
    color-mix(in srgb, var(--ac) 55%, transparent),
    transparent 55%
  );
  clip-path: circle(0 at var(--fx, 90%) var(--fy, 6%));
  opacity: 0.9;
  animation: fsfx 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes fsfx {
  60% {
    clip-path: circle(150% at var(--fx, 90%) var(--fy, 6%));
    opacity: 0.55;
  }
  100% {
    clip-path: circle(150% at var(--fx, 90%) var(--fy, 6%));
    opacity: 0;
  }
}
html.fsgo .w {
  animation: fsrise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes fsrise {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
}

/* Kontroller på hver boks i Rediger: Liten | Stor + Animert */
.w .wctl {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sf) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.16);
}
.cv.ed .w .wctl {
  display: flex;
}
.wctl .wsg {
  display: inline-flex;
  padding: 2px;
  border-radius: 10px;
  background: var(--sf2);
}
.wctl button {
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--mu);
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}
.wctl .wsg button.on {
  background: var(--sf);
  color: var(--tx);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.wctl .wan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--sf2);
  padding: 6px 10px;
  border-radius: 10px;
}
.wctl .wan svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
.wctl .wan.on {
  background: linear-gradient(135deg, #ff9f0a, #ff375f);
  color: #fff;
}
.wctl button:active {
  transform: scale(0.94);
}

/* Animert bakgrunn */
.w {
  isolation: isolate;
}
.w.an::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 20% 25%,
      color-mix(in srgb, var(--wc) 34%, transparent),
      transparent 46%
    ),
    radial-gradient(
      circle at 80% 75%,
      color-mix(in srgb, var(--wc) 26%, transparent),
      transparent 50%
    ),
    radial-gradient(
      circle at 60% 15%,
      color-mix(in srgb, var(--wc) 18%, #fff 0%),
      transparent 40%
    );
  background-size: 160% 160%;
  animation: wanim 9s ease-in-out infinite alternate;
}
.w.an::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  width: 40%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );
  transform: translateX(-160%) skewX(-18deg);
  animation: wshine 7s ease-in-out infinite;
}
@keyframes wanim {
  0% {
    background-position: 0% 0%;
    filter: hue-rotate(0deg);
  }
  100% {
    background-position: 100% 100%;
    filter: hue-rotate(18deg);
  }
}
@keyframes wshine {
  0%,
  55% {
    transform: translateX(-160%) skewX(-18deg);
  }
  100% {
    transform: translateX(520%) skewX(-18deg);
  }
}
.w[data-key="w:weather"]::before,
.w[data-key="w:weather"]::after {
  display: none;
}
.w[data-key="w:weather"]:not(.an) *,
.w[data-key="w:weather"]:not(.an) *::before,
.w[data-key="w:weather"]:not(.an) *::after {
  animation-play-state: paused !important;
}

/* Store versjoner av de smale boksene */
.w.wl .lgx {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 46%;
  font-size: 12px;
  color: var(--mu);
  text-align: right;
}
.w.wl .lgx b {
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.w.wl .lgx em {
  font-style: normal;
  color: var(--ac);
  font-weight: 650;
}
.w.wl .lgx.ex {
  top: 40px;
  bottom: auto;
  right: 22px;
  gap: 5px;
  align-items: flex-start;
  text-align: left;
}
.w.wl .lgx.ex b {
  font-size: 12.5px;
}
.w .fbars {
  position: absolute;
  right: 22px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 60px;
}
.w .fbars i {
  width: 14px;
  border-radius: 5px;
  background: color-mix(in srgb, #ff9500 38%, var(--sf2));
}
.w .fbars i.td {
  background: #ff9500;
}
.w.wl .nr.sm {
  width: calc(50% - 8px);
  display: inline-flex;
  vertical-align: top;
}

/* Nye widgets */
.ckg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}
.w.wl .ckg {
  grid-template-columns: repeat(4, 1fr);
}
.cki {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  align-items: center;
}
.cki .dn {
  grid-row: span 2;
  font-size: 17px;
}
.cki b {
  font-size: 12px;
  font-weight: 650;
  color: var(--mu);
}
.cki em {
  font-style: normal;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.slp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.slp button,
.gls button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sf2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 0.15s,
    background 0.2s;
}
.slp button:hover,
.gls button:hover {
  background: var(--ac);
  color: #fff;
  transform: scale(1.1);
}
.slp > div {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}
.slb {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 32px;
  margin-top: 6px;
}
.slb i {
  width: 14px;
  border-radius: 4px;
  background: color-mix(in srgb, #5e5ce6 35%, var(--sf2));
}
.slb i.t {
  background: #5e5ce6;
}
.slb i.lo {
  background: #ff9f0a;
}
.hbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hbs button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 11px;
  background: var(--sf2);
  font-size: 12.5px;
  font-weight: 650;
  text-align: left;
  transition:
    background 0.2s,
    transform 0.15s,
    color 0.2s;
}
.hbs button span {
  font-size: 15px;
  filter: grayscale(1);
  opacity: 0.55;
  transition: 0.2s;
}
.hbs button.on {
  background: color-mix(in srgb, #ff375f 18%, var(--sf2));
  color: #ff375f;
}
.hbs button.on span {
  filter: none;
  opacity: 1;
}
.hbs button:active {
  transform: scale(0.95);
}
.gls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 12px;
  color: var(--mu);
  font-weight: 600;
}
.gls span:last-child {
  display: inline-flex;
  gap: 5px;
}
.gls button {
  width: 22px;
  height: 22px;
  font-size: 14px;
}
.cld {
  font-size: 20px;
  font-weight: 750;
  text-align: right;
  font-variant-numeric: tabular-nums;
  margin: -6px 0 4px;
  height: 24px;
  overflow: hidden;
}
.clk2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.clk2 .eq {
  grid-column: span 2;
}
.clk2 button {
  height: 20px;
  border-radius: 7px;
  background: var(--sf2);
  font-size: 12px;
  font-weight: 650;
  transition:
    transform 0.12s,
    background 0.2s;
}
.clk2 button:active {
  transform: scale(0.9);
}
.clk2 .op {
  background: color-mix(in srgb, var(--ac) 22%, var(--sf2));
  color: var(--ac);
}
.clk2 .cl {
  color: #ff3b30;
}
.clk2 .eq {
  background: var(--ac);
  color: #fff;
}
.qnt {
  width: 100%;
  height: calc(100% - 30px);
  resize: none;
  border: 0;
  outline: 0;
  background: color-mix(in srgb, #ffd60a 16%, var(--sf2));
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--tx);
}
.dyw {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dyn {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #ff453a;
}
.dyw b {
  display: block;
  font-size: 17px;
}
.dyw span {
  display: block;
  font-size: 13px;
  color: var(--mu);
}
.dyw em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 650;
  margin-top: 4px;
  color: var(--ac);
}

/* Dagens ord: bare pillen, med spørsmålet som plassholder */
.mo .mw {
  width: auto;
  flex: 0 0 218px;
  margin: 0 8px 0 0;
}
.mo .mw input {
  height: 30px;
  font-size: 12.5px;
  padding: 0 38px 0 12px;
}
.mo .mw input::placeholder {
  font-size: 12px;
}
.w.sm .mo {
  flex-wrap: nowrap;
}
.mo {
  margin-top: 9px;
}

/* Skolenavn: får bruke to linjer, så ... */
.w .sc-n {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  line-height: 1.15;
  font-size: 21px;
}
.w .sc-f:empty {
  display: none;
}

/* Kalkulator */
.cli {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--sf2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--tx);
  outline: 0;
  font-variant-numeric: tabular-nums;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.cli:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 22%, transparent);
}
.clr {
  font-size: 24px;
  font-weight: 780;
  letter-spacing: -0.02em;
  margin: 6px 2px 2px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clh {
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.clh button {
  font-size: 11px;
  color: var(--mu);
  background: var(--sf2);
  border-radius: 8px;
  padding: 3px 8px;
  white-space: nowrap;
}
.clh b {
  color: var(--tx);
}

.w .sc-n {
  padding-bottom: 0 !important;
  margin-bottom: 4px;
}
.mo .mw {
  flex: 0 0 196px;
  margin-right: 6px;
}
.mo .me2 {
  min-width: 0;
}
.mo .me2 button,
.mo > button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 30px;
  height: 28px;
  font-size: 16px;
}
.w.sm .mo > button {
  max-width: none;
}
.mo .mw {
  flex: 0 0 214px;
}
.mo .mw input {
  padding-right: 12px;
}
.mo .mw input:not(:placeholder-shown) {
  padding-right: 40px;
}
.mo .mw input:placeholder-shown ~ .wcn {
  display: none;
}
.mo .me2 button,
.mo > button {
  max-width: 26px;
}
.clr {
  margin-top: 4px;
}
.clh {
  margin-top: 2px;
}

/* ===== v3.1 ===== */
/* Neste: «I morgen» står rett etter handlingen; stor boks har to kolonner */
.nrg {
  display: grid;
  gap: 0;
}
.nrg.two {
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
}
.nr b {
  flex: 0 1 auto;
}
.nr span {
  flex: none;
  font-size: 12px;
}
.nr.f span {
  color: var(--ac);
}
/* Side 2-merket flyttes ned til høyre så det ikke dekker bokser */
.pgl {
  top: auto;
  bottom: 10px;
  left: auto;
  right: 16px;
  transform: none;
}
/* Kalkulator */
.cwr {
  display: flex;
  gap: 12px;
  height: calc(100% - 30px);
  margin-top: 4px;
}
.cl-l {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.cwr.lg2 .cl-l {
  flex-basis: 216px;
}
.kcd {
  background: color-mix(in srgb, var(--sf2) 80%, #000 6%);
  border-radius: 12px;
  padding: 6px 12px 7px;
  text-align: right;
  height: 56px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  outline: 0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.14);
  cursor: text;
  font-variant-numeric: tabular-nums;
}
.kcd:focus {
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.14),
    0 0 0 2px color-mix(in srgb, var(--ac) 60%, transparent);
}
.kce {
  font-size: 12px;
  color: var(--mu);
  min-height: 15px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  direction: ltr;
}
.kcr {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--mu);
}
.kcr.dn {
  color: var(--tx);
}
.kcd .kcr:not(:empty) {
  color: var(--tx);
}
.cpad {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 5px;
}
.kk {
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  background: var(--sf2);
  color: var(--tx);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  min-height: 0;
  transition:
    transform 0.08s,
    filter 0.15s,
    background 0.15s;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}
.kk:hover {
  filter: brightness(1.12);
}
.kk:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: none;
}
.kk svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kk.n {
  background: color-mix(in srgb, var(--sf2) 60%, var(--tx) 8%);
}
.kk.o {
  background: color-mix(in srgb, var(--ac) 22%, var(--sf2));
  color: var(--ac);
}
.kk.c {
  color: #ff453a;
  background: color-mix(in srgb, #ff453a 14%, var(--sf2));
}
.kk.eq {
  background: var(--ac);
  color: #fff;
}
.kk.z {
  grid-column: span 2;
}
.kk.s {
  background: color-mix(in srgb, #8e8e93 20%, var(--sf2));
  font-size: 14px;
}
.cl-r {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.chs button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-size: 12.5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--sf2);
  color: var(--mu);
  cursor: pointer;
}
.chs button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chs button b {
  color: var(--tx);
}
.chn {
  color: var(--mu);
  font-size: 12.5px;
  padding: 8px 2px;
}
.csi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  height: 32px;
  flex: none;
}

/* ===== v3.1: leseplan, hva må jeg få, studierekke ===== */
.lph {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 15px;
}
.lph b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lpc {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: #ff9f0a;
  color: #fff;
  cursor: pointer;
}
.lpok {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  color: #34c759;
}
.lpi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  font-size: 13.5px;
}
.lpi b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.lpi em {
  font-style: normal;
  color: var(--mu);
  font-size: 12px;
}
.lpi.dn b {
  text-decoration: line-through;
  opacity: 0.5;
}
.lpi .ckb {
  width: 18px;
  height: 18px;
}
.lpi .ckb svg {
  width: 11px;
  height: 11px;
}
.lpm {
  width: min(460px, 94vw);
}
.lpm .lpt {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.4;
}
.lpr {
  display: flex;
  gap: 28px;
  margin: 14px 0 6px;
  align-items: flex-start;
}
.lps {
  min-height: 2.6em;
  margin: 8px 0 12px !important;
}
.ndw {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100% - 30px);
}
.ndw.lg {
  flex-direction: row;
  gap: 18px;
}
.ndf,
.ndr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ndl {
  display: grid;
  gap: 3px;
  font-size: 11.5px;
  color: var(--mu);
}
.ndi {
  height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--sf2);
  padding: 0 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--tx);
  outline: 0;
  width: 100%;
}
.ndi:focus {
  border-color: var(--ac);
}
.ndc {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.ndc button {
  flex: 1;
  min-width: 34px;
  height: 28px;
  border-radius: 8px;
  background: var(--sf2);
  font-size: 13px;
  font-weight: 700;
  color: var(--mu);
  cursor: pointer;
}
.ndc button.on {
  background: #ff9f0a;
  color: #fff;
}
.ndr {
  background: color-mix(in srgb, #ff9f0a 14%, var(--sf2));
  border-radius: 14px;
  padding: 10px 12px;
  justify-content: center;
}
.ndr small {
  color: var(--mu);
  font-size: 11.5px;
}
.ndr b {
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ndr p {
  font-size: 10.5px;
  color: var(--mu);
  margin: 0;
}
.ndt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 14px;
  margin: 4px 0;
}
.ndt div {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}
.ndt em {
  font-style: normal;
  font-weight: 650;
}
.skw {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.skl {
  flex: 1;
  min-width: 0;
}
.skn {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.skn span {
  font-size: 13px;
  font-weight: 600;
  color: var(--mu);
  margin-left: 5px;
  letter-spacing: 0;
}
.skl p {
  font-size: 11.5px;
  color: var(--mu);
  margin: 3px 0 0;
  line-height: 1.3;
}
.skg {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
  flex: none;
}
.skc {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--sf2);
  display: block;
}
.skc.l-1 {
  opacity: 0.25;
}
.skc.l1 {
  background: color-mix(in srgb, #ff6a00 35%, var(--sf2));
}
.skc.l2 {
  background: color-mix(in srgb, #ff6a00 70%, var(--sf2));
}
.skc.l3 {
  background: #ff6a00;
}
.skc.t {
  outline: 1.5px solid var(--tx);
  outline-offset: 1px;
}

/* v3.2 Leseplan-dialog: bred, to kolonner, passer på skjermen */
.md.lpm {
  width: min(780px, 94vw);
  max-height: min(600px, 92vh);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lpm .lpg {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.lpm .lpf {
  padding: 22px 22px 8px;
}
.lpm .lpp {
  padding: 22px 22px 8px;
  background: color-mix(in srgb, var(--tx) 4%, var(--bg));
  border-left: 0.5px solid var(--ln);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lpm .lp2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lpm .lpt {
  min-height: 0;
  height: 92px;
  resize: none;
}
.lpm .lpr {
  margin: 12px 0 4px;
  gap: 22px;
}
.lpm .lpv {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.lpm .lps {
  margin: 10px 0 8px !important;
  min-height: 0;
  font-size: 12.5px;
}
.lpm .lpa {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 22px 16px;
  border-top: 0.5px solid var(--ln);
  background: var(--bg);
}
.lpm .lpa .btn {
  margin: 0;
  width: auto;
}
.lpm .lpa .btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.lpm .lpa .gh {
  background: transparent;
  color: var(--mu);
  box-shadow: none;
}
.lpv-h {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--mu);
  margin-bottom: 8px;
}
.lpv-r {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-top: 0.5px solid var(--ln);
  font-size: 12.5px;
}
.lpv-r:first-of-type {
  border-top: 0;
}
.lpv-r > span {
  color: var(--mu);
  font-weight: 600;
}
.lpv-r i {
  display: inline-block;
  font-style: normal;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 7px;
  margin: 0 4px 3px 0;
  background: color-mix(in srgb, #5e5ce6 16%, transparent);
  color: #5e5ce6;
}
.lpv-r i.rv {
  background: color-mix(in srgb, #ff9f0a 18%, transparent);
  color: #c77700;
}
.lpv-m {
  color: var(--mu);
  font-size: 12px;
  padding-top: 6px;
}
.lpe {
  height: 100%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: var(--mu);
  font-size: 12.5px;
  padding: 0 12px;
}
.lpe b {
  color: var(--tx);
  font-size: 14px;
}
@media (max-width: 700px) {
  .lpm .lpg {
    grid-template-columns: 1fr;
  }
  .lpm .lpp {
    border-left: 0;
    border-top: 0.5px solid var(--ln);
  }
  .lpm .lpv {
    max-height: 140px;
  }
  .md.lpm {
    max-height: 92vh;
  }
}

/* v3.2 Studie-Wrapped */
.wrw {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--a), var(--b));
}
.wrw .wre {
  font-size: 26px;
  line-height: 1;
}
.wrw b {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.wrw small {
  display: block;
  font-size: 11.5px;
  opacity: 0.9;
}
.wrg {
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  width: auto;
}
.md.wrm {
  width: min(400px, 94vw);
  max-height: 94vh;
  overflow: auto;
}
.wrb {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px var(--ln);
}
.wrb canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56vh;
  object-fit: contain;
  margin: 0 auto;
  background: #222;
}
.wra {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.wra .btn {
  margin: 0;
  width: auto;
}
.wra .gh {
  background: transparent;
  color: var(--mu);
  box-shadow: 0 0 0 0.5px var(--ln);
}

/* v3.5 Leseplan: ny dialog */
.md.lpm {
  width: min(860px, 95vw);
  max-height: min(620px, 94vh);
  border-radius: 22px;
}
.lpm .lpg {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.lpm .lpf {
  padding: 24px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lphd {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lphi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #5e5ce6, #bf5af2);
  box-shadow: 0 6px 18px rgba(94, 92, 230, 0.35);
  flex: none;
}
.lphd b {
  display: block;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.lphd span {
  font-size: 12.5px;
  color: var(--mu);
}
.lpm .lp2 {
  gap: 12px;
}
.lpm label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lpm .fl2 {
  margin: 0;
}
.lpm .fl2 span {
  color: var(--mu);
  font-weight: 500;
}
.lpm .lpt {
  height: 120px;
}
.lpm .lpr {
  margin: 0;
}
.lpm .lpp {
  padding: 20px;
  background: color-mix(in srgb, #5e5ce6 7%, var(--bg));
}
.lpks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.lpk {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 0 0 0.5px var(--ln);
}
.lpk b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.lpk span {
  font-size: 11px;
  color: var(--mu);
}
.lpvd {
  margin: 10px 0 12px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 12px;
}
.lpvd.ok {
  background: color-mix(in srgb, #30d158 16%, transparent);
  color: color-mix(in srgb, #30d158 70%, var(--tx));
}
.lpvd.mid {
  background: color-mix(in srgb, #ff9f0a 16%, transparent);
  color: color-mix(in srgb, #ff9f0a 70%, var(--tx));
}
.lpvd.bad {
  background: color-mix(in srgb, #ff453a 16%, transparent);
  color: color-mix(in srgb, #ff453a 75%, var(--tx));
}
.lptl {
  position: relative;
}
.lpd {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 7px 0;
  position: relative;
}
.lpd::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 34px;
  bottom: -8px;
  width: 2px;
  background: var(--ln);
}
.lpd:last-child::before {
  display: none;
}
.lpdd {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 0 0 0.5px var(--ln);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}
.lpdd b {
  font-size: 15px;
}
.lpdd span {
  font-size: 10px;
  color: var(--mu);
  text-transform: lowercase;
}
.lpd.ex .lpdd {
  background: #5e5ce6;
  color: #fff;
  box-shadow: none;
}
.lpd.ex .lpdd span {
  color: #fff;
}
.lpd.ex .lpdc {
  align-self: center;
  font-size: 13.5px;
}
.lpdb {
  height: 4px;
  border-radius: 2px;
  background: var(--ln);
  margin: 4px 0 6px;
  overflow: hidden;
}
.lpdb i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5e5ce6, #bf5af2);
  border-radius: 2px;
}
.lpdc i {
  display: inline-block;
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 7px;
  margin: 0 4px 4px 0;
  background: color-mix(in srgb, #5e5ce6 16%, transparent);
  color: color-mix(in srgb, #5e5ce6 80%, var(--tx));
}
.lpdc i.rv {
  background: color-mix(in srgb, #ff9f0a 18%, transparent);
  color: color-mix(in srgb, #ff9f0a 75%, var(--tx));
}
.lpe-i {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #5e5ce6 14%, transparent);
  color: #5e5ce6;
  margin-bottom: 4px;
}
.lpm .lpa {
  align-items: center;
}
.lpm .lpa .lps {
  flex: 1;
  margin: 0 !important;
  font-size: 12.5px;
  color: var(--mu);
}
/* tom leseplan-boks: får plass i liten størrelse */
.lpz {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: calc(100% - 30px);
}
.lpz b {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.lpz span {
  font-size: 12px;
  color: var(--mu);
  line-height: 1.3;
}
.lpz .btn {
  margin-top: auto;
  align-self: flex-start;
  width: auto;
  padding: 5px 12px;
  font-size: 12.5px;
}
@media (max-width: 700px) {
  .lpm .lpg {
    grid-template-columns: 1fr;
  }
  .lpm .lpv {
    max-height: 220px;
  }
}
.lpdc .lpdb i {
  display: block;
  padding: 0;
  margin: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #5e5ce6, #bf5af2);
}

/* v3.7 Leseplan: emner som brikker eller antall */
.lptabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tx) 7%, transparent);
  margin-bottom: 10px;
}
.lptabs button {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--mu);
}
.lptabs button.on {
  background: var(--bg);
  color: var(--tx);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.lpn {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lpst {
  display: flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--tx) 6%, transparent);
  border-radius: 12px;
  padding: 4px;
}
.lpst button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 600;
  background: var(--bg);
  color: var(--tx);
}
.lpst b {
  min-width: 38px;
  text-align: center;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.lpus {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lpus button {
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mu);
  box-shadow: 0 0 0 1px var(--ln);
}
.lpus button.on {
  color: #fff;
  background: #5e5ce6;
  box-shadow: none;
}
.lpchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  min-height: 86px;
  max-height: 128px;
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tx) 6%, transparent);
  cursor: text;
}
.lpch {
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  background: var(--bg);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lv) 45%, transparent);
}
.lpcl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tx);
}
.lpcl i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lv);
}
.lpcl em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--lv);
  font-weight: 700;
}
.lpcx {
  padding: 2px 8px 2px 4px;
  color: var(--mu);
  font-size: 14px;
}
.lpcx:hover {
  color: #ff453a;
}
#lpci {
  flex: 1;
  min-width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-size: 13px;
  padding: 4px 2px;
}
.lphint {
  font-size: 11.5px;
  color: var(--mu);
  margin-top: 6px;
}
.lpm .lpr {
  flex-wrap: wrap;
  gap: 16px;
}
.lpm .seg2 button {
  min-width: 28px;
  padding: 0 8px;
}

/* v3.8 Neste: to kolonner som ikke renner over */
.nrg.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.nrg .nr {
  min-width: 0;
}

/* v3.8 Eksamen: lagre stress + prikker for dagens lagringer */
.stw {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.stn {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.stn i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tx) 20%, transparent);
}
.stn i.on {
  background: var(--wc, #ff3b30);
}
.stq {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 9px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tx) 9%, transparent);
  font-size: 12px;
  font-weight: 650;
  flex: none;
  animation: pop 0.2s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.stq button {
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--tx) 10%, transparent);
}
.stq button.y {
  background: var(--ac);
  color: #fff;
}
.sr.full {
  opacity: 0.45;
  filter: saturate(0.4);
}
.sr.full .sk {
  pointer-events: none;
}
.sr.full .sl3 {
  justify-content: center;
}

/* v3.8 Stresskart */
.md.sxm {
  width: min(880px, 95vw);
  max-height: 94vh;
  overflow: auto;
  padding: 22px 24px;
  border-radius: 22px;
}
.sxh {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sxh small {
  display: block;
  font-size: 12px;
  color: var(--mu);
  font-weight: 600;
}
.sxh b {
  font-size: 26px;
  letter-spacing: -0.03em;
  background: linear-gradient(
    90deg,
    hsl(120 70% 45%),
    hsl(50 90% 50%),
    hsl(0 80% 55%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sxts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.sxt {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tx) 5%, transparent);
  box-shadow: 0 0 0 0.5px var(--ln);
}
.sxt b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.sxt span {
  font-size: 11.5px;
  color: var(--mu);
}
.sxg {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 6px 8px;
}
.sxl {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  font-size: 11.5px;
  color: var(--mu);
  font-weight: 600;
}
.sxl span {
  display: flex;
  align-items: center;
}
.sxgrid {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
}
.sxc {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--c);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform 0.12s;
}
.sxc.e {
  background: color-mix(in srgb, var(--tx) 7%, transparent);
  box-shadow: none;
}
.sxc:hover {
  transform: scale(1.25);
  z-index: 1;
}
.sxc.sel {
  outline: 2px solid var(--tx);
  outline-offset: 1px;
}
.sxdays {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  font-size: 10px;
  color: var(--mu);
}
.sxdays span {
  white-space: nowrap;
  overflow: visible;
}
.sxline {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tx) 4%, transparent);
}
.sxline svg {
  width: 100%;
  height: 96px;
  display: block;
  overflow: visible;
}
.sxex {
  stroke: #5e5ce6;
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.sxleg {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--mu);
}
.sxleg span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sxleg i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.sxleg i.exl {
  width: 2px;
  height: 12px;
  border-radius: 0;
  background: #5e5ce6;
}
.sxd {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-size: 13px;
}
.sxd b {
  width: 100%;
}
.sxd span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sxd i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.sxd .mu {
  color: var(--mu);
}
.sxem {
  padding: 40px 10px;
  text-align: center;
  display: grid;
  gap: 6px;
}
.sxem b {
  font-size: 18px;
}
.sxem span {
  color: var(--mu);
  font-size: 13.5px;
  max-width: 46ch;
  margin: 0 auto;
}
.sxf {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.sxf .btn {
  width: auto;
  margin: 0;
}
@media (max-width: 700px) {
  .sxts {
    grid-template-columns: 1fr 1fr;
  }
  .sxg {
    grid-template-columns: 1fr;
  }
  .sxl {
    display: none;
  }
}

/* v3.8 Igjen denne uka */
.lfl {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.lfl > span {
  font-size: 26px;
}
.lfl b {
  display: block;
}
.lfl small {
  color: var(--mu);
  font-size: 12px;
}

/* v3.8 Wrapped: velg hva som er med */
.md.wrm {
  width: min(760px, 95vw);
  max-height: 94vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  overflow: auto;
}
.wrm .wrb canvas {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
}
.wrm .wrb {
  display: flex;
  justify-content: center;
  background: #111;
}
.wro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.wro button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 0 0 1px var(--ln);
  color: var(--mu);
}
.wro button i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px var(--ln);
  flex: none;
}
.wro button.on {
  color: var(--tx);
  box-shadow: 0 0 0 1.5px #ff2d78;
  background: color-mix(in srgb, #ff2d78 8%, transparent);
}
.wro button.on i {
  background: #ff2d78
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/12px no-repeat;
  box-shadow: none;
}
@media (max-width: 700px) {
  .md.wrm {
    grid-template-columns: 1fr;
  }
  .wrm .wrb canvas {
    max-height: 50vh;
  }
}
.w .stw {
  position: relative;
}
.stq {
  position: absolute;
  right: -4px;
  top: 2px;
  z-index: 3;
  background: var(--sf2, #3a3a3c);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.25),
    0 0 0 0.5px var(--ln);
}
