/* Karma */

@font-face { font-family: 'Inter Tight'; src: url(../fonts/inter-tight.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../fonts/instrument-serif.woff2) format('woff2'); font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../fonts/instrument-serif-italic.woff2) format('woff2'); font-style: italic; font-display: swap; }

:root {
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, .74);
  --fg-3: rgba(255, 255, 255, .5);
  --fg-4: rgba(255, 255, 255, .28);
  --glass: rgba(255, 255, 255, .075);
  --glass-hover: rgba(255, 255, 255, .13);
  --glass-strong: rgba(14, 14, 22, .62);
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .22);
  --heart: #ff4f7b;
  --heart-2: #ff9a6b;
  --ok: #5ee6a0;
  --accent: #ff5d5d;
  --blur: blur(24px) saturate(170%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.5, .64, 1);
  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --gutter: clamp(16px, 2.2vw, 30px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: radial-gradient(120% 90% at 50% 0%, #1a1f45 0%, #070811 60%) #05060c;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  user-select: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input { background: none; border: 0; outline: none; }
::selection { background: rgba(255, 79, 123, .45); }
svg { display: block; }
.ic, .icon-btn svg, .glyph svg, .wx svg, .cmd svg {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
:focus-visible { outline: 2px solid rgba(255, 255, 255, .7); outline-offset: 3px; border-radius: 10px; }

.glass {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ——— Himlen ——— */
#sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.4s var(--ease);
  image-rendering: auto;
}
.sky-ready #sky { opacity: 1; }
.no-webgl #sky { display: none; }
.veil {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 46%, rgba(0, 0, 0, .22), transparent 70%),
    linear-gradient(to top, rgba(0, 0, 0, .35), transparent 30%);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; opacity: .075; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Intro ——— */
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.booting .reveal, .onboarding-on .reveal { opacity: 0; transform: translateY(10px); filter: blur(8px); }
.off { display: none !important; }
.onboarding-on .sponsor, .onboarding-on .todo-panel { opacity: 0; pointer-events: none; }

/* ——— Topp ——— */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px;
  padding: calc(var(--gutter) - 4px) var(--gutter);
}

.dock { display: flex; gap: 8px; align-items: center; }
.dock a, .dock .add {
  position: relative; width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: transform .35s var(--spring), background .2s;
}
.dock a:hover, .dock .add:hover { transform: translateY(-3px) scale(1.06); background: var(--glass-hover); }
.dock a:active { transform: scale(.94); }
.dock img { width: 18px; height: 18px; border-radius: 4px; }
.dock .letter { font-size: 14px; font-weight: 600; }
.dock .add { color: var(--fg-3); border-style: dashed; background: transparent; }
.dock .add svg { width: 16px; height: 16px; }
.dock [data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translate(-50%, -4px); white-space: nowrap;
  font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 8px;
  background: var(--glass-strong); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s var(--ease);
}
.dock [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
.dock .x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; color: #000; font-size: 12px; line-height: 18px; text-align: center; font-weight: 700;
  opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--spring);
}
.dock a:hover .x { opacity: 1; transform: scale(1); }

.search {
  width: min(540px, 40vw); height: 46px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: background .25s, border-color .25s, width .45s var(--ease), box-shadow .25s;
}
.search:focus-within { background: rgba(255, 255, 255, .14); border-color: var(--line-strong); width: min(620px, 48vw); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5); }
.search .ic { width: 18px; height: 18px; color: var(--fg-2); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; font-size: 15px; }
.search input::placeholder { color: var(--fg-3); }
kbd {
  font-family: var(--font); font-size: 11.5px; color: var(--fg-3);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; margin-right: 4px;
}
.search:focus-within kbd { opacity: 0; }

.weather {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 16px; text-align: right;
  transition: background .2s;
}
.weather:hover { background: var(--glass); }
.wx { width: 30px; height: 30px; }
.wx svg { width: 100%; height: 100%; stroke-width: 1.5; }
.weather .temp { font-size: 26px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.weather .meta { display: flex; flex-direction: column; line-height: 1.15; }
.weather .city { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.weather .hilo { font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.weather.empty { color: var(--fg-3); font-size: 13.5px; gap: 6px; }
.weather.empty svg { width: 18px; height: 18px; }

/* ——— Mitten ——— */
.center {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 4vh; text-align: center;
}
.center > * { pointer-events: auto; }
.date {
  font-size: 12.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--fg-2); margin-bottom: 6px;
}
.clock {
  font-size: clamp(92px, 15.5vw, 224px); font-weight: 220; line-height: .92; letter-spacing: -.055em;
  font-variant-numeric: tabular-nums; margin-left: -.05em;
  background: linear-gradient(180deg, #fff 35%, rgba(255, 255, 255, .7));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 12px 50px rgba(0, 0, 0, .25));
}
.clock .ampm { font-size: .2em; letter-spacing: 0; font-weight: 400; margin-left: .25em; vertical-align: .35em; -webkit-text-fill-color: var(--fg-2); }
.greeting {
  margin: .2em 0 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(30px, 3.5vw, 52px); letter-spacing: -.01em; line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .3);
}
.name { outline: none; border-radius: 6px; padding: 0 2px; cursor: text; transition: background .2s; }
.name:hover { background: rgba(255, 255, 255, .06); }
.name:focus { background: rgba(255, 255, 255, .1); }
.name:empty::before { content: attr(data-placeholder); color: var(--fg-3); }

.focus { margin-top: clamp(22px, 4.5vh, 44px); min-height: 92px; display: flex; flex-direction: column; align-items: center; }
.focus-q { font-size: 16px; color: var(--fg-2); margin-bottom: 12px; }
.focus input {
  width: min(460px, 80vw); font-size: 24px; text-align: center; padding: 4px 0 10px;
  border-bottom: 1.5px solid rgba(255, 255, 255, .35); transition: border-color .25s;
}
.focus input:focus { border-color: #fff; }
.focus-label { font-size: 11.5px; letter-spacing: .24em; font-weight: 600; text-transform: uppercase; color: var(--fg-2); margin-bottom: 10px; }
.focus-row { display: flex; align-items: center; gap: 14px; font-size: clamp(20px, 2vw, 26px); font-weight: 400; }
.focus-row .txt { transition: color .3s, opacity .3s; position: relative; }
.focus-row .txt::after {
  content: ''; position: absolute; left: 0; right: 0; top: 54%; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.focus.done .txt { opacity: .55; }
.focus.done .txt::after { transform: scaleX(1); }
.focus-row .del { opacity: 0; color: var(--fg-3); font-size: 22px; width: 28px; transition: opacity .2s; }
.focus-row:hover .del { opacity: 1; }

.check {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  border: 1.5px solid rgba(255, 255, 255, .55); display: grid; place-items: center;
  transition: background .25s, border-color .25s, transform .3s var(--spring);
}
.check svg { width: 14px; height: 14px; stroke: #0b0b12; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s var(--ease) .05s; }
.check:hover { border-color: #fff; }
.check:active { transform: scale(.85); }
.is-done .check, .focus.done .check { background: #fff; border-color: #fff; }
.is-done .check svg, .focus.done .check svg { stroke-dashoffset: 0; }

/* ——— Botten ——— */
.bottom {
  position: fixed; inset: auto 0 0 0; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px;
  padding: var(--gutter);
}
.quote { margin: 0; max-width: 380px; cursor: pointer; opacity: .82; transition: opacity .25s; }
.quote:hover { opacity: 1; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.32; }
.quote figcaption { margin-top: 6px; font-size: 12px; color: var(--fg-3); letter-spacing: .02em; }
.quote.swap blockquote, .quote.swap figcaption { animation: quoteSwap .5s var(--ease); }
@keyframes quoteSwap { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } }

.impact {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 7px 20px 7px 7px; border-radius: 999px; text-align: left;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: transform .4s var(--spring), background .25s, box-shadow .35s, opacity .9s var(--ease), filter .9s var(--ease);
}
.impact:hover { background: var(--glass-hover); transform: translateY(-2px); box-shadow: 0 12px 40px -8px rgba(255, 79, 123, .45); }
.impact:active { transform: scale(.97); }
.ring { position: relative; width: 42px; height: 42px; flex: none; }
.ring > svg:first-child { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.ring-fill { fill: none; stroke: var(--heart); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: 106.8; transition: stroke-dashoffset 1.2s var(--ease) .4s; }
.ring .heart { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; fill: var(--heart); }
.impact.beat .heart { animation: beat .9s var(--spring) .5s; }
@keyframes beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.35); } 55% { transform: scale(.92); } }
.impact-text { display: flex; flex-direction: column; line-height: 1.2; }
.impact-text strong { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.impact-text span { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; }

.actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-btn, .todo-btn {
  height: 40px; border-radius: 999px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: background .2s, transform .3s var(--spring);
}
.icon-btn { width: 40px; color: var(--fg-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .todo-btn:hover { background: var(--glass-hover); color: var(--fg); }
.icon-btn:active, .todo-btn:active { transform: scale(.92); }
.todo-btn { display: flex; gap: 8px; padding: 0 16px; font-size: 14px; font-weight: 500; }
.todo-ic { display: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.todo-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .9); color: #0b0b12; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.badge:empty { display: none; }
.todo-btn[aria-expanded="true"] .badge { background: rgba(0, 0, 0, .1); }

/* ——— Sponsor ——— */
.sponsor {
  position: fixed; right: var(--gutter); bottom: calc(var(--gutter) + 56px); z-index: 3; width: 272px;
  border-radius: 22px; padding: 10px; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: opacity .5s var(--ease), transform .5s var(--ease), width .45s var(--ease), padding .45s var(--ease);
}
.sponsor[hidden], .todo-open .sponsor { opacity: 0; transform: translateY(12px); pointer-events: none; }
.sponsor-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-size: 11.5px; color: var(--fg-3); }
.sponsor-head b { color: var(--fg-2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 10.5px; }
.sponsor-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--heart); box-shadow: 0 0 10px var(--heart); }
.sponsor-head .for { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sponsor-head button { color: var(--fg-3); font-size: 11.5px; padding: 2px 6px; border-radius: 6px; }
.sponsor-head button:hover { color: var(--fg); background: var(--glass); }
.sponsor-media {
  aspect-ratio: 16 / 9; border-radius: 14px; position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 0% 100%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 60%),
    radial-gradient(70% 90% at 100% 0%, rgba(120, 140, 255, .55), transparent 60%),
    #15151f;
  display: grid; place-items: center;
}
.sponsor-media span { font-family: var(--serif); font-style: italic; font-size: 26px; opacity: .9; }
.sponsor-media small { position: absolute; bottom: 8px; right: 10px; font-size: 10.5px; color: var(--fg-3); letter-spacing: .06em; }
.sponsor-body { padding: 12px 4px 4px; }
.sponsor-body strong { font-size: 14px; font-weight: 600; }
.sponsor-body p { margin: 4px 0 0; font-size: 12.5px; color: var(--fg-2); line-height: 1.4; }
.sponsor.collapsed { width: auto; padding: 6px 6px 6px 10px; border-radius: 999px; }
.sponsor.collapsed .sponsor-head { padding: 0; }
.sponsor.collapsed .sponsor-media, .sponsor.collapsed .sponsor-body, .sponsor.collapsed .for { display: none; }

/* ——— Att göra ——— */
.todo-panel {
  position: fixed; right: var(--gutter); bottom: calc(var(--gutter) + 56px); z-index: 4;
  width: 340px; max-height: min(62vh, 560px); border-radius: 24px;
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  animation: panelIn .4s var(--spring);
}
.todo-panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.todo-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 20px 8px; }
.todo-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.todo-head button { font-size: 12px; color: var(--fg-3); }
.todo-head button:hover { color: var(--fg); }
.todo-list { list-style: none; margin: 0; padding: 4px 10px; overflow-y: auto; flex: 1; }
.todo-list li {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; font-size: 14.5px;
  animation: rowIn .35s var(--ease);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } }
.todo-list li:hover { background: rgba(255, 255, 255, .05); }
.todo-list .check { width: 20px; height: 20px; border-radius: 7px; }
.todo-list .check svg { width: 12px; height: 12px; }
.todo-list .txt { flex: 1; user-select: text; word-break: break-word; transition: opacity .3s; }
.todo-list .is-done .txt { opacity: .45; text-decoration: line-through; }
.todo-list .del { opacity: 0; color: var(--fg-3); font-size: 18px; }
.todo-list li:hover .del { opacity: 1; }
.todo-empty { padding: 18px 20px; color: var(--fg-3); font-size: 14px; }
.todo-panel form { padding: 10px; border-top: 1px solid var(--line); }
.todo-panel input { width: 100%; padding: 10px 12px; font-size: 14.5px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.todo-panel input::placeholder { color: var(--fg-3); }

/* ——— Toast och hjärtan ——— */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--gutter) + 72px); z-index: 20;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .92); color: #0b0b12;
  box-shadow: 0 16px 50px -12px rgba(0, 0, 0, .6);
  transition: opacity .3s var(--ease), transform .45s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.bursts { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.bursts svg { position: absolute; width: 16px; height: 16px; fill: var(--heart); will-change: transform, opacity; }
.plus-one { position: absolute; font-size: 12.5px; font-weight: 600; color: var(--fg); white-space: nowrap; will-change: transform, opacity; }

/* ——— Ark (dialoger) ——— */
dialog:focus { outline: none; }
dialog { color: var(--fg); padding: 0; border: 0; background: none; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(4, 4, 10, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog[open] { animation: sheetIn .5s var(--spring); }
dialog[open]::backdrop { animation: fade .35s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

.sheet {
  width: min(900px, calc(100vw - 32px)); max-height: min(88vh, 860px); overflow-y: auto;
  margin: auto; border-radius: 30px; padding: clamp(22px, 4vw, 40px);
  background: rgba(14, 14, 22, .74); border: 1px solid var(--line);
  backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .07);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.sheet-narrow { width: min(560px, calc(100vw - 32px)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.kicker { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; color: var(--fg-2); }
.close { width: 34px; height: 34px; border-radius: 50%; background: var(--glass); display: grid; place-items: center; color: var(--fg-2); transition: background .2s, transform .3s var(--spring); }
.close:hover { background: var(--glass-hover); color: var(--fg); transform: rotate(90deg); }
.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.hero-amount { font-size: clamp(54px, 8vw, 92px); font-weight: 220; letter-spacing: -.05em; line-height: .95; font-variant-numeric: tabular-nums; }
.hero-to { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); margin-top: 6px; }
.hero-to em { color: var(--accent); font-style: italic; }
.hero-lead { margin: 14px 0 0; max-width: 46ch; color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.hero-note { margin-top: 6px; font-size: 12px; color: var(--fg-3); }
.big-ring { position: relative; width: 150px; height: 150px; }
.big-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.big-ring circle { fill: none; stroke-width: 7; }
.big-ring .track { stroke: rgba(255, 255, 255, .08); }
.big-ring .fill { stroke: url(#heartGrad); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease) .2s; }
.big-ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.big-ring .lbl b { font-size: 30px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big-ring .lbl span { font-size: 11px; color: var(--fg-3); max-width: 100px; line-height: 1.25; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0 34px; }
.stat { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); }
.stat b { display: block; font-size: 28px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--fg-3); }

.section-title { font-size: 22px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 4px; }
.section-hint { margin: 0 0 16px; color: var(--fg-3); font-size: 14px; }

.charities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.charity {
  position: relative; text-align: left; padding: 16px; border-radius: 20px; min-height: 148px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .07);
  transition: transform .35s var(--spring), background .2s, border-color .2s, box-shadow .3s;
}
.charity:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .08); }
.charity:active { transform: scale(.97); }
.charity[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--hue) 70%, transparent);
  background: color-mix(in srgb, var(--hue) 14%, rgba(255, 255, 255, .03));
  box-shadow: 0 10px 40px -14px color-mix(in srgb, var(--hue) 80%, transparent);
}
.glyph { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--hue); background: color-mix(in srgb, var(--hue) 16%, transparent); }
.glyph svg { width: 20px; height: 20px; stroke-width: 1.7; }
.charity b { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.charity span { font-size: 12.5px; color: var(--fg-3); line-height: 1.35; }
.charity .tick {
  position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--hue); display: grid; place-items: center; opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .35s var(--spring);
}
.charity .tick svg { width: 12px; height: 12px; stroke: #0b0b12; stroke-width: 2.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.charity[aria-pressed="true"] .tick { opacity: 1; transform: scale(1); }
.charity .raised { margin-top: auto; font-size: 11.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
.how div { padding: 18px; border-radius: 20px; background: rgba(255, 255, 255, .03); }
.how i { font-style: normal; font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--fg-3); }
.how b { display: block; margin: 10px 0 4px; font-size: 15px; font-weight: 600; }
.how span { font-size: 13px; color: var(--fg-3); line-height: 1.45; }

.invite { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 18px 22px; border-radius: 20px; background: linear-gradient(100deg, rgba(255, 79, 123, .18), rgba(255, 154, 107, .1)); border: 1px solid rgba(255, 79, 123, .25); }
.invite b { font-size: 15px; }
.invite span { display: block; font-size: 13px; color: var(--fg-2); margin-top: 2px; }
.btn {
  height: 42px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: #fff; color: #0b0b12; transition: transform .3s var(--spring), opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.95); }
.btn.ghost { background: var(--glass); color: var(--fg); }
.btn:disabled { opacity: .35; pointer-events: none; }

/* Inställningar */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row > label, .row > .lbl { font-size: 14.5px; }
.row small { display: block; font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }
.row.stack { flex-direction: column; align-items: stretch; }
.field { padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); font-size: 14.5px; width: 220px; }
.field:focus { background: rgba(255, 255, 255, .12); }
.seg { display: flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.seg button { padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--fg-2); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .9); color: #0b0b12; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .16); flex: none; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .35s var(--spring); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.skies { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.sky-opt { padding: 8px; border-radius: 16px; border: 1px solid transparent; text-align: left; transition: border-color .2s, background .2s; }
.sky-opt:hover { background: rgba(255, 255, 255, .05); }
.sky-opt[aria-pressed="true"] { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
.sky-opt i { display: block; height: 44px; border-radius: 11px; margin-bottom: 7px; }
.sky-opt span { font-size: 12.5px; color: var(--fg-2); padding-left: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 7px 13px; border-radius: 99px; font-size: 13px; background: rgba(255, 255, 255, .07); color: var(--fg-3); transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { background: rgba(255, 255, 255, .9); color: #0b0b12; }
.danger { color: #ff8a8a; font-size: 13.5px; padding: 6px 0; }
.danger:hover { text-decoration: underline; }

/* Popover (genväg, väder) */
.pop {
  position: fixed; z-index: 40; width: 280px; padding: 16px; border-radius: 20px;
  display: flex; flex-direction: column; gap: 10px;
  animation: panelIn .35s var(--spring);
}
.pop label { font-size: 12px; color: var(--fg-3); margin-bottom: -4px; }
.pop .field { width: 100%; }
.pop .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.pop .btn { height: 36px; padding: 0 14px; font-size: 13px; }
.pop .err { font-size: 12.5px; color: #ff9a9a; min-height: 1em; }

/* ——— Kommandopalett ——— */
.palette {
  margin: 16vh auto auto; width: min(600px, calc(100vw - 32px)); border-radius: 22px; overflow: hidden;
  background: rgba(16, 16, 24, .9); border: 1px solid var(--line);
  backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8);
}
.palette input { width: 100%; padding: 20px 22px; font-size: 18px; border-bottom: 1px solid var(--line); }
.palette input::placeholder { color: var(--fg-3); }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.cmd { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 14.5px; color: var(--fg-2); cursor: pointer; }
.cmd svg { width: 18px; height: 18px; color: var(--fg-3); flex: none; }
.cmd kbd { margin-left: auto; }
.cmd[aria-selected="true"] { background: rgba(255, 255, 255, .09); color: var(--fg); }
.cmd[aria-selected="true"] svg { color: var(--fg); }

/* ——— Onboarding ——— */
.onboarding {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  overflow-y: auto;
}
.onboarding[hidden] { display: none; }
.ob-step { width: min(880px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; animation: obIn .9s var(--ease); }
.ob-step.leaving { animation: obOut .45s var(--ease) forwards; }
@keyframes obIn { from { opacity: 0; transform: translateY(16px); filter: blur(10px); } }
@keyframes obOut { to { opacity: 0; transform: translateY(-12px); filter: blur(8px); } }
.ob-hello { font-family: var(--serif); font-style: italic; font-size: clamp(64px, 10vw, 140px); line-height: .9; }
.ob-q { font-size: clamp(22px, 2.6vw, 32px); font-weight: 300; letter-spacing: -.02em; margin: 18px 0 28px; }
.ob-step input { width: min(440px, 80vw); font-size: 34px; font-weight: 300; text-align: center; padding-bottom: 10px; border-bottom: 1.5px solid rgba(255, 255, 255, .4); }
.ob-step input:focus { border-color: #fff; }
.ob-hint { margin-top: 16px; font-size: 13px; color: var(--fg-3); }
.ob-step .charities { width: 100%; margin: 6px 0 28px; text-align: left; }
.ob-title { font-family: var(--serif); font-style: italic; font-size: clamp(36px, 5vw, 64px); line-height: 1; margin: 0 0 10px; }
.ob-sub { color: var(--fg-2); font-size: 16px; margin: 0 0 28px; max-width: 52ch; line-height: 1.5; }
.ob-step .btn { height: 50px; padding: 0 28px; font-size: 15px; }

/* ——— Zen ——— */
.zen .top, .zen .bottom, .zen .greeting, .zen .focus, .zen .sponsor, .zen .todo-panel, .zen .veil { opacity: 0 !important; pointer-events: none !important; transition: opacity .8s var(--ease); }
.zen .clock { transform: scale(1.12); }
.clock { transition: transform 1s var(--ease), opacity .9s var(--ease), filter .9s var(--ease); }
.zen-hint { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 12.5px; color: var(--fg-3); opacity: 0; transition: opacity .6s .8s; z-index: 5; pointer-events: none; }
.zen .zen-hint { opacity: 1; }

/* ——— Små skärmar ——— */
@media (max-width: 1000px) {
  .quote, .sponsor { display: none; }
  .bottom { grid-template-columns: 1fr auto; }
  .impact { justify-self: start; }
  .charities { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .top { grid-template-columns: auto 1fr auto; }
  .dock, .weather .meta { display: none; }
  .search { width: 100%; }
  .search:focus-within { width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .big-ring { display: none; }
  .how { grid-template-columns: 1fr; }
  .invite { flex-direction: column; align-items: flex-start; }
  .impact-text span { display: none; }
  .todo-btn [data-i18n] { display: none; }
  .todo-btn .todo-ic { display: block; }
  .todo-btn { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Onboardingens utgångsläge: mest chill, båda eller mest jobb */
.ob-profs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(760px, 100%); }
.ob-prof { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 20px 20px; border-radius: 22px; text-align: left; background: var(--glass); border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .35s var(--spring); }
.ob-prof:hover { background: var(--glass-hover); border-color: var(--line-strong); transform: translateY(-3px); }
.ob-prof:active { transform: scale(.97); }
.ob-prof b { font-size: 18px; font-weight: 600; margin-top: 8px; }
.ob-prof span:not(.ob-prof-ic) { font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.ob-prof-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.ob-prof-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .ob-profs { grid-template-columns: 1fr; } }

/* Sponsorn: hela rutan är en länk, med bild eller sponsorns färg */
.sponsor-link { display: block; color: inherit; text-decoration: none; }
.sponsor-link[href]:hover .sponsor-body strong { text-decoration: underline; }
.sponsor-media.has-img { background: #000; }
.sponsor-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sponsor-media.has-img small { z-index: 1; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: var(--fg-2); }
.sponsor-media[style*="--sp"] { background: radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--sp) 80%, transparent), transparent 65%), color-mix(in srgb, var(--sp) 35%, #0b0b12); }

/* ——— Bakgrunder: eget foto och väljaren ——— */
.bg-photo {
  position: fixed; inset: -2%; pointer-events: none; opacity: 0;
  background: center / cover no-repeat; transition: opacity 1s var(--ease);
}
.bg-photo.on { opacity: 1; }
/* Långsam inzoomning, som ett andetag. Stängs av med "Rörlig himmel" och av systemets minskade rörelse. */
.bg-photo.on { animation: bgDrift 90s ease-in-out infinite alternate; }
.bg-photo.on.still { animation: none; }
@media (prefers-reduced-motion: reduce) { .bg-photo.on { animation: none; } }
@keyframes bgDrift { from { transform: scale(1); } to { transform: scale(1.06); } }
/* Fotot får en mörkare kant och botten, så att klockan och texten alltid går att läsa. */
.has-photo .veil {
  background:
    radial-gradient(70% 55% at 50% 45%, rgba(0, 0, 0, .28), transparent 75%),
    linear-gradient(to top, rgba(0, 0, 0, .55), transparent 40%),
    linear-gradient(to bottom, rgba(0, 0, 0, .35), transparent 22%);
}

.bg-scopes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: -6px 0 12px; scrollbar-width: none; }
.bg-scopes button { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; color: var(--fg-2); background: rgba(255, 255, 255, .06); transition: background .2s, color .2s; }
.bg-scopes button:hover { background: rgba(255, 255, 255, .1); }
.bg-scopes button[aria-selected="true"] { background: #fff; color: #0b0b12; }
.bg-scopes .ws-ic { width: 20px; height: 20px; border-radius: 6px; font-size: 10.5px; display: grid; place-items: center; background: var(--c); color: #0b0b12; font-weight: 700; }
.bg-hint { margin: 0 0 14px; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.bg-follow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border-radius: 14px; font-size: 14px; color: var(--fg-2); background: rgba(255, 255, 255, .05); border: 1px solid transparent; text-align: left; }
.bg-follow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; }
.bg-follow[aria-pressed="true"] { border-color: var(--line-strong); color: var(--fg); }
.bg-follow[aria-pressed="true"] svg { opacity: 1; }
.bg-sec { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3); }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.bg-tile { position: relative; padding: 6px; border-radius: 16px; border: 1px solid transparent; text-align: left; transition: border-color .2s, background .2s; }
.bg-tile:hover { background: rgba(255, 255, 255, .05); }
.bg-tile[aria-pressed="true"] { border-color: #fff; background: rgba(255, 255, 255, .07); }
.bg-tile i { display: block; height: 62px; border-radius: 11px; background-size: cover; background-position: center; }
.bg-tile > span { display: block; margin-top: 6px; padding-left: 2px; font-size: 12.5px; color: var(--fg-2); }
.bg-tile.photo { padding: 6px; }
.bg-tile .bg-pick { display: block; width: 100%; padding: 0; }
.bg-tile .bg-pick i { height: 82px; }
.bg-del { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; opacity: 0; transition: opacity .2s; }
.bg-del svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.bg-tile:hover .bg-del, .bg-del:focus-visible { opacity: 1; }
/* Krysset syns alltid lite, så att det går att hitta (och på pekskärmar, där hover inte finns). */
.bg-del { opacity: .75; }
.bg-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.bg-current span::first-letter { text-transform: uppercase; }
.bg-add { cursor: pointer; }
.bg-add i { height: 82px; display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: rgba(255, 255, 255, .03); }
.bg-add i svg { width: 22px; height: 22px; fill: none; stroke: var(--fg-2); stroke-width: 1.8; stroke-linecap: round; }
.bg-fine { margin: 10px 0 0; font-size: 12.5px; color: var(--fg-3); }
.bg-team { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); }
.bg-team b { display: block; font-size: 14px; font-weight: 500; }
.bg-team small { font-size: 12.5px; color: var(--fg-3); }
.bg-team-btns { display: flex; gap: 6px; }

/* Ge direkt till organisationen */
.give { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.give-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.give-text b { font-size: 15px; font-weight: 500; }
.give-text span { font-size: 13px; color: var(--fg-2); }
.give-badge { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 4px; padding: 3px 9px; border-radius: 8px; font-size: 12px !important; color: #8ff0bd !important; background: rgba(94, 230, 160, .12); }
.give-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.give-badge.muted { color: var(--fg-3) !important; background: rgba(255, 255, 255, .06); }
.give-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Enfärgad bakgrund: ingen slöja behövs när inget rör sig bakom texten. */
.has-plain .veil { display: none; }
/* Enfärgade rutor får en tunn kant, annars försvinner Svart mot ett svart ark. */
.bg-tile.plain i { box-shadow: inset 0 0 0 1px var(--line-strong); }
