/* ==========================================================================
   Axis Games – helles Pastell-Design
   ========================================================================== */

@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url("/fonts/fredoka-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("/fonts/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("/fonts/fredoka-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("/fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/fonts/nunito-latin-800-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;

  --bg: #fffbf5;
  --surface: #ffffff;
  --ink: #3a3556;
  --ink-soft: #66618a;
  --line: #efe8f5;

  --mint: #c9f1e0;      --mint-deep: #7fd1ae;
  --peach: #ffdccb;     --peach-deep: #ffa07f;
  --lavender: #e4dbff;  --lavender-deep: #a996f0;
  --sky: #d0e9ff;       --sky-deep: #7dbdf5;
  --butter: #fff3bf;    --butter-deep: #f5cf54;
  --rose: #ffd3e4;      --rose-deep: #f58db5;

  --danger: #c2415f;
  --danger-bg: #ffe4ea;
  --ok-bg: #d9f6e8;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px -12px rgba(120, 100, 190, .28);
  --shadow-sm: 0 4px 14px -6px rgba(120, 100, 190, .25);

  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--lavender-deep); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------------------------------------------------- */
#site-header { min-height: 72px; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 245, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; letter-spacing: -.01em; }
.brand svg { width: 40px; height: 40px; flex: none; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover svg { transform: rotate(90deg); }
.brand span span { color: var(--lavender-deep); }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 8px 16px; border-radius: 999px; font-weight: 700; color: var(--ink-soft); transition: background .15s, color .15s; }
.nav button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink-soft); text-align: left; cursor: pointer; padding: 8px 16px; border-radius: 999px; }
.nav button:hover { background: var(--lavender); color: var(--ink); }
.nav .nav-extra { display: none; }
.nav a:hover { background: var(--lavender); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--lavender); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; min-width: 120px; justify-content: flex-end; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--lavender); color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; transition: transform .15s; }
.user-chip:hover { transform: translateY(-1px); }
.user-chip__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 800px) {
  .header-inner { gap: 10px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .header-actions { margin-left: auto; min-width: 0; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; margin: 0; padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav button { padding: 12px 16px; }
  .nav .nav-extra { display: block; }
}
@media (max-width: 520px) {
  .hide-sm { display: none !important; }
  .user-chip__name { display: none; }
  .user-chip { padding: 4px; }
}

/* ---------- Buttons --------------------------------------------------- */
.btn {
  --btn-bg: var(--peach-deep); --btn-edge: #e8825f;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: 0; border-radius: 16px;
  font: 800 1rem/1.2 var(--font-body); color: var(--ink);
  background: var(--btn-bg); box-shadow: 0 4px 0 var(--btn-edge);
  cursor: pointer; transition: transform .1s, box-shadow .1s, filter .15s;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 5px 0 var(--btn-edge); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--btn-edge); filter: none; }
.btn-lavender { --btn-bg: var(--lavender); --btn-edge: #c3b5f5; }
.btn-mint { --btn-bg: var(--mint); --btn-edge: #9fdcc2; }
.btn-butter { --btn-bg: var(--butter); --btn-edge: #ecd67c; }
.btn-ghost { --btn-bg: transparent; --btn-edge: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--lavender); box-shadow: none; }
.btn-ghost:active { transform: none; }
.btn-danger { --btn-bg: var(--danger-bg); --btn-edge: #f2b5c3; color: var(--danger); }
.btn-sm { padding: 8px 16px; border-radius: 12px; font-size: .95rem; box-shadow: 0 3px 0 var(--btn-edge); }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; border-radius: 18px; }
.btn-block { width: 100%; }

/* ---------- Karten, Chips --------------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: var(--butter); font: 800 .85rem/1.4 var(--font-body); }
.chip--mint { background: var(--mint); }
.chip--lavender { background: var(--lavender); }
.chip--peach { background: var(--peach); }

/* ---------- Avatare ---------------------------------------------------- */
.avatar {
  --ring: var(--lavender-deep);
  display: inline-block; flex: none; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--ring); background: #fff;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar--sm { width: 36px; height: 36px; border-width: 2.5px; }
.avatar--lg { width: 120px; height: 120px; border-width: 5px; box-shadow: 0 0 0 6px var(--surface), var(--shadow); }
.avatar--xl { width: 96px; height: 96px; border-width: 4px; box-shadow: var(--shadow-sm); }
/* Ringfarben der Figuren - dieselben Werte stehen in public/data/characters.json */
.ch-1 { --ring: #b4190b; } .ch-2 { --ring: #0164b2; } .ch-3 { --ring: #249249; } .ch-4 { --ring: #eec002; }
.ch-5 { --ring: #ec6c1c; } .ch-6 { --ring: #8d45af; } .ch-7 { --ring: #00b2bc; } .ch-8 { --ring: #db2569; }

/* ---------- Hero ------------------------------------------------------- */
.hero { position: relative; overflow-x: clip; padding: 56px 0 72px; }
.blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(8px); opacity: .75; }
.blob--1 { width: 420px; height: 420px; background: var(--lavender); top: -140px; left: -120px; }
.blob--2 { width: 340px; height: 340px; background: var(--peach); bottom: -120px; left: 34%; }
.blob--3 { width: 380px; height: 380px; background: var(--mint); top: -60px; right: -140px; }
.blob--4 { width: 200px; height: 200px; background: var(--rose); bottom: 30px; right: 22%; opacity: .6; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--butter-deep) 62% 92%, transparent 92%); padding: 0 .08em; }
.hero .lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 34ch; margin-bottom: 1.6em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 20px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.hero-note .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mint-deep); box-shadow: 0 0 0 5px var(--mint); }
@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .lead { max-width: none; }
}

/* ---------- Spielbrett (Deko) ------------------------------------------ */
.board-wrap { position: relative; width: min(100%, 470px); margin-inline: auto; padding: 18px; }
.board {
  display: grid; grid-template: repeat(9, minmax(0, 1fr)) / repeat(9, minmax(0, 1fr)); gap: 6px;
  aspect-ratio: 1; padding: 16px;
  background: var(--surface); border-radius: 38px; box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, .7);
  transform: rotate(-3deg); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1);
}
.board-wrap:hover .board { transform: rotate(0deg) scale(1.02); }
.tile { position: relative; border-radius: 12px; }
.t-sky { background: var(--sky); } .t-rose { background: var(--rose); }
.t-mint { background: var(--mint); } .t-butter { background: var(--butter); }
.t-center { background: var(--surface); display: grid; place-items: center; font-size: 1.5rem; box-shadow: inset 0 0 0 3px var(--lavender); }
.base { display: grid; grid-template: minmax(0, 1fr) minmax(0, 1fr) / minmax(0, 1fr) minmax(0, 1fr); place-items: center; gap: 8%; padding: 12%; border-radius: 22px; min-width: 0; min-height: 0; }
.base.b-lavender { background: var(--lavender); } .base.b-peach { background: var(--peach); }
.base.b-mint { background: var(--mint); } .base.b-sky { background: var(--sky); }
.slot { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.pawn {
  position: absolute; inset: 12%; border-radius: 50%; background: var(--pc);
  box-shadow: 0 4px 0 rgba(58, 53, 86, .18), inset 0 -4px 0 rgba(58, 53, 86, .12);
  animation: bob 3.2s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.pawn::after { content: ""; position: absolute; top: 16%; left: 20%; width: 28%; height: 20%; border-radius: 50%; background: rgba(255, 255, 255, .6); transform: rotate(-30deg); }
.tile .pawn { inset: 14%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.die {
  position: absolute; z-index: 2; width: 62px; height: 62px; padding: 10px;
  background: var(--surface); border: 0; border-radius: 16px; cursor: pointer;
  box-shadow: 0 6px 0 #ddd4ee, var(--shadow);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  animation: hover 4.5s ease-in-out infinite;
}
.die:focus-visible { outline-offset: 4px; }
.die i { width: 100%; height: 100%; }
.die i.on { background: var(--dot, var(--ink)); border-radius: 50%; transform: scale(.72); }
.die--a { top: -4px; right: 0; --dot: var(--rose-deep); transform: rotate(14deg); }
.die--b { bottom: 0; left: -6px; --dot: var(--sky-deep); animation-delay: -2s; transform: rotate(-12deg); }
.die.rolling { animation: roll .6s ease-out; }
@keyframes hover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(200deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }
@media (max-width: 420px) { .die { width: 52px; height: 52px; padding: 8px; } }

/* ---------- Sektionen -------------------------------------------------- */
.section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 30px; border-radius: 28px; transition: transform .2s; }
.feature:hover { transform: translateY(-4px) rotate(-.6deg); }
.feature .icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 20px; background: rgba(255, 255, 255, .75); font-size: 2rem; }
.feature p { margin: 0; color: var(--ink-soft); }
.feature.f-lavender { background: var(--lavender); } .feature.f-mint { background: var(--mint); } .feature.f-peach { background: var(--peach); }
.feature { position: relative; }
.feature .chip { position: absolute; top: 22px; right: 22px; background: rgba(255, 255, 255, .75); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px 26px 26px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-sm); counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: -20px; left: 24px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 700 1.3rem var(--font-head); background: var(--butter); box-shadow: 0 4px 0 var(--butter-deep);
}
.step:nth-child(2)::before { background: var(--sky); box-shadow: 0 4px 0 var(--sky-deep); }
.step:nth-child(3)::before { background: var(--rose); box-shadow: 0 4px 0 var(--rose-deep); }
.step p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 34px; } }

.banner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px;
  padding: 36px 40px; border-radius: 32px;
  background: linear-gradient(120deg, var(--sky) 0%, var(--lavender) 55%, var(--rose) 100%);
}
.banner h2 { margin: 0 0 6px; font-size: 1.9rem; }
.banner p { margin: 0; color: var(--ink); opacity: .8; }
.banner .big { font-size: 3.4rem; line-height: 1; }
@media (max-width: 760px) { .banner { grid-template-columns: 1fr; text-align: center; padding: 30px 24px; justify-items: center; } }

/* ---------- Footer ----------------------------------------------------- */
.site-footer { margin-top: 40px; padding: 32px 0 40px; border-top: 1px solid var(--line); background: #fff8ff; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lavender-deep); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Formulare -------------------------------------------------- */
.auth-page { position: relative; overflow: hidden; padding: 56px 0 80px; }
.auth-page .blob--2 { bottom: auto; top: 46%; left: 6%; width: 260px; height: 260px; }
.auth-card { width: min(460px, 100% - 32px); margin-inline: auto; padding: 36px 34px 32px; }
.auth-card h1 { font-size: 2.2rem; margin-bottom: .2em; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: 1.6em; }
.auth-emoji { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 22px; background: var(--butter); font-size: 2rem; transform: rotate(-6deg); }
.auth-foot { margin: 22px 0 0; text-align: center; color: var(--ink-soft); }
.auth-foot a, .link { font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--lavender-deep); text-decoration-thickness: 3px; text-underline-offset: 3px; }

.field { margin-bottom: 18px; }
.field label, .label { display: block; margin-bottom: 6px; font-weight: 800; font-size: .95rem; }
.field .hint { margin: 6px 2px 0; font-size: .88rem; color: var(--ink-soft); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field textarea {
  width: 100%; padding: 13px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm);
  font: 600 1rem var(--font-body); color: var(--ink); background: #fdfbff; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #a9a5c4; font-weight: 400; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lavender-deep); background: #fff; box-shadow: 0 0 0 4px var(--lavender); }
.field.invalid input, .field.invalid textarea { border-color: var(--rose-deep); background: #fff9fb; }
.field-error { margin: 6px 2px 0; font-size: .9rem; font-weight: 700; color: var(--danger); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px !important; }
.pw-toggle { position: absolute; top: 50%; right: 8px; translate: 0 -50%; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 1.15rem; }
.pw-toggle:hover { background: var(--lavender); }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; font-size: .95rem; }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--lavender-deep); }
.check-wrap.invalid .check { color: var(--danger); }
.form-msg { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; }
.form-msg.error { background: var(--danger-bg); color: var(--danger); }
.form-msg.ok { background: var(--ok-bg); color: #1f6b4a; }

/* ---------- Profil ------------------------------------------------------ */
.page { padding: 48px 0 72px; }
.page-title { margin-bottom: 28px; }
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.profile-side { text-align: center; position: sticky; top: 96px; }
.profile-side .avatar { margin: 0 auto 16px; }
.profile-side h2 { margin-bottom: .1em; word-break: break-word; }
.profile-bio { margin: 14px 0 0; color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.stat { padding: 12px 6px; border-radius: 16px; }
.stat b { display: block; font: 700 1.6rem/1.1 var(--font-head); }
.stat span { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.stat:nth-child(1) { background: var(--sky); } .stat:nth-child(2) { background: var(--butter); } .stat:nth-child(3) { background: var(--rose); }
.stack { display: grid; gap: 24px; }
#own-actions { margin-top: 24px; }
.card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.picker button { aspect-ratio: 1; padding: 0; border: 4px solid var(--ring, transparent); border-radius: 50%; background: #fff; cursor: pointer; overflow: hidden; opacity: .75; transition: transform .1s, opacity .15s, box-shadow .15s; }
.picker button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.picker button:hover { transform: scale(1.06); opacity: 1; }
.picker button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--ring); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 44px; height: 44px; border: 4px solid var(--surface); border-radius: 50%; background: var(--av); cursor: pointer; box-shadow: 0 0 0 2px var(--line); transition: transform .1s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--lavender-deep); }
.counter { text-align: right; font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 20px; }
.kv dt { font-weight: 800; }
.kv dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.danger-zone { background: #fff9fb; border: 2px dashed var(--rose); box-shadow: none; }
details summary { cursor: pointer; font-weight: 800; }
details[open] summary { margin-bottom: 16px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } .profile-side { position: static; } }

/* ---------- Lobby ------------------------------------------------------- */
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.seat { display: grid; justify-items: center; gap: 8px; padding: 22px 12px; border-radius: 24px; text-align: center; font-weight: 800; }
.seat .avatar { width: 72px; height: 72px; font-size: 2.2rem; }
.seat.me { background: var(--surface); box-shadow: 0 0 0 3px var(--lavender-deep), var(--shadow-sm); }
.seat.empty { border: 3px dashed var(--line); color: var(--ink-soft); font-weight: 700; }
.seat.empty .avatar { background: #f6f2fb; color: #c5bfdb; font-size: 1.8rem; }
.seat small { display: block; font-weight: 700; color: var(--ink-soft); }
.lobby-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.player-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.player-list a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: #faf7ff; font-weight: 800; transition: background .15s, transform .1s; }
.player-list a:hover { background: var(--lavender); transform: translateY(-1px); }
@media (max-width: 720px) { .seats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Textseiten (Impressum, Datenschutz) ------------------------- */
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose a { font-weight: 800; text-decoration: underline; text-decoration-color: var(--lavender-deep); text-underline-offset: 3px; }
.todo { background: var(--butter); padding: 1px 8px; border-radius: 8px; font-weight: 800; }
.notice { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--butter); font-weight: 700; }

/* ---------- Toast -------------------------------------------------------- */
.toast-area { position: fixed; z-index: 100; left: 50%; bottom: 24px; translate: -50% 0; display: grid; gap: 10px; width: min(420px, 100% - 32px); pointer-events: none; }
.toast { padding: 14px 20px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow); animation: toast-in .3s cubic-bezier(.3, 1.5, .5, 1); }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- 404 / Leerzustände ------------------------------------------ */
.empty-state { padding: 90px 0; text-align: center; }
.empty-state .big { font-size: 5rem; line-height: 1; margin-bottom: 12px; }

.skeleton { display: inline-block; width: 110px; height: 40px; border-radius: 999px; background: linear-gradient(90deg, #f3eefb, #fbf8ff, #f3eefb); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.hero-title { margin-top: .35em; }
.section--tight { padding-top: 24px; }

/* ==========================================================================
   Spiel: Armstedt
   ========================================================================== */
.game-page .container { width: min(1280px, 100% - 32px); }
.game-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.game-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.7rem); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.board-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 10px; font-weight: 700; font-size: .9rem; }
.board-scroll { overflow: auto; max-height: 88vh; border-radius: 34px; box-shadow: var(--shadow); background: #fff; -webkit-overflow-scrolling: touch; }
.board-frame { aspect-ratio: 1; padding: 8px; }
.board-svg { display: block; width: 100%; height: 100%; border-radius: 22px; }
.side-col { display: grid; gap: 16px; position: sticky; top: 92px; }
.side-col .card { padding: 22px; }
.side-col h3 { font-size: 1.15rem; margin-bottom: 12px; }
.side-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0; }
@media (max-width: 980px) { .game-layout { grid-template-columns: 1fr; } .side-col { position: static; } }

.conn-banner { margin: 0 0 16px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--butter); font-weight: 800; text-align: center; }

#status.my-turn { box-shadow: 0 0 0 4px var(--peach-deep), var(--shadow); }
.turn { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.turn .avatar { width: 52px; height: 52px; font-size: 1.7rem; }
.turn b { display: block; font: 600 1.35rem/1.2 var(--font-head); }
.stadtkasse { margin: 14px 0 0; font-weight: 700; color: var(--ink-soft); text-align: center; }

.invite-row { display: flex; gap: 8px; }
.invite-row .input { flex: 1; min-width: 0; padding: 9px 12px; font-size: .9rem; border: 2px solid var(--line); border-radius: 12px; background: #fdfbff; font-family: var(--font-body); color: var(--ink); }

.players { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.player { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 16px; background: #faf7ff; }
.player.turn-now { background: var(--lavender); }
.player.offline { opacity: .55; }
.player-info { flex: 1; min-width: 0; line-height: 1.25; }
.player-info b, .player-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }

.log { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 260px; overflow: auto; font-size: .95rem; }
.log li { padding: 6px 10px; border-radius: 10px; background: #faf7ff; }
.log li:first-child { background: var(--butter); font-weight: 700; }

/* Brett (SVG) */
.fld { fill: rgba(255, 255, 255, .95); stroke: #b3a874; stroke-width: 2.5; }
.fld.haupt { fill: #fff0b0; stroke: #d6b53a; }
.fld.c-start { fill: #c9f1e0; stroke: #7fd1ae; }
.fld.c-blitzer { fill: #ffd0d6; stroke: #f58d9b; }
.fld.c-einkaufszentrum { fill: #cde8ff; stroke: #7dbdf5; }
.fld.c-offen { fill: #f1edf7; stroke: #cbc2df; stroke-dasharray: 6 5; }
.b-num { font: 700 25px var(--font-head); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.b-num--small { font-size: 15px; fill: var(--ink-soft); font-family: var(--font-body); font-weight: 800; }
.corner ~ .b-num--small { text-anchor: start; }
.b-strip { font: 800 14px var(--font-body); fill: #fff; text-anchor: middle; dominant-baseline: central; letter-spacing: .02em; }
.b-corner { font: 800 17px var(--font-body); fill: var(--ink); text-anchor: middle; }
.b-corner--big { font-size: 34px; }
.b-corner--tiny { font-size: 13px; }
.b-corner--soft { fill: var(--ink-soft); font-weight: 600; font-style: italic; }
.b-title { font: 700 76px var(--font-head); fill: var(--lavender-deep); text-anchor: middle; letter-spacing: .04em; }
.b-sub { font: 700 20px var(--font-body); fill: var(--ink-soft); text-anchor: middle; }
.b-roll { font: 800 22px var(--font-body); fill: var(--ink); text-anchor: middle; }
.die-face { fill: #fff; stroke: var(--lavender); stroke-width: 5; }
.die-pip { fill: var(--rose-deep); }
.token { transition: transform .22s ease-in-out; }
.tk-ring { fill: #fff; stroke-width: 5; }
.tk-emoji { font-size: 15px; text-anchor: middle; dominant-baseline: central; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.token.active .tk-ring { animation: token-pulse 1.3s ease-in-out infinite; }
@keyframes token-pulse { 50% { stroke-width: 9; } }

/* ---------- Lobby: Spiel wählen -------------------------------------------- */
.lobby-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: stretch; }
.game-tile { position: relative; overflow: hidden; background: linear-gradient(140deg, #fff 55%, var(--butter) 100%); }
.game-tile__art { position: absolute; top: 14px; right: 22px; font-size: 4.4rem; line-height: 1; opacity: .9; transform: rotate(8deg); }
.game-tile .hero-title { margin-top: .3em; font-size: 2.2rem; }
.resume { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; background: var(--mint); }
.resume p { margin: 0; flex: 1; color: var(--ink); font-weight: 700; }
.join-form { display: flex; gap: 10px; }
.code-input { flex: 1; min-width: 0; padding: 13px 16px; border: 2px solid var(--line); border-radius: var(--radius-sm); font: 800 1.3rem var(--font-head); letter-spacing: .3em; text-transform: uppercase; text-align: center; background: #fdfbff; color: var(--ink); }
.code-input:focus { outline: none; border-color: var(--lavender-deep); box-shadow: 0 0 0 4px var(--lavender); background: #fff; }
@media (max-width: 860px) { .lobby-grid { grid-template-columns: 1fr; } .game-tile__art { font-size: 3.2rem; } }

/* ---------- Figuren-Auswahl in der Runde, Startseite ---------------------- */
.char-pick { margin: 0 0 16px; }
.char-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 6px; }
.char-btn { aspect-ratio: 1; padding: 0; border: 3px solid var(--ring); border-radius: 50%; background: #fff; overflow: hidden; cursor: pointer; opacity: .8; transition: transform .1s, opacity .15s; }
.char-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.char-btn:hover:not([disabled]) { transform: scale(1.1); opacity: 1; }
.char-btn[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring); }
.char-btn[disabled] { opacity: .25; filter: grayscale(1); cursor: not-allowed; }
.char-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 8px; }
.char-row .avatar { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.char-row .avatar:hover { transform: translateY(-6px) rotate(-3deg) scale(1.06); }
.feature .icon img { width: 52px; height: 52px; border-radius: 50%; }

/* ---------- Startseite ohne Konto ---------------------------------------- */
.header-spacer { flex: 1; }
.start-card { margin-top: 8px; max-width: 520px; padding: 24px; }
.start-card .field { margin-bottom: 16px; }
.start-card .btn-lg { margin-top: 4px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.resume-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm); background: var(--mint); font-weight: 700; }
.char-strip--big { gap: 8px; }

/* ---------- Schlanke Startseite + Folgeseiten ---------------------------- */
.hero--start { padding: 72px 0 96px; }
.hero--start .lead { max-width: 30ch; }
.hero-cta--stack { flex-direction: column; align-items: flex-start; }
.hero-cta--stack .btn { min-width: 260px; }
.auth-card--wide { width: min(520px, 100% - 32px); }
.code-input--full { width: 100%; }
.auth-card .identity .field { margin-bottom: 16px; }
.auth-card .char-strip { gap: 8px; }
@media (max-width: 900px) { .hero--start { padding: 40px 0 64px; } .hero-cta--stack .btn { width: 100%; } }

.auth-card .field-error { margin: 2px 2px 14px; }

/* Würfelanzeige in der Statuskarte */
.roll-box { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 10px 14px; border-radius: 18px; background: var(--butter); font-weight: 800; }
.rollface { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); flex: none; width: 58px; height: 58px; padding: 9px; border-radius: 15px; background: #fff; box-shadow: 0 4px 0 #ddd4ee; }
.rollface i { width: 100%; height: 100%; }
.rollface i.on { background: var(--rose-deep); border-radius: 50%; transform: scale(.75); }

.b-strip--plate { font-size: 11.5px; }

/* Straßen kaufen, bauen */
.b-house { font-size: 22px; text-anchor: middle; dominant-baseline: central; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.decision { margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; background: var(--mint); }
.decision b { display: block; font: 600 1.15rem/1.25 var(--font-head); margin-bottom: 4px; }
.decision p { margin: 0 0 12px; font-size: .95rem; color: var(--ink); }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.decision-actions .btn { flex: 1 1 140px; }
.decision--wait { background: var(--butter); }
.decision--wait small { display: block; }
.player-assets { font-size: .8rem; }
