:root {
  color-scheme: light dark;
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #1c1c28;
  --subtext: #6b6b7b;
  --border: #e4e4ee;
  --primary: #5b5fef;
  --tint: #5055e8;
  /* Ränder von Eingaben und Kästchen: mindestens 3:1 gegen Seite und Karte */
  --control: #8a8ca3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f14;
    --card: #1a1a22;
    --text: #ededf3;
    --subtext: #a3a3b5;
    --border: #2d2d39;
    --tint: #a3a6ff;
    --control: #64667d;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Kopfzeile, Inhalt und Fußzeile nebeneinander in einer Hülle, damit Screenreader sie als
   eigene Bereiche erkennen; die Breite setzt die Hülle */
.seite,
main {
  max-width: 640px;
  margin: 0 auto;
}

.seite > main {
  max-width: none;
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 8px 0 4px;
}

h2 {
  font-size: 19px;
  margin: 32px 0 8px;
}

h3 {
  font-size: 16px;
  margin: 24px 0 4px;
}

p,
li {
  color: var(--text);
}

.lead,
.muted {
  color: var(--subtext);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}

.code {
  font: 600 32px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 6px;
  text-align: center;
  margin: 4px 0 16px;
}

.button {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin: 8px 0 0;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.15s, border-color 0.15s;
}

/* Beim Drücken sinkt der Knopf ein wenig ein: Die Seite hat gehört */
.button:active {
  transform: scale(0.97);
}

.button.secondary {
  background: transparent;
  color: var(--tint);
  border-color: var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 8px 8px 8px 0;
  text-align: left;
  vertical-align: top;
}

a {
  color: var(--tint);
}

footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--subtext);
}

/* Etwas Luft oben und unten, damit die Links auch am Handy gut zu treffen sind */
footer a {
  display: inline-block;
  margin-right: 14px;
  padding: 6px 0;
}

.placeholder {
  background: rgba(255, 181, 71, 0.22);
  border-radius: 4px;
  padding: 0 4px;
}

.label {
  margin: 0 0 4px;
}

.flush-top {
  margin-top: 0;
}

.flush-bottom {
  margin-bottom: 0;
}

.note {
  margin-top: 12px;
}

.small {
  font-size: 14px;
}

/* .button setzt display: block und würde das hidden-Attribut sonst überstimmen */
[hidden] {
  display: none !important;
}

/* ---------- Startseite und Einladung ---------- */

:root {
  --marker: #cbccfc;
  --phone: #15151c;
  --shadow: 0 24px 48px rgba(28, 28, 70, 0.18);
  --shadow-small: 0 10px 24px rgba(28, 28, 70, 0.14);
  --phone-ring: #2b2b35;
}

@media (prefers-color-scheme: dark) {
  :root {
    --marker: rgba(91, 95, 239, 0.55);
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    --shadow-small: 0 10px 24px rgba(0, 0, 0, 0.45);
    /* Sonst verschwindet der dunkle Rahmen im dunklen Hintergrund */
    --phone-ring: #4a4a5c;
  }
}

.seite.wide {
  max-width: 1040px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  display: block;
  width: 36px;
  height: 36px;
}

.wordmark {
  display: block;
  width: auto;
  height: 26px;
}

/* Textmarker wie auf Flyer und Store-Bildern */
.marker {
  background-image: linear-gradient(transparent 60%, var(--marker) 60%, var(--marker) 92%, transparent 92%);
  padding: 0 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Installationsweg passend zum Handy: platform.js setzt data-platform am <html>.
   Auf dem Computer stehen beide Wege nebeneinander, dazu ein QR-Code. */
html[data-platform="android"] .for-ios,
html[data-platform="ios"] .for-android,
html[data-platform="android"] .for-desktop,
html[data-platform="ios"] .for-desktop,
html[data-platform="desktop"] .switch,
html:not([data-platform]) .switch {
  display: none;
}

.install {
  display: grid;
  gap: 20px;
}

@media (min-width: 560px) {
  html[data-platform="desktop"] .install,
  html:not([data-platform]) .install {
    grid-template-columns: 1fr 1fr;
  }
}

.install-option {
  display: flex;
  flex-direction: column;
}

.install-option .button:first-child,
.install-option .install-label + .button,
.android-play .button:first-child,
.android-ask .button:first-child {
  margin-top: 0;
}

.install-option .muted {
  margin: 10px 0 0;
}

.install-label {
  margin: 0 0 8px;
  font-weight: 700;
}

.switch {
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--tint);
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.install-qr {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.install-qr img {
  flex: none;
  width: 112px;
  height: 112px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.install-qr p {
  margin: 0;
}

/* Handy-Rahmen um echte Screenshots */
.phone {
  position: relative;
  padding: 10px;
  border-radius: 46px;
  background: var(--phone);
  box-shadow: var(--shadow), inset 0 0 0 2px var(--phone-ring);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 37px;
}

/* Dynamic Island */
.phone::after {
  content: "";
  position: absolute;
  top: calc(10px + 1.2%);
  left: 50%;
  width: 27%;
  aspect-ratio: 126 / 37;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

.phone.small {
  padding: 6px;
  border-radius: 30px;
  box-shadow: var(--shadow-small), inset 0 0 0 2px var(--phone-ring);
}

.phone.small img {
  border-radius: 25px;
}

.phone.small::after {
  top: calc(6px + 1.2%);
}

.push {
  position: absolute;
  top: 31%;
  left: -14%;
  width: 82%;
  padding: 10px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: #1c1c28;
  box-shadow: 0 18px 40px rgba(28, 28, 70, 0.25);
  font-size: 13px;
  line-height: 1.35;
  transform: rotate(-3deg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.push p {
  margin: 0;
  color: inherit;
}

.push .push-app {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b6b7b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.push-app img {
  width: 16px;
  height: 16px;
}

.push-app span {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0;
}

.push .push-title {
  margin-top: 4px;
  font-weight: 700;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(8deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.join-title {
  margin-top: 28px;
}
