/* Client-Layout im Stil eines Spiel-Clients. Nur Tokens und Bausteine aus ui.css. */

html, body { overflow: hidden; }
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--bg-blocks); }
.client { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; }

.display { font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); text-transform: var(--display-case); }

/* ---- Kopfleiste ---- */
.head {
  display: flex; align-items: stretch; height: 64px; flex-shrink: 0;
  background: color-mix(in srgb, var(--surface) 90%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(var(--panel-blur));
}
.head .back {
  width: 64px; display: grid; place-items: center; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer;
  font-size: 26px; color: var(--text-dim); transition: color var(--speed), background var(--speed);
}
.head .back:hover { color: var(--text); background: var(--surface-2); }
.head .back:disabled { visibility: hidden; }
.head .where { display: flex; align-items: center; gap: var(--gap-3); padding: 0 var(--gap-5); min-width: 0; }
.head .where .logo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; flex-shrink: 0; }
.head .where .logo i { border-radius: 2px; }
.head .where .logo i:nth-child(1) { background: var(--accent); }
.head .where .logo i:nth-child(2) { background: var(--c-cyan); }
.head .where .logo i:nth-child(3) { background: var(--c-pink); }
.head .where .logo i:nth-child(4) { background: var(--c-yellow); }
.head .where h1 { font-size: 30px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .where h1 small { color: var(--text-dim); font-size: 18px; margin-left: 10px; }
.head .fill { flex: 1; }
.head .stat { display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gap-5); border-left: 1px solid var(--line); text-align: right; }
.head .stat b { font-size: 20px; line-height: 1; }
.head .me {
  display: flex; align-items: center; gap: var(--gap-3); padding: 0 var(--gap-5) 0 var(--gap-4); border: 0; border-left: 1px solid var(--line);
  background: transparent; cursor: pointer; text-align: left; transition: background var(--speed);
}
.head .me:hover { background: var(--surface-2); }
.avatar {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; background: var(--c-blue);
  color: #fff; font-size: 22px; border-radius: var(--radius-m);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut) * .4), calc(100% - var(--cut) * .4) 100%, 0 100%);
}

/* ---- Fußleiste ---- */
.foot {
  height: 34px; flex-shrink: 0; display: flex; align-items: center; gap: var(--gap-5); padding: 0 var(--gap-5);
  border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); font-size: 12px; color: var(--text-dim);
}
.foot .fill { flex: 1; }

/* ---- Inhalt ---- */
.body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--gap-6) 0 var(--gap-6); }
.screen { animation: screen-in 260ms cubic-bezier(.2, .8, .2, 1); }
@keyframes screen-in { from { opacity: 0; transform: translateX(40px); } }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--gap-5); }

/* Große Menübalken wie im Hauptmenü */
.menu { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.bar-btn {
  --item: var(--accent);
  position: relative; display: flex; align-items: center; gap: var(--gap-5); width: 100%; min-height: 104px; padding: 14px calc(var(--cut) + 28px) 14px 28px;
  border: 0; border-left: 10px solid var(--item); cursor: pointer; text-align: left; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--item) 26%, var(--surface)) 0%, var(--surface) 70%);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  border-radius: var(--radius-m);
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter var(--speed);
  animation: bar-in 420ms cubic-bezier(.2, .8, .2, 1) both;
}
.bar-btn:nth-child(2) { animation-delay: 40ms; } .bar-btn:nth-child(3) { animation-delay: 80ms; }
.bar-btn:nth-child(4) { animation-delay: 120ms; } .bar-btn:nth-child(5) { animation-delay: 160ms; }
.bar-btn:nth-child(6) { animation-delay: 200ms; } .bar-btn:nth-child(7) { animation-delay: 240ms; }
@keyframes bar-in { from { opacity: 0; transform: translateX(-60px); } }
.bar-btn:hover, .bar-btn:focus-visible { transform: translateX(16px); filter: brightness(1.18); outline: none; }
.bar-btn:disabled { cursor: default; filter: saturate(.3) brightness(.8); transform: none; }
.bar-btn .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bar-btn .t b { font-size: 46px; line-height: .95; color: var(--text); letter-spacing: .01em; }
.bar-btn .t span { color: var(--text-dim); font-size: 15px; }
.bar-btn .big-n {
  position: absolute; right: calc(var(--cut) + 18px); top: 50%; transform: translateY(-50%);
  font-size: 92px; line-height: 1; color: var(--item); opacity: .18; pointer-events: none;
}
.bar-btn .cover { width: 220px; height: 100%; position: absolute; right: 0; top: 0; bottom: 0; opacity: .9;
  mask-image: linear-gradient(90deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); }
.bar-btn .cover canvas { position: absolute; inset: 0; }
.bar-btn.small { min-height: 74px; }
.bar-btn.small .t b { font-size: 32px; }
.bar-btn.on { filter: brightness(1.2); box-shadow: inset 0 0 0 2px var(--item); }

.menu-grid { display: grid; grid-template-columns: minmax(0, 820px) 1fr; gap: var(--gap-6); align-items: start; }
@media (max-width: 1000px) { .menu-grid { grid-template-columns: 1fr; } }

.side { display: flex; flex-direction: column; gap: var(--gap-3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--gap-4); backdrop-filter: blur(var(--panel-blur)); }
.card h3 { font-size: 22px; margin: 0 0 var(--gap-3); }
.sec-title { font-size: 34px; margin: 0 0 var(--gap-4); }
.sec-title small { font-size: 16px; color: var(--text-dim); margin-left: 10px; font-family: var(--font-ui); text-transform: none; font-weight: 400; }

.room-row { display: flex; align-items: center; gap: var(--gap-3); padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); cursor: pointer; border: 1px solid transparent; }
.room-row:hover { border-color: var(--accent); }
.room-row .code { font-family: var(--font-mono); font-weight: 800; letter-spacing: .15em; }

.code-input { font-family: var(--font-mono); font-size: 40px; font-weight: 900; letter-spacing: .4em; text-transform: uppercase; text-align: center; width: 100%; padding: 14px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border: 2px solid transparent; border-radius: var(--radius-m); cursor: pointer; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--bg) inset; }
.swatch:disabled { opacity: .2; cursor: default; }

.theme-card { display: flex; gap: 0; height: 40px; width: 120px; border-radius: var(--radius-s); overflow: hidden; flex-shrink: 0; }
.theme-card i { flex: 1; }

/* ---- Lobby ---- */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap-5); }
@media (max-width: 960px) { .lobby { grid-template-columns: 1fr; } }
.code-big { font-family: var(--font-mono); font-size: 52px; font-weight: 900; letter-spacing: .22em; color: var(--accent); text-shadow: var(--glow); line-height: 1; }
.p-row {
  --item: var(--accent);
  display: flex; align-items: center; gap: var(--gap-3); padding: 10px 14px; min-height: 58px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--item) 22%, var(--surface-2)), var(--surface-2) 60%);
  border-left: 6px solid var(--item); border-radius: var(--radius-s);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut) * .6) 100%, 0 100%);
}

.p-row b { font-size: 24px; }
.p-row.off { opacity: .45; }
.p-row .tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--item); }
.p-row.empty { --item: var(--line); background: transparent; border-left-style: dashed; color: var(--text-dim); animation: none; }

.chat { display: flex; flex-direction: column; gap: var(--gap-2); }
.chat .log { height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.chat .log b { font-weight: 700; }

.start-wrap { display: flex; align-items: center; gap: var(--gap-4); }
.start-btn { font-size: 34px !important; padding: 16px 64px 16px 36px !important; }

/* ---- Spielansicht ---- */
.play { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; background: var(--bg); background-image: var(--bg-art); }
.play .head { height: 52px; }
.play .head .where h1 { font-size: 24px; }
.play .head .chips { display: flex; align-items: center; gap: 6px; padding: 0 var(--gap-4); overflow: hidden; }
.play .ui-stage { flex: 1; }
.result-card { min-width: min(460px, 90vw); display: flex; flex-direction: column; gap: var(--gap-4); text-align: center; }
.result-card .ui-list { text-align: left; }

/* ---- Freunde ---- */
.stat-btn { background: transparent; border: 0; border-left: 1px solid var(--line); cursor: pointer; color: inherit; transition: background var(--speed); }
.stat-btn:hover { background: var(--surface-2); }
.stat-btn b { position: relative; }
.dot-new { position: absolute; top: -10px; right: -16px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-style: normal; display: grid; place-items: center; }
.friendcode { font-size: 26px; letter-spacing: .02em; }
.friend { --item: var(--line); display: flex; align-items: center; gap: var(--gap-3); padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface-2); border-left: 4px solid var(--line); }
.friend.on { border-left-color: var(--item); }
.friend b { font-size: 18px; margin-right: 4px; }
.friend .avatar { width: 36px; height: 36px; font-size: 18px; position: relative; overflow: visible; clip-path: none; }
.friend .presence { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-dim); border: 2px solid var(--surface); }
.friend.on .presence { background: var(--ok); }
.friend:not(.on) { opacity: .6; }
.friend-status { font-size: 13px; }

/* ---- Bestenliste ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { --item: var(--accent); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 8px 14px; cursor: pointer; font-weight: 700; color: var(--text-dim); }
.tab.small { padding: 5px 11px; font-size: 13px; }
.tab.on { color: var(--text); border-color: var(--item); box-shadow: inset 0 -3px 0 var(--item); }
.board table { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.board td { padding: 8px; border-bottom: 1px solid var(--line); }
.board td.display { font-size: 18px; }
.board tr.me td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.board .dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.board td .ui-dim { margin-left: 4px; font-size: 13px; }
.tier.bronze { color: #c8864a; } .tier.silber { color: #c9d1dc; } .tier.gold { color: #f3c94c; } .tier.platin { color: #6fe0d6; } .tier.diamant { color: #8ab8ff; }
.ui-badge.ranked { color: var(--accent); border-color: var(--accent); }
.elo { font-family: var(--font-display); font-weight: 800; margin-left: 8px; }
.elo.up { color: var(--ok); } .elo.down { color: var(--danger); }

/* ---- Einstellungen ---- */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle span { width: 40px; height: 22px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background var(--speed); flex-shrink: 0; }
.toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-dim); transition: transform var(--speed), background var(--speed); }
.toggle input:checked + span { background: color-mix(in srgb, var(--accent) 45%, var(--surface-2)); }
.toggle input:checked + span::after { transform: translateX(18px); background: var(--text); }
.toggle.small { font-size: 13px; gap: 8px; }
.toggle.small span { width: 32px; height: 18px; } .toggle.small span::after { width: 12px; height: 12px; }
.toggle.small input:checked + span::after { transform: translateX(14px); }
.toggle.ro { cursor: default; opacity: .7; }
.keyrow { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.keyrow:last-of-type { border-bottom: 0; }
.keyrow input[type=range] { width: 200px; accent-color: var(--accent); }
.tune-val { min-width: 70px; text-align: right; }
.keycap {
  min-width: 38px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface-2);
  font-family: var(--font-mono); font-weight: 700; cursor: pointer; color: var(--text);
}
.keycap:hover { border-color: var(--danger); color: var(--danger); }
.keycap.add { color: var(--text-dim); border-style: dashed; }
.keycap.add:hover { border-color: var(--accent); color: var(--accent); }
.keycap.listening { border-color: var(--accent); color: var(--accent); animation: key-blink 1s infinite; }
@keyframes key-blink { 50% { opacity: .45; } }
.ui-toast.invite { display: flex; align-items: center; gap: 10px; pointer-events: auto; border-color: var(--accent); }

/* ---- Werkstatt ---- */
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.werk-row { padding: 12px 14px; }
.werk-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.status-entwurf { color: var(--text-dim); }
.status-eingereicht { color: var(--c-yellow); border-color: var(--c-yellow); }
.status-freigegeben { color: var(--ok); border-color: var(--ok); }
.status-abgelehnt { color: var(--danger); border-color: var(--danger); }
.editor { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 200px); min-height: 420px; }
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-status { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor .tab small { display: block; font-size: 11px; color: var(--text-dim); font-weight: 400; font-family: var(--font-mono); }
.editor .code {
  flex: 1; width: 100%; resize: none; padding: 14px 16px; border-radius: var(--radius-m); border: 1px solid var(--line);
  background: var(--board-bg); color: var(--text); font-family: var(--font-mono); font-size: 14px; line-height: 1.55; tab-size: 2;
  outline: none; white-space: pre; overflow: auto;
}
.editor .code:focus { border-color: var(--accent); }
.editor .code[readonly] { opacity: .9; }
.review-bar { padding: 10px 12px; }

/* ---- Baukasten ---- */
.editor.bk-editor { height: auto; min-height: 0; }
.bk-root { display: flex; flex-direction: column; gap: 12px; }
.bk-hinweise { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: var(--radius-m); font-size: 14px;
  background: color-mix(in srgb, var(--c-yellow) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-yellow) 45%, var(--line)); }
.bk-body.ro { pointer-events: none; opacity: .8; }
.bk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px 22px; max-width: 1100px; }
.bk-feld { display: flex; flex-direction: column; gap: 6px; }
.bk-feld.toggle { flex-direction: row; align-items: flex-start; }
.bk-feld.toggle small { font-size: 12px; }
.bk-zahl input[type=range] { flex: 1; accent-color: var(--accent); }
.bk-wert { min-width: 90px; text-align: right; font-family: var(--font-mono); }
.bk-tip { font-size: 12px; }
.bk-ziele { display: flex; flex-direction: column; gap: 6px; }
.bk-ziel { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: var(--radius-m); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; }
.bk-ziel small { color: var(--text-dim); }
.bk-ziel.on { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.bk-karte { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.bk-palette { display: flex; flex-direction: column; gap: 4px; }
.bk-kachel { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--radius-s); border: 1px solid transparent; background: none;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.bk-kachel:hover { background: var(--surface); }
.bk-kachel.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.bk-kachel i { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; font-style: normal; border: 1px solid rgba(0,0,0,.3); flex-shrink: 0; }
.bk-kachel em { font-style: normal; font-size: 15px; font-weight: 800; }
.bk-werkzeug { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bk-flaeche { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bk-canvas { display: block; cursor: crosshair; touch-action: none; border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line); align-self: flex-start; }
.bk-masse { gap: 14px; font-size: 13px; }
.bk-masse label { gap: 8px; }
.bk-mass { width: 74px; padding: 6px 8px; }
.bk-fragen { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.bk-frage { display: flex; flex-direction: column; gap: 10px; padding: var(--gap-3) var(--gap-4); }
.bk-nr { width: 30px; font-size: 22px; color: var(--text-dim); }
.bk-antworten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-left: 38px; }
.bk-antwort { --item: var(--accent); display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 4px solid var(--item); border-radius: var(--radius-s); }
.bk-antwort input[type=radio] { accent-color: var(--ok); width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; }
.bk-antwort.richtig .ui-input { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; }
.bk-plus { justify-self: start; }
@media (max-width: 860px) { .bk-karte { grid-template-columns: 1fr; } .bk-palette { flex-direction: row; flex-wrap: wrap; } .bk-antworten { grid-template-columns: 1fr; padding-left: 0; } }

/* ---- Spielregeln (?-Knopf) ---- */
.regel-knopf { width: 34px; padding: 6px 0; font-weight: 900; font-size: 16px; border-radius: 50%; }
.regel-panel { position: fixed; top: 64px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); z-index: 30; display: flex; flex-direction: column; gap: 14px;
  padding: var(--gap-4); background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow), 0 20px 60px rgba(0,0,0,.45); backdrop-filter: blur(14px); transform: translateX(30px); opacity: 0; transition: transform .18s ease-out, opacity .18s; }
.regel-panel.an { transform: none; opacity: 1; }
.regel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.regel-kopf h2 { margin: 0; }
.regel-inhalt { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.regel b { font-size: 15px; color: var(--accent); letter-spacing: .04em; }
.regel p { margin: 4px 0 0; line-height: 1.5; }
.regel-tasten { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin-top: 6px; font-size: 14px; }
.regel-tasten kbd { font-family: var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; font-size: 12px; }

/* ---- Lobby (neu) ---- */
.lobby { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.lobby-main { display: flex; flex-direction: column; gap: var(--gap-5); min-width: 0; }
.lobby-side { display: flex; flex-direction: column; gap: var(--gap-4); position: sticky; top: 0; }
.lobby-hero { --item: var(--accent); display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: var(--gap-5); align-items: center; padding: var(--gap-4);
  border-color: color-mix(in srgb, var(--item) 45%, var(--line)); background: linear-gradient(110deg, color-mix(in srgb, var(--item) 16%, var(--surface)), var(--surface) 55%); position: relative; overflow: hidden; }
.lobby-hero::after { content: ''; position: absolute; inset: -40% -10% auto auto; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(color-mix(in srgb, var(--item) 22%, transparent), transparent 70%); pointer-events: none; animation: hero-glow 6s ease-in-out infinite alternate; }
@keyframes hero-glow { to { transform: translate(-60px, 40px) scale(1.2); } }
.hero-cover { height: 150px; border-radius: var(--radius-m); overflow: hidden; position: relative; background: var(--board-bg); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.hero-cover canvas { position: absolute; inset: 0; }
.hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-text h2 { font-size: 40px; line-height: 1; margin: 0; }
.hero-text p { margin: 0; font-size: 15px; line-height: 1.4; }
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 6px; margin-top: 4px; }
.hero-start { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; z-index: 1; }
.hero-start .start-btn { padding: 16px 48px !important; }
.hero-start .start-btn:not(:disabled) { animation: start-puls 1.6s ease-in-out infinite; }
@keyframes start-puls { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 22%, transparent), var(--glow); } }
.hero-start .warte { font-size: 20px; color: var(--text-dim); animation: warte 1.4s ease-in-out infinite alternate; }
@keyframes warte { to { opacity: .45; } }
.hero-start .ui-dim { font-size: 13px; }
.lobby-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--gap-3); animation: picker-rein .2s ease-out; }
@keyframes picker-rein { from { opacity: 0; transform: translateY(-6px); } }
.pick-tile { --item: var(--accent); display: flex; flex-direction: column; gap: 2px; padding: 0 0 10px; border-radius: var(--radius-m); overflow: hidden; cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; transition: transform .12s, border-color .12s, box-shadow .12s; }
.pick-tile:hover { transform: translateY(-3px); border-color: var(--item); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.pick-tile.on { border-color: var(--item); box-shadow: 0 0 0 2px var(--item); }
.pick-tile .cover { height: 92px; position: relative; margin-bottom: 6px; }
.pick-tile .cover canvas { position: absolute; inset: 0; }
.pick-tile b { padding: 0 12px; font-size: 18px; }
.pick-tile span { padding: 0 12px; font-size: 12px; color: var(--text-dim); }
.lobby-regeln { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-3); flex-wrap: wrap; margin-bottom: var(--gap-3); }
.sec-head .sec-title { margin: 0; }
.swatches.small .swatch { width: 28px; height: 28px; border-radius: var(--radius-s); }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap-3); }
.seat { --item: var(--accent); position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 68px; border-radius: var(--radius-m);
  background: linear-gradient(120deg, color-mix(in srgb, var(--item) 20%, var(--surface-2)), var(--surface-2) 70%); border: 1px solid color-mix(in srgb, var(--item) 35%, var(--line));
  animation: seat-rein .25s ease-out; }
@keyframes seat-rein { from { opacity: 0; transform: scale(.96); } }
.seat.me { box-shadow: 0 0 0 2px var(--item); }
.seat.off { opacity: .5; }
.seat .avatar { width: 42px; height: 42px; font-size: 22px; background: var(--item); flex-shrink: 0; }
.seat-name { display: flex; flex-direction: column; min-width: 0; }
.seat-name b { font-size: 20px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-name span { font-size: 12px; }
.seat-tags { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.seat-tags .tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--item); }
.seat-add { position: absolute; right: 8px; bottom: 6px; font-size: 11px !important; padding: 2px 8px !important; opacity: 0; transition: opacity .15s; }
.seat:hover .seat-add { opacity: 1; }
.seat.empty { justify-content: center; gap: 8px; color: var(--text-dim); background: transparent; border: 1px dashed var(--line); cursor: pointer; font: inherit; animation: none; }
.seat.empty span { font-size: 22px; font-weight: 700; }
.seat.empty:hover { border-color: var(--accent); color: var(--text); }
.room-card { display: flex; flex-direction: column; gap: var(--gap-3); }
.room-code { display: flex; flex-direction: column; gap: 4px; }
.room-code .code-big { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-size: 46px; }
.room-code .code-big:hover { filter: brightness(1.2); }
.room-opts { display: flex; gap: var(--gap-4); }
.lobby .chat .log { height: 200px; }
@media (max-width: 1100px) { .lobby-hero { grid-template-columns: 180px minmax(0, 1fr); } .hero-start { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: var(--gap-4); } }
@media (max-width: 960px) { .lobby-side { position: static; } }
@media (max-width: 640px) { .lobby-hero { grid-template-columns: 1fr; } .hero-cover { height: 120px; } }

/* ---- Menü-Effekte ---- */
#aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(60px); opacity: .55; }
#aurora i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; opacity: .35; mix-blend-mode: screen; }
#aurora i:nth-child(1) { background: radial-gradient(var(--accent), transparent 65%); left: -15vmax; top: -20vmax; animation: aurora1 22s ease-in-out infinite alternate; }
#aurora i:nth-child(2) { background: radial-gradient(var(--c-cyan), transparent 65%); right: -20vmax; top: 10vmax; opacity: .22; animation: aurora2 28s ease-in-out infinite alternate; }
#aurora i:nth-child(3) { background: radial-gradient(var(--c-pink), transparent 65%); left: 20vmax; bottom: -30vmax; opacity: .2; animation: aurora3 25s ease-in-out infinite alternate; }
@keyframes aurora1 { to { transform: translate(30vmax, 18vmax) scale(1.2); } }
@keyframes aurora2 { to { transform: translate(-28vmax, 12vmax) scale(.85); } }
@keyframes aurora3 { to { transform: translate(-14vmax, -26vmax) scale(1.15); } }
#glow { position: fixed; left: -300px; top: -300px; width: 600px; height: 600px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%); mix-blend-mode: screen; will-change: transform; }
.client { z-index: 2; }

.bar-btn::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--item) 32%, transparent), transparent 70%); }
.bar-btn:hover::before { opacity: 1; }
.bar-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.14), transparent); transform: skewX(-18deg) translateX(-120%); }
.bar-btn:hover::after { animation: glanz .7s ease-out; }
@keyframes glanz { to { transform: skewX(-18deg) translateX(560%); } }
.bar-btn .t b { transition: letter-spacing .25s, text-shadow .25s; }
.bar-btn:hover .t b { letter-spacing: .03em; text-shadow: 0 0 24px color-mix(in srgb, var(--item) 60%, transparent); }
.bar-btn:hover .big-n { opacity: .32; transform: translateY(-50%) scale(1.06); transition: opacity .2s, transform .2s; }
.bar-btn:active { transform: translateX(16px) scale(.985); }

.welle { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(rgba(255,255,255,.28), transparent 60%);
  transform: scale(0); animation: welle .65s ease-out forwards; }
@keyframes welle { to { transform: scale(1); opacity: 0; } }

.logo i { animation: logo-tanz 3.2s ease-in-out infinite; }
.logo i:nth-child(2) { animation-delay: .2s; } .logo i:nth-child(3) { animation-delay: .4s; } .logo i:nth-child(4) { animation-delay: .6s; }
@keyframes logo-tanz { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-3px) scale(1.12); } }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-4); }
.game-tile { --item: var(--accent); position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  border-radius: var(--radius-l); border: 1px solid var(--line); color: var(--text); font: inherit;
  background: linear-gradient(170deg, color-mix(in srgb, var(--item) 14%, var(--surface)), var(--surface) 60%);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
  animation: tile-in .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.game-tile::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--item) 22%, transparent), transparent 70%); }
.game-tile:hover { transform: translateY(-6px); border-color: var(--item); box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px var(--item), 0 0 40px color-mix(in srgb, var(--item) 25%, transparent); }
.game-tile:hover::before { opacity: 1; }
.game-tile .cover { position: relative; height: 170px; overflow: hidden; background: var(--board-bg); }
.game-tile .cover canvas { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.game-tile:hover .cover canvas { transform: scale(1.06); }
.game-tile .cover::after { content: ''; position: absolute; inset: auto 0 0 0; height: 60px; background: linear-gradient(transparent, var(--surface)); }
.gt-text { display: flex; flex-direction: column; gap: 6px; padding: 4px 18px 18px; position: relative; z-index: 1; }
.gt-text b { font-size: 30px; line-height: 1; }
.gt-text > span { color: var(--text-dim); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.gt-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gt-go { position: absolute; right: 14px; top: 132px; z-index: 3; padding: 6px 16px; border-radius: 99px; background: var(--item); color: #fff; font-size: 16px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; box-shadow: 0 6px 20px color-mix(in srgb, var(--item) 50%, transparent); }
.game-tile:hover .gt-go { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #aurora i, .logo i, .game-tile, .bar-btn { animation: none !important; } }

/* Haken für freigegebene Prüfer */
.haken { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; background: var(--ok); vertical-align: middle; flex-shrink: 0; }
.haken svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
