:root {
  --bg: #0b0f1e;
  --bg2: #121833;
  --ink: #eef1ff;
  --muted: #9aa3c7;
  --line: rgba(255,255,255,.09);
  --glass: rgba(22, 28, 56, .62);
  --glass-2: rgba(255,255,255,.05);
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --ok: #22c55e;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 55%, #f59e0b 100%);
  --t-c: linear-gradient(150deg, #22c55e, #059669);
  --t-p: linear-gradient(150deg, #fbbf24, #f59e0b);
  --t-a: rgba(255,255,255,.07);
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Hintergrund ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 120%, #1a1f4a 0%, transparent 60%), var(--bg); }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); opacity: .32; will-change: transform; }
.b1 { background: #6d28d9; left: -20vmax; top: -25vmax; animation: drift 26s ease-in-out infinite alternate; }
.b2 { background: #0891b2; right: -25vmax; top: 10vh; animation: drift 32s ease-in-out infinite alternate-reverse; opacity: .22; }
.b3 { background: #db2777; left: 10vw; bottom: -35vmax; animation: drift 38s ease-in-out infinite alternate; opacity: .18; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.screen { position: relative; z-index: 1; height: 100dvh; width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px;
  background: var(--glass-2); border: 1px solid var(--line);
  font-weight: 700; letter-spacing: .01em;
  transition: transform .12s ease, background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: rgba(255,255,255,.09); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary {
  background: var(--grad); border: 0; color: #fff;
  box-shadow: 0 8px 24px -8px rgba(236,72,153,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { min-height: 56px; font-size: 1.08rem; width: 100%; border-radius: 16px; }
.btn.danger { color: #fecaca; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.12); }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--glass-2); border: 1px solid var(--line); font-weight: 800; font-size: 1.05rem;
}
.icon-btn:active { transform: scale(.94); }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px; }

.panel {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}
.panel-title { font-weight: 800; margin-bottom: 12px; display: flex; gap: 8px; align-items: baseline; }

/* ---------- Kacheln ---------- */
.tile {
  --ts: 52px;
  width: var(--ts); height: var(--ts); flex: none;
  display: grid; place-items: center;
  font-weight: 900; font-size: calc(var(--ts) * .5); line-height: 1; text-transform: uppercase;
  border-radius: calc(var(--ts) * .2);
  background: rgba(0,0,0,.22); border: 1px solid var(--line);
  color: var(--ink);
}
.tile.f { border-color: rgba(196,181,253,.55); background: rgba(139,92,246,.14); animation: pop .12s ease; }
.tile.c, .tile.p, .tile.a { border-color: transparent; }
.tile.c { background: var(--t-c); color: #fff; box-shadow: 0 6px 16px -8px rgba(34,197,94,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.tile.p { background: var(--t-p); color: #1c1306; box-shadow: 0 6px 16px -8px rgba(245,158,11,.8), inset 0 1px 0 rgba(255,255,255,.3); }
.tile.a { background: var(--t-a); color: #6b7499; }
.tile.flip { animation: flip .5s ease both; }
.tile.sm { --ts: 26px; display: inline-grid; vertical-align: middle; }
.tile.live { border-style: dashed; border-color: rgba(196,181,253,.5); }
@keyframes pop { 50% { transform: scale(1.1); } }
@keyframes flip { 0% { transform: rotateX(0); } 49% { transform: rotateX(90deg); filter: brightness(.6); } 51% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.row { display: flex; gap: var(--gap, 6px); justify-content: center; }
.row.shake { animation: shake .4s ease; }
.row.bounce .tile { animation: bounce .6s ease both; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes bounce { 40% { transform: translateY(-14px); } 70% { transform: translateY(2px); } }
.board { display: flex; flex-direction: column; gap: var(--gap, 6px); align-items: center; }

/* ---------- Start ---------- */
#home { display: grid; place-items: center; overflow-y: auto; padding: calc(20px + var(--safe-t)) 16px calc(20px + var(--safe-b)); }
.home-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-tiles { display: flex; gap: 8px; margin-top: 14px; perspective: 600px; }
.hero-tiles .tile { --ts: 54px; animation: heroIn .7s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes heroIn { 0% { opacity: 0; transform: translateY(26px) rotateX(90deg); } 100% { opacity: 1; transform: none; } }
.logo {
  margin: 4px 0 0; font-size: clamp(3.2rem, 14vw, 4.6rem); font-weight: 900; letter-spacing: .12em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(236,72,153,.35)); line-height: 1;
}
.tagline { margin: 0 0 6px; color: var(--muted); text-align: center; }
.home-panel { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 700; }
input {
  width: 100%; height: 50px; border-radius: 14px; padding: 0 16px; font: inherit; font-size: 1.05rem; font-weight: 700;
  color: var(--ink); background: rgba(0,0,0,.25); border: 1px solid var(--line); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
input::placeholder { color: rgba(154,163,199,.55); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-row { display: flex; gap: 10px; }
#codeInput { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-size: 1.2rem; }
.error { color: #fca5a5; min-height: 1.2em; font-size: .9rem; text-align: center; }
.join-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); }
.join-hint { text-align: center; }
.join-hint b { letter-spacing: .15em; }
.recent { width: 100%; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.recent-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: left; }
.recent-list button:active { transform: scale(.98); }
.recent-code { font-weight: 900; letter-spacing: .18em; }
.recent-meta { flex: 1; color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Kopfleiste ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-weight: 900; letter-spacing: .16em; flex: none; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chip.off .dot { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.top-actions { display: flex; gap: 6px; margin-left: auto; }
.people { display: flex; align-items: center; min-width: 0; flex: 1; justify-content: flex-start; padding-left: 4px; overflow: hidden; }
.people .avatar { width: 30px; height: 30px; font-size: .8rem; margin-left: -6px; border: 2px solid var(--bg); }
.people .avatar:first-child { margin-left: 0; }
.people .avatar::after { display: none; }
.people .avatar:not(.on) { opacity: .45; }
.people .more { margin-left: 6px; color: var(--muted); font-weight: 800; font-size: .85rem; }

.avatar {
  position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 900; color: #fff; background: var(--pc, #8b5cf6);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 6px 16px -6px var(--pc, #8b5cf6);
}
.avatar.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }
.avatar.xs { width: 24px; height: 24px; font-size: .7rem; }

/* ---------- Raum ---------- */
#room { display: grid; grid-template-rows: auto 1fr auto; max-width: 1200px; margin: 0 auto; }
.room-grid { min-height: 0; display: grid; gap: 14px; padding: 4px 16px 12px; grid-template-columns: minmax(0, 1fr) 380px; }
.words-col { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; scrollbar-width: thin; }
.tabbar { display: none; }
@media (max-width: 899px) {
  .room-grid { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
  .room-grid[data-tab="words"] .chat-col { display: none; }
  .room-grid[data-tab="chat"] .words-col { display: none; }
  .tabbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 16px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(11,15,30,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .tabbar button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 14px; font-weight: 800; color: var(--muted); }
  .tabbar button.on { color: #fff; background: rgba(139,92,246,.2); }
}
.tab-badge { position: absolute; top: 6px; right: calc(50% - 52px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-2); color: #fff; font-style: normal; font-size: .7rem; font-weight: 900; display: grid; place-items: center; }
.icon-btn .tab-badge { top: -4px; right: -4px; }

.send-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.send-hint { text-align: center; font-size: .9rem; }
.send-hint:empty { display: none; }
.list-title { margin: 6px 4px 0; font-size: .78rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; display: flex; gap: 8px; align-items: center; }
.list-title .count { background: rgba(255,255,255,.08); padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.pz-list { display: flex; flex-direction: column; gap: 10px; }
.empty-note { padding: 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; font-size: .92rem; }

.pz-card {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .12s, border-color .2s, background .2s;
}
.pz-card.enter { animation: cardIn .35s ease both; }
.pz-card:hover { border-color: rgba(255,255,255,.18); }
.pz-card:active { transform: scale(.985); }
.pz-card.new { border-color: rgba(236,72,153,.55); box-shadow: 0 0 0 1px rgba(236,72,153,.25), 0 12px 30px -16px rgba(236,72,153,.8); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.pz-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pz-who { flex: 1; min-width: 0; }
.pz-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-who small { color: var(--muted); }
.pill { flex: none; font-size: .72rem; font-weight: 900; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.pill.new { background: var(--grad); color: #fff; }
.pill.play { background: rgba(139,92,246,.22); color: #c4b5fd; }
.pill.won { background: rgba(34,197,94,.18); color: #86efac; }
.pill.lost { background: rgba(239,68,68,.16); color: #fca5a5; }
.pz-progress { display: flex; flex-direction: column; gap: 6px; }
.prog { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.prog .pname { width: 72px; flex: none; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog .pstat { margin-left: auto; color: var(--muted); font-weight: 700; white-space: nowrap; }
.dots { display: flex; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.dots i { width: 10px; height: 10px; border-radius: 3px; background: rgba(255,255,255,.08); flex: none; }
.dots i.c { background: #22c55e; } .dots i.p { background: #f59e0b; } .dots i.a { background: rgba(255,255,255,.18); }
.pz-word { display: flex; gap: 4px; flex-wrap: wrap; }
.pz-word .tile { --ts: 24px; }

/* ---------- Chat ---------- */
.chat-col { min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.chat-head .muted { font-size: .82rem; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: cardIn .25s ease both; }
.msg .bubble { padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.07); border: 1px solid var(--line); line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.msg .who { display: block; font-size: .74rem; font-weight: 900; margin-bottom: 2px; }
.msg .time { font-size: .68rem; color: var(--muted); margin-left: 6px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: linear-gradient(135deg, rgba(139,92,246,.55), rgba(236,72,153,.45)); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.cont .avatar { visibility: hidden; }
.msg.cont .who { display: none; }
.sys { align-self: center; text-align: center; font-size: .8rem; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.04); max-width: 92%; }
.sys.link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(154,163,199,.4); text-underline-offset: 3px; }
.day { align-self: center; font-size: .72rem; font-weight: 900; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin: 6px 0 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { height: 46px; font-weight: 600; font-size: 1rem; }
.send-btn { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.send-btn:active { transform: scale(.94); }

/* ---------- Rätsel ---------- */
#puzzle { display: grid; grid-template-rows: auto 1fr auto auto; max-width: 900px; margin: 0 auto; }
.pz-title { flex: 1; min-width: 0; text-align: center; line-height: 1.2; }
.pz-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-title small { color: var(--muted); font-weight: 700; }
.pz-body { min-height: 0; overflow-y: auto; padding: 8px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pz-body.center-v { justify-content: center; }
.pz-msg { min-height: 26px; text-align: center; font-weight: 800; padding: 0 16px; }
.pz-msg.err { color: #fca5a5; }
.others { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.other { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: .82rem; font-weight: 800; }
.result-card { width: min(520px, 100%); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.result-title { font-size: 1.4rem; font-weight: 900; }
.result-title.win { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.solution { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.solution .tile { --ts: 34px; }
.watch-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 420px)); justify-content: center; gap: 14px; }
.watch-card { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 14px; }
.watch-head { width: 100%; display: flex; align-items: center; gap: 10px; }
.watch-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.times { font-size: .78rem; color: var(--muted); text-align: center; }
.typing-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c4b5fd; margin-left: 6px; animation: blink 1s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }

/* Tastatur – bewusst ohne Farben: keine Hilfe */
.keyboard { padding: 6px 6px calc(8px + var(--safe-b)); display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 620px; margin: 0 auto; -webkit-user-select: none; user-select: none; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1 1 0; min-width: 0; height: 52px; border-radius: 10px; font-weight: 900; font-size: 1.05rem;
  background: rgba(255,255,255,.1); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  display: grid; place-items: center; transition: background .15s, transform .08s;
}
.key:active, .key.down { background: rgba(139,92,246,.45); transform: scale(.94); }
.key.wide { flex: 1.6 1 0; font-size: .78rem; letter-spacing: .04em; }
.key.enter { background: var(--grad); color: #fff; border: 0; }
.key svg { width: 22px; height: 22px; }
@media (max-height: 640px) { .key { height: 44px; } }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; background: rgba(5,7,16,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease both; }
@media (min-width: 640px) { .modal { place-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; width: min(560px, 100%); max-height: 90dvh; overflow-y: auto; padding: 22px 20px calc(22px + var(--safe-b));
  background: linear-gradient(180deg, #1a2045, #121733); border: 1px solid var(--line); border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px -10px rgba(0,0,0,.7); animation: sheetIn .35s cubic-bezier(.2,.9,.3,1.1) both;
  display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 640px) { .sheet { border-radius: 24px; } }
.sheet.small { width: min(380px, 100%); }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { margin: 0; font-size: 1.3rem; padding-right: 40px; }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; line-height: 1; background: rgba(255,255,255,.07); }
.rules p { color: #d3d8f2; line-height: 1.5; margin: 0 0 12px; }
.legend { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; color: #d3d8f2; }
.legend div { display: flex; gap: 10px; align-items: center; }
.privacy { font-size: .88rem; }
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-note { margin: -8px 0 0; font-size: .9rem; }
#menuCode { letter-spacing: .14em; }

#wordInput { text-transform: uppercase; letter-spacing: .2em; font-size: 1.25rem; text-align: center; }
.word-preview { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; min-height: 34px; }
.word-preview .tile { --ts: 34px; }
.word-preview .count { align-self: center; color: var(--muted); font-weight: 800; font-size: .85rem; margin-left: 6px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-weight: 800; transition: background .2s, border-color .2s; }
.pick .avatar { width: 28px; height: 28px; font-size: .78rem; }
.pick.on { background: rgba(139,92,246,.25); border-color: rgba(196,181,253,.6); }
.pick:not(.on) .avatar { filter: grayscale(.8) brightness(.7); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text small { color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); flex: none; }
.seg button { width: 38px; height: 36px; border-radius: 9px; font-weight: 900; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(236,72,153,.6); }

.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.seat .name { flex: 1; min-width: 0; }
.seat .name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .name small { color: var(--muted); }
.badge { font-size: .7rem; font-weight: 900; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.badge.you { background: rgba(139,92,246,.22); color: #c4b5fd; }
.badge.on { background: rgba(34,197,94,.16); color: #86efac; }

/* ---------- Toasts usw. ---------- */
.toasts { position: fixed; z-index: 110; left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 8px 14px; border-radius: 12px; background: rgba(16,20,42,.92); border: 1px solid var(--line); font-weight: 700; font-size: .86rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2) both; text-align: center; }
.toast.out { animation: toastOut .3s ease both; }
.toast.err { border-color: rgba(239,68,68,.5); color: #fecaca; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }
.conn { position: fixed; z-index: 130; bottom: calc(12px + var(--safe-b)); left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(239,68,68,.9); font-weight: 800; font-size: .85rem; }
.confetti { position: fixed; inset: 0; z-index: 140; pointer-events: none; width: 100%; height: 100%; }
