/* „Mein portspace“ – hell, Glas, weiche Übergänge; Farben wie die Landeseite (assistent/portspace/app/src/styles/
   global.css, „Helles Hologramm-Labor“). Systemschriften, keine Fremd-Quellen, keine Inline-Stile (CSP). Mobil zuerst. */
:root {
  --grund: #f5f7fc;
  --flaeche: #ffffff;
  --glas: rgba(255, 255, 255, 0.78);
  --tinte: #0b1030;
  --leise: #4a5274;
  --hauch: #7a83a6;
  --linie: rgba(74, 92, 170, 0.16);
  --linie-stark: rgba(74, 92, 170, 0.28);
  --indigo: #4a4fe0;
  --akzent-weich: #e9eaff;
  --holo: linear-gradient(115deg, #7fd8ff 0%, #8fa6ff 34%, #c7a2ff 66%, #ffc0aa 100%);
  --holo-schrift: linear-gradient(100deg, #0a86bd 0%, #4a4fe0 42%, #8448dc 72%, #c9557a 100%);
  --warn: #b3261e;
  --warn-weich: #ffe7e3;
  --gut: #08707e;
  --gut-weich: #dcf5f8;
  --signal-weich: #fff1dc;
  --schatten-klein: 0 14px 30px -18px rgba(54, 66, 160, 0.35);
  --kante: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(110, 125, 210, 0.16);
  --sanft: cubic-bezier(0.22, 1, 0.36, 1);
  --text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--grund); }
body {
  margin: 0; min-height: 100vh; background: var(--grund); color: var(--tinte);
  font-family: var(--text); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(60rem 30rem at 0% -10%, rgba(143, 211, 255, .35), transparent 70%),
                    radial-gradient(50rem 28rem at 110% 0%, rgba(180, 147, 255, .25), transparent 70%);
  background-repeat: no-repeat;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 8px; }
a { color: var(--indigo); text-underline-offset: 3px; overflow-wrap: anywhere; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; background: var(--akzent-weich);
  padding: 1px 6px; border-radius: 6px; }

.holo-leiste { height: 4px; background: var(--holo); }
.huelle { max-width: 680px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.kopf { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; min-height: 64px; }
.marke {
  margin: 0; font-weight: 700; letter-spacing: .02em; font-size: 15px;
  background: var(--holo-schrift); -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 { margin: 6px 0 0; font-size: clamp(30px, 7vw, 40px); line-height: 1.15; letter-spacing: -.01em; }
h2 { margin: 0 0 10px; font-size: 19px; line-height: 1.3; }
.leise { color: var(--leise); }
.klein { font-size: 14px; }
.einleitung { margin: 8px 0 18px; }
.nummer { color: var(--hauch); font-size: 14px; margin: 4px 0 0; }
.ansicht { animation: auftauchen .45s var(--sanft) both; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.karte {
  background: var(--glas); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 18px; box-shadow: var(--kante), var(--schatten-klein); padding: 18px; margin: 14px 0;
}
.karte p { margin: 0; }
.stapel { display: grid; gap: 10px; }
.hinweis.fehler { background: var(--warn-weich); box-shadow: 0 0 0 1px rgba(179, 38, 30, .18); }

/* ---------- Fortschritt ---------- */
.fortschritt-karte h2 { margin-bottom: 12px; }
.balken { position: relative; height: 10px; border-radius: 99px; background: var(--akzent-weich); overflow: hidden; }
.balken.gross { height: 14px; }
.fuellung { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--holo);
  transition: width .8s var(--sanft); }
.fuellung.laeuft::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: schimmer 1.4s linear infinite;
}
@keyframes schimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.als-naechstes { margin-top: 12px !important; }
.link-knopf { font: inherit; font-weight: 650; color: var(--indigo); background: none; border: 0; padding: 4px 2px;
  min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }

/* ---------- Schritt-Karten (aufklappbar) ---------- */
.karten { display: grid; gap: 12px; margin: 14px 0; }
.schritt-karte {
  background: var(--glas); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 18px; box-shadow: var(--kante), var(--schatten-klein); overflow: hidden;
  transition: box-shadow .3s var(--sanft), transform .3s var(--sanft);
  animation: auftauchen .5s var(--sanft) both;
}
.schritt-karte:nth-child(2) { animation-delay: .05s; } .schritt-karte:nth-child(3) { animation-delay: .1s; }
.schritt-karte:nth-child(4) { animation-delay: .15s; } .schritt-karte:nth-child(5) { animation-delay: .2s; }
.schritt-karte.offen { box-shadow: var(--kante), 0 24px 46px -24px rgba(54, 66, 160, .45); }
.karte-kopf {
  width: 100%; display: grid; grid-template-columns: 34px 1fr auto; grid-template-areas: "z t p" "z k k";
  gap: 2px 10px; align-items: center; text-align: left; padding: 16px 16px 14px; min-height: 64px;
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
}
.karte-kopf:hover { background: rgba(233, 234, 255, .35); }
.zeichen { grid-area: z; font-size: 22px; line-height: 1; align-self: start; padding-top: 2px; }
.karte-titel { grid-area: t; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.karte-titel .titel { font-weight: 650; }
.karte-titel .untertitel { color: var(--hauch); font-size: 14px; }
.pfeil { grid-area: p; width: 10px; height: 10px; border-right: 2px solid var(--hauch); border-bottom: 2px solid var(--hauch);
  transform: rotate(45deg); transition: transform .3s var(--sanft); margin: 0 4px 4px; }
.offen .pfeil { transform: rotate(225deg); margin-bottom: -2px; }
.karte-zeile { grid-area: k; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 650; padding: 2px 9px; border-radius: 99px;
  background: var(--akzent-weich); color: #3a3fc4; white-space: nowrap; }
[data-zustand="fertig"] .chip { background: var(--gut-weich); color: #04434c; }
[data-zustand="problem"] .chip { background: var(--warn-weich); color: #6d1712; }
[data-zustand="persoenlich"] .chip, [data-zustand="spaeter"] .chip { background: var(--signal-weich); color: #6b3a00; }
.kurz { color: var(--leise); font-size: 15px; }
.karte-inhalt { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--sanft); }
.offen .karte-inhalt { grid-template-rows: 1fr; }
.karte-innen { overflow: hidden; }
.schritt-karte p { margin: 0; }
.karte-innen > .stapel { padding: 0 16px 18px 60px; }
.karte-innen .ablauf { display: grid; gap: 12px; }
.dauer { color: var(--hauch); font-size: 14px; }
.grund { background: var(--signal-weich); border-radius: 12px; padding: 10px 12px; color: #4d2c00; }
[data-zustand="problem"] .grund { background: var(--warn-weich); color: #6d1712; }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qr { width: 196px; height: 196px; border-radius: 14px; background: #fff; padding: 6px; box-shadow: var(--kante); }
.apps { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }

/* ---------- Formulare, Knöpfe ---------- */
label { font-weight: 600; margin-top: 4px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 17px; color: var(--tinte);
  background: #fbfcff; border: 1px solid var(--linie-stark); border-radius: 12px;
}
#code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; font-size: 19px; }
input:focus { outline: 2px solid var(--indigo); outline-offset: 1px; border-color: transparent; }
.passwort-zeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.knopf {
  display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 12px 20px; border: 0;
  border-radius: 14px; font: inherit; font-weight: 650; color: #fff; background: var(--indigo); cursor: pointer;
  text-decoration: none; box-shadow: 0 10px 22px -12px rgba(74, 79, 224, .8); transition: transform .15s var(--sanft);
}
.knopf:active { transform: scale(.98); }
.knopf.gross { min-height: 60px; font-size: 18px; width: 100%; }
.knopf:disabled { opacity: .55; cursor: wait; }
.knopf-leise {
  display: inline-flex; align-items: center; justify-self: start; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--linie-stark); border-radius: 12px; font: inherit; font-size: 15px; color: var(--indigo);
  background: var(--akzent-weich); cursor: pointer; text-decoration: none;
}
.knopf-leise.klein { min-width: 76px; justify-content: center; }
.knopf-leise:disabled { opacity: .55; }
.feld-fehler { margin: 0; color: var(--warn); font-size: 15px; }
.frage { margin: 0; font-weight: 650; font-size: 18px; }
.siegel-hinweis { color: var(--leise); font-size: 14px; }

.anleitung { background: rgba(245, 247, 252, .9); border-radius: 14px; padding: 14px 16px; }
.anleitung h3 { margin: 0 0 6px; font-size: 16px; }
.anleitung ol { margin: 0; padding-left: 22px; }
.anleitung li { margin: 6px 0; }
.anleitung .gut { margin: 10px 0 0; color: var(--leise); font-size: 15px; }
.ergebnis { border-radius: 14px; padding: 14px 16px; background: var(--akzent-weich); }
.ergebnis.gut { background: var(--gut-weich); color: #04434c; }
.ergebnis.problem { background: var(--warn-weich); color: #6d1712; }
.ergebnis-text { font-weight: 650; }
.ergebnis .anleitung { background: rgba(255, 255, 255, .75); margin-top: 10px; color: var(--tinte); }
.warten { display: grid; gap: 10px; color: var(--leise); }

.code-neu { background: var(--gut-weich); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.code-anzeige { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px; font-weight: 700;
  letter-spacing: .06em; color: #04434c; overflow-wrap: anywhere; }

.fuss { padding-top: 8px; padding-bottom: 32px; }
.fuss-links { display: flex; gap: 18px; justify-content: center; font-size: 14px; }
.fuss-links a { color: var(--leise); display: inline-block; padding: 12px 4px; }

@media (min-width: 720px) {
  .kopf { padding-top: 28px; }
  .karte { padding: 24px 26px; }
  .karte-kopf { padding: 18px 22px 16px; }
  .karte-innen > .stapel { padding: 0 22px 22px 66px; }
}
@media (max-width: 420px) {
  .karte-innen > .stapel { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
