/* Daily Thread web app: the app's calm, clean look, laid out for a desktop screen. */
/* tokens of the app (Theme.kt, skill journal-designstil, 2026-11-18): hairlines instead of shadows, real black */
:root, :root[data-theme="light"] {
  --paper: #FAF8F9; --card: #FFFFFF; --ink: #0A0A0A; --muted: #5F5965; --line: #D6D2D9; --line-2: #D6D2D9;
  --label: #D9437F; --label-2: #E2598F; --fill: rgba(10, 10, 10, .055); --fill-2: rgba(10, 10, 10, .09);
  --label-soft: rgba(217, 67, 127, .12); --shadow: none;
  --gold-bg: rgba(255, 176, 102, .28); --gold-fg: #99693D;
}
:root[data-theme="dark"] {
  --paper: #000000; --card: #111113; --ink: #F5F5F5; --muted: #B8B1BF; --line: #2A2A2E; --line-2: #2E2E33;
  --label: #FF85BA; --label-2: #FF9CC6; --fill: rgba(245, 245, 245, .07); --fill-2: rgba(245, 245, 245, .12);
  --label-soft: rgba(255, 133, 186, .14); --shadow: none;
  --gold-bg: rgba(255, 176, 102, .30); --gold-fg: #FFC894;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; transition: background .3s; }
body.writing { overflow: hidden; }
h1 { font-size: 32px; line-height: 1.12; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 17px; margin: 0; font-weight: 650; }
a { color: var(--label); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--label); outline-offset: 2px; border-radius: 10px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pink { color: var(--label); }
.grow { flex: 1; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.eyebrow.pink { color: var(--label); }
.eyebrow.month { margin: 26px 8px 6px; }
.note { background: var(--label-soft); color: var(--label); padding: 11px 15px; border-radius: 14px; margin: 0; animation: rise .4s ease both; }

/* ---------- three columns: navigation, content, a quiet rail ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr) 320px; min-height: 100vh; }
.shell.no-rail { grid-template-columns: 232px minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 26px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; padding: 4px 10px; }
.brand img { width: 30px; height: 30px; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.brand:hover img { transform: rotate(60deg); }
.side nav, .side-foot { display: flex; flex-direction: column; gap: 4px; }
.side-foot { margin-top: auto; }
.nav-btn { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 15.5px; text-align: left; transition: background .2s, color .2s, transform .15s; }
.nav-btn .ic { width: 22px; height: 22px; }
.nav-btn:hover { background: var(--fill); color: var(--ink); }
.nav-btn:active { transform: scale(.97); }
.nav-btn.on { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }
.main { width: 100%; max-width: 760px; margin: 0 auto; padding: 44px 36px 90px; display: flex; flex-direction: column; gap: 30px; }
.main.enter > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.main.enter > *:nth-child(2) { animation-delay: .05s; } .main.enter > *:nth-child(3) { animation-delay: .1s; } .main.enter > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 44px 24px 40px 4px; display: flex; flex-direction: column; gap: 16px; }
.rail-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.main.enter ~ .rail .rail-card { animation: rise .5s .1s both; }   /* only when the page changes, not on every update */
.rail-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px 26px; box-shadow: var(--shadow); }
.link { border: 0; background: none; color: var(--label); padding: 4px 0; font-size: 15px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--fill); color: var(--ink); font-weight: 600; transition: background .2s, transform .15s, filter .2s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--label); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.quiet { background: transparent; }
.btn.quiet:hover { background: var(--fill); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: inline-grid; place-items: center; transition: background .2s, color .2s; }
.icon-btn:hover:not(:disabled) { background: var(--fill); color: var(--ink); }
.icon-btn:disabled { opacity: .3; }
.icon-btn.fav { color: var(--label); }
.icon-btn.fav .ic { fill: var(--label); }
.arrows { display: inline-flex; gap: 2px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Heute ---------- */
.hero { position: relative; display: flex; flex-direction: column; gap: 6px; }
.hero-text { position: relative; z-index: 1; }
.weave-slot { height: 210px; margin: 10px -36px -10px; position: relative; transition: filter .6s; }
.weave-slot.glow-up { filter: brightness(1.3) saturate(1.3) drop-shadow(0 0 12px rgba(255, 176, 102, .6)); }
.weave { width: 100%; height: 100%; display: block; }
.today { display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.today-top { display: flex; justify-content: space-between; gap: 20px; }
.today h2 { font-size: 24px; }
.today p.muted { margin: 2px 0 0; }
.ring { position: relative; flex: none; width: 60px; height: 60px; display: grid; place-items: center; color: var(--label); }
.ring .ring-svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-2); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--label); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.streak-tile { flex: none; position: relative; width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 23px; background: var(--gold-bg); color: var(--gold-fg); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.streak-tile .ic { position: absolute; top: 5px; right: 5px; width: 13px; height: 13px; stroke-width: 2; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.cta { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 7px 7px 24px; border: 0; border-radius: 999px; background: var(--label); color: #fff; font-weight: 650; font-size: 17px; transition: transform .15s, filter .2s; }
.cta i { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; transition: transform .25s; }
.cta:hover { filter: brightness(1.05); }
.cta:hover i { transform: translateX(3px); }
.cta:active { transform: scale(.98); }
.cta.quiet { background: var(--fill); color: var(--ink); }
.cta.quiet i { background: var(--card); }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: flex; gap: 15px; align-items: center; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 18px; text-align: left; transition: background .2s, transform .15s; }
.row:hover { background: var(--card); box-shadow: var(--shadow); }
.row:active { transform: scale(.99); }
.row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.row-text strong { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.row-tags span { font-size: 12.5px; color: var(--muted); background: var(--fill); padding: 1px 9px; border-radius: 999px; }
.row-chev { color: var(--muted); opacity: 0; transition: opacity .2s, transform .2s; }
.row:hover .row-chev { opacity: .7; transform: translateX(2px); }
.ic.heart { width: 14px; height: 14px; color: var(--label); fill: var(--label); }
.tile { position: relative; flex: none; display: grid; place-items: center; border-radius: 13px; font-weight: 700; }
.tile .tick { position: absolute; top: 6px; right: 7px; width: 7px; height: 4px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); }

/* rail: the streak like the app's streak widget (widget_streak.xml): small STREAK label with the sun
   (pink once today is written), big number, "Tage in Folge", then today's state and the restores */
.streak-w { display: flex; flex-direction: column; padding: 16px 20px 18px; }
.sw-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.sw-sun { width: 22px; height: 22px; color: var(--muted); stroke-width: 1.8; transition: color .5s; }
.streak-w.done .sw-sun { color: var(--label); }
.sw-num { font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.sw-label { font-size: 15px; font-weight: 500; margin: 2px 0 8px; }
.streak-w .small { font-size: 13px; line-height: 1.45; }
/* the Heute card comes from the kit (same as the website and the app) */
.today-card { cursor: pointer; text-align: left; transition: transform .15s; }
.today-card:active { transform: scale(.99); }
.today-card .dt-title { font-size: 19px; line-height: 25px; }
.today-card .ring { width: 52px; height: 52px; }
.dt-streak.fading { background: rgba(var(--gold), calc(var(--dt-gold-a) * var(--glow, 1)));
  box-shadow: inset 0 0 0 2px rgba(var(--gold), calc(var(--dt-gold-a) * (1 - var(--glow, 1)))); }
@keyframes spin { to { transform: rotate(360deg); } }
.week { display: flex; justify-content: space-between; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 2px; border-radius: 12px; }
.day .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; transition: transform .2s; }
.day:hover .dot { transform: scale(1.1); }
.day.now { color: var(--label); font-weight: 700; }
.day.now .dot { box-shadow: inset 0 0 0 1.5px var(--label); }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini-grid .wd { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 2px; }
.mini { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font-size: 12px; color: var(--muted); transition: transform .15s; }
.mini:hover:not(:disabled) { transform: scale(1.12); }
.mini.now { box-shadow: inset 0 0 0 1.4px var(--label); color: var(--label); font-weight: 700; }
.mini:disabled { opacity: .35; }

/* ---------- Tagebuch ---------- */
.seg { display: flex; background: var(--fill); border-radius: 999px; padding: 4px; position: relative; }
.seg button { border: 0; background: none; padding: 8px 20px; border-radius: 999px; color: var(--muted); font-size: 15px; transition: background .25s, color .25s, box-shadow .25s; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg.small button { padding: 6px 13px; font-size: 13.5px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--label); box-shadow: 0 0 0 4px var(--label-soft); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 36px; border-radius: 999px; border: 0; background: var(--fill); color: var(--muted); padding: 0 14px; font-size: 14.5px; transition: background .2s, color .2s; }
.chip:hover:not(:disabled) { background: var(--fill-2); color: var(--ink); }
.chip.on { background: var(--label-soft); color: var(--label); font-weight: 600; }
.chip:disabled { opacity: .4; }
.chip em { font-style: normal; font-size: 12.5px; opacity: .7; }
.chev { width: 14px; height: 14px; transition: transform .3s; }
.chev.up { transform: rotate(180deg); }
.view-toggle { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--label-soft); color: var(--label); display: grid; place-items: center; transition: transform .2s; }
.view-toggle:hover { transform: scale(1.07); }
.flyout { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -14px; }
.flyout > * { animation: fly .4s calc(var(--i) * 25ms) cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes fly { from { opacity: 0; transform: translateY(-10px) scale(.7); } to { opacity: 1; transform: none; } }
.moodpick { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; font-weight: 800; font-size: 15px; transition: transform .15s; }
.moodpick:hover:not(:disabled) { transform: scale(1.1); }
.moodpick:disabled { opacity: .35; }
.moodpick.on { box-shadow: 0 0 0 2px var(--label); }
.moodpick sup { position: absolute; top: -3px; right: -9px; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.journal-body { display: flex; flex-direction: column; }
.empty { padding: 40px 0; }
.wd-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; font-size: 13px; color: var(--muted); position: sticky; top: 0; background: var(--paper); padding: 10px 0 6px; z-index: 2; }
.cal-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 4px 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 14px; transition: transform .15s, box-shadow .2s; max-height: 64px; justify-self: center; width: 100%; max-width: 64px; }
.cal-day b { font-size: 17px; }
.cal-day:hover:not(:disabled) { transform: scale(1.08); box-shadow: var(--shadow); }
.cal-day.now { box-shadow: inset 0 0 0 1.6px var(--label); color: var(--label); }
.cal-day:disabled { opacity: .35; }
.year .cal-title { padding-top: 0; }
.year .cal-title .arrows { margin-left: auto; }
.year-grid { display: grid; grid-template-columns: 26px repeat(12, 1fr); gap: 3px 0; align-items: center; justify-items: center; }
.ym, .yd { font-size: 11.5px; color: var(--muted); }
.px { width: 100%; height: 14px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.px i { border-radius: 50%; display: block; transition: transform .2s; }
.px:hover i { transform: scale(1.5); }
.px.now i { outline: 1.5px solid var(--label); outline-offset: 2px; }
/* the globe floats on the page itself: same colour as the paper, no box or edge around it (wish of the user, 2026-11-18) */
.globe-slot { height: calc(100vh - 230px); min-height: 460px; overflow: hidden; position: relative; background: var(--paper); margin: 0 -36px; }
.globe { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 0; background: transparent !important; }   /* MapLibre's own CSS would make it relative (height 0) */
.globe .space { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.globe .space.back { z-index: -1; }
.globe .space.front { z-index: 3; }
.globe-note { padding-top: 40%; }
.pin { min-width: 34px; height: 34px; padding: 0 9px; border-radius: 11px; border: 2px solid var(--card); background: var(--pin-bg); color: var(--pin-fg); font-weight: 800; font-size: 15px; box-shadow: 0 6px 14px rgba(0, 0, 0, .18); position: relative; transition: transform .15s; }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: var(--pin-bg); border-right: 2px solid var(--card); border-bottom: 2px solid var(--card); transform: translateX(-50%) rotate(45deg); }
.pin.stack { box-shadow: 4px -4px 0 -2px var(--card), 4px -4px 0 0 var(--pin-bg), 0 6px 14px rgba(0, 0, 0, .18); }
.pin:hover { transform: translateY(-2px) scale(1.06); }
:root[data-theme="dark"] .pin { box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .pin.stack { box-shadow: 4px -4px 0 -2px var(--card), 4px -4px 0 0 var(--pin-bg), 0 6px 16px rgba(0, 0, 0, .5); }

/* ---------- Einblicke ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat b { font-size: 30px; letter-spacing: -.02em; }
.chart-card { padding: 22px 22px 16px; }
.chart-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-head h3 { margin-right: auto; }
.chart { width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-dasharray: 3 6; }
.chart .avg { stroke: var(--label); stroke-opacity: .45; stroke-dasharray: 6 6; }
.chart .axis { fill: var(--muted); font-size: 12px; }
.chart .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .1s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .pt { stroke: var(--card); stroke-width: 2.5; cursor: pointer; transform-box: fill-box; transform-origin: center; animation: pop .4s calc(.3s + var(--k) * 25ms) cubic-bezier(.3, 1.6, .5, 1) both; transition: r .15s; }
.chart .pt:hover { r: 8; }
/* week and month review cards, as ReviewCard in the app: same height side by side, the colour wheel as symbol */
.sec-head .small { margin: 2px 0 0; }
.reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.review-tile { height: 136px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.rt-top { display: flex; gap: 12px; align-items: center; }
.rt-top div { display: flex; flex-direction: column; min-width: 0; }
.rt-top strong { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.rt-top .muted { font-size: 14px; line-height: 1.35; }
.rv-dot { flex: none; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(#7B52E0, #E04FD8, #FF5E9C, #FFB066, #7B52E0); opacity: .85; }
@media (max-width: 560px) { .reviews { grid-template-columns: 1fr; } }
.saved-link { display: inline-flex; align-items: center; gap: 8px; margin: 14px 4px 0; }
.saved-link .ic { width: 16px; height: 16px; }
.ic.filled { fill: currentColor; }
/* saved analyses in the journal list (SavedInsightRow): tinted square in the topic's colour */
.ins-row { --a: #F0629F; align-items: flex-start; }
.ins-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--a) 16%, transparent); color: color-mix(in srgb, var(--a) 75%, #000); }
[data-theme="dark"] .ins-ic { background: color-mix(in srgb, var(--a) 20%, transparent); color: var(--a); }
.ins-ic .ic { width: 20px; height: 20px; }
.ins-ic.big { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 16px; }
.ins-ic.big .ic { width: 24px; height: 24px; }
.ins-text { margin-top: 28px; }
.ins-text .eyebrow { margin: 0 0 8px; }
.ins-text .eyebrow ~ .eyebrow { margin-top: 28px; }
.sheet .ins-text .text { margin: 0; }
.sheet .ins-text .text.plain + .text.plain { margin-top: 14px; }
.sheet .ins-text .text + .text.plain, .sheet .ins-text .text + .eyebrow { margin-top: 28px; }
.sheet.stay, .sheet-back.stay { animation: none; }

/* ---------- Einstellungen ---------- */
.group { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.group-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 14px -18px; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; border: 0; background: none; text-align: left; transition: background .15s; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row:hover { background: var(--fill); }
.set-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--label-soft); color: var(--label); flex: none; }
.set-ic .ic { width: 18px; height: 18px; }
.set-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-text strong { font-weight: 550; }
.set-text .muted { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.chev-r { color: var(--muted); width: 16px; height: 16px; }
.profile { padding: 18px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--label); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none; }
.online { width: 7px; height: 7px; border-radius: 50%; background: #4CC38A; display: inline-block; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--fill-2); position: relative; flex: none; transition: background .25s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch.on { background: var(--label); }
.switch.on i { transform: translateX(18px); }
.foot { max-width: 480px; margin: 0 auto; }

/* ---------- reader sheet ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(10, 5, 15, .28); z-index: 20; animation: fade .25s both; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--card); z-index: 21; padding: 18px 34px 40px; overflow-y: auto; box-shadow: -20px 0 60px rgba(0, 0, 0, .15); animation: slidein .4s cubic-bezier(.2, .8, .2, 1) both; display: flex; flex-direction: column; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.sheet-top { display: flex; align-items: center; gap: 4px; margin: 0 -10px 18px; }
.sheet-title { font-size: 28px; margin-bottom: 18px; }
.sheet-mood { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.sheet .text { font-size: 17.5px; line-height: 1.7; margin: 0 0 26px; white-space: normal; }
.sheet .cta { margin-top: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 0; border-radius: 999px; padding: 6px 14px; background: var(--fill); color: var(--muted); font-size: 14.5px; transition: background .2s, color .2s, transform .15s; }
.tags.pick .tag:hover { background: var(--fill-2); color: var(--ink); }
.tags.pick .tag:active { transform: scale(.95); }
.tag.on { background: var(--label-soft); color: var(--label); font-weight: 600; }

/* ---------- writing: full screen, one page per step ---------- */
.writer { position: fixed; inset: 0; z-index: 30; background: var(--paper); display: flex; flex-direction: column; opacity: 0; transform: translateY(24px); transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1); }
.writer.open { opacity: 1; transform: none; }
.w-wash { position: absolute; inset: 0 0 auto; height: 60vh; pointer-events: none; transition: background .6s; }
.w-top { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 24px 8px; }
.w-title { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.w-saved { min-width: 110px; text-align: right; }
.w-progress { position: relative; display: flex; gap: 6px; width: min(720px, calc(100% - 48px)); margin: 6px auto 0; }
.w-progress span { flex: 1; height: 3px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.w-progress span i { display: block; height: 100%; width: 0; background: var(--label); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.w-progress span.on i { width: 100%; }
.w-viewport { position: relative; flex: 1; overflow: hidden; }
.w-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.65, 0, .25, 1); }
.w-page { flex: 0 0 100%; height: 100%; overflow-y: auto; overflow-x: hidden; padding: 46px max(24px, calc(50% - 360px)) 30px; display: flex; flex-direction: column; opacity: .25; transition: opacity .45s; }
.w-page.cur { opacity: 1; }
.q { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; margin-bottom: 14px; }
.glow-wrap { display: grid; place-items: center; padding: 26px 0 22px; }
.glow { width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) calc(var(--s) * 34%), transparent); box-shadow: 0 0 calc(var(--s) * 90px) color-mix(in srgb, var(--c) calc(var(--s) * 45%), transparent); transition: background .5s, box-shadow .5s; animation: breathe-glow 6s ease-in-out infinite; }
.glow span { font-size: 84px; font-weight: 300; letter-spacing: -.04em; }
.glow span.pop { animation: numpop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes numpop { from { transform: scale(.8); } }
@keyframes breathe-glow { 50% { transform: scale(1.035); } }
.mood-range { width: 100%; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; }
.mood-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--fill-2); }
.mood-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill-2); }
.mood-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); margin-top: -10px; transition: transform .15s; }
.mood-range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--ink); }
.mood-range:active::-webkit-slider-thumb { transform: scale(1.2); }
.ends { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 22px; }
.breathe { position: relative; flex: 1; min-height: 340px; display: grid; place-items: center; }
.b-ring, .b-core { position: absolute; border-radius: 50%; }
.b-core { width: 170px; height: 170px; background: radial-gradient(circle, var(--label-soft), transparent 70%); animation: breath 8s ease-in-out infinite; }
.b-ring { width: 170px; height: 170px; border: 1.5px solid var(--label); opacity: .4; animation: breath 8s ease-in-out infinite; }
.b-ring.two { animation-delay: -.4s; opacity: .18; }
@keyframes breath { 0%, 100% { transform: scale(.72); } 50% { transform: scale(1.35); } }
.b-text { position: relative; font-size: 19px; color: var(--muted); height: 28px; }
.b-text span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; animation: inout 8s ease-in-out infinite; }
.b-text .out { animation-delay: -4s; }
@keyframes inout { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }
.w-page textarea { flex: 1; width: 100%; min-height: 240px; resize: none; border: 0; outline: 0; background: transparent; font-size: 21px; line-height: 1.65; padding: 8px 0; }
.w-page textarea::placeholder { color: var(--muted); opacity: .75; }
.w-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 14px 0 24px; }
.w-bottom .hint { text-align: center; flex: 1; }
.w-bottom .btn[hidden] { visibility: hidden; display: inline-flex; }

/* ---------- dialogs ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 5, 15, .35); display: grid; place-items: center; padding: 24px; z-index: 40; animation: fade .2s both; }
.modal { background: var(--card); border-radius: 26px; padding: 28px 30px; width: min(520px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; display: flex; flex-direction: column; gap: 10px; }
.modal input:not([type=checkbox]) { height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--paper); padding: 0 16px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.modal input:focus { border-color: var(--label); box-shadow: 0 0 0 4px var(--label-soft); }
/* contact form (Fehler melden): kind chips, message, optional reply address, device details */
.modal .chips .chip { cursor: pointer; }
.modal .chips .chip:has(input:focus-visible) { outline: 2px solid var(--label); outline-offset: 2px; }
.contact-text { min-height: 140px; resize: vertical; border-radius: 14px; border: 1px solid var(--line-2); background: var(--paper); padding: 14px 16px; outline: 0; line-height: 1.5; transition: border-color .2s, box-shadow .2s; }
.contact-text:focus { border-color: var(--label); box-shadow: 0 0 0 4px var(--label-soft); }
.contact-info { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.contact-info[hidden] { display: none; }
.contact-info input { margin-top: 3px; accent-color: var(--label); width: 18px; height: 18px; flex: none; }
.contact-info > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--label); width: 18px; height: 18px; flex: none; }

/* ---------- start, login ---------- */
.intro { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; place-items: center; transition: opacity .4s; }
.intro canvas { width: 180px; height: 180px; }
.intro.out { opacity: 0; }
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(217, 67, 127, .10), transparent 70%), var(--paper); }
.gate-card { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: 34px 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.gate-card h1 { font-size: 28px; }
.gate-card p { margin: 0; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.gate-brand img { width: 36px; height: 36px; }
.gate-card form { display: flex; flex-direction: column; gap: 10px; }
.gate-card input[type=email], .gate-card input[type=password] { height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--paper); padding: 0 16px; outline: 0; transition: border-color .2s, box-shadow .2s; }
.gate-card input:focus { border-color: var(--label); box-shadow: 0 0 0 4px var(--label-soft); }
.google { background: var(--card); border: 1px solid var(--line-2); }
.gate-links { display: flex; justify-content: space-between; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.loader { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--fill-2); border-top-color: var(--label); animation: spin .9s linear infinite; }

/* fewer animations (setting) and the system's reduced motion */
:root[data-lite="1"] *, :root[data-lite="1"] *::before, :root[data-lite="1"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .shell, .shell.no-rail { grid-template-columns: 220px minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 760px) {
  .shell, .shell.no-rail { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 15; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); gap: 0; }
  .side .brand { display: none; }
  .side nav { flex-direction: row; gap: 0; flex: 3; justify-content: space-around; }
  .side-foot { margin: 0; flex: 1; align-items: center; }
  .nav-btn { flex-direction: column; gap: 3px; font-size: 11.5px; padding: 6px 10px; }
  .nav-btn.on { box-shadow: none; background: transparent; color: var(--label); }
  .main { padding: 26px 16px 110px; gap: 24px; }
  h1 { font-size: 27px; }
  .weave-slot { margin: 6px -16px -6px; height: 140px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 11px 12px; font-size: 12px; line-height: 1.3; border-radius: 16px; } .stat b { font-size: 22px; margin: 2px 0; }
  .stat > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chart-card { padding: 18px 14px 12px; }
  .chart .axis, .chart text { font-size: 22px; }
  .card { padding: 20px; }
  .w-page { padding: 26px 18px 20px; }
  .glow { width: 170px; height: 170px; } .glow span { font-size: 66px; }
  .w-bottom .hint { display: none; }
  .globe-slot { height: calc(100vh - 290px); margin: 0 -16px; }
}
