:root {
  --bg: #fff;
  --sf: #fff;
  --sf2: #f2f2f5;
  --tx: #1d1d1f;
  --mu: #86868b;
  --ln: #e0e0e5;
  --dot: #d4d4da;
  --cv: #fafafb;
  --ac: #007aff;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e20;
    --sf: #2c2c2f;
    --sf2: #38383c;
    --tx: #f5f5f7;
    --mu: #9b9ba3;
    --ln: #3b3b40;
    --dot: #3a3a3f;
    --cv: #18181a;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1e20;
  --sf: #2c2c2f;
  --sf2: #38383c;
  --tx: #f5f5f7;
  --mu: #9b9ba3;
  --ln: #3b3b40;
  --dot: #3a3a3f;
  --cv: #18181a;
}
* {
  box-sizing: border-box;
  margin: 0;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--tx);
  font:
    14px/1.4 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI Variable",
    "Segoe UI",
    Inter,
    system-ui,
    sans-serif;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: default;
  text-align: inherit;
}
button:focus-visible,
input:focus-visible,
[contenteditable]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ac) 55%, transparent);
  outline-offset: 1px;
}
#app {
  height: 100%;
  --ac: #007aff;
  position: relative;
  display: flex;
  flex-direction: column;
}
.gl {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
}
.gl svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(#9da3ae, #6c717c);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  flex: none;
}
.tb {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 0.5px solid var(--ln);
  z-index: 4;
}
.tb h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tb small {
  display: block;
  font-size: 12px;
  color: var(--mu);
  font-weight: 500;
}
.sp {
  flex: 1;
}
.bd {
  flex: 1;
  overflow: auto;
  min-height: 0;
  position: relative;
}
.pg {
  min-height: 100%;
}
.pg.inr {
  animation: inr 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.pg.inl {
  animation: inl 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes inr {
  from {
    opacity: 0;
    transform: translateX(70px);
  }
}
@keyframes inl {
  from {
    opacity: 0;
    transform: translateX(-70px);
  }
}
.ib {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--tx);
}
.ib:hover {
  background: var(--sf2);
}
.ib svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--ac);
  color: #fff;
  font-weight: 560;
  font-size: 13.5px;
  text-align: center;
}
.btn:active {
  filter: brightness(0.9);
}
.btn.gh {
  background: var(--sf2);
  color: var(--tx);
}
.btn.bl {
  display: block;
  width: 100%;
  padding: 11px;
  font-size: 15px;
  border-radius: 11px;
}
.btn:disabled {
  opacity: 0.35;
}
.in {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--sf);
  color: var(--tx);
  font: inherit;
  font-size: 15px;
  margin-top: 10px;
}
.in:focus {
  border-color: var(--ac);
  outline: 3px solid color-mix(in srgb, var(--ac) 30%, transparent);
  outline-offset: 0;
}
.bd.nh {
  overflow: hidden;
}
.bd.nh .pg {
  position: absolute;
  inset: 0;
  min-height: 0;
}
.o0 {
  position: fixed;
  inset: 0;
  z-index: 8;
}
@keyframes pp {
  from {
    transform: scale(0.55);
  }
}
.fc {
  max-width: 420px;
  margin: 0 auto;
  padding: 44px 20px 120px;
  text-align: center;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.gh2 {
  font-size: 12px;
  font-weight: 650;
  color: var(--mu);
  padding: 0 14px 6px;
}
.dc {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dc b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.dc small {
  color: var(--mu);
  font-size: 12px;
}
.nm {
  color: var(--ac);
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
.tb .bk {
  margin-left: -10px;
  margin-right: 2px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.tb .bk svg {
  width: 19px;
  height: 19px;
}
.av {
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.exm {
  flex: 1;
  min-width: 0;
}
.exm b {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exm span {
  font-size: 12.5px;
  color: var(--mu);
}

/* ===== Rolige, tynne rullefelt ===== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--tx) 14%, transparent);
  border: 3.5px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
  min-height: 36px;
  transition: background 0.2s;
}
*:hover > ::-webkit-scrollbar-thumb,
:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--tx) 26%, transparent);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background: color-mix(in srgb, var(--ac) 80%, transparent);
  background-clip: content-box;
}

/* ===== Glidende hover-markør i segmentkontroller (se ui/glide.js) ===== */
.seg,
.seg2 {
  position: relative;
  isolation: isolate;
}
.seg > button,
.seg2 > button {
  position: relative;
  z-index: 1;
  transition:
    color 0.2s,
    transform 0.15s;
}
.seg > button:active,
.seg2 > button:active {
  transform: scale(0.96);
}
.gld {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  background: color-mix(in srgb, var(--ac) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 28%, transparent);
  transition:
    transform 0.32s cubic-bezier(0.25, 1.25, 0.4, 1),
    width 0.32s cubic-bezier(0.25, 1.25, 0.4, 1),
    height 0.32s cubic-bezier(0.25, 1.25, 0.4, 1),
    opacity 0.2s;
}
.gld.v {
  opacity: 1;
}
.gld.j {
  transition: opacity 0.2s;
}
.seg > button:hover:not(.on),
.seg2 > button:hover:not(.on) {
  color: var(--ac);
}
