@font-face {
  font-family: Syne;
  src: url("/assets/fonts/Syne-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --app-bg: #101218;
  --app-flaeche: #191d27;
  --app-linie: #363e4d;
  --app-tinte: #f5f7fa;
  --app-leise: #abb5c8;
  --app-cyan: #42efd6;
  --app-violett: #b29aff;
  background: var(--app-bg);
  color: var(--app-tinte);
  font: 1rem/1.5 system-ui, sans-serif;
}

/* Helle Ansicht (#287): assets/thema.js setzt data-thema="hell" auf <html>.
   Gleiche Rollen wie im Dunkeln; Cyan und Violett tiefer, damit sie auf Weiß
   als Text (mindestens 4,5:1) und als Knopffläche taugen. */
html[data-thema="hell"] {
  color-scheme: light;
  --app-bg: #f5f6f9;
  --app-flaeche: #ffffff;
  --app-linie: #c9ced8;
  --app-tinte: #111318;
  --app-leise: #545e70;
  --app-cyan: #006a57;
  --app-violett: #5b4fd6;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.lang-pending body { visibility: hidden; }
:focus-visible { outline: 2px solid var(--app-cyan); outline-offset: 3px; }

.app-kopf {
  border-bottom: 1px solid var(--app-linie);
  padding-top: env(safe-area-inset-top);
}

.app-breite {
  width: min(100%, 40rem);
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}

.app-kopf .app-breite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.app-marke { font: 800 1.65rem/1 Syne, system-ui, sans-serif; }
.app-marke span { color: var(--app-cyan); }
main { padding-block: 24px max(24px, env(safe-area-inset-bottom)); }
h1 { margin: 0; font-size: clamp(1.65rem, 8.2vw, 2.2rem); line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
#memberGreeting { color: var(--app-leise); margin: 4px 0 24px; overflow-wrap: anywhere; }
.app-profil { color: var(--app-cyan); }
#memberToolsList { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.arcade__link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 16px;
  background: var(--app-flaeche);
  border: 1px solid var(--app-linie);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
a.arcade__link:hover { border-color: var(--app-cyan); }
.arcade__num { display: grid; place-items: center; flex: none; width: 32px; }
.arcade__num svg { width: 27px; height: 27px; }
.arcade__body { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.arcade__title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.arcade__desc, .arcade__cta { color: var(--app-leise); font-size: .875rem; }
a .arcade__cta { font-size: 0; }
a .arcade__cta::after {
  display: block;
  content: "";
  width: 9px;
  height: 9px;
  margin-inline-end: 3px;
  border-top: 2px solid var(--app-tinte);
  border-right: 2px solid var(--app-tinte);
  transform: rotate(45deg);
}

form { display: grid; gap: 16px; margin-top: 24px; }
form label { display: block; margin-bottom: 4px; }
input, button { font: inherit; }
input {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--app-linie);
  border-radius: 8px;
  background: var(--app-flaeche);
  color: inherit;
}
button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--app-flaeche);
  color: var(--app-tinte);
  cursor: pointer;
}
button:disabled { opacity: .6; }
form button { background: var(--app-violett); color: #161222; font-weight: 700; }
html[data-thema="hell"] form button { color: #ffffff; }
#memberLogoutBtn { padding-inline: 8px; background: transparent; color: var(--app-leise); }
.app-status { color: #ff9aab; margin: 0 0 12px; }
html[data-thema="hell"] .app-status { color: #b42318; }
.app-status:empty { display: none; }
details, .app-aktualisieren { margin-top: 24px; }
details { color: var(--app-leise); }
summary { color: var(--app-cyan); cursor: pointer; padding-block: 10px; }

/* Hell/Dunkel-Umschalter (#287) im Kopf, rund wie auf der Website. Ohne
   JavaScript (kein data-thema) bleibt er weg. */
.app-thema {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--app-linie);
  border-radius: 999px;
  background: transparent;
  color: var(--app-leise);
}
.app-thema:hover { color: var(--app-tinte); border-color: var(--app-cyan); }
.app-thema svg { display: block; width: 18px; height: 18px; }
html:not([data-thema]) .app-thema,
.app-thema .thema-knopf__mond,
html[data-thema="hell"] .app-thema .thema-knopf__sonne { display: none; }
html[data-thema="hell"] .app-thema .thema-knopf__mond { display: block; }
