@charset "UTF-8";
/* =============================================================================
   Myso_44 Gamehub · chat.css — Chat überall (RAEUME.md, Etappe 2) · One UI
   Knopf unten rechts (.cw-fab) mit Zähler, Fenster (.cw) darüber; in der Lobby liegt das Fenster
   fest im Bereich (.cw.is-docked im #chat des .st-dock). Nur --ou-*-Tokens.
   ========================================================================== */

/* ---------------------------------------------------------------- Knopf */
.cw-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--ou-line-strong);
  border-radius: 999px;
  background: var(--ou-surface);
  color: var(--ou-text);
  box-shadow: var(--ou-drop);
  font: 600 var(--ou-fs-sm)/1 var(--ou-font-body);
  cursor: pointer;
}
.cw-fab.hidden { display: none; }
.cw-fab:hover, .cw-fab:focus-visible { border-color: var(--ou-primary); }
.cw-fab[aria-expanded="true"] { border-color: var(--ou-primary); }
.cw-fab .icon, .cw-fab svg { width: 20px; height: 20px; }
.cw-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ou-primary);
  color: var(--ou-on-primary, var(--ou-surface));
  font: 700 .75rem/22px var(--ou-font-body);
  text-align: center;
}
.cw-count.hidden { display: none; }
@media (max-width: 539px) { .cw-fab-label { display: none; } .cw-fab { padding: 0 12px; } }

/* ---------------------------------------------------------------- Fenster */
.cw {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 60px);
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 32px));
  height: min(640px, calc(100dvh - 150px));
  overflow: hidden;
  border: 1px solid var(--ou-line-strong);
  border-radius: var(--ou-radius);
  background: var(--ou-surface);
  box-shadow: var(--ou-drop);
  animation: cw-in var(--ou-dur, 220ms) var(--ou-ease) both;
}
.cw.hidden { display: none; }
@keyframes cw-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .cw { animation: none; } }
/* Handy: Fenster über die ganze Breite, fast die ganze Höhe */
@media (max-width: 539px) {
  .cw:not(.is-docked) { right: 8px; left: 8px; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 60px); width: auto; height: calc(100dvh - 140px); }
}

/* Fest in der Lobby: füllt seinen Platz im Bereich */
.cw.is-docked {
  position: static;
  width: auto;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: none;
}
.cw.is-docked .cw-close { display: none; }

.cw-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--ou-line); }
.cw.is-docked .cw-head { padding: 0 0 8px; }
.cw-tabs { display: flex; flex: 1; gap: 4px; min-width: 0; }
.cw-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--ou-radius-sm);
  background: none;
  color: var(--ou-muted);
  font: 400 1.25rem/1 var(--ou-font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
}
.cw-tab.hidden { display: none; }
.cw-tab:hover { color: var(--ou-text); }
.cw-tab.is-on { border-color: var(--ou-line-strong); background: color-mix(in srgb, var(--ou-text) 5%, transparent); color: var(--ou-text); }
.cw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ou-primary); }
.cw-dot.hidden { display: none; }

/* ---------------------------------------------------------------- Nachrichten */
.cw-log { flex: 1 1 0; min-height: 0; margin: 0; padding: 8px 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.cw.is-docked .cw-log { padding: 4px 0; }
.cw-empty { margin: 0; padding: 0 16px 16px; color: var(--ou-muted); font-size: var(--ou-fs-sm); line-height: 1.5; }
.cw-empty.hidden { display: none; }
.cw-day { margin: 10px 14px 4px; color: var(--ou-faint); font: 600 .6875rem/1.4 var(--ou-font-body); letter-spacing: .08em; text-align: center; text-transform: uppercase; }

.cw-msg { position: relative; padding: 8px 14px 4px; border-radius: var(--ou-radius-sm); transition: background-color var(--ou-dur-fast) var(--ou-ease); }
.cw.is-docked .cw-msg { padding-inline: 6px; }
.cw-msg.is-cont { padding-top: 1px; }
.cw-msg:hover, .cw-msg.is-act { background: color-mix(in srgb, var(--ou-text) 4%, transparent); }
.cw-msg.is-flash { background: color-mix(in srgb, var(--ou-primary) 14%, transparent); }
.cw-meta { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 2px; }
.cw-name { min-width: 0; overflow: hidden; color: var(--ou-text); font-size: .875rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cw-name[data-profile] { cursor: pointer; }
.cw-msg.is-host .cw-name { color: var(--ou-primary-ink); }
.cw-msg.is-me .cw-name { color: var(--ou-muted); }
.cw-time { margin-left: auto; flex: none; color: var(--ou-faint); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.cw-text { color: var(--ou-text); font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.cw-msg.is-host .cw-text { color: var(--ou-text); }

/* Antwort: Auszug der zitierten Nachricht */
.cw-quote {
  display: block;
  max-width: 100%;
  margin: 2px 0 4px;
  padding: 2px 0 2px 8px;
  overflow: hidden;
  border: 0;
  border-left: 2px solid var(--ou-line-strong);
  background: none;
  color: var(--ou-muted);
  font: 400 .8125rem/1.4 var(--ou-font-body);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.cw-quote b { color: var(--ou-text); font-weight: 600; }

/* Reaktionen unter der Nachricht */
.cw-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.cw-react {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--ou-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ou-text) 3%, transparent);
  color: var(--ou-text);
  font: 600 .75rem/1.5 var(--ou-font-body);
  cursor: pointer;
}
.cw-react b { color: var(--ou-muted); font-variant-numeric: tabular-nums; }
.cw-react.is-mine { border-color: var(--ou-primary); background: color-mix(in srgb, var(--ou-primary) 12%, transparent); }
.cw-react:hover { border-color: var(--ou-line-strong); }

/* Aktionen: schwebende Leiste oben rechts (Maus: beim Überfahren, Handy: nach Tippen) */
.cw-actions {
  position: absolute;
  top: -14px;
  right: 10px;
  z-index: 1;
  display: none;
  align-items: center;
  gap: 2px;
  max-width: calc(100% - 20px);
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--ou-line-strong);
  border-radius: var(--ou-radius-sm);
  background: var(--ou-surface);
  box-shadow: var(--ou-drop);
}
.cw-msg.is-act .cw-actions { display: flex; }
@media (hover: hover) { .cw-msg:hover .cw-actions, .cw-msg:focus-within .cw-actions { display: flex; } }
.cw-msg:first-child .cw-actions, .cw-day + .cw-msg .cw-actions { top: 2px; }
.cw-act, .cw-pick {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 0;
  border-radius: var(--ou-radius-sm);
  background: none;
  color: var(--ou-text);
  font: 600 .75rem/1.2 var(--ou-font-body);
  cursor: pointer;
}
.cw-act svg { width: 14px; height: 14px; }
.cw-act:hover, .cw-pick:hover { background: color-mix(in srgb, var(--ou-text) 8%, transparent); }
.cw-picks { display: inline-flex; gap: 1px; padding-inline: 2px; border-inline: 1px solid var(--ou-line); }
.cw-del { color: var(--ou-primary-ink); }

/* ---------------------------------------------------------------- Eingabe */
.cw-replying { display: flex; align-items: center; gap: 8px; flex: none; margin: 0 12px; padding: 6px 4px 6px 10px; border-left: 2px solid var(--ou-primary); background: color-mix(in srgb, var(--ou-text) 4%, transparent); color: var(--ou-muted); font-size: .8125rem; }
.cw.is-docked .cw-replying { margin: 0; }
.cw-replying.hidden { display: none; }
.cw-replying-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-replying-text b { color: var(--ou-text); }
.cw-replying-x { flex: none; padding: 4px; }
.cw-form { display: flex; gap: 8px; flex: none; padding: 10px 12px 12px; }
.cw.is-docked .cw-form { padding: 8px 0 0; }
.cw-form input { flex: 1; min-width: 0; padding: 10px 12px; }
.cw-send { flex: none; padding: 10px 14px; }

/* ---------------------------------------------------------------- Lobby: mehr Platz für den Chat */
.st-lobby .st-dock { display: flex; flex-direction: column; gap: 10px; }
.st-lobby .st-dock #chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; }
.st-lobby .lobby-emotes { flex: none; }
.st-lobby .lobby-emotes .react-label { margin: 0 0 6px; }
.st-lobby.st-float:not(.is-phone):not(.st-flat) .st-sheet-body { flex: 0 1 auto; max-height: 48%; }
.st-lobby.st-float:not(.is-phone):not(.st-flat) .st-dock { flex: 1 1 0; max-height: none; min-height: 280px; overflow: hidden; }
.st-studio.is-phone .st-dock #chat, .st-studio.st-flat .st-dock #chat { height: min(60dvh, 520px); }

/* ---------------------------------------------------------------- Wer ist gerade da (RAEUME.md, Etappe 7) */
.app-bar { position: sticky; }
.who-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--ou-line); border-radius: 999px; background: none; color: var(--ou-muted); font: 600 var(--ou-fs-sm)/1 var(--ou-font-body); cursor: pointer; }
.who-btn.hidden { display: none; }
.who-btn svg { width: 18px; height: 18px; }
.who-btn.has-people { border-color: var(--ou-line-strong); color: var(--ou-text); }
.who-btn.has-people .who-count { color: var(--ou-primary-ink); }
.who-btn:hover, .who-btn[aria-expanded="true"] { border-color: var(--ou-primary); }
.who-count { font-variant-numeric: tabular-nums; }
@media (max-width: 539px) { .who-label { display: none; } }
.who-pop { position: absolute; top: calc(100% + 6px); right: max(12px, var(--pad-x)); z-index: 45; width: min(360px, calc(100vw - 24px)); max-height: min(70dvh, 520px); overflow: auto; padding: 10px; border: 1px solid var(--ou-line-strong); border-radius: var(--ou-radius); background: var(--ou-surface); box-shadow: var(--ou-drop); }
.who-pop.hidden { display: none; }
.who-head { margin: 4px 6px 8px; color: var(--ou-muted); font-size: var(--ou-fs-sm); }
.who-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.who-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--ou-radius-sm); background: none; color: var(--ou-text); text-align: left; cursor: pointer; }
.who-row:hover, .who-row:focus-visible { border-color: var(--ou-line-strong); background: color-mix(in srgb, var(--ou-text) 4%, transparent); }
.who-row svg { width: 16px; height: 16px; flex: none; color: var(--ou-muted); }
.who-text { display: grid; gap: 2px; min-width: 0; font-weight: 600; }
.who-place { color: var(--ou-muted); font-size: .8125rem; font-weight: 500; }

/* ---------------------------------------------------------------- Showmaster-Zugang und Version (0.8.5.0) */
.sm-btn { color: var(--ou-muted); }
.sm-btn:hover, .sm-btn[aria-expanded="true"] { color: var(--ou-yellow); }
.sm-pop { position: absolute; top: calc(100% + 6px); right: max(12px, var(--pad-x)); z-index: 46; display: grid; gap: 10px; width: min(320px, calc(100vw - 24px)); padding: 14px; border: 1px solid var(--ou-line-strong); border-radius: var(--ou-radius); background: var(--ou-surface); box-shadow: var(--ou-drop); }
.sm-pop.hidden { display: none; }
.sm-kicker { margin: 0; color: var(--ou-yellow-ink, var(--ou-muted)); font: 600 var(--ou-fs-xs)/1.35 var(--ou-font-body); letter-spacing: var(--ou-label-tracking); text-transform: uppercase; }
.sm-text { margin: 0; color: var(--ou-muted); font-size: var(--ou-fs-sm); line-height: 1.5; }
.sm-form { display: grid; gap: 8px; }
.sm-err:empty { display: none; }
.sm-go { justify-self: start; }
.sm-version { margin: 0; color: var(--ou-faint); font-size: .6875rem; }
.app-version { color: var(--ou-faint); font-size: .75rem; }

/* ---------------------------------------------------------------- Mitteilungszentrale und Meldungen (0.8.5.0) */
.nt-btn { position: relative; }
.nt-btn.has-news { color: var(--ou-text); border-color: var(--ou-primary); }
.nt-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ou-primary); color: var(--ou-on-primary, var(--ou-cream)); font: 700 .6875rem/18px var(--ou-font-body); text-align: center; box-shadow: 0 0 0 2px var(--ou-bg); }
.nt-badge.hidden { display: none; }
.nt-btn.has-news .nt-badge::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--ou-primary); animation: nt-pulse 2s ease-out infinite; }
.nt-btn.is-ring > .icon { animation: nt-ring .7s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes nt-pulse { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@keyframes nt-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .nt-btn.has-news .nt-badge::after, .nt-btn.is-ring > .icon { animation: none; } }

.nt-pop { position: absolute; top: calc(100% + 6px); right: max(12px, var(--pad-x)); z-index: 46; display: grid; gap: 10px; align-content: start; width: min(400px, calc(100vw - 24px)); max-height: min(72vh, 620px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid var(--ou-line-strong); border-radius: var(--ou-radius); background: var(--ou-surface); box-shadow: var(--ou-drop); }
.nt-pop.hidden { display: none; }
.nt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border: 1px solid var(--ou-line); border-radius: var(--ou-radius-sm); }
.nt-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 4px 8px; border: 0; border-radius: calc(var(--ou-radius-sm) - 2px); background: none; color: var(--ou-muted); font: 600 var(--ou-fs-sm)/1.2 var(--ou-font-body); cursor: pointer; }
.nt-tab.is-on { background: var(--ou-surface-2, var(--ou-line)); color: var(--ou-text); }
.nt-count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--ou-primary); color: var(--ou-on-primary, var(--ou-cream)); font-size: .6875rem; line-height: 18px; }
.nt-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nt-item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--ou-line); border-radius: var(--ou-radius-sm); }
.nt-item.is-new { border-color: color-mix(in srgb, var(--ou-primary) 55%, transparent); background: color-mix(in srgb, var(--ou-primary) 7%, transparent); }
.nt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nt-title { min-width: 0; font-size: var(--ou-fs-sm); line-height: 1.35; overflow-wrap: anywhere; }
.nt-time { flex: none; color: var(--ou-faint); font-size: .75rem; }
.nt-sub, .nt-body p, .nt-comment { margin: 0; color: var(--ou-muted); font-size: var(--ou-fs-sm); line-height: 1.5; }
.nt-body { display: grid; gap: 6px; }
.nt-body h4 { margin: 4px 0 0; font-size: var(--ou-fs-sm); }
.nt-body ul { display: grid; gap: 3px; margin: 0; padding-left: 18px; color: var(--ou-muted); font-size: var(--ou-fs-sm); line-height: 1.45; }
.nt-comment { padding-left: 10px; border-left: 2px solid var(--ou-line-strong); color: var(--ou-text); }
.nt-gift { display: flex; align-items: center; gap: 10px; }
.nt-gift .outfit-thumb { width: 56px; height: 56px; }
.nt-rarity { color: var(--rar, var(--ou-muted)); font: 600 var(--ou-fs-xs)/1.3 var(--ou-font-body); letter-spacing: var(--ou-label-tracking); text-transform: uppercase; }
.nt-gift[data-rarity="mythic"] { --rar: var(--ou-green); }
.nt-gift[data-rarity="legendary"] { --rar: var(--ou-yellow); }
.nt-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-empty { margin: 0; color: var(--ou-muted); font-size: var(--ou-fs-sm); line-height: 1.5; }
.nt-foot .btn-ghost { white-space: nowrap; }
.nt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--ou-line); }
.nt-kicker { margin: 0; color: var(--ou-muted); font: 600 var(--ou-fs-xs)/1.35 var(--ou-font-body); letter-spacing: var(--ou-label-tracking); text-transform: uppercase; }
.nt-form { display: grid; gap: 8px; }
.nt-form textarea { resize: vertical; }
.nt-form .err:empty { display: none; }
.nt-form button[type="submit"] { justify-self: start; }
.nt-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nt-kind { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border: 1px solid var(--ou-line); border-radius: var(--ou-radius-sm); color: var(--ou-muted); font-weight: 600; cursor: pointer; }
.nt-kind input { position: absolute; opacity: 0; pointer-events: none; }
.nt-kind:has(input:checked) { border-color: var(--ou-primary); color: var(--ou-text); background: color-mix(in srgb, var(--ou-primary) 8%, transparent); }
.nt-kind:has(input:focus-visible) { outline: 2px solid var(--ou-focus, var(--ou-primary)); outline-offset: 2px; }
.nt-status { flex: none; padding: 1px 8px; border: 1px solid var(--ou-line-strong); border-radius: 999px; color: var(--ou-muted); font-size: .75rem; font-weight: 600; }
.nt-status.is-progress { border-color: var(--ou-yellow); color: var(--ou-text); }
.nt-status.is-done { border-color: var(--ou-green); color: var(--ou-text); }
.nt-status.is-wontfix { color: var(--ou-faint); }
@media (max-width: 520px) { .nt-bug { display: none; } }
/* Schmale Handys: Kopfleiste mit Mitteilungen, Krone, Ton und Thema passt in eine Zeile */
@media (max-width: 420px) {
  .app-bar { gap: 4px; }
  .app-bar .brand img { height: 30px; width: auto; }
  .app-bar .icon-btn, .app-bar .me-btn, .app-bar #themeSwitchHost button, .app-bar #soundToggleHost button { width: 34px; height: 34px; min-width: 34px; }
  .app-bar .who-btn { height: 34px; padding: 0 8px; gap: 4px; }
}
