/* 0.36.0 „Miteinander“: Gruß-Karte von unten, Steckbrief, Zimmertafel, Stempelbuch, Besuchsband (Welt) und Stempel-Baukasten (Welt und „Ich“).
   Wird überall geladen (erw_style). Große Knöpfe ≥ 54 px, Schrift in Bedienelementen ≥ 15 px. Keine Inline-Styles (CSP). */

/* Zähler „👥 N hier“ im Kopf der Welt */
.welt-chip.mit-zahl { cursor: default; color: #1e1b4b; }
.welt-chip.mit-zahl[hidden] { display: none; }

/* Hinweiszeile oben (erster Hinweis, „Kollegial“, Gruß angekommen) */
.mit-info { position: absolute; left: 8px; right: 8px; top: 100px; z-index: 5; display: grid; gap: 3px; padding: 11px 14px; border-radius: 14px; background: #fff; color: #1e1b4b;
  box-shadow: 0 8px 24px rgba(30,27,75,.28); border-left: 5px solid #4f46e5; font-size: 15px; line-height: 1.35; cursor: pointer; }
.mit-info[hidden] { display: none; }
.mit-info.gruen { background: #ecfdf5; border-left-color: #059669; color: #065f46; }
.mit-info-text { font-weight: 800; }
.mit-info small { font-size: 15px; color: #4b5563; }
.mit-info.gruen small { color: #047857; }

/* Besuchsband (statt Ziel-Leiste) */
.mit-band { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 16px;
  background: #4f46e5; color: #fff; box-shadow: 0 6px 18px rgba(30,27,75,.3); }
.mit-band[hidden] { display: none; }
.mit-band-text { margin: 0; flex: 1 1 220px; display: grid; gap: 2px; font-size: 15px; line-height: 1.3; min-width: 0; }
.mit-band-text b { overflow-wrap: anywhere; }
.mit-band-zurueck { min-height: 54px; padding: 8px 16px; border: 0; border-radius: 13px; background: #fff; color: #3730a3; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #c7d2fe; }
.welt.mit-besuch .welt-ziel, .welt.mit-besuch .welt-handy-knopf { display: none; }
.welt.mit-besuch .welt-kopf { top: 96px; }
.welt.mit-besuch .welt-menue { top: 132px; }
.welt.mit-besuch .mit-info { top: 136px; }

/* Karte von unten */
.mit-karte { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; max-height: 68%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  box-sizing: border-box; padding: 4px 14px 16px; background: #fff; color: #111827; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(30,27,75,.32);
  font-size: 16px; line-height: 1.4; -webkit-user-select: text; user-select: text; animation: mit-hoch .22s ease-out; }
.mit-karte[hidden] { display: none; }
@keyframes mit-hoch { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.mit-griff { width: 48px; height: 5px; border-radius: 3px; background: #d1d5db; margin: 6px auto 8px; }
.welt.mit-karte-offen .welt-pad, .welt.mit-karte-offen .welt-a, .welt.mit-karte-offen .welt-handy-knopf, .welt.mit-karte-offen .welt-box, .welt.mit-karte-offen .welt-einr,
.welt.mit-karte-offen .welt-ziel, .welt.mit-karte-offen .welt-kopf, .welt.mit-karte-offen .welt-menue, .welt.mit-karte-offen .mit-band { display: none; }
.mit-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.mit-figur { flex: none; width: 84px; height: 180px; object-fit: contain; background: #eef2ff; border-radius: 16px; padding: 4px 6px; box-sizing: border-box; }   /* große Figur zum Angucken */
@media (max-height: 640px) { .mit-figur { width: 64px; height: 138px; } }
.mit-figur.leer { display: grid; place-items: center; font-size: 34px; }
.mit-kopf.klein .mit-figur { width: 44px; height: 96px; }
.mit-wer { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mit-wer b { font-size: 19px; line-height: 1.2; color: #1e1b4b; overflow-wrap: anywhere; }
.mit-wer span { font-size: 15px; color: #4b5563; overflow-wrap: anywhere; }
.mit-stempel { flex: none; width: 58px; height: 58px; }
.mit-zu { flex: none; align-self: flex-start; width: 54px; height: 54px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; color: #4b5563; font: inherit; font-size: 20px; font-weight: 800; cursor: pointer; }
.mit-gruss-haupt { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-radius: 16px;
  background: #4f46e5; color: #fff; font: inherit; font-size: 20px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #3730a3; }
.mit-gruss-haupt small { font-size: 15px; font-weight: 600; opacity: .9; }
.mit-sym { font-size: 1.15em; }
.mit-gruesse { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.mit-gruss { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 6px 10px; border: 1px solid #e0e7ff; border-radius: 14px; background: #fff; color: #1e1b4b;
  font: inherit; font-size: 15px; line-height: 1.2; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 2px 0 #e0e7ff; }
.mit-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: 8px; }
.mit-kachel { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 6px 4px; border: 0; border-radius: 14px; background: #f3f4f6; color: #1f2937;
  font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.mit-kachel span { font-size: 20px; line-height: 1; }
.mit-schon { margin: 0; padding: 12px 14px; border-radius: 14px; background: #ecfdf5; color: #047857; font-weight: 800; }
.mit-auch { margin: 10px 0 0; font-size: 15px; color: #4b5563; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.mit-link { min-height: 54px; padding: 4px 2px; border: 0; background: transparent; color: #4338ca; font: inherit; font-size: 15px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.mit-link.warn { color: #b91c1c; }
.mit-gross { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; margin-top: 8px; padding: 10px 14px; border: 1px solid #e0e7ff; border-radius: 14px;
  background: #fff; color: #1e1b4b; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.mit-gross.primaer { background: #4f46e5; color: #fff; border-color: #4f46e5; box-shadow: 0 4px 0 #3730a3; }
.mit-gross.leise { border-color: transparent; color: #4b5563; }
.mit-gross:disabled, .mit-gruss:disabled, .mit-ansehen:disabled { opacity: .55; cursor: default; }
.mit-frage-titel { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; font-size: 18px; color: #1e1b4b; }
.mit-frage p { margin: 6px 0; }
.mit-klein { font-size: 15px; color: #4b5563; margin: 8px 0 0; }
.mit-h3 { margin: 14px 0 6px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.mit-leer { color: #6b7280; }
.mit-gruende { display: grid; gap: 0; }

/* Steckbrief */
.mit-steckbrief { display: flex; gap: 14px; align-items: flex-start; }
.mit-sb-figur { flex: none; width: 116px; background: #eef2ff; border-radius: 16px; padding: 6px; }
.mit-sb-figur svg { display: block; width: 100%; height: auto; }
.mit-sb-text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.mit-sb-titel { margin: 0; display: grid; gap: 2px; } .mit-sb-titel b { font-size: 20px; color: #1e1b4b; overflow-wrap: anywhere; } .mit-sb-titel span { font-size: 15px; color: #4b5563; }
.mit-sb-zeile { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.mit-sb-wappen svg { width: 44px; height: 44px; display: block; }
.mit-orden { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mit-orden li { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: #fffbeb; text-align: center; font-size: 15px; font-weight: 700; color: #92400e; }
.mit-orden svg { width: 40px; height: 40px; }
.mit-sb-knoepfe { margin-top: 6px; }

/* Zimmertafel */
.mit-suche { display: block; margin: 8px 0; }
.mit-suche input { width: 100%; box-sizing: border-box; min-height: 54px; padding: 10px 14px; border: 2px solid #c7d2fe; border-radius: 14px; font: inherit; font-size: 17px; color: #111827; background: #fff; }
.mit-suche input:focus { outline: 3px solid #a5b4fc; outline-offset: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mit-tafel-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.mit-tafel-liste li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.mit-zimmer { flex: none; min-width: 44px; font-weight: 900; color: #4f46e5; font-size: 16px; }
.mit-tafel-wer { flex: 1; min-width: 0; display: grid; } .mit-tafel-wer b { overflow-wrap: anywhere; } .mit-tafel-wer small { font-size: 15px; color: #6b7280; }
.mit-ansehen { flex: none; min-height: 54px; padding: 6px 12px; border: 1px solid #c7d2fe; border-radius: 13px; background: #fff; color: #3730a3; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.mit-blaettern { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; font-size: 15px; color: #4b5563; }
.mit-blaettern .mit-gross { width: 64px; margin: 0; font-size: 22px; }

/* Stempelbuch */
.mit-buch { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.mit-eintrag { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: #fffdf7; border: 1px solid #f1e7cf; }
.mit-eintrag-stempel { flex: none; width: 52px; height: 52px; }
.mit-eintrag-inhalt { flex: 1; min-width: 0; }
.mit-eintrag-kopf { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.mit-eintrag-kopf .mit-link { padding: 0 2px; text-align: left; }
.mit-eintrag-wer { flex: none; display: grid; place-items: center; min-width: 54px; min-height: 54px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.mit-eintrag-kopf small { font-size: 15px; color: #6b7280; }
.mit-eintrag-text { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.mit-eintrag-k { flex: none; display: grid; gap: 6px; }
.mit-mini { width: 54px; height: 54px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; color: #4b5563; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.mit-schreiben { display: grid; grid-template-columns: 58px 1fr; gap: 8px 12px; align-items: start; margin: 6px 0 4px; padding: 12px; border-radius: 16px; background: #eef2ff; }
.mit-schreiben > :not(.mit-stempel) { grid-column: 2; }
.mit-schreiben .mit-stempel { grid-row: 1 / span 2; }
.mit-schreiben .mit-gross, .mit-schreiben .mit-klein { grid-column: 1 / -1; }
.mit-label { font-weight: 800; color: #1e1b4b; }
.mit-text { width: 100%; box-sizing: border-box; min-height: 84px; padding: 10px 12px; border: 2px solid #c7d2fe; border-radius: 12px; font: inherit; font-size: 17px; resize: vertical; background: #fff; color: #111827; }
.mit-zaehler { font-size: 15px; color: #4b5563; } .mit-zaehler.zu-viel { color: #b91c1c; font-weight: 800; }
.mit-fehler { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 15px; font-weight: 700; }
.mit-fehler[hidden] { display: none; }
.mit-grund { padding: 10px 12px; border-radius: 12px; background: #f3f4f6; color: #374151; }
.mit-erst { padding: 10px 12px; border-radius: 16px; background: #eef2ff; }
.mit-erst p { margin: 0 0 8px; }

@media (min-width: 720px) {
  .mit-karte { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100% - 16px)); border-radius: 22px 22px 0 0; animation: none; }
  .mit-info { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100% - 16px)); }
  .mit-band { left: 50%; right: auto; transform: translateX(-50%); width: min(640px, calc(100% - 16px)); }
}
@media (prefers-reduced-motion: reduce) { .mit-karte { animation: none; } }
body[data-ruhig="1"] .mit-karte { animation: none; }

/* Stempel-Baukasten (Welt und „Ich“) */
.sbk { display: grid; gap: 12px; }
.sbk-vorschau { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #fffdf7; border: 1px dashed #e5d9bd; }
.sbk-bild { width: 120px; height: 120px; flex: none; }
.sbk-hinweis { font-size: 15px; color: #6b7280; }
.sbk-wahl { display: grid; gap: 10px; }
.sbk-gruppe { border: 0; margin: 0; padding: 0; min-width: 0; }
.sbk-gruppe legend { font-weight: 800; font-size: 16px; margin-bottom: 6px; padding: 0; }
.sbk-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sbk-kachel { display: flex; align-items: center; gap: 6px; min-height: 54px; padding: 6px 10px; border: 2px solid #e5e7eb; border-radius: 13px; background: #fff; color: #1f2937;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: left; }
.sbk-kachel[aria-pressed="true"] { border-color: #4f46e5; background: #eef2ff; color: #3730a3; box-shadow: 0 0 0 2px #c7d2fe; }
.sbk-farbfeld { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.sbk-sym { flex: none; width: 24px; text-align: center; font-size: 18px; }
.sbk-form-rund, .sbk-form-eckig, .sbk-form-siegel, .sbk-form-raute, .sbk-form-oval { flex: none; width: 20px; height: 20px; border: 3px solid currentColor; box-sizing: border-box; }
.sbk-form-rund { border-radius: 50%; } .sbk-form-eckig { border-radius: 3px; } .sbk-form-siegel { border-radius: 50%; border-style: dotted; }
.sbk-form-raute { transform: rotate(45deg) scale(.85); } .sbk-form-oval { width: 24px; height: 16px; border-radius: 50%; }
.sbk-schrift { font-size: 16px; }
.sbk-zaehler { font-size: 15px; color: #6b7280; font-weight: 400; }
.sbk-text { width: 100%; box-sizing: border-box; min-height: 54px; padding: 10px 12px; border: 2px solid #c7d2fe; border-radius: 12px; font: inherit; font-size: 17px; background: #fff; color: #111827; }
.sbk-fehler { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 15px; font-weight: 700; }
.sbk-fehler[hidden] { display: none; }
.sbk-speichern { min-height: 56px; font-size: 17px; }
:root[data-theme="dark"] .sbk-kachel, :root[data-theme="dark"] .sbk-text { background: var(--flaeche); color: var(--text); border-color: var(--linie2); }
:root[data-theme="dark"] .sbk-kachel[aria-pressed="true"] { background: var(--akzent-hell); color: var(--akzent-text); border-color: var(--akzent); }
:root[data-theme="dark"] .sbk-vorschau { background: var(--flaeche2); border-color: var(--linie2); }

/* „Ich“: vier Reiter (Ich, Fähigkeiten, Talente, Miteinander) – am Handy 2 × 2, sonst nebeneinander */
.ich-reiter:has(> a:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .ich-reiter:has(> a:nth-child(4)) { grid-template-columns: repeat(4, 1fr); } }
