/* =====================================================================
   plattform.css – plattformweites Aussehen.
   Gilt für: Hauptportal, Anmeldung/Registrierung, Adminbereich und als
   Basis der Spiel-Lobbys. Spiel-spezifische Stile kommen je Spiel dazu
   (z. B. spiele/literatte/assets/literatte.css).
   Responsive von Smartphone bis Notebook. Bewusst gut unterstützte CSS-
   Eigenschaften (Grid, custom properties, clamp) für Safari/Firefox/Chrome.
   ===================================================================== */
:root{
  --holz-hell: #a8743f;
  --holz-mittel: #875730;
  --holz-dunkel: #5d3c20;
  --pergament: #f5edd8;
  --papier: #fffaef;
  --tinte: #2a2018;
  --tinte-leise: #6b5d48;
  --linie: rgba(120,90,50,.22);
}
*{ box-sizing:border-box; }
html,body{ margin:0; }

html{ -webkit-text-size-adjust:100%; }   /* iOS: kein Auto-Zoom der Schrift */

body{
  min-height:100vh;
  font-family:"Hanken Grotesk", system-ui, sans-serif;
  color:var(--tinte);
  background: radial-gradient(120% 80% at 50% 12%, #336a4f 0%, #1f4232 52%, #122418 100%);
  background-attachment: fixed;
  padding: clamp(14px, 4vw, 44px) clamp(12px, 4vw, 24px);
  position:relative;
}
body::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0; opacity:.05;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap{ position:relative; z-index:1; max-width: 880px; margin:0 auto; }
.wrap-breit{ max-width: 1040px; }

/* ----- Kopf ----- */
.kopf{ text-align:center; margin-bottom: clamp(18px,4vw,30px); }
.kopf h1{
  font-family:"Fraunces", serif; font-weight:600;
  font-size: clamp(1.9rem, 6vw, 3rem); margin:0; color:#f0e2b4;
  letter-spacing:-.01em; text-shadow:0 2px 0 rgba(0,0,0,.25);
}
.sub{ margin:.4rem 0 0; color:#bcd6c4; font-size: clamp(.88rem,2.5vw,.98rem); letter-spacing:.02em; }

/* ----- Karten ----- */
.karte{
  background:var(--pergament); color:var(--tinte);
  border-radius:16px; padding: clamp(18px, 4vw, 30px);
  box-shadow: 0 22px 48px -22px rgba(0,0,0,.65), inset 0 0 0 1px rgba(120,90,50,.16);
}
.karte-schmal{ max-width: 460px; margin: 0 auto; }
.karte-kopf{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }

h2{ font-family:"Fraunces", serif; font-weight:600; font-size:1.4rem; margin:0 0 .5em; color:var(--holz-dunkel); }
h3{ font-family:"Fraunces", serif; font-weight:600; font-size:1.05rem; margin:1.5em 0 .6em; color:var(--tinte-leise);
    text-transform:uppercase; letter-spacing:.08em; }
p{ line-height:1.6; margin:.6em 0; }
.leer{ color:var(--tinte-leise); font-style:italic; }

/* ----- Topbar (angemeldet als …) ----- */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:10px 14px; flex-wrap:wrap;
  background:rgba(245,237,216,.92); color:var(--tinte);
  border-radius:12px; padding:10px 16px; margin-bottom:18px; font-size:.95rem;
  box-shadow: inset 0 0 0 1px rgba(120,90,50,.18);
}
.leiselink{ color:var(--holz-mittel); text-decoration:none; font-weight:600; font-size:.9rem; }
.leiselink:hover{ text-decoration:underline; }

/* ----- Formulare ----- */
label{ display:block; font-weight:600; font-size:.92rem; margin:.9em 0 .3em; }
.opt{ font-weight:400; color:var(--tinte-leise); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select{
  width:100%; font-family:inherit; font-size:16px; /* 16px: verhindert iOS-Zoom beim Fokus */ color:var(--tinte);
  background:var(--papier); border:1px solid rgba(120,90,50,.35); border-radius:9px;
  padding:10px 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus{ outline:none; border-color:var(--holz-mittel); box-shadow:0 0 0 3px rgba(135,87,48,.18); }
.formgitter{ display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }
.formgitter.zwei, details .formgitter{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px){ .formgitter{ grid-template-columns: 1fr 1fr; } }

.erweitert{ margin-top:1em; border-top:1px solid var(--linie); padding-top:.6em; }
.erweitert summary{ cursor:pointer; font-weight:600; color:var(--tinte-leise); font-size:.92rem; }
.erweitert[open] summary{ margin-bottom:.4em; }
.hinweis-klein{ font-size:.85rem; color:var(--tinte-leise); margin:1em 0 .4em; line-height:1.45; }

/* ----- Buttons ----- */
.btn{ display:inline-block; font-family:inherit; font-weight:600; text-decoration:none; text-align:center;
  cursor:pointer; border:none; border-radius:9px; transition: transform .08s, filter .15s, background .15s; }
.btn:active{ transform: translateY(1px); }
.btn-haupt{
  padding:12px 18px; font-size:1rem; color:#fff6e8;
  background: linear-gradient(180deg, var(--holz-hell), var(--holz-mittel));
  box-shadow: 0 6px 14px -6px rgba(93,60,32,.8), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-haupt:hover{ filter:brightness(1.06); }
.btn-neben{
  padding:9px 16px; font-size:.92rem; color:var(--holz-dunkel); background:transparent;
  box-shadow: inset 0 0 0 1.5px rgba(135,87,48,.5);
}
.btn-neben:hover{ background:rgba(135,87,48,.08); }
.btn-block{ width:100%; text-align:center; margin-top:1.2em; }

/* ----- Fehlermeldung ----- */
.fehler{
  background:rgba(200,60,60,.12); border-left:4px solid #c8453a; color:#7a261f;
  padding:11px 16px; border-radius:0 10px 10px 0; margin-bottom:16px; font-size:.95rem;
}
/* ----- Erfolgsmeldung ----- */
.erfolg{
  background:rgba(74,128,85,.14); border-left:4px solid #4a8055; color:#2f5a39;
  padding:11px 16px; border-radius:0 10px 10px 0; margin-bottom:16px; font-size:.95rem;
}

/* ----- Konto: Checkbox-Zeile + Freundeslisten ----- */
.check-zeile{ display:flex; align-items:flex-start; gap:10px; font-weight:400; margin:.9em 0 .3em; cursor:pointer; }
.check-zeile input[type="checkbox"]{ width:18px; height:18px; margin-top:2px; flex:0 0 auto; accent-color:var(--holz-mittel); cursor:pointer; }
.check-zeile input:disabled{ cursor:default; }
.konto-liste{ list-style:none; margin:.4em 0 .2em; padding:0; display:flex; flex-direction:column; gap:8px; }
.konto-zeile{
  display:flex; align-items:center; justify-content:space-between; gap:10px 14px; flex-wrap:wrap;
  background:var(--papier); border-radius:10px; padding:9px 14px;
  box-shadow:inset 0 0 0 1px var(--linie);
}
.konto-zeile .name{ font-weight:600; }
.konto-zeile .aktionen{ display:flex; gap:8px; }
.konto-zeile .aktionen form{ margin:0; }
.konto-add{ display:flex; gap:10px 14px; flex-wrap:wrap; align-items:center; margin-top:.6em; }
.konto-add input[type="text"]{ flex:1 1 220px; width:auto; }
.konto-add .btn{ flex:0 0 auto; }

/* ----- Badges (Plattform + Spiele) ----- */
.badge{ display:inline-block; font-size:.78rem; font-weight:600; padding:3px 10px; border-radius:999px;
  background:rgba(120,90,50,.14); color:var(--tinte-leise); }
.badge-warten{ background:rgba(168,116,63,.18); color:var(--holz-dunkel); }
.badge-bereit{ background:rgba(74,128,85,.18); color:#2f5a39; }
.badge-mensch{ background:rgba(135,87,48,.16); color:var(--holz-dunkel); }
.badge-cpu{ background:rgba(47,125,154,.16); color:#22647e; }

/* =====================================================================
   PORTAL – Hauptseite mit Spiele-Kacheln (responsiv)
   ===================================================================== */
.portal-gitter{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(14px, 3vw, 22px);
}
.spiel-kachel{
  display:flex; flex-direction:column; text-decoration:none; color:var(--tinte);
  background:var(--pergament); border-radius:16px; padding: clamp(18px,3vw,24px);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.6), inset 0 0 0 1px rgba(120,90,50,.16);
  transition: transform .12s ease, box-shadow .15s ease;
}
.spiel-kachel:hover{ transform: translateY(-3px); box-shadow: 0 26px 50px -22px rgba(0,0,0,.7), inset 0 0 0 1px rgba(120,90,50,.22); }
.spiel-kachel h2{ margin:.1em 0 .35em; }
.spiel-kachel p{ flex:1; margin:0 0 16px; font-size:.92rem; color:var(--tinte-leise); }
.spiel-kachel .spielen{ align-self:flex-start; }
