/* Plattform @helen's english courses: Gestaltung. Quelle: At-Helens\plattform\src\admin.css
   Farben wie Helens Website (Version 1): warmes Gelb, Orange, Dunkelblau. Keine Fremdschrift, nichts wird nachgeladen.
   Die Seite ist bewusst immer hell (color-scheme light), auch wenn das Gerät dunkel eingestellt ist. */

:root {
  color-scheme: light;
  --navy: #242656;
  --orange: #F59C02;
  --orange-text: #9A5200;
  --gelb: #FFF3A3;
  --hellgelb: #FFF6C2;
  --creme: #FFFBEA;
  --weiss: #FFFFFF;
  --grau: #46557A;
  --leise: #5A6688;
  --linie: #EADB9C;
  --haar: #F1E7BD;
  --fehler: #B3261E;
  --radius: 18px;
  --breit: 1120px;
  --rand: max(20px, calc((100% - var(--breit)) / 2));
  --schrift: "Open Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--navy);
  font: 16px/1.55 var(--schrift);
  overflow-x: clip;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.p-sprung { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--navy); color: var(--creme); border-radius: 10px; font-weight: 700; }
.p-sprung:focus { top: 12px; }

/* ---------- Kopf und Wege ---------- */

.p-kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px var(--rand);
  background: var(--gelb);
  border-bottom: 1px solid var(--linie);
}
.p-marke { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.p-marke img { width: auto; height: 46px; }
.p-marke-text { padding-left: 12px; border-left: 1px solid var(--navy); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.p-ich { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-ich-mail { font-size: 14px; color: var(--grau); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }

.p-rund {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--navy); border-radius: 50%; background: transparent;
}
.p-rund svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.p-rund:hover { background: var(--navy); color: var(--creme); }
.p-rund.dreht svg { animation: p-drehen .8s linear infinite; }
@keyframes p-drehen { to { transform: rotate(360deg); } }

.p-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--weiss);
  border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.p-nav a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; padding: 8px 2px 7px;
  font-size: 11.5px; font-weight: 600; text-decoration: none; color: var(--grau);
  border-top: 3px solid transparent;
}
.p-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.p-nav a[aria-current="page"] { color: var(--navy); border-top-color: var(--orange); font-weight: 700; }
.p-nav a:focus-visible { outline-offset: -4px; }
.p-zahl {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--orange); color: var(--navy);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* ---------- Seitenaufbau ---------- */

.p-ansicht > * { margin-left: var(--rand); margin-right: var(--rand); }
.p-ansicht > .p-held, .p-ansicht > .p-seitenkopf { margin: 0; padding-left: var(--rand); padding-right: var(--rand); }
.p-warten { padding: 60px 0; color: var(--grau); }

.p-held, .p-seitenkopf { position: relative; background: var(--gelb); overflow: hidden; }
.p-held { padding-top: 34px; padding-bottom: 74px; }
.p-seitenkopf { padding-top: 30px; padding-bottom: 66px; }
.p-datum { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); }
.p-held h1 { margin-top: 6px; font-size: clamp(32px, 5.4vw, 52px); line-height: 1.05; letter-spacing: -.02em; font-weight: 700; }
.p-seitenkopf h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; }
.p-seitenkopf p { margin-top: 8px; max-width: 46em; color: var(--grau); }
.p-seitenkopf p + p { margin-top: 18px; }
.p-satz { position: relative; margin-top: 20px; max-width: 30em; font-size: clamp(19px, 2.5vw, 24px); line-height: 1.4; }
.p-satz-zwei { margin-top: 10px; font-size: clamp(17px, 2vw, 19px); color: var(--grau); }
.p-satz a, .p-fliess a { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.p-satz a:hover { text-decoration-color: var(--navy); }
.p-held > :not(.p-bogen) { position: relative; } /* Text liegt über dem Bogen */
.p-bogen { position: absolute; right: max(-30px, calc(var(--rand) - 60px)); top: -34px; width: 250px; height: 250px; pointer-events: none; }
.p-bogen path { fill: none; stroke: var(--orange); stroke-width: 9; stroke-linecap: round; opacity: .85; }

.p-karte {
  position: relative;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 22px 26px 24px;
  margin-top: 20px;
}
.p-held + .p-karte, .p-seitenkopf + .p-karte { margin-top: -44px; }
.p-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.p-karte-kopf-zwei { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--haar); }
.p-karte h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
.p-mehr { font-size: 15px; font-weight: 600; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.p-fliess { max-width: 48em; margin: 2px 0 6px; color: var(--grau); }
.p-fliess b { color: var(--navy); }
.p-fuss { margin-top: 14px; font-size: 14px; color: var(--leise); }
.p-hinweis { margin-top: 22px; max-width: 52em; font-size: 14px; color: var(--leise); }
.p-unten { margin-top: 18px; }
.p-zwei { display: grid; gap: 0 20px; grid-template-columns: minmax(0, 1fr); }
.p-zwei > * { min-width: 0; }

/* ---------- Kurve ---------- */

.p-kurve { border-radius: 10px; }
.p-kurve svg { width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; overflow: visible; }
.p-k-wert { min-height: 1.6em; margin: 4px 0 6px; font-size: 15px; color: var(--grau); }
.p-k-wert b { color: var(--navy); margin-right: 6px; }
.p-k-gitter { stroke: var(--haar); stroke-width: 1; }
.p-k-text { fill: var(--leise); font-size: 12px; font-family: var(--schrift); }
.p-k-flaeche { fill: var(--gelb); opacity: .75; }
.p-k-linie { fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.p-k-anm { fill: var(--orange); stroke: var(--weiss); stroke-width: 2; }
.p-k-schn { fill: var(--weiss); stroke: var(--orange); stroke-width: 2.4; }
.p-k-zeiger { stroke: var(--navy); stroke-width: 1; opacity: .3; }
.p-k-punkt { fill: var(--navy); stroke: var(--weiss); stroke-width: 2; }
.p-k-legende { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-size: 13.5px; color: var(--grau); }
.p-k-legende span { display: inline-flex; align-items: center; gap: 7px; }
.p-k-legende i { flex: none; display: inline-block; }
.p-l-linie { width: 18px; height: 0; border-top: 2.4px solid var(--navy); }
.p-l-anm { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }
.p-l-schn { width: 11px; height: 11px; border-radius: 50%; border: 2.4px solid var(--orange); background: var(--weiss); }

/* ---------- Listen ---------- */

.p-liste > li + li { border-top: 1px solid var(--haar); }
.p-zeile { display: flex; align-items: center; gap: 14px; padding: 13px 10px; margin: 0 -10px; border-radius: 12px; text-decoration: none; }
.p-zeile:hover { background: var(--creme); }
.p-z-haupt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.p-z-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.p-z-sub { font-size: 14.5px; color: var(--grau); overflow-wrap: anywhere; }
.p-z-sub em { font-style: normal; font-weight: 700; color: var(--orange-text); margin-right: 4px; }
.p-z-rand { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.p-z-zeit { font-size: 13px; color: var(--leise); white-space: nowrap; }

.p-status { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.p-status-neu { background: var(--orange); color: var(--navy); }
.p-status-kontaktiert { background: var(--hellgelb); border-color: var(--navy); color: var(--navy); }
.p-status-erledigt { background: transparent; border-color: var(--linie); color: var(--grau); }

.p-werkzeug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 8px; }
.p-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.p-wahl button {
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--creme); color: var(--navy);
  font-size: 15px; font-weight: 600;
}
.p-wahl button span { margin-left: 7px; font-weight: 400; color: var(--grau); }
.p-wahl button:hover { border-color: var(--navy); }
.p-wahl button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--creme); }
.p-wahl button[aria-pressed="true"] span { color: var(--gelb); }
.p-wahl-klein button { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.p-suche { flex: 1 1 220px; max-width: 340px; }
.p-suche input {
  width: 100%; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--linie); border-radius: 999px; background: var(--weiss);
  font-size: 16px;
}
.p-suche input::placeholder { color: var(--leise); opacity: 1; }
.p-suche input:focus { border-color: var(--navy); }
.p-leer { padding: 34px 0 26px; color: var(--grau); text-align: center; }
.p-leer-klein { padding: 8px 0; color: var(--grau); }

.p-balken li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 9px 0; }
.p-balken li + li { border-top: 1px solid var(--haar); }
.p-ba-name { font-size: 15.5px; overflow-wrap: anywhere; }
.p-ba-zahl { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.p-ba-zahl small { display: inline-block; min-width: 46px; margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--leise); text-align: right; }
.p-ba-spur { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--creme); overflow: hidden; }
.p-ba-spur i { display: block; height: 100%; border-radius: 3px; background: var(--orange); }

/* ---------- Knöpfe ---------- */

.p-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--navy); background: transparent; color: var(--navy);
  font-size: 15.5px; font-weight: 700; text-decoration: none;
}
.p-knopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.p-knopf:hover { background: var(--navy); color: var(--creme); }
.p-knopf-voll { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.p-knopf-voll:hover { background: var(--navy); border-color: var(--navy); color: var(--creme); }
.p-knopf-gefahr { background: var(--fehler); border-color: var(--fehler); color: #FFFFFF; }
.p-knopf-gefahr:hover { background: #8C1D17; border-color: #8C1D17; color: #FFFFFF; }
.p-knopf:disabled { opacity: .55; cursor: default; }
.p-textknopf { padding: 8px 0; min-height: 44px; border: 0; background: none; font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.p-textknopf:hover { text-decoration-color: var(--navy); }
.p-gefahr { color: var(--fehler); text-decoration-color: currentColor; }

/* ---------- Login, Einrichtung, Konto ---------- */

.ist-aus .p-nav, .ist-aus .p-ich { display: none; }
body.ist-aus { padding-bottom: 40px; }
a.p-rund { color: var(--navy); text-decoration: none; }
.p-konto[aria-current="page"] { background: var(--navy); color: var(--creme); }
.p-ansicht > .p-schmal { max-width: 480px; margin-left: var(--rand); margin-right: auto; }
.p-feld { display: block; margin-bottom: 16px; }
.p-feld span { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.p-feld input {
  display: block; width: 100%; min-height: 50px; padding: 10px 14px;
  border: 1px solid var(--grau); border-radius: 14px; background: var(--weiss); font-size: 17px;
}
.p-feld input:focus { border-color: var(--navy); outline: 3px solid var(--navy); outline-offset: 1px; }
.p-formfehler { min-height: 1.5em; margin: 0 0 12px; color: var(--fehler); font-weight: 700; }
.p-formfehler:empty { min-height: 0; margin: 0; }
.p-knopf-breit { width: 100%; }
#p-einrichten { margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--haar); }

/* ---------- Blatt: ein Eintrag ---------- */

.p-blatt {
  width: 100%; max-width: 540px; height: 100%; max-height: none;
  margin: 0 0 0 auto; padding: 0; border: 0;
  background: var(--creme); color: var(--navy);
}
.p-blatt::backdrop { background: rgba(36, 38, 86, .42); }
.p-blatt-innen { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.p-b-kopf { position: relative; background: var(--gelb); padding: 26px 76px 22px 26px; border-bottom: 1px solid var(--linie); }
.p-b-zu { position: absolute; top: 18px; right: 18px; }
.p-b-art { font-size: 13.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); }
.p-b-kopf h2 { margin-top: 4px; font-size: clamp(26px, 6vw, 32px); line-height: 1.1; letter-spacing: -.015em; overflow-wrap: anywhere; }
.p-b-taten { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 26px 0; }
.p-b-status, .p-b-notiz, .p-b-weg { padding: 22px 26px 0; }
.p-b-etikett { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); }
.p-b-liste { margin: 22px 26px 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 4px 18px; }
.p-b-liste > div { padding: 12px 0; }
.p-b-liste > div + div { border-top: 1px solid var(--haar); }
.p-b-liste dt { font-size: 13.5px; color: var(--leise); }
.p-b-liste dd { font-weight: 600; overflow-wrap: anywhere; }
.p-b-liste a { text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.p-b-notiz textarea {
  display: block; width: 100%; min-height: 96px; margin-bottom: 10px; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--linie); border-radius: 14px; background: var(--weiss); font-size: 16px; line-height: 1.5;
}
.p-b-notiz textarea::placeholder { color: var(--leise); opacity: 1; }
.p-b-notiz textarea:focus { border-color: var(--navy); }
.p-b-mail { margin: 20px 26px 0; font-size: 14px; color: var(--leise); }
.p-b-mail.ist-fehler { color: var(--fehler); font-weight: 700; }
.p-b-weg { margin-top: 10px; }
.p-b-frage { margin-bottom: 12px; font-weight: 700; }

/* ---------- Meldung unten ---------- */

.p-meldung {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px); padding: 11px 20px; border-radius: 999px;
  background: var(--navy); color: var(--creme); font-weight: 600; font-size: 15px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.p-meldung.ist-da { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s ease, transform .2s ease; }
dialog[open] ~ .p-meldung { bottom: 24px; }

/* ---------- Bewegung: leise, nur wenn erwünscht ---------- */

@media (prefers-reduced-motion: no-preference) {
  .p-k-linie { animation: p-zeichnen 1.1s cubic-bezier(.3, .6, .2, 1); }
  .p-bogen path { animation: p-zeichnen 1.3s cubic-bezier(.3, .6, .2, 1); }
  .p-k-flaeche { animation: p-kommen .9s ease-out; }
  .p-k-anm, .p-k-schn { animation: p-kommen .5s ease-out .7s backwards; }
  .p-blatt[open] { animation: p-herein .26s cubic-bezier(.2, .7, .2, 1); }
  .p-blatt[open]::backdrop { animation: p-kommen-voll .26s ease-out; }
}
@keyframes p-zeichnen { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes p-kommen { from { opacity: 0; } }
@keyframes p-kommen-voll { from { opacity: 0; } to { opacity: 1; } }
@keyframes p-herein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Breiter als ein Handy ---------- */

@media (max-width: 599px) {
  .p-marke img { height: 40px; }
  .p-marke-text { font-size: 13px; padding-left: 10px; }
  .p-ich-mail { display: none; }
  .p-karte { padding: 18px 16px 20px; }
  .p-b-kopf { padding-left: 20px; }
  .p-b-taten, .p-b-status, .p-b-notiz, .p-b-weg { padding-left: 20px; padding-right: 20px; }
  .p-b-liste, .p-b-mail { margin-left: 20px; margin-right: 20px; }
  .p-b-taten .p-knopf { flex: 1 1 auto; }
  .p-bogen { width: 200px; height: 200px; right: -96px; top: -78px; }
  .p-ansicht > .p-schmal { margin-right: var(--rand); }
  .p-z-sub em { display: block; }
}

@media (min-width: 900px) {
  body { padding-bottom: 60px; }
  .p-kopf { gap: 34px; padding-top: 12px; padding-bottom: 12px; }
  .p-nav { position: static; display: flex; gap: 6px; background: none; border: 0; padding: 0; }
  .p-nav a { flex-direction: row; gap: 8px; min-height: 44px; padding: 6px 14px; border: 1px solid transparent; border-radius: 999px; font-size: 15px; color: var(--navy); }
  .p-nav svg { width: 20px; height: 20px; }
  .p-nav a:hover { border-color: var(--navy); }
  .p-nav a[aria-current="page"] { background: var(--navy); color: var(--creme); border-color: var(--navy); }
  .p-nav a:focus-visible { outline-offset: 3px; }
  .p-zahl { position: static; margin-left: 2px; }
  .p-zwei { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .p-held { padding-top: 46px; padding-bottom: 88px; }
  .p-meldung { bottom: 28px; }
}
