/* Nomopoly – Startseite und Lobby im Stil der Spielansicht (Umbau Etappe 5).
   Nutzt die Variablen aus nomopoly.css (--n-* Oberfläche, --b-* Brett) und fenster.css (--f-*), Kacheln (.kachel) und Knöpfe (.kb).
   Alles hängt an body[data-view='home'] bzw. body[data-view='lobby'], damit nichts in die Spielansicht ausstrahlt. */

/* ---------- Seite ---------- */
:is(body[data-view='home'], body[data-view='lobby']) {
  --text: var(--jost); --dick: JostDick, var(--jost); --eng: var(--jost);
  --st-linie: rgba(23, 34, 61, .09); --st-fokus: #17223d; --st-ring: inset 0 0 0 0 transparent;
  font-family: var(--jost); color: var(--n-ink); background: none;
}
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) {
  --st-linie: rgba(170, 195, 255, .16); --st-fokus: #eaf0ff; --st-ring: inset 0 0 0 1px rgba(170, 195, 255, .2);
}
/* Hintergrund als feste Ebene (wie im Spiel – ein „fixed“-Hintergrund ruckelt am iPhone) */
:is(body[data-view='home'], body[data-view='lobby'])::before { content: ''; position: fixed; inset: 0; background: var(--n-seite); z-index: -1; pointer-events: none; }
:is(body[data-view='home'], body[data-view='lobby']) :focus-visible { outline: 2px solid var(--st-fokus); outline-offset: 2px; box-shadow: none; }
:is(body[data-view='home'], body[data-view='lobby']) h2 { font-family: var(--jost); }

/* Hell/Dunkel-Knopf */
:is(body[data-view='home'], body[data-view='lobby']) button.st-thema { width: 40px; height: 40px; }
:is(body[data-view='home'], body[data-view='lobby']) button.st-thema .ik { width: 18px; height: 18px; }

/* Eingabefelder (mind. 16 px, damit iOS nicht zoomt) */
:is(body[data-view='home'], body[data-view='lobby']) .st-eingabe { flex: 1; min-width: 0; width: 100%; height: 48px; background: var(--n-feld); color: var(--n-ink); border: 0; border-radius: 11px;
  padding: 0 14px; font: 500 16px var(--jost); box-shadow: var(--st-ring); transition: box-shadow .15s; }
:is(body[data-view='home'], body[data-view='lobby']) .st-eingabe::placeholder { color: var(--n-ink2); opacity: .85; }
:is(body[data-view='home'], body[data-view='lobby']) .st-eingabe:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--n-ink); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .st-eingabe:focus { box-shadow: inset 0 0 0 1.5px rgba(214, 226, 255, .85), 0 0 12px -4px rgba(150, 185, 255, .6); }
.st-zeile { display: flex; gap: 10px; margin-top: auto; }
.st-text { font-size: 14.5px; line-height: 1.45; color: var(--n-ink2); margin: 0 0 16px; }
:is(body[data-view='home'], body[data-view='lobby']) .kb.st-gross { min-height: 48px; font-size: 16px; padding: 11px 20px; border-radius: 11px; flex: none; }

/* Kacheln */
:is(body[data-view='home'], body[data-view='lobby']) .kachel { border-radius: 16px; }
:is(body[data-view='home'], body[data-view='lobby']) .kachel > h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .kachel > h2 { font-weight: 600; }

/* ---------- Startseite ---------- */
.st { max-width: 1040px; min-height: 100dvh; margin: 0 auto; padding: clamp(36px, 7vh, 76px) 24px 36px; display: flex; flex-direction: column; }
.st-oben { position: absolute; top: 18px; right: 20px; z-index: 2; }
.st-oben button.st-thema { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.st-oben button.st-thema:hover { filter: none; background: rgba(255, 255, 255, .2); }
.st-kopf { display: grid; justify-items: center; text-align: center; animation: st-rein .5s cubic-bezier(.2, .8, .2, 1) both; }

/* Logo: wie in der Brettmitte – roter Kasten, dunkler Rand, harter Schatten unter der Schrift */
.st-logo { margin: 0; font: 800 clamp(44px, 8vw, 88px)/1 var(--jost); background: #d63a30; border: .08em solid var(--b-logorand); border-radius: .13em; padding: .14em .42em .09em;
  box-shadow: 0 .14em .4em -.14em rgba(214, 58, 48, .55), 0 .3em .5em -.25em rgba(0, 0, 0, .45); }
.st-logo-name { display: block; color: #fff; letter-spacing: .05em; margin-right: -.05em; text-transform: uppercase; text-shadow: .066em .066em 0 var(--b-logorand); }
html[data-thema='dunkel'] .st-logo { box-shadow: 0 0 .45em rgba(214, 58, 48, .45), 0 .1em 0 rgba(0, 0, 0, .4); }
.st-unter { margin: 20px 0 0; padding-left: .32em; font-weight: 600; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
html[data-thema='dunkel'] .st-unter { color: #a9b6d6; text-shadow: 0 0 8px rgba(150, 185, 255, .45); }

/* Blickfang: ein Stück Brettkante (je Bundesland die teuerste Straße) */
.st-reihe { --tw: 80px; display: flex; gap: 2px; padding: 2px; margin: clamp(28px, 5vh, 46px) auto 0; background: var(--b-line);
  box-shadow: 0 0 0 1px rgba(59, 77, 114, .3), 0 24px 40px -22px rgba(0, 0, 0, .7); }
html[data-thema='dunkel'] .st-reihe { box-shadow: 0 0 0 1px var(--glow), 0 0 22px rgba(110, 150, 255, .16), 0 24px 40px -18px rgba(0, 0, 0, .9); }
.st-feld { width: var(--tw); height: calc(var(--tw) * 1.58); background: var(--b-tile); box-shadow: inset 0 0 0 2px var(--b-rand); color: var(--b-ink);
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.st-bar { display: block; align-self: stretch; height: calc(var(--tw) * .33); background: var(--farbe); border-bottom: 2px solid var(--b-line); flex: none; }
.st-fname { margin-top: calc(var(--tw) * .12); padding: 0 4px; max-width: 100%; font-weight: 700; font-size: calc(var(--tw) * .132); line-height: 1.1; letter-spacing: .03em; text-transform: uppercase; hyphens: manual; overflow-wrap: anywhere; }
.st-wappen { width: calc(var(--tw) * .27); height: calc(var(--tw) * .27); object-fit: contain; margin-top: calc(var(--tw) * .09); pointer-events: none; }
.st-preis { margin-top: auto; margin-bottom: calc(var(--tw) * .12); font-weight: 600; font-size: calc(var(--tw) * .14); line-height: 1; }
html[data-thema='dunkel'] :is(.st-fname, .st-preis) { text-shadow: 0 0 calc(var(--tw) * .07) var(--glow), 0 0 calc(var(--tw) * .16) var(--glow2); }
html[data-thema='dunkel'] .st-bar { filter: saturate(1.15) brightness(1.05); box-shadow: 0 0 12px -3px var(--farbe); }

/* Zwei Kacheln */
.st-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: 100%; max-width: 820px; margin: clamp(30px, 5.5vh, 52px) auto 0; align-items: stretch;
  animation: st-rein .5s .08s cubic-bezier(.2, .8, .2, 1) both; }
.st-kacheln:has(.st-regeln[open]) { align-items: start; }
.st-kachel { display: flex; flex-direction: column; padding: 22px; }
body[data-view='home'] .kachel > h2 { font-size: 19px; margin-bottom: 6px; }
#raum-erstellen { width: 100%; margin-top: auto; }
.st-regeln { margin: 0 0 18px; border-radius: 12px; background: var(--n-feld); box-shadow: var(--st-ring); }
.st-regeln > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; font-weight: 700; font-size: 14.5px; cursor: pointer; border-radius: 12px; }
.st-regeln > summary::-webkit-details-marker { display: none; }
.st-regeln > summary .ik { display: inline-grid; width: 18px; height: 18px; color: var(--n-ink2); transition: transform .2s; }
.st-regeln[open] > summary .ik { transform: rotate(180deg); }
.st-regeln .regeln { padding: 0 14px 6px; }
.st-code { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.st-code::placeholder { letter-spacing: .02em; text-transform: none; font-weight: 500; }
.st-fuss { text-align: center; margin: 30px 0 0; font-size: 13px; color: rgba(255, 255, 255, .62); }
html[data-thema='dunkel'] .st-fuss { color: #7d89a8; }
.kb.st-discord { width: 100%; margin-top: 12px; text-decoration: none; }
.st-konto { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; color: var(--n-ink2); flex-wrap: wrap; }
.st-konto-bild { width: 28px; height: 28px; border-radius: 50%; }
.st-link { background: none; border: 0; padding: 6px 0; color: var(--n-ink); font: 600 13.5px var(--jost); text-decoration: underline; text-underline-offset: 3px; }
@keyframes st-rein { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Lobby ---------- */
.lo { max-width: 1280px; margin: 0 auto; padding: 16px 16px 32px; }
.lo-kopf { display: flex; align-items: center; gap: 18px; padding: 12px 14px; }
.lo-logo { flex: none; font-size: 18px; }
.lo-raum { display: grid; gap: 1px; padding-left: 18px; border-left: 1px solid var(--st-linie); flex: none; }
.lo-label { font-size: 12.5px; font-weight: 500; color: var(--n-ink2); line-height: 1.25; }
.lo-code { font: 800 22px/1.1 var(--jost); letter-spacing: .14em; }
.lo-link { flex: 1; min-width: 0; display: grid; gap: 4px; padding-left: 18px; border-left: 1px solid var(--st-linie); }
.lo-linkzeile { display: flex; gap: 8px; align-items: center; min-width: 0; }
.lo-linkfeld { flex: 1; min-width: 0; height: 38px; background: var(--n-feld); color: var(--n-ink); border: 0; border-radius: 9px; padding: 0 11px; font: 500 16px var(--jost); box-shadow: var(--st-ring); text-overflow: ellipsis; }
.lo-linkfeld:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--n-ink2); }
.lo-kopf .kb.klein { min-height: 38px; flex: none; }

.lo-raster { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.lo-spalte { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lo-kachel { padding: 16px 16px 18px; }

/* Spieler: sechs Plätze, oben ein Farbbalken wie auf den Feldern */
.lo-plaetze { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lo-platz { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px 10px; border-radius: 11px; overflow: hidden;
  background: var(--n-feld); box-shadow: var(--st-ring); }
.lo-bar { align-self: stretch; height: 7px; margin: 0 -6px; background: var(--farbe); flex: none; }
.lo-platz.ich { box-shadow: inset 0 0 0 2px var(--n-ink); }
html[data-thema='dunkel'] .lo-platz.ich { background: rgba(150, 185, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(200, 215, 255, .8), 0 0 14px -4px rgba(150, 185, 255, .6); }
html[data-thema='dunkel'] .lo-bar { box-shadow: 0 0 10px var(--farbe); }
.lo-figur { width: 100%; height: 104px; padding-top: 10px; display: flex; align-items: flex-end; justify-content: center; }
.lo-figur > * { width: 46px; flex: none; }
.lo-name { display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 100%; margin-top: 8px; font-weight: 700; font-size: 14px; line-height: 1.2; }
.lo-nametext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lo-krone .ik { display: block; width: 15px; height: 15px; color: #c08a16; }
html[data-thema='dunkel'] .lo-krone .ik { color: #ffd45e; filter: drop-shadow(0 0 4px rgba(255, 212, 94, .55)); }
html[data-thema='dunkel'] .lo-name { text-shadow: 0 0 6px rgba(150, 185, 255, .35); }
.lo-status { min-height: 16px; font-size: 11.5px; font-weight: 600; color: var(--n-ink2); line-height: 1.4; }
.lo-platz.weg .lo-figur { opacity: .4; filter: grayscale(1); }
.lo-platz.weg .lo-status { color: var(--n-rotschrift); }
.lo-weg { position: absolute; top: 9px; right: 3px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--n-ink2); display: grid; place-items: center; padding: 0; transition: background .15s, color .15s; }
.lo-weg .ik { display: block; width: 15px; height: 15px; }
.lo-weg:hover { background: rgba(23, 34, 61, .08); color: var(--n-rotschrift); }
html[data-thema='dunkel'] .lo-weg:hover { background: rgba(255, 255, 255, .08); }
.lo-platz.frei { background: none; box-shadow: inset 0 0 0 1.5px var(--st-linie); padding-top: 7px; }
html[data-thema='dunkel'] .lo-platz.frei { box-shadow: inset 0 0 0 1px rgba(170, 195, 255, .2); }
.lo-leer { display: block; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--n-ink2) 45%, transparent); }
.lo-platz.frei .lo-name { font-weight: 500; color: var(--n-ink2); }
.lo-platz.frei .lo-name::after { content: ''; display: block; height: 16px; }
.kb.lo-start { width: 100%; margin-top: 14px; min-height: 50px; font-size: 16px; border-radius: 11px; }
.kb.lo-start:disabled { opacity: 1; background: var(--n-feld); color: var(--n-ink2); border-color: transparent; box-shadow: var(--st-ring); font-weight: 700; }
.lo-warten { margin: 14px 0 0; padding: 13px 12px; border-radius: 11px; background: var(--n-feld); box-shadow: var(--st-ring); text-align: center; font-size: 14px; font-weight: 500; color: var(--n-ink2); }

/* Deine Figur */
.lo-ich-oben { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; }
.lo-vorschau { height: 156px; border-radius: 11px; overflow: hidden; background: var(--n-feld); box-shadow: var(--st-ring); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; position: relative; }
.lo-vorschau::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--farbe); }
.lo-vorschau > * { width: 58px; flex: none; }
.lo-feldname { display: block; margin: 16px 0 7px; font-size: 12.5px; font-weight: 600; color: var(--n-ink2); }
.lo-ich-felder > .lo-feldname:first-child { margin-top: 0; }
.lo-ich-felder .st-eingabe { height: 44px; }
.lo-farben { display: grid; grid-template-columns: repeat(6, minmax(0, 40px)); gap: 8px; }
.lo-farbe { width: 100%; aspect-ratio: 1; padding: 0; border-radius: 50%; background: var(--farbe); border: 2px solid var(--n-rand); box-shadow: 0 2px 0 var(--n-rand); transition: transform .12s; }
.lo-farbe:hover:not(:disabled) { transform: translateY(-1px); }
.lo-farbe.aktiv { outline: 2px solid var(--n-ink); outline-offset: 3px; }
.lo-farbe { position: relative; }
.lo-farbe:disabled { opacity: .3; box-shadow: none; cursor: not-allowed; }
.lo-farbe:disabled::after { content: ''; position: absolute; left: 12%; right: 12%; top: calc(50% - 1px); height: 2px; border-radius: 2px; background: var(--n-rand); transform: rotate(-45deg); }
html[data-thema='dunkel'] .lo-farbe:disabled::after { background: #eaf0ff; }
html[data-thema='dunkel'] .lo-farbe { border-color: rgba(234, 240, 255, .6); box-shadow: 0 0 12px -3px var(--farbe); }
html[data-thema='dunkel'] .lo-farbe.aktiv { outline-color: #eaf0ff; }
.lo-figurwahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.lo-fig { min-width: 0; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 10px 4px 8px; border: 0; border-radius: 11px;
  background: var(--n-feld); box-shadow: var(--st-ring); color: var(--n-ink); transition: background .15s, box-shadow .15s; }
.lo-figzelle { position: relative; min-width: 0; display: grid; }
.lo-figzelle.eigen .lo-fig { padding-top: 26px; }
.lo-figmini { position: absolute; top: 3px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--n-karte); color: var(--n-ink2); box-shadow: 0 1px 3px rgba(23, 34, 61, .25); transition: color .15s, background .15s; }
.lo-figmini::before { content: ''; position: absolute; inset: -6px; }
.lo-figmini .ik { display: block; width: 13px; height: 13px; }
.lo-stift { left: 3px; } .lo-figweg { right: 3px; }
.lo-stift:hover { color: var(--n-ink); } .lo-figweg:hover { color: var(--n-rotschrift); }
html[data-thema='dunkel'] .lo-figmini { background: #1b2746; color: #a9b6d6; box-shadow: inset 0 0 0 1px rgba(170, 195, 255, .3); }
html[data-thema='dunkel'] .lo-stift .ik path:last-child { stroke: #1b2746; }
.lo-stift .ik path:last-child { stroke: var(--n-karte); }
.lo-fkopf { width: 48px; display: flex; align-items: flex-end; justify-content: center; }
.lo-fkopf > * { width: 100%; flex: none; }
.lo-figname { max-width: 100%; min-height: 2.3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 11.5px; font-weight: 600; line-height: 1.15; color: var(--n-ink2); hyphens: auto; }
@media (hover: hover) { .lo-fig:hover:not(:disabled):not(.aktiv) { box-shadow: inset 0 0 0 1.5px var(--n-ink2); } }
.lo-fig.aktiv { background: color-mix(in srgb, var(--farbe) 14%, var(--n-karte)); box-shadow: inset 0 0 0 2px var(--n-ink); }
.lo-fig.aktiv .lo-figname { color: var(--n-ink); }
html[data-thema='dunkel'] .lo-fig.aktiv { background: color-mix(in srgb, var(--farbe) 18%, transparent); box-shadow: inset 0 0 0 1.5px rgba(200, 215, 255, .85), 0 0 14px -4px rgba(150, 185, 255, .6); }
.lo-fig:disabled { opacity: .3; filter: grayscale(1); cursor: not-allowed; }
.kb.lo-werkstatt { width: 100%; margin-top: 12px; min-height: 58px; padding: 9px 14px; justify-content: flex-start; gap: 12px; text-align: left; border-radius: 11px; }
.kb.lo-werkstatt > .ik { width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--n-rot); color: #fff; border: 2px solid var(--n-rand); }
html[data-thema='dunkel'] .kb.lo-werkstatt > .ik { border-color: rgba(234, 240, 255, .7); box-shadow: 0 0 12px -2px rgba(214, 58, 48, .7); }
.lo-wk-text { display: grid; gap: 1px; min-width: 0; }
.lo-wk-text b { font-size: 15px; font-weight: 800; }
.lo-wk-text small { font-size: 12.5px; font-weight: 500; color: var(--n-ink2); }
html[data-thema='dunkel'] .lo-wk-text small { color: #a9b6d6; }

/* Chat */
.lo-chatliste { height: 190px; overflow-y: auto; overscroll-behavior: contain; font-size: 14px; line-height: 1.4; padding-right: 4px; scrollbar-width: thin; }
.lo-chatliste:has(.lo-chatleer) { height: auto; }
.lo-chatleer { margin: 0; font-size: 13.5px; color: var(--n-ink2); }
.lo-chatein { display: flex; gap: 8px; margin-top: 10px; }
.lo-chatein .st-eingabe { height: 44px; }
.senden-rund.lo-senden { width: 44px; height: 44px; }
.senden-rund.lo-senden .ik, .senden-rund.lo-senden svg { width: 20px; height: 20px; }

/* ---------- Regeln (Formular aus settingsForm) ---------- */
:is(body[data-view='home'], body[data-view='lobby']) .regeln { display: grid; }
:is(body[data-view='home'], body[data-view='lobby']) .regel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--st-linie); }
:is(body[data-view='home'], body[data-view='lobby']) .regel:first-child { border-top: 0; padding-top: 4px; }
:is(body[data-view='home'], body[data-view='lobby']) .regel-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
:is(body[data-view='home'], body[data-view='lobby']) .regel-hinweis { font-size: 12.5px; color: var(--n-ink2); line-height: 1.35; margin-top: 2px; }
:is(body[data-view='home'], body[data-view='lobby']) .wahl { -webkit-appearance: none; appearance: none; height: 40px; padding: 0 32px 0 12px; border: 0; border-radius: 9px; flex: none;
  font: 700 16px var(--jost); color: var(--n-ink); box-shadow: var(--st-ring); cursor: pointer;
  background: var(--n-feld) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2355617d' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .wahl { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23a9b6d6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .wahl option { background: #141d35; color: #eaf0ff; }
body .st-regeln .wahl { background-color: var(--n-karte); }
html[data-thema='dunkel'] body .st-regeln .wahl { background-color: rgba(255, 255, 255, .07); }
/* Schalter */
:is(body[data-view='home'], body[data-view='lobby']) .schalter { width: 50px; height: 30px; }
:is(body[data-view='home'], body[data-view='lobby']) .schieber { background: #cdd5e4; border-radius: 99px; box-shadow: none; transition: background .2s; }
:is(body[data-view='home'], body[data-view='lobby']) .schieber::after { top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; box-shadow: 0 1px 3px rgba(23, 34, 61, .35); transition: transform .22s cubic-bezier(.3, .7, .3, 1); }
:is(body[data-view='home'], body[data-view='lobby']) .schalter input:checked + .schieber { background: #17223d; }
:is(body[data-view='home'], body[data-view='lobby']) .schalter input:checked + .schieber::after { transform: translateX(20px); }
:is(body[data-view='home'], body[data-view='lobby']) .schalter input:focus-visible + .schieber { outline: 2px solid var(--st-fokus); outline-offset: 2px; }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .schieber { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(170, 195, 255, .3); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .schieber::after { background: #b9c6e6; box-shadow: none; }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .schalter input:checked + .schieber { background: #9db8ff; box-shadow: 0 0 12px -2px rgba(150, 185, 255, .7); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .schalter input:checked + .schieber::after { background: #0b1122; }
/* nur lesen (Mitspieler) */
:is(body[data-view='home'], body[data-view='lobby']) .wert { flex: none; font: 700 13px/1.2 var(--jost); padding: 5px 12px; border-radius: 999px; background: var(--n-feld); color: var(--n-ink); }
:is(body[data-view='home'], body[data-view='lobby']) .wert.an { background: #17223d; color: #fff; }
:is(body[data-view='home'], body[data-view='lobby']) .wert.aus { background: var(--n-feld); color: var(--n-ink2); box-shadow: var(--st-ring); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .wert.an { background: #9db8ff; color: #0b1122; }

/* ---------- Fenster, Rückfragen, Hinweise (wie in der Spielansicht) ---------- */
:is(body[data-view='home'], body[data-view='lobby']) .dialog-ov { background: rgba(6, 24, 30, .55); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .dialog-ov { background: rgba(3, 6, 14, .66); }
:is(body[data-view='home'], body[data-view='lobby']) .dialog { background: var(--f-bg); color: var(--f-ink); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .dialog { box-shadow: 0 0 0 1px rgba(170, 195, 255, .35), 0 0 30px -8px rgba(120, 160, 255, .5), 0 30px 60px -20px rgba(0, 0, 0, .9); }
:is(body[data-view='home'], body[data-view='lobby']) .dialog-kopf { padding: 15px 16px 12px 20px; border-bottom: 1px solid var(--f-linie); }
:is(body[data-view='home'], body[data-view='lobby']) .dialog-kopf h2 { font-size: 20px; font-weight: 800; }
:is(body[data-view='home'], body[data-view='lobby']) .dialog-inhalt { padding: 16px 20px 18px; }
:is(body[data-view='home'], body[data-view='lobby']) .x { background: var(--f-feld2); color: var(--f-ink); width: 36px; height: 36px; font-size: 20px; }
:is(body[data-view='home'], body[data-view='lobby']) .frage { font-size: 15.5px; font-weight: 500; margin-bottom: 16px; }
:is(body[data-view='home'], body[data-view='lobby']) .knopfreihe { justify-content: flex-end; gap: 10px; }
:is(body[data-view='home'], body[data-view='lobby']) .knopf { font: 800 15px/1.15 var(--jost); border: 2px solid #17223d; border-radius: 10px; box-shadow: 0 3px 0 #17223d; background: #fff; color: #17223d; padding: 10px 16px; min-height: 44px; animation: none; transform: none; }
:is(body[data-view='home'], body[data-view='lobby']) .knopf.gelb, :is(body[data-view='home'], body[data-view='lobby']) .knopf.rot { background: #d63a30; color: #fff; }
:is(body[data-view='home'], body[data-view='lobby']) .knopf:hover:not(:disabled) { transform: none; filter: brightness(1.05); }
:is(body[data-view='home'], body[data-view='lobby']) .knopf:active:not(:disabled) { top: 2px; box-shadow: 0 1px 0 #17223d; }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .knopf { background: rgba(255, 255, 255, .04); color: #eaf0ff; border-color: rgba(234, 240, 255, .7); box-shadow: 0 0 10px -4px rgba(150, 185, 255, .5); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) :is(.knopf.gelb, .knopf.rot) { background: #d63a30; color: #fff; border-color: #0b1122; box-shadow: 0 3px 0 #0b1122, 0 0 16px -2px rgba(214, 58, 48, .55); }
:is(body[data-view='home'], body[data-view='lobby']) .toast { border-radius: 12px; box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .6); font-family: var(--jost); font-weight: 700; color: #17223d; }
:is(body[data-view='home'], body[data-view='lobby']) .toast.fehler { background: #d63a30; color: #fff; box-shadow: 0 0 0 2px #17223d, 0 14px 28px -10px rgba(0, 0, 0, .6); }
html[data-thema='dunkel'] :is(body[data-view='home'], body[data-view='lobby']) .toast:not(.fehler) { background: #1b2746; color: #eaf0ff; box-shadow: 0 0 0 1px rgba(170, 195, 255, .35), 0 14px 28px -10px rgba(0, 0, 0, .8); }
:is(body[data-view='home'], body[data-view='lobby']) .offline-hinweis { font-family: var(--jost); background: #d63a30; }
body:not(.offline) .offline-hinweis { box-shadow: none; visibility: hidden; }

/* ---------- Tablet und Handy ---------- */
@media (max-width: 1100px) {
  .lo-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lo-s1 { grid-row: span 2; }
}
@media (max-width: 760px) {
  .lo { padding: max(10px, env(safe-area-inset-top)) 10px calc(24px + env(safe-area-inset-bottom)); }
  .lo-kopf { flex-wrap: wrap; gap: 10px; padding: 10px 12px 12px; }
  .lo-raum { padding-left: 10px; }
  .lo-code { font-size: 20px; letter-spacing: .06em; }
  .lo-link { order: 5; flex-basis: 100%; padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--st-linie); }
  .lo-raster { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
  .lo-spalte { display: contents; }
  .lo-beitritt { order: 0; } .lo-spieler { order: 1; } .lo-ich { order: 2; } .lo-regeln { order: 3; } .lo-chat { order: 4; }
  .lo-kachel { padding: 14px 12px 16px; }
  .lo-plaetze { gap: 6px; }
  .lo-figur { height: 92px; }
  .lo-ich-oben { grid-template-columns: 78px minmax(0, 1fr); gap: 12px; }
  .lo-vorschau { height: 144px; }
  .lo-vorschau > * { width: 52px; }
  .lo-figurwahl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .lo-chatliste { height: 160px; }
}
@media (max-width: 640px) {
  .st { padding: calc(max(12px, env(safe-area-inset-top)) + 52px) 16px calc(24px + env(safe-area-inset-bottom)); }
  .st-oben { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  .st-unter { font-size: 11.5px; letter-spacing: .26em; padding-left: .26em; margin-top: 16px; }
  .st-reihe { --tw: 62px; }
  .st-feld:nth-child(2), .st-feld:nth-child(4), .st-feld:nth-child(6) { display: none; }
  .st-kacheln { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .st-kachel { padding: 18px 16px; }
  .st-kachel .st-zeile { margin-top: 0; }
}
@media (max-width: 360px) { .st-logo { font-size: 40px; } .st-reihe { --tw: 56px; } }

/* Konto: rundes Profilbild, Klick öffnet Menü (29.11.) */
.kk-knopf { width: 46px; height: 46px; border-radius: 50%; padding: 0; border: 2.5px solid #17223d; background: #fff; box-shadow: 0 3px 0 #17223d; overflow: hidden; display: grid; place-items: center; cursor: pointer; flex: none; }
.kk-knopf img, .kk-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kk-knopf:active { transform: translateY(2px); box-shadow: 0 1px 0 #17223d; }
.kk-buchstabe { font: 800 19px var(--jost); color: #fff; background: #5865f2; width: 100%; height: 100%; display: grid; place-items: center; }
.kk-menue { position: fixed; z-index: 900; width: min(300px, calc(100vw - 16px)); background: #fff; color: #17223d; border: 2.5px solid #17223d; border-radius: 14px; box-shadow: 0 5px 0 #17223d, 0 20px 40px -14px rgba(0, 0, 0, .5); padding: 14px; font-family: var(--jost); display: grid; gap: 6px; }
.kk-kopf { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #e3e8f1; }
.kk-kopf b { display: block; font-size: 16px; } .kk-kopf small { font-size: 12px; color: #5b6680; }
.kk-bild { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid #17223d; display: grid; }
.kk-zeile { display: flex; gap: 8px; } .kk-zeile .st-eingabe { flex: 1; min-width: 0; padding: 8px 10px; font-size: 15px; min-height: 0; }
.kk-hinweis { margin: 0 0 6px; font-size: 12px; color: #5b6680; }
.kk-ab { width: 100%; }
.lo-konto { display: flex; align-items: center; flex: none; }
.lo-konto .kb.st-discord { width: auto; margin: 0; background: #5865f2; color: #fff; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; }
.lo-konto .kb.st-discord .ik svg { width: 20px; height: 20px; display: block; }
/* Discord-Anmeldung oben rechts auf der Startseite (29.11.) */
.st-oben { display: flex; align-items: center; gap: 10px; }
.st-konto-oben .kb.st-discord { width: auto; margin: 0; background: #5865f2; color: #fff; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 14px; }
.st-konto-oben .kb.st-discord .ik svg { width: 20px; height: 20px; display: block; }
.st-konto-oben .st-konto { margin: 0; background: rgba(255, 255, 255, .92); color: #17223d; padding: 5px 12px 5px 6px; border-radius: 999px; border: 2px solid #17223d; font-weight: 700; }
.st-konto-oben .st-link { color: #17223d; opacity: .65; }
.kb.lo-werkstatt { text-decoration: none; }
.kb.lo-werkstatt > .ik.dc { background: #5865f2; }
.kb.lo-werkstatt > .ik.dc svg { width: 100%; height: 100%; display: block; }
@media (max-width: 560px) { .st-konto-oben .st-konto span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .st-konto-oben .kb.st-discord { font-size: 13px; padding: 7px 10px; } }
/* Lobby-Kopf: Discord-Knopf genau so hoch wie „Link kopieren“ */
.lo-kopf .lo-konto .kb.st-discord { min-height: 38px; height: 38px; padding: 0 14px; font-size: 13.5px; box-sizing: border-box; }
.lo-kopf .lo-konto .kb.st-discord .ik svg { width: 18px; height: 18px; }
/* Rechts im Kopf: Hell/Dunkel und Konto auf einer Linie mit Linkfeld und „Link kopieren“, alles 38 px hoch (03.12.) */
.lo-rechts { display: flex; align-items: center; gap: 8px; align-self: flex-end; flex: none; }
:is(body[data-view='lobby']) .lo-kopf .lo-rechts button.st-thema { width: 38px; height: 38px; border-radius: 10px; background: var(--n-feld); color: var(--n-ink); border: 0; box-shadow: var(--st-ring); }
html .lo-rechts .kk-knopf { width: 38px; height: 38px; border: 0; box-shadow: none; }
html .lo-rechts .kk-knopf:active { transform: scale(.95); }
@media (max-width: 760px) {
  .lo-rechts { margin-left: auto; align-self: center; }
  .lo-rechts:has(.st-discord) { flex: 1 1 100%; } .lo-rechts:has(.st-discord) .lo-konto, .lo-rechts .st-discord { flex: 1; justify-content: center; }
}
