/* K&K OS. Farben, Schrift und Effekte wie kk-solutions.ch (kk-website/src/app/globals.css). */

@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-ext.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --base: #0A0A0C;
  --surface: #131316;
  --card: #1F1F23;
  --line: #2C2C31;
  --muted-strong: #5C5C63;
  --muted-text: #80808A;
  --muted: #999AA2;
  --text: #F3F3F5;
  --mint: #46D69F;
  --rot: #F07A7A;
  --ease-card: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --leiste: 64px;
  color-scheme: dark;
}

@property --kk-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--base); }
html, body { margin: 0; height: 100%; }
body {
  background: var(--base); color: var(--text); font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none; overflow: hidden; letter-spacing: -0.005em;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
input, textarea, button { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.versteckt { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.erlaubt-markieren, .text-waehlbar { -webkit-user-select: text; user-select: text; }

/* Lichteinfall wie auf der Website */
.licht { position: fixed; inset: 0 0 auto 0; height: 70vh; pointer-events: none; z-index: 0;
  background: linear-gradient(212deg, rgba(255,255,255,0.11) 0%, rgba(255,255,255,0.03) 32%, transparent 60%); }

.grad { background: linear-gradient(180deg, #FFFFFF 18%, #85868E 105%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; }
.label { font: 500 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-text); margin: 0; }

.wortmarke { display: flex; align-items: baseline; gap: 6px; font-size: 19px; letter-spacing: -0.045em; }
.wortmarke b { font-weight: 700; }
.wortmarke span { color: var(--muted); font-weight: 500; }
.wortmarke.gross { font-size: 44px; gap: 10px; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 500; letter-spacing: -0.01em; transition: background 200ms ease, border-color 200ms ease, transform 120ms ease; }
.knopf:active { transform: scale(0.98); }
.knopf.primaer { border: 1px solid rgba(70,214,159,0.55); color: var(--mint); }
.knopf.primaer:active { background: rgba(70,214,159,0.08); border-color: var(--mint); }
.knopf.zweit { border: 1px solid var(--line); background: var(--surface); }
.knopf.zweit:active { background: var(--card); border-color: var(--muted-strong); }
.knopf.leise { color: var(--muted); padding: 0 12px; }
.knopf.gefahr { border: 1px solid rgba(240,122,122,0.45); color: var(--rot); }
.knopf.breit { width: 100%; }
.knopf[disabled] { opacity: 0.4; pointer-events: none; }
.rund { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rund.klein { width: 38px; height: 38px; }
.rund svg { width: 19px; height: 19px; }
.rund span { font-weight: 600; font-size: 14px; }

/* Haltedruck für Schwerwiegendes: 1 Sekunde halten füllt die Linie */
.halten { position: relative; overflow: hidden; }
.halten::before { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--mint); transform: scaleX(0); transform-origin: left; }
.halten.drueckt::before { transform: scaleX(1); transition: transform 1000ms linear; }

/* Anmeldung */
.anmeldung { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--oben)) 24px calc(24px + var(--unten)); z-index: 2; }
.anmeldung-innen { width: 100%; max-width: 360px; animation: kk-rise 600ms var(--ease-card) both; }
.anmeldung-satz { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--muted); margin: 18px 0 48px; letter-spacing: -0.02em; }
.login { display: grid; gap: 12px; }
.login input { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px; font-size: 17px; -webkit-user-select: text; user-select: text; }
.login input:focus { border-color: var(--muted-strong); outline: none; }
.fehler { color: var(--rot); min-height: 1.4em; margin: 0; font-size: 14px; }

/* Gerüst */
#app { position: fixed; inset: 0; z-index: 1; }
.kopf { position: absolute; inset: 0 0 auto 0; z-index: 3; height: calc(60px + var(--oben)); padding: var(--oben) 20px 0; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(10,10,12,0.92) 55%, rgba(10,10,12,0)); }
.ort { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(76px + var(--oben)) 20px calc(var(--leiste) + var(--unten) + 40px); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 240ms ease, transform 320ms var(--ease-card), visibility 0s 240ms; }
.ort.an { opacity: 1; visibility: visible; transform: none; transition: opacity 240ms ease, transform 320ms var(--ease-card); }
.ort-titel { font: 600 30px/1.1 var(--sans); letter-spacing: -0.035em; margin: 6px 0 20px; }

/* Leiste unten */
.leiste { position: absolute; inset: auto 0 0 0; z-index: 4; height: calc(var(--leiste) + var(--unten)); padding: 0 8px var(--unten);
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center;
  background: rgba(10,10,12,0.86); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%); border-top: 1px solid rgba(44,44,49,0.7); }
.ziel { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted-strong); transition: color 200ms ease; }
.ziel svg { width: 23px; height: 23px; }
.ziel span { font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; }
.ziel.an { color: var(--text); }
.ziel .punkt { position: absolute; top: 12px; left: calc(50% + 9px); }
.punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--base); border: 1.5px solid var(--mint); display: inline-block; }
.punkt.pocht { animation: kk-pulse 1.6s ease-in-out infinite; }
.sprechen { justify-self: center; width: 62px; height: 62px; margin-top: -26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text);
  background: radial-gradient(120% 120% at 30% 20%, #2A2A30 0%, #141417 70%); border: 1px solid rgba(70,214,159,0.55);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.9), 0 0 0 6px var(--base); transition: transform 160ms var(--ease-card), border-color 200ms ease; touch-action: none; }
.sprechen svg { width: 26px; height: 26px; }
.sprechen.nimmt { transform: scale(1.12); border-color: var(--mint); color: var(--mint); }
.sprechen.wandelt svg { animation: kk-pulse 1s ease-in-out infinite; }

/* Start */
.zahl-kopf { margin: 14px 0 26px; font-weight: 600; }
.zahl { display: block; font-size: 112px; line-height: 0.92; letter-spacing: -0.06em; font-weight: 600; animation: kk-count 500ms var(--ease-card) both; }
.satz { display: block; font: 500 30px/1.15 var(--serif); letter-spacing: -0.025em; color: var(--text); margin-top: 6px; }
.zahl-kopf.ruhig .zahl { display: none; }

.stapel { position: relative; height: 312px; margin: 0 0 8px; }
.karte { position: absolute; inset: 0 0 auto 0; height: 292px; padding: 20px 20px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; touch-action: none; will-change: transform; transform-origin: 50% 100%;
  transition: transform 420ms var(--ease-card), opacity 300ms ease, border-color 200ms ease; box-shadow: 0 30px 60px -28px rgba(0,0,0,0.95); }
.karte.oben { cursor: grab; }
.karte.zieht { transition: none; }
.karte[data-tiefe="1"] { transform: translateY(14px) scale(0.95); background: #101013; }
.karte[data-tiefe="2"] { transform: translateY(26px) scale(0.9); background: #0D0D10; border-color: #222226; }
.karte[data-tiefe="3"] { transform: translateY(34px) scale(0.86); opacity: 0; }
.karte .kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.art { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.art svg { width: 15px; height: 15px; color: var(--muted); }
.karte .zeit { font-size: 12px; color: var(--muted-text); }
.karte h3 { font: 600 23px/1.18 var(--sans); letter-spacing: -0.03em; margin: 18px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.karte .weil { color: var(--muted); margin: 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.karte .fuss { margin-top: auto; display: flex; gap: 10px; }
.karte .fuss .knopf { flex: 1; min-height: 46px; }
.karte .stempel { position: absolute; top: 22px; padding: 6px 12px; border-radius: 10px; font: 600 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0; pointer-events: none; }
.karte[data-tiefe] > * { opacity: 0; }
.karte .stempel.ja { left: 20px; border: 1.5px solid var(--mint); color: var(--mint); }
.karte .stempel.nein { right: 20px; border: 1.5px solid var(--rot); color: var(--rot); }
.karte .stempel.spaeter { left: 50%; transform: translateX(-50%); border: 1.5px solid var(--muted); color: var(--muted); }
.karte.shine::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--kk-a), transparent 0deg, transparent 245deg, rgba(255,255,255,0.06) 265deg, rgba(255,255,255,0.65) 290deg, rgba(255,255,255,0.06) 315deg, transparent 335deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  animation: kk-shine 9s linear infinite; opacity: 0; pointer-events: none; }

.leer { text-align: center; padding: 18px 0 8px; animation: kk-rise 600ms var(--ease-card) both; }
.ruhe { width: 116px; height: 116px; }
.ruhe circle { stroke: var(--line); stroke-width: 1.2; }
.ruhe path { stroke: var(--mint); stroke-width: 2; stroke-dasharray: 80; stroke-dashoffset: 80; animation: kk-haken 900ms 250ms var(--ease-card) forwards; }
.leer-satz { font-size: 30px; margin: 18px 0 0; }

.naechster { width: 100%; text-align: left; display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(19,19,22,0.6); }
.naechster .uhr { flex: none; width: 48px; text-align: center; }
.naechster .uhr b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.03em; }
.naechster .uhr span { font-size: 11px; color: var(--muted-text); text-transform: uppercase; letter-spacing: 0.1em; }
.naechster .was { min-width: 0; }
.naechster .was b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.naechster .was span { font-size: 13px; color: var(--muted); }
.erledigt-zeile { display: block; margin: 22px auto 0; font-size: 14px; color: var(--muted); padding: 8px 14px; border-radius: 999px; }
.erledigt-zeile b { color: var(--text); font-weight: 600; }
.erledigt-zeile:active { background: var(--surface); }
.wisch-hilfe { text-align: center; font-size: 12px; color: var(--muted-strong); margin: 4px 0 0; }

/* Listen */
.liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kacheln + .liste { margin-top: 28px; }
.gruppe { margin: 26px 0 8px; display: flex; align-items: center; justify-content: space-between; }
.gruppe:first-child { margin-top: 0; }
.zeile { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 14px; text-align: left; transition: background 160ms ease; }
.zeile:active { background: var(--surface); }
.zeile .marke { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; font: 600 12.5px/1 var(--sans); letter-spacing: -0.01em; color: var(--muted); }
.zeile .marke svg { width: 20px; height: 20px; }
.zeile .mitte { flex: 1; min-width: 0; }
.zeile .mitte b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .mitte span { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .rechts { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--muted-text); }
.zeile.wartet .mitte b { font-weight: 600; }
.zeile .chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(70,214,159,0.5); color: var(--mint); }
.leise-satz { color: var(--muted); font-size: 15px; padding: 18px 0; }

/* Suche */
.suchfeld { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }
.suchfeld svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.suchfeld input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 17px; outline: none; -webkit-user-select: text; user-select: text; }
.suchfeld input::-webkit-search-cancel-button { filter: invert(0.6); }
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.kachel { aspect-ratio: 1 / 0.92; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; padding: 14px; text-align: left; }
.kachel svg { width: 24px; height: 24px; color: var(--muted); }
.kachel b { font-weight: 500; }
.kachel span { display: block; font-size: 12px; color: var(--muted-text); }

/* Ebenen */
#ebenen { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.ebene { position: absolute; inset: 0; background: var(--base); display: flex; flex-direction: column; pointer-events: auto;
  transform: translateX(100%); transition: transform 380ms var(--ease-card); box-shadow: -30px 0 60px -20px rgba(0,0,0,0.8); }
.ebene.an { transform: none; }
.ebene.unten { transform: translateY(100%); }
.ebene.unten.an { transform: none; }
.ebene.weg { transform: translateX(-24%); }
.ebene-kopf { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--oben)) 14px 10px; border-bottom: 1px solid rgba(44,44,49,0.6); background: var(--base); }
.ebene-titel { flex: 1; min-width: 0; }
.ebene-titel b { display: block; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebene-titel span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebene-rechts { display: flex; gap: 8px; }
.ebene-inhalt { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 20px 20px calc(28px + var(--unten)); }
.ebene-fuss { flex: none; padding: 10px 12px calc(10px + var(--unten)); border-top: 1px solid rgba(44,44,49,0.6); background: rgba(10,10,12,0.94); }

/* Einheit */
.einheit-kopf { margin: 4px 0 22px; }
.einheit-kopf .nummer { font: 600 13px/1 var(--sans); letter-spacing: 0.06em; color: var(--muted); }
.einheit-kopf h2 { font: 500 34px/1.1 var(--serif); letter-spacing: -0.03em; margin: 10px 0 6px; }
.einheit-kopf p { margin: 0; color: var(--muted); font-size: 15px; }
.lage { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; margin-bottom: 30px; }
.lage-zeile { display: grid; grid-template-columns: 124px 1fr; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: baseline; }
.lage-zeile:first-child { border-top: 0; }
.lage-zeile .label { line-height: 1.5; }
.lage-zeile div { font-size: 15px; }
.lage-zeile div span { color: var(--muted); }
.verlauf { position: relative; padding-left: 22px; }
.verlauf::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.v-eintrag { position: relative; display: block; width: 100%; text-align: left; padding: 10px 0 14px; }
.v-eintrag::before { content: ""; position: absolute; left: -21px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--base); border: 1.5px solid var(--muted-strong); }
.v-eintrag.mail::before { border-color: var(--muted); }
.v-eintrag.chat::before { border-color: var(--mint); }
.v-eintrag .oben { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted-text); text-transform: uppercase; letter-spacing: 0.1em; }
.v-eintrag b { display: block; font-weight: 500; margin: 4px 0 2px; }
.v-eintrag p { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Chat */
.chat-verlauf { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.nachricht { max-width: 100%; animation: kk-rise 300ms var(--ease-card) both; overflow-wrap: anywhere; }
.nachricht.du { align-self: flex-end; max-width: 84%; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 6px 20px; padding: 10px 14px; white-space: pre-wrap; }
.nachricht.kk { font-size: 16px; line-height: 1.55; -webkit-user-select: text; user-select: text; }
.nachricht.kk p { margin: 0 0 10px; }
.nachricht.kk p:last-child { margin-bottom: 0; }
.nachricht.kk ul, .nachricht.kk ol { margin: 0 0 10px; padding-left: 22px; }
.nachricht.kk h4 { font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
.nachricht.kk code { font: 13.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.nachricht.kk pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow-x: auto; font: 13px/1.45 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre; }
.nachricht.kk table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; margin-bottom: 10px; }
.nachricht.kk td, .nachricht.kk th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.nachricht.hinweis { align-self: center; font-size: 12.5px; color: var(--muted-text); text-align: center; }
.nachricht.abschnitt { align-self: stretch; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted-strong); text-transform: uppercase; letter-spacing: 0.14em; }
.nachricht.abschnitt::before, .nachricht.abschnitt::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.werkzeug { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-text); }
.werkzeug svg { width: 14px; height: 14px; flex: none; }
.werkzeug span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arbeitet { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.tippen { display: inline-flex; gap: 4px; }
.tippen i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: kk-typing 1.2s ease-in-out infinite; }
.tippen i:nth-child(2) { animation-delay: 0.15s; }
.tippen i:nth-child(3) { animation-delay: 0.3s; }
.auswahl { border: 1px solid rgba(70,214,159,0.4); border-radius: 18px; padding: 16px; display: grid; gap: 8px; background: var(--surface); }
.auswahl p { margin: 0 0 6px; font-weight: 500; }
.auswahl button { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--base); }
.auswahl button small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.auswahl button:active { border-color: var(--mint); }
.eingabe { display: flex; align-items: flex-end; gap: 8px; }
.eingabe textarea { flex: 1; min-height: 44px; max-height: 40vh; resize: none; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); padding: 11px 16px; font-size: 16px; line-height: 1.35; outline: none; -webkit-user-select: text; user-select: text; }
.eingabe textarea:focus { border-color: var(--muted-strong); }
.eingabe .rund.senden { border-color: rgba(70,214,159,0.55); color: var(--mint); }
.eingabe .rund.nimmt { border-color: var(--mint); color: var(--mint); animation: kk-pulse 1.4s ease-in-out infinite; }

/* Formulare in Fenstern */
.feld { display: grid; gap: 6px; margin-bottom: 14px; }
.feld input, .feld textarea { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; font-size: 16px; outline: none; -webkit-user-select: text; user-select: text; }
.feld textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
.feld input:focus, .feld textarea:focus { border-color: var(--muted-strong); }
.reihe { display: flex; gap: 10px; }
.reihe > * { flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--muted); }
.chips button.an { color: var(--text); border-color: var(--muted-strong); background: var(--card); }
.chips button b { font-weight: 600; color: var(--mint); margin-left: 4px; }
.mail-kopf { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.mail-kopf h2 { font: 600 22px/1.25 var(--sans); letter-spacing: -0.025em; margin: 0 0 10px; }
.mail-kopf p { margin: 2px 0; font-size: 14px; color: var(--muted); }
.mail-text { white-space: pre-wrap; font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.anhaenge { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.anhaenge a { font-size: 13px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.datei-text { white-space: pre-wrap; font: 14px/1.55 var(--sans); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.tag-kopf { margin: 24px 0 6px; }
.tag-kopf:first-child { margin-top: 0; }
.vorschau-box { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 16px; margin-bottom: 18px; }
.vorschau-box .mail-text { font-size: 14.5px; }
.knopfreihe { display: grid; gap: 10px; margin-top: 8px; }
.ok-zeile { color: var(--mint); font-size: 14px; margin: 0 0 14px; }

/* Aufnahme */
.aufnahme { position: fixed; inset: auto 0 calc(var(--leiste) + var(--unten) + 26px) 0; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; animation: kk-rise 220ms var(--ease-card) both; }
.aufnahme p { margin: 0; font-size: 14px; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: rgba(19,19,22,0.9); border: 1px solid var(--line); }
.welle { display: flex; align-items: center; gap: 5px; height: 38px; }
.welle i { width: 4px; height: 100%; border-radius: 2px; background: var(--mint); transform: scaleY(0.25); animation: kk-welle 900ms ease-in-out infinite; }
.welle i:nth-child(2) { animation-delay: 0.12s; }
.welle i:nth-child(3) { animation-delay: 0.24s; }
.welle i:nth-child(4) { animation-delay: 0.36s; }
.welle i:nth-child(5) { animation-delay: 0.48s; }

/* Hinweis */
.hinweis { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--leiste) + var(--unten) + 14px); display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 8px 8px 18px; border-radius: 16px;
  background: rgba(31,31,35,0.96); border: 1px solid var(--line); box-shadow: 0 20px 44px -16px rgba(0,0,0,0.95); overflow: hidden; animation: kk-rise 260ms var(--ease-card) both; }
.hinweis span { flex: 1; font-size: 15px; }
.hinweis-knopf { height: 38px; padding: 0 14px; border-radius: 11px; color: var(--mint); font-weight: 600; }
.hinweis-zeit { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--mint); transform-origin: left; transform: scaleX(0); }
.hinweis-zeit.laeuft { animation: kk-ablauf var(--dauer, 5s) linear forwards; }
body.ebene-offen .hinweis { bottom: calc(var(--unten) + 84px); }

@keyframes kk-shine { 0% { --kk-a: 0deg; opacity: 0; } 4% { opacity: 1; } 22% { opacity: 1; } 28% { --kk-a: 360deg; opacity: 0; } 100% { --kk-a: 360deg; opacity: 0; } }
@keyframes kk-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
@keyframes kk-typing { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes kk-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kk-count { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kk-haken { to { stroke-dashoffset: 0; } }
@keyframes kk-welle { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
@keyframes kk-ablauf { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* iPad und Mac: die Orte als Seitenleiste links, Ebenen rechts daneben */
@media (min-width: 900px) {
  :root { --rand: 248px; }
  .leiste { inset: 0 auto 0 0; width: var(--rand); height: auto; padding: calc(84px + var(--oben)) 14px 24px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; border-top: 0; border-right: 1px solid var(--line); background: var(--base); }
  .ziel { flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; }
  .ziel span { font-size: 15px; }
  .ziel.an { background: var(--surface); }
  .ziel .punkt { position: static; margin-left: auto; }
  .sprechen { order: 9; margin: auto 0 0; align-self: center; }
  .kopf { width: var(--rand); background: none; }
  .ort { left: var(--rand); padding-left: max(32px, calc((100vw - var(--rand) - 720px) / 2)); padding-right: max(32px, calc((100vw - var(--rand) - 720px) / 2)); padding-top: calc(40px + var(--oben)); padding-bottom: 40px; }
  #ebenen { left: auto; width: min(560px, calc(100vw - var(--rand))); }
  .ebene { border-left: 1px solid var(--line); }
  .aufnahme { bottom: 40px; left: var(--rand); }
  .hinweis { left: calc(var(--rand) + 24px); right: auto; width: 420px; bottom: 24px; }
}

/* Blätter von unten, kleine Bausteine der App */
.ebene.unten { top: calc(var(--oben) + 44px); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line); box-shadow: 0 0 0 100vmax rgba(0,0,0,0.55); }
.ebene.unten .ebene-kopf { border-radius: 24px 24px 0 0; background: transparent; }
.ebene.unten.klein-blatt { top: auto; max-height: 82vh; }
.ebene.unten.klein-blatt .ebene-inhalt { flex: none; }
.ebene.weg { box-shadow: none; }
.blatt-titel { font: 600 26px/1.15 var(--sans); letter-spacing: -0.03em; margin: 10px 0 8px; }
.blatt-satz { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.verlauf-label { margin-bottom: 8px; }
.zweite-reihe { margin-top: 6px; }
.zweite-reihe .knopf { min-height: 38px; font-size: 14px; }
.klein-knopf { min-height: 34px; padding: 0 12px; margin: 6px 0 0 -12px; font-size: 14px; color: var(--mint); }
.v-eintrag.zurueck b { text-decoration: line-through; color: var(--muted); }
.zeile .marke.uhr-marke { font-size: 13px; color: var(--text); }
.zeile .rechts svg { width: 16px; height: 16px; color: var(--muted-strong); }
.bild-voll { display: block; max-width: 100%; border-radius: 14px; margin: 0 auto; }
.datei-gross { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 0; text-align: center; }
.datei-gross svg { width: 54px; height: 54px; color: var(--muted); stroke-width: 1.2; margin-bottom: 8px; }
.datei-gross b { font-weight: 500; overflow-wrap: anywhere; }
.datei-gross span { font-size: 13px; color: var(--muted); }
a.knopf { text-decoration: none; color: var(--text); }
.konto-kopf { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.konto-kopf b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.konto-kopf div span { font-size: 13px; color: var(--muted); }
.rund.gross-rund { width: 54px; height: 54px; }
.rund.gross-rund span { font-size: 20px; }
.knopf svg { width: 18px; height: 18px; }
.bezug-kopf { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.an-kk .feld textarea { min-height: 120px; font-size: 17px; border-radius: 16px; }
.chips.alle, .chips.bezug { flex-wrap: wrap; overflow: visible; }
.chips.bezug button { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nachricht.du.wird { opacity: 0.55; }
.auswahl pre.bild { margin: 0; font: 11.5px/1.35 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.auswahl .reihe button { text-align: center; }
.arbeitet .taetigkeit { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arbeitet .stopp { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 14px; }
.arbeitet .stopp svg { width: 14px; height: 14px; }
.arbeitet .stopp.bestaetigt { border-color: rgba(240,122,122,0.5); color: var(--rot); }
.suche-laedt { padding: 16px 0; }
.ebene-inhalt.chat-inhalt { padding-bottom: 16px; }
.eingabe .rund.mikro { color: var(--muted); }
.feld textarea, .eingabe textarea { resize: none; }
.chips.bezug button.an { color: var(--mint); border-color: rgba(70,214,159,0.55); background: transparent; }
.v-eintrag .knopf.klein-knopf { color: var(--mint); }
.chat-verlauf .werkzeug { margin: 4px 0 10px; }
