/* Auswahlseite — plain, bold. Same family as Schach and Yukendo. */

:root {
  --paper: #f6f4ee;
  --paper-2: #fffefb;
  --ink: #1b1a18;
  --muted: #74705f;
  --line: #d9d4c5;
  --marker: #ffe24a;
  --marker-ink: #1b1a18;
  --red: #c62f22;
  --red-soft: #fbe3df;
  --green: #1a7f37;
  --radius: 14px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151513;
    --paper-2: #1e1d1a;
    --ink: #f3efe4;
    --muted: #9b9584;
    --line: #3a3832;
    --marker: #f5d530;
    --marker-ink: #151513;
    --red: #ff7a68;
    --red-soft: #46241f;
    --green: #56d364;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

header { margin-bottom: 40px; }

h1 {
  margin: 0;
  font-size: clamp(56px, 12vw, 104px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

header p {
  margin: 14px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 20px;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}

.game img { width: 72px; height: 72px; margin-bottom: 6px; }

.game .name {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.game .text { color: var(--muted); flex: 1; }

.game .go {
  align-self: flex-start;
  margin-top: 6px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
}

a.game:hover, a.game:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
  outline: none;
}

a.game:hover .go, a.game:focus-visible .go {
  background: var(--marker);
  color: var(--marker-ink);
  border-color: var(--marker-ink);
}

a.game:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }

/* Aurora brings its night along: a dark card with a slowly drifting veil
   of aurora light, inside the family's frame */
.game.aurora {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0a0e1c;
  color: #eef2ff;
}
.game.aurora::before {
  content: "";
  position: absolute;
  inset: -40% -20% 40%;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 30% 60%, #5cf2b466, transparent 70%),
    radial-gradient(ellipse 50% 35% at 70% 50%, #a37cff55, transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 40%, #3fd3e644, transparent 70%);
  filter: blur(18px);
  animation: aurora-veil 14s ease-in-out infinite alternate;
}
@keyframes aurora-veil {
  from { transform: translateX(-8%) skewX(-6deg); }
  to { transform: translateX(8%) skewX(6deg); }
}
.game.aurora .text { color: #c9d0ea; }
.game.aurora .go { border-color: #eef2ff; }
a.game.aurora:hover .go, a.game.aurora:focus-visible .go {
  background: linear-gradient(120deg, #5cf2b4, #3fd3e6, #a37cff);
  color: #03110c;
  border-color: transparent;
}

.game.soon {
  justify-content: center;
  background: transparent;
  border: 3px dashed var(--line);
  box-shadow: none;
  color: var(--muted);
}

.game.soon .name { color: var(--muted); }

footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px 32px;
  font-size: 15px;
  color: var(--muted);
}

footer a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
footer a:hover { background: var(--marker); color: var(--marker-ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .game { transition: none; }
  .game.aurora::before { animation: none; }
}

/* Impressum und Datenschutz */

.prose { max-width: 720px; }
.prose h1 { font-size: clamp(44px, 9vw, 72px); margin-bottom: 24px; }
.prose h2 { margin: 36px 0 8px; font-size: 22px; line-height: 1.25; }
.prose p { margin: 0 0 14px; }
.prose a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--marker); color: var(--marker-ink); text-decoration: none; }
.prose code { font-size: .9em; }

.back { margin: 0 0 20px; font-weight: 700; }
.back a { text-decoration: none; }

.muted { color: var(--muted); }

.note {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
}
.note p { margin: 0; }

.error {
  padding: 14px 18px;
  background: var(--red-soft);
  color: var(--red);
  border-radius: var(--radius);
  font-weight: 600;
}

.todo { background: var(--red-soft); color: var(--red); font-weight: 700; padding: 0 .25em; border-radius: 4px; }

footer a[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 700; }

/* Leiste oben: zurück zur Auswahl, Konto */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 0;
  font-weight: 700;
  font-size: 16px;
}
.topbar a { color: inherit; text-decoration: none; padding: 4px 10px; border-radius: 999px; }
.topbar a:hover, .topbar a:focus-visible { background: var(--marker); color: var(--marker-ink); }
.topbar-account a { border: 2px solid var(--ink); }
.topbar-account a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.who::before { content: "● "; color: var(--green); }

main.prose { padding-top: 32px; }
.narrow { max-width: 520px; }

/* Formulare */

.form { display: grid; gap: 14px; margin: 20px 0 24px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input {
  font: inherit;
  font-weight: 400;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink);
}
.form input:focus-visible { outline: 3px solid var(--marker); outline-offset: 1px; }
.hint { font-weight: 400; font-size: 15px; color: var(--muted); }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: 10px 20px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--marker);
  color: var(--marker-ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.wide { width: 100%; }
.btn.small { padding: 6px 14px; font-size: 16px; }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.prose a.btn { text-decoration: none; }
.prose a.btn:hover { background: var(--marker); }

.notice {
  padding: 14px 18px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
}

/* Datenschutz: einzelne gespeicherte Daten */

.store-group { margin-top: 24px; }
.store-group h3 { font-size: 18px; margin: 0 0 10px; }
.datum {
  margin: 0 0 12px;
  padding: 14px 18px;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
.datum h4 { margin: 0 0 4px; font-size: 18px; }
.datum p { margin: 0 0 8px; }
.datum dl { margin: 0; display: grid; gap: 4px; }
.datum dl div { display: grid; grid-template-columns: 7em 1fr; gap: 10px; }
.datum dt { font-weight: 700; color: var(--muted); }
.datum dd { margin: 0; }
@media (max-width: 520px) { .datum dl div { grid-template-columns: 1fr; gap: 0; } }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

/* Schutz vor Bots (peilung.go): das versteckte Feld und die Peilung */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.peilung { margin: 4px 0 0; padding: 14px 16px 12px; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--paper-2); box-shadow: 5px 5px 0 var(--ink); }
.peilung legend { padding: 0 6px; font-weight: 900; letter-spacing: .02em; }
.peilung > .hint { margin: 0 0 10px; }
.peilung-board { position: relative; width: min(100%, 288px); aspect-ratio: 1; margin: 0 auto; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.peilung-board img { display: block; width: 100%; height: 100%; }
.peilung-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.peilung-grid button { border: 0; background: transparent; cursor: pointer; touch-action: manipulation; }
.peilung-grid button:focus-visible { outline: 3px solid var(--marker); outline-offset: -3px; }
.peilung-grid button[aria-pressed="true"] { background: color-mix(in srgb, var(--marker) 45%, transparent); box-shadow: inset 0 0 0 3px var(--marker); }
@media (hover: hover) { .peilung-grid button:hover { background: color-mix(in srgb, white 18%, transparent); } }
.peilung-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin: 10px 0 0; font-size: 15px; }
.linklike { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn.waiting { opacity: .7; cursor: progress; }
.btn.waiting::after { content: " …"; }
