:root {
  --bg: #131316;
  --card: #1b1b20;
  --field: #0f0f12;
  --fg: #f1f1f3;
  --muted: #a3a3ad;
  --line: #2d2d35;
  --edge: #3a3a44;
  --accent: #ffffff;
  --column: 880px;
  --card2: #232328;
  --card3: #2a2a31;
  --chat-size: 14px;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.4 "WP Emoji", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* vertical lines left and right, full height */
.frame {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(var(--column), 100%);
  transform: translateX(-50%);
  box-sizing: border-box;
  border-left: 1px solid var(--edge);
  border-right: 1px solid var(--edge);
  pointer-events: none;
}

/* name + profile picture top right in the column */
.bar {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(var(--column), 100%);
  transform: translate(-50%, var(--bar-y, 0px));
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: fit-content;
  min-width: 150px;
  max-width: 100%;
  height: 36px;
  padding: 0 2px 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.namebtn,
.avbtn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.namebtn {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.service {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.avbtn {
  border-radius: 50%;
  display: block;
}

.avbtn:hover .avatar {
  box-shadow: 0 0 0 2px var(--accent);
}

.toast {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--column), 100%);
  box-sizing: border-box;
  padding: 0 16px;
  margin: 0;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.toast:empty {
  display: none;
}

.toast.error {
  color: #ff8a8a;
}

.pill:hover,
.pill:has(.namebtn[aria-expanded="true"]) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.1);
}

.name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card3);
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* window: centered in the column */
.panel {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px;
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
}

h2 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

form {
  display: flex;
  justify-content: center;
  gap: 8px;
}

input {
  flex: 1;
  min-width: 0;
  max-width: 300px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--fg);
  font: inherit;
  text-align: center;
}

/* dots instead of characters, without type="password" so the browser doesn't show a password manager */
.masked {
  -webkit-text-security: disc;
  text-security: disc;
}

input::placeholder {
  color: #6c6c76;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(0.85);
}

/* round logo buttons in the brand colors */
.links {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.link {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.link.discord {
  background: #2b3068;
  box-shadow: inset 0 0 0 2px #5865f2;
}

.link.twitch {
  background: #3d2468;
  box-shadow: inset 0 0 0 2px #9146ff;
}

.link.google {
  background: #fff;
  box-shadow: inset 0 0 0 2px #4285f4;
  color: #fff;
}

.link.github {
  background: #232830;
  box-shadow: inset 0 0 0 2px #8b949e;
  color: #fff;
}

.links {
  flex-wrap: wrap;
}

.link:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.link svg {
  width: 26px;
  height: 26px;
}

.link .logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.link.static {
  pointer-events: none;
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.as {
  margin: 14px 0 16px;
  font-size: 15px;
  line-height: 1.5;
}

.as b {
  font-weight: 700;
}

.pill-btn {
  border-radius: 999px;
  padding: 9px 22px;
}

.role-badge {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto;
}

.role-title {
  margin: 14px 0 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.btn.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

select {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 8px;
  color: var(--fg);
  font: inherit;
}

#access-form {
  flex-wrap: wrap;
}

#access-label {
  min-width: 140px;
}

.pwbox {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pwbox code {
  background: var(--field);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  font: 600 16px/1 ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: 0.08em;
  user-select: all;
}

.pwbox .btn {
  padding: 10px 16px;
}

.access-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.access-list:empty {
  display: none;
}

.access-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
}

.access-list img {
  flex: none;
  width: 28px;
  height: 28px;
}

.access-list .who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.access-list button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ff8a8a;
  font: inherit;
  font-size: 13px;
  padding: 5px 10px;
  cursor: pointer;
}

.sub {
  margin: 20px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profiles {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.profiles:empty {
  display: none;
}

.profile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  padding: 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
}

.profile .pic {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card3);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  overflow: hidden;
}

.profile .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile .head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  min-width: 0;
}

.profile .head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile .head img {
  width: 20px;
  height: 20px;
  flex: none;
}

.profile dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  margin: 10px 0 0;
  font-size: 13px;
}

.profile dt {
  color: var(--muted);
}

.profile dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.profile .mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
}

.profile .on {
  color: #7be08f;
}

.profile .tag {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: #ff8a8a;
  font-size: 13px;
}

.danger {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #7a2e2e;
  background: #3a1717;
  color: #ff9a9a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.danger.confirm {
  background: #b32d2d;
  color: #fff;
  border-color: #b32d2d;
}

.danger.calm {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
}

.danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.link.has-logo svg {
  display: none;
}

.link.linked::after {
  content: "✓";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.hint,
.msg {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.msg:empty {
  display: none;
}

.msg.error {
  color: #ff8a8a;
}

.msg.ok {
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- WawaParty ---------- */
.bar { z-index: 20; }
.panel { z-index: 30; }
/* Fenster (Name, Verbindungen, Team-Login) offen: Startseite/Raum ausblenden */
body:has(#panel:not([hidden])) .home,
body:has(#panel:not([hidden])) .room { display: none; }

/* home page (black/grey/white) */
.home { position: fixed; inset: 0; overflow-y: auto; }
.home-col { width: min(860px, 100%); margin: 0 auto; min-height: 100%; background: #17171a; color: var(--fg); box-sizing: border-box; padding-bottom: 30px; border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); }
.home-top { height: 64px; background: var(--card2); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 18px; }
.home-logo { display: flex; align-items: center; gap: 11px; font: 800 24px/1 "WP Emoji", system-ui, sans-serif; color: #fff; letter-spacing: 0.01em; }
.home-logo img { display: block; height: 28px; width: auto; }
.home-hero { height: 100px; background: linear-gradient(#2d2d33, #17171a); display: grid; place-items: center; font-size: 50px; filter: grayscale(1); border-bottom: 1px solid var(--line); }
.home-boxes { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; padding: 14px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box.suggest { text-align: center; }
.box.suggest .go { display: inline-block; text-decoration: none; margin-top: 4px; }
.box { background: #1d1d22; border: 1px dashed #3d3d47; border-radius: 8px; padding: 12px; }
.box h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.06em; color: var(--muted); }
.games { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.games .game { width: 96px; flex: none; border: 2px solid #4a4a54; opacity: 1; border-radius: 8px; background: #2c2c33; color: #fff; padding: 10px 6px; display: grid; gap: 3px; justify-items: center; text-align: center; cursor: pointer; font: inherit; }
.game .gi { width: 44px; height: 44px; display: block; }
.game b { font-size: 13px; }
.game small { font-size: 10px; color: #b4b4be; }
.create-row { display: flex; gap: 6px; align-items: center; }
.home input, .home select { background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; font: 14px "WP Emoji", system-ui, sans-serif; outline: none; }
.home input:focus, .home select:focus { border-color: #8a8a96; }
#room-name { flex: 1 1 100px; min-width: 100px; }
.seg { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--edge); }
.seg button { border: 0; background: transparent; color: var(--muted); font: 700 13px "WP Emoji", system-ui, sans-serif; padding: 8px 12px; cursor: pointer; }
.seg button.on { background: #fff; color: #111; }
.go { border: 0; border-radius: 999px; background: var(--accent); color: #111; font: 800 14px "WP Emoji", system-ui, sans-serif; padding: 9px 18px; cursor: pointer; }
.go:hover { background: var(--accent); filter: brightness(0.88); }
.join-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.join-row label { color: var(--muted); }
.join-row input { width: 74px; flex: none; text-transform: uppercase; letter-spacing: 0.15em; text-align: center; }
.home .msg { color: #ff8a8a; min-height: 1.2em; margin: 6px 0 0; font-size: 13px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 14px 0; padding-top: 14px; border-top: 1px solid var(--edge); font-weight: 700; font-size: 13px; color: var(--fg); }
.list-tools { display: flex; gap: 6px; }
.list-tools input { width: 130px; }
.refresh { border: 1px solid var(--edge); border-radius: 999px; background: var(--card3); color: #fff; font: 700 12px "WP Emoji", system-ui, sans-serif; padding: 7px 12px; cursor: pointer; }
.refresh:hover { background: #34343c; }
.tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; padding: 18px 14px; }
.ticket { position: relative; display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; color: #f1f1f3; background: #35353d; border-radius: 6px; padding: 12px 40px 12px 10px; min-height: 64px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.ticket:nth-child(3n + 1) { transform: rotate(-1deg); }
.ticket:nth-child(3n + 2) { transform: rotate(0.6deg); }
.ticket:nth-child(3n) { transform: rotate(-0.4deg); }
.ticket:hover { background: #3f3f48; }
.ticket::before { content: ""; position: absolute; inset: 5px 36px 5px 5px; border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 4px; pointer-events: none; }
.ticket .tname { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; position: relative; }
.ticket .tname span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket .cnt { flex: none; background: rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.ticket .tgame { margin-top: 6px; font-size: 12px; color: #b4b4be; position: relative; }
.ticket .tcode { position: absolute; top: 0; right: 0; bottom: 0; width: 36px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); border-radius: 0 6px 6px 0; border-left: 1px dashed rgba(255, 255, 255, 0.2); font: 800 13px ui-monospace, monospace; color: rgba(255, 255, 255, 0.55); writing-mode: vertical-rl; letter-spacing: 0.15em; }
.nothing { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px 0; font-weight: 400; }
@media (max-width: 640px) { .home-boxes { grid-template-columns: 1fr; } .tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); } .create-row { flex-wrap: wrap; } }
@media (max-width: 420px) { .tickets { grid-template-columns: 1fr; } }

/* Raum: oben Leiste, Spielfeld, unten Statuszeile; rechts Spielerliste + Chat */
body.in-room .frame { display: none; }
.room { position: fixed; inset: 0; display: flex; background: #111114; }
.game { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.game-top { height: 64px; flex: none; box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--card2); border-bottom: 1px solid var(--line); }
.code { background: transparent; border: 0; color: #fff; font: 800 16px/1 ui-monospace, monospace; letter-spacing: 0.08em; padding: 6px 0; cursor: pointer; }
.code:hover { text-decoration: underline; }
.room-title { font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players-n { color: var(--muted); font-size: 13px; margin-left: auto; padding-right: 12px; }
.stage { position: relative; flex: 1; min-height: 240px; background: radial-gradient(circle at 50% 45%, #2a2a2f, #131316 75%); overflow: hidden; }
.ring { position: absolute; inset: 0; }
.seat { position: absolute; transform: translate(-50%, -50%); display: grid; gap: 2px; justify-items: center; text-align: center; width: 130px; }
.seat .sname { font-size: 12px; font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ddd; }
.seat.turn .sname { color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }
.seat .sav { width: 40px; height: 40px; border-radius: 4px; background: #2e2e35; display: grid; place-items: center; overflow: hidden; font-weight: 700; color: #fff; border: 2px solid transparent; }
.seat.turn .sav { border-color: #fff; }
.seat .sav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seat.out .sav, .seat.out .sname { opacity: 0.35; filter: grayscale(1); }
.seat.away .sav, .seat.away .sname { opacity: 0.45; filter: grayscale(1); } /* gone but still in the game */
.hearts { color: #ff5470; letter-spacing: 1px; min-height: 1em; font-size: 12px; }
.typed { min-height: 1.2em; color: #cfcfd6; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.04em; text-transform: uppercase; }
.seat.turn .typed { color: #fff; font-weight: 700; }
.dir { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform 0.55s cubic-bezier(0.3, 1.4, 0.5, 1); }
.dir i { animation: dirnudge 0.7s ease-in-out infinite alternate; }
@keyframes dirnudge { from { translate: 0 0; } to { translate: 6px 0; } }
.dir i { position: absolute; left: 44px; top: -3px; width: 70px; height: 6px; background: #e8e8ee; border-radius: 3px; }
.dir i::after { content: ""; position: absolute; right: -14px; top: -8px; border-left: 16px solid #e8e8ee; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.bomb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4d4d58, #17171b 70%); border: 3px solid #5a5a66; display: grid; place-items: center; font: 800 26px/1 "WP Emoji", system-ui, sans-serif; letter-spacing: 0.04em; color: #fff; z-index: 1; }
/* fuse: curved wick with a flickering spark */
.bomb::before { content: ""; position: absolute; top: -20px; right: 8px; width: 22px; height: 22px; border: 3px solid #8b7355; border-left-color: transparent; border-bottom-color: transparent; border-radius: 0 100% 0 0; transform: rotate(8deg); }
.bomb::after { content: "✹"; position: absolute; top: -34px; right: -10px; font-size: 26px; line-height: 1; color: #ffe9a6; text-shadow: 0 0 6px #ff9f1c, 0 0 14px #ff5a1f; transform-origin: 50% 60%; animation: spark 0.18s steps(2, end) infinite alternate; }
.bomb:not([hidden]) { animation: bombpulse 0.9s ease-in-out infinite; }
@keyframes spark { 0% { transform: scale(0.85) rotate(-14deg); opacity: 0.85; color: #ffe9a6; } 100% { transform: scale(1.2) rotate(18deg); opacity: 1; color: #ff9f1c; } }
@keyframes bombpulse { 0%, 100% { margin-top: 0; } 50% { margin-top: -2px; } }
.bomb.boom { animation: boom 0.5s ease-out; }
@keyframes boom { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9); } 100% { box-shadow: 0 0 0 90px rgba(255, 255, 255, 0); } }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 17px; color: var(--muted); max-width: 55%; }
.bomb:not([hidden]) ~ .center { top: calc(50% + 90px); font-size: 13px; }
.controls { flex: none; display: grid; gap: 8px; justify-items: center; padding: 10px 16px; background: #17171b; border-top: 1px solid var(--line); min-height: 60px; }
.controls .msg { margin: 0; min-height: 1.2em; }
.host-box { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.word-form { width: min(380px, 100%); }
.word-form input { width: 100%; box-sizing: border-box; text-align: center; font-size: 18px; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 440px; }
.letters:empty { display: none; }
.letters span { width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; border-radius: 5px; background: var(--field); color: var(--muted); }
.letters span.got { background: #fff; color: #111; }
.statusbar { flex: none; height: 48px; display: flex; align-items: center; justify-content: center; position: relative; background: var(--card2); border-top: 1px solid var(--line); font-weight: 600; }
.statusbar .btn { position: absolute; left: 12px; padding: 6px 14px; }
.avatar.sm { width: 20px; height: 20px; font-size: 11px; }

.chat { width: var(--chat-w, 300px); flex: none; box-sizing: border-box; border-left: 1px solid var(--edge); display: flex; flex-direction: column; background: #17171a; }
.roster { margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 28%; overflow-y: auto; font-size: 12px; }
.roster table { width: 100%; border-collapse: collapse; }
.roster th { text-align: left; color: var(--muted); font-weight: 600; padding: 5px 10px; position: sticky; top: 0; background: #1d1d22; }
.roster td { padding: 4px 10px; border-top: 1px solid #25252b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.roster tr.turn td { background: rgba(255, 255, 255, 0.08); font-weight: 700; }
.roster tr.out td { opacity: 0.4; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; font-size: var(--chat-size); }
.msg-row { display: block; overflow-wrap: anywhere; line-height: 20px; }
.msg-row > * { vertical-align: middle; }
.msg-row .avatar { display: inline-grid; margin-right: 5px; }
.msg-row .role-ic { width: 16px; height: 16px; margin-right: 5px; }
.msg-row .svc-ic { border-radius: 4px; }
.msg-row .ctext { white-space: pre-line; }
.msg-row.system { color: var(--muted); font-size: 12px; font-style: italic; }
.chat-form { border-top: 1px solid var(--edge); padding: 8px 10px; position: relative; flex-wrap: wrap; }
.emoji-box { position: absolute; left: 0; right: 0; bottom: 100%; max-height: 260px; overflow-y: auto; background: var(--card); border-top: 1px solid var(--edge); scrollbar-width: thin; z-index: 40; }
.emoji-box[hidden] { display: none; }
.emoji-row { display: flex; align-items: center; gap: 10px; padding: 4px 12px; cursor: pointer; font-size: 14px; }
.emoji-row:hover, .emoji-row.on { background: rgba(255, 255, 255, 0.1); }
.emoji-ic { width: 26px; text-align: center; font-size: 18px; }
.emoji-nm { color: #cfcfd6; }
.chat-form input { width: 100%; box-sizing: border-box; }
body.in-room .bar { left: auto; right: 0; width: var(--chat-w, 300px); transform: none; }

.stats { border-bottom: 1px solid var(--line); font-size: 12px; background: #1a1a1f; }
.stats-title { padding: 5px 10px; color: var(--muted); font-weight: 600; background: #1d1d22; }
.stats-scroll { max-height: 230px; overflow: auto; scrollbar-width: thin; }
.stats table { width: 100%; min-width: 500px; border-collapse: collapse; text-align: center; }
.stats th { color: var(--muted); font-weight: 600; padding: 4px 6px; position: sticky; top: 0; background: #1d1d22; white-space: nowrap; }
.stats td { padding: 5px 6px; border-top: 1px solid #25252b; white-space: nowrap; }
.stats td:first-child, .stats th:first-child { text-align: left; max-width: 130px; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; }
.stats td.sub { color: var(--muted); }
.stats tr.out td { opacity: 0.4; }
.stats tr.out td:first-child { text-decoration: line-through; }

@media (max-width: 760px) {
  .room { flex-direction: column; }
  .chat { width: auto; height: 40vh; border-left: 0; border-top: 1px solid var(--edge); }
  .roster { margin-top: 0; max-height: 22%; }
  body.in-room .bar { width: 100%; }
  .game-top { padding-right: 190px; }
}

/* Regeln-Fenster */
.modal { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.6); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: min(720px, 100%); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); overflow: hidden; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 18px; }
.x { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge); background: #26262c; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.dialog-body { overflow-y: auto; padding: 4px 18px 14px; }
.rsec { padding: 12px 0; border-bottom: 1px dashed #33333b; }
.rsec:last-child { border-bottom: 0; }
.rsec h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.04em; color: #fff; display: flex; align-items: center; gap: 8px; }
.rsec h3::before { content: ""; width: 4px; height: 14px; background: #fff; border-radius: 2px; }
.rtext { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.rrow { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--muted); font-size: 13px; }
.rrow input[type=range] { flex: 1; accent-color: #fff; }
.rnum { width: 64px; text-align: center; }
.dialog select, .dialog input[type=number] { background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: 14px "WP Emoji", system-ui, sans-serif; }
.dialog select { width: 100%; }
.dialog :disabled { opacity: 0.55; cursor: not-allowed; }
.stat { display: flex; justify-content: space-between; max-width: 260px; font-size: 14px; padding: 2px 0; color: var(--muted); }
.stat b { color: #fff; font-weight: 600; }
.bonus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin: 8px 0; }
.bl { display: grid; justify-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.bl .rnum { width: 56px; }
.dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.dialog-foot .hint { margin-right: auto; }
.btn.mini { padding: 6px 12px; font-size: 13px; }
.btn.mini.quiet { background: var(--card3); color: #fff; }
.game-top .players-n { margin-left: auto; }
.seat-box { display: flex; gap: 10px; }
.seat.won .sav { border-color: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, 0.5); }
.crown { margin-right: 4px; }
.roster tr.watch td { color: var(--muted); font-style: italic; }
.center.has-winner { font-size: 16px; }
.winner { display: grid; justify-items: center; gap: 10px; }
.wav { width: 96px; height: 96px; border-radius: 8px; background: #2e2e35; display: grid; place-items: center; overflow: hidden; font: 800 40px "WP Emoji", system-ui, sans-serif; color: #fff; border: 3px solid #fff; box-shadow: 0 0 30px rgba(255, 255, 255, 0.35); }
.wav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wname { font-weight: 800; font-size: 20px; color: #fff; }

.countdown { font-weight: 800; color: #fff; background: #2f2f37; border: 1px solid var(--edge); border-radius: 999px; padding: 6px 14px; font-size: 14px; white-space: nowrap; }
.game-top .room-title { min-width: 0; flex: 0 1 auto; }
.countdown { flex: none; display: none; }
.game-top .players-n { white-space: nowrap; }
@media (max-width: 1100px) { .game-top .players-n { display: none; } }

.bomb canvas { width: 92px; height: 37px; display: block; }

.legal { display: flex; justify-content: center; gap: 10px; padding: 8px 0 4px; font-size: 13px; color: var(--muted); }
.legal a { color: var(--muted); }
.legal a:hover { color: #fff; }

/* big countdown for everyone in the middle */
.cd-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 2; pointer-events: none; }
.cd-big small { display: block; color: var(--muted); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.cd-big b { display: block; font-size: 72px; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.cd-big.note b { font-size: 20px; font-weight: 600; }
.typed { transition: none; }
.typed em { font-style: normal; color: #fff; font-weight: 800; }

/* Tabs im Seitenbereich: Chat / Personen */
.tabs { display: flex; flex: none; border-bottom: 1px solid var(--line); background: #1d1d22; }
.tab { flex: 1; padding: 7px 0; font-size: 18px; line-height: 1.2; background: none; border: 0; border-bottom: 2px solid transparent; color: #fff; cursor: pointer; opacity: 0.55; }
.tab:hover { opacity: 0.85; }
.tab.on { opacity: 1; border-bottom-color: #fff; background: #26262c; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane[hidden] { display: none; }
.people-search { margin: 8px 10px; flex: none; }
.people-list { flex: 1; overflow-y: auto; padding: 0 6px 10px; }
.people-sec { padding: 8px 10px 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.person { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 6px 8px; background: none; border: 0; border-radius: 8px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.person:hover { background: rgba(255, 255, 255, 0.07); }
.person .pav { width: 36px; height: 36px; border-radius: 50%; background: #3a3a42; display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700; color: #fff; }
.person .pav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .ptxt { flex: 1; min-width: 0; line-height: 1.25; }
.person .pname { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .psub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .pbadge { flex: none; font-size: 14px; }
.person.banned .pname { text-decoration: line-through; }
.person.banned .pav, .person.banned .ptxt { opacity: 0.55; }
.person.banned::after { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #e0443e linear-gradient(#fff, #fff) center / 10px 3px no-repeat; }
.person.away .pav, .person.away .ptxt { opacity: 0.45; filter: grayscale(1); }
.person .role-ic { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.userpane { align-items: center; padding: 12px 14px; overflow-y: auto; text-align: center; gap: 4px; }
.userpane .back { align-self: flex-start; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 2px 0 6px; }
.userpane .back:hover { color: #fff; }
.userpane .bigav { width: 64px; height: 64px; border-radius: 50%; background: #3a3a42; display: grid; place-items: center; overflow: hidden; font-size: 26px; font-weight: 700; color: #fff; margin-top: 4px; }
.userpane .bigav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.userpane .uname { font-weight: 800; font-size: 16px; margin-top: 6px; overflow-wrap: anywhere; }
.userpane .utag { color: var(--muted); font-size: 12px; }
.userpane .uid { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; }
.userpane .uid i { font-style: normal; font-size: 10px; font-weight: 800; background: #5865a8; color: #fff; padding: 2px 4px; border-radius: 4px; }
.userpane .ustate { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 2px; }
.userpane .ustate.red::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #e0443e linear-gradient(#fff, #fff) center / 8px 2px no-repeat; }
.userpane .ubtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.ubtn { background: #fff; color: #111; border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 14px; line-height: 1.2; font-weight: 700; cursor: pointer; }
.ubtn:hover { background: #dcdce2; }
.ubtn.danger { background: #e0443e; color: #fff; margin: 0; border: 0; border-radius: 999px; grid-column: auto; padding: 8px 18px; font-size: 14px; }
.ubtn.danger:hover { background: #c4372f; }

/* Gebannt / gekickt: eigene Seite */
.gone { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px 16px; background: var(--bg); }
.gone[hidden] { display: none; }
.gone h1 { margin: 0; font-size: 34px; color: #cfcfd6; }
.gone p { margin: 0; color: #e8e8ee; font-size: 16px; }
.gone .gone-links { margin-top: 10px; color: var(--muted); }
.gone a { color: #fff; text-decoration: underline; }

/* ---- News & Changelog ---- */
/* name bar scrolls with the home page  */
body:has(#panel:not([hidden])) .bar { transform: translateX(-50%); }

.box.discordbox { text-align: center; }
.box.discordbox .go { margin-top: 4px; }
.box.discordbox .msg { margin: 8px 0 0; }
.box.discordbox .msg.ok { color: #7dfcc0; }

.chat-link { color: #8fb4ff; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.chat-link:hover { color: #b7cfff; }

/* multi line chat field */
.chat-form textarea, .m-inrow textarea { background: var(--field); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: inherit; line-height: 20px; outline: none; text-align: left; }
.chat-form textarea::placeholder, .m-inrow textarea::placeholder { color: #6c6c76; }
.chat-form textarea:focus, .m-inrow textarea:focus { border-color: var(--accent); }
.chat-form textarea { width: 100%; box-sizing: border-box; resize: none; overflow-y: auto; max-height: 140px; display: block; }
.send-btn { display: none; flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #ff6b8b; color: #fff; font-size: 18px; cursor: pointer; }
@media (pointer: coarse) {
  .chat-form { display: flex; gap: 8px; align-items: flex-end; }
  .chat-form textarea { flex: 1; width: auto; }
  .send-btn { display: block; }
}
.m-bubble span { white-space: pre-line; }

/* phone: chat is a panel from the right, opened with the arrow top right */
.chat-toggle { display: none; position: relative; flex: none; width: 36px; height: 36px; margin-left: 8px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: #fff; cursor: pointer; place-items: center; padding: 0; }
.chat-toggle svg { transition: transform 0.2s; }
.chat-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.chat-toggle .dot { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #ff6b8b; border: 2px solid var(--card); }
@media (max-width: 760px) {
  body.in-room .chat-toggle { display: grid; }
  body.in-room .bar { background: #17171a; border-bottom: 1px solid var(--line); height: 60px; padding: 12px 10px; align-items: center; z-index: 30; }
  .room { padding-top: 60px; box-sizing: border-box; flex-direction: column; }
  .game-top { height: auto; min-height: 48px; padding: 6px 10px; gap: 8px; flex-wrap: wrap; }
  .game-top .room-title { display: none; }
  .game-top .btn.mini { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  .chat { position: fixed; z-index: 15; top: 60px; right: 0; bottom: auto; height: calc(var(--vvh, 100dvh) - 60px); width: min(88vw, 420px) !important; border-left: 1px solid var(--edge); border-top: 0; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.55); transform: translateX(105%); transition: transform 0.22s ease; visibility: hidden; }
  .chat.open { transform: none; visibility: visible; }
  .roster { margin-top: 0; max-height: 30%; }
  .stats-scroll { max-height: 160px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .chat { transition: none; } }

.games .game.sel { border-color: #fff; opacity: 1; }
.games .game:hover { opacity: 1; }

/* game content editor picker (game + languages) */
.gce-pick { flex: 1 1 100%; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); text-align: left; }
.gce-h { margin: 0; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.gce-all { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.gce-games, .gce-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gce-game, .gce-lang { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: transparent; color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.gce-game:hover, .gce-lang:hover { border-color: var(--accent); }
.gce-game.on, .gce-lang.on { border-color: var(--accent); background: rgb(255 255 255 / 0.06); }
.gce-game img { width: 40px; height: 40px; flex: none; }
.gce-lang img { width: 22px; height: 16px; flex: none; border-radius: 3px; object-fit: cover; }
.gce-lang span { flex: 1; min-width: 0; font-size: 14px; }
.gce-lang i { font-style: normal; color: var(--accent); font-weight: 700; }
.gce-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--accent); }
.gce-preview.bad { border-color: #ff8a8a; }
.gce-preview img { width: 44px; height: 44px; flex: none; }
.gce-preview b { display: block; }
.gce-preview small { color: var(--muted); font-size: 12px; }

.avatar.clickable { cursor: pointer; }

.home-top { gap: 18px; }
.online { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; color: var(--fg); white-space: nowrap; }
.online i { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.18); }

#help-link .hp-dot { display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: #4a74f0; vertical-align: middle; }

/* translated text under a message (opened from the right click menu) */
.tr-host { position: relative; }
.tr-out { display: block; margin: 2px 0 4px; font-size: 12px; line-height: 17px; color: var(--muted); white-space: normal; }
.tr-text { display: block; font-style: italic; color: #d4d4da; white-space: pre-line; overflow-wrap: anywhere; }
.tr-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.tr-meta svg { flex: none; opacity: .8; }
.tr-x { padding: 0; border: 0; background: none; color: #8ab4ff; font: inherit; cursor: pointer; }
.tr-x:hover { text-decoration: underline; }

/* translate button: hidden when the message is already in my language */

/* reply to a message */
.ctx-menu { position: fixed; z-index: 1000; min-width: 190px; padding: 6px; border: 1px solid var(--edge); border-radius: 8px; background: var(--card); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.ctx-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 7px 8px; border: 0; border-radius: 4px; background: none; color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.ctx-item.dim { opacity: .5; }
.ctx-item svg { flex: none; color: var(--muted); }
.ctx-item:hover, .ctx-item:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.rp-quote { display: flex; align-items: center; gap: 5px; max-width: 100%; margin: 2px 0 3px; padding: 1px 0 1px 7px; border-left: 2px solid var(--accent, #6b8cff); color: var(--muted); font-size: 12px; line-height: 17px; cursor: pointer; overflow: hidden; white-space: nowrap; }
.rp-quote svg { flex: none; }
.rp-quote b { flex: none; font-weight: 600; color: #b9b9c2; }
.rp-quote span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rp-quote:hover span { color: var(--fg, #fff); }
.rp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 0 0 calc(100% + 20px); box-sizing: border-box; margin: -8px -10px 0; padding: 7px 12px; background: var(--card3); color: var(--muted); font-size: 12px; line-height: 16px; min-width: 0; }
.rp-bar[hidden] { display: none; }
.rp-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-bar b { font-weight: 600; color: var(--fg); }
.rp-close { flex: none; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--fg); cursor: pointer; }
.rp-close:hover { background: rgba(255, 255, 255, .26); }
@keyframes rp-blink { 0%, 60% { background: rgba(107, 140, 255, .22); } 100% { background: transparent; } }
.rp-flash { animation: rp-blink 1.4s ease-out; border-radius: 6px; }

/* birthday effect (cake name in the room chat) */
.party-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; transition: opacity .6s; }
.party-fx.fade { opacity: 0; }
.party-item { position: absolute; line-height: 1; opacity: .9; animation: 7s linear forwards; will-change: transform; }
.party-item.down { top: -90px; animation-name: party-down; }
.party-item.up { bottom: -90px; animation-name: party-up; }
@keyframes party-down { to { transform: translate(var(--sway), var(--dist)) rotate(var(--spin)); } }
@keyframes party-up { to { transform: translate(var(--sway), calc(var(--dist) * -1)) rotate(var(--spin)); } }
.stage > .ring, .stage > .bomb, .stage > .dir { z-index: 1; }

/* small phones: the logo text makes way for the name pill, nothing overlaps in the header */
@media (max-width: 600px) {
  .home-logo > span { display: none; }
  .home-top { padding: 0 12px; height: 56px; }
  .home-top .online { margin-left: 10px; }
  .bar { padding: 10px 12px; gap: 8px; }
  .pill { min-width: 0; max-width: 44vw; }
  .namebtn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-boxes { padding: 10px; gap: 10px; }
  .list-head { margin: 6px 10px 0; }
  .tickets { padding: 14px 10px; }
  .games .game { width: calc(50% - 4px); }
}
@media (max-width: 380px) {
  .home-boxes .box { padding: 10px; }
  .create-row #room-name { flex: 1 1 100%; width: 100%; box-sizing: border-box; }
}
@media (max-width: 400px) {
  .home-top .online { padding: 4px 8px; }
  .home-top .online span { display: none; }
}
