@charset "UTF-8";
/* =============================================================================
   Myso_44 Gamehub · studio.css — Startseite und Lobby als Studio (STARTSEITE.md) · One UI
   Links der Raum in 3D (studio-3d.js) als dunkle Insel, rechts der Bereich der gewählten
   Station im Thema der Seite. Schmal (.is-phone, setzt studio.js) oder ohne WebGL (.st-flat):
   Raum oben bzw. gar nicht, Bereich darunter. Nur --ou-*-Tokens, keine eigenen Farben.
   Das Casino (#casinoStudio, Feinheiten in casino.css) hat zwei Räume auf einer Leinwand und
   legt an einer Station das Modell des Spiels als Ebene (.st-layer) über den Raum.
   ========================================================================== */

/* Das Studio füllt das Fenster unter der Kopfleiste, ohne Höchstmaß (Fußzeile folgt darunter) */
@media (min-width: 720px) {
  #startView.st-view, #lobbyView.st-view, #casinoView.st-view, #halleView.st-view { max-width: none; }
  .app-main:has(> .st-view:not(.hidden)) { padding: 12px; }
}

.st-studio {
  --st-sheet-w: clamp(360px, 30vw, 500px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: max(480px, calc(100dvh - var(--app-bar-h) - 24px));
  overflow: hidden;
  border: 1px solid var(--ou-line);
  border-radius: var(--ou-radius);
  background: var(--ou-surface);
}
.st-studio.is-open { grid-template-columns: minmax(0, 1fr) min(440px, 40%); }

/* Startseite und Lobby (.st-float, setzt studio.js): der Bereich liegt als Karte über dem Raum,
   so hoch wie sein Inhalt; die Kamera rückt die Station in die freie Fläche links davon. */
.st-float.is-open:not(.is-phone):not(.st-flat) { grid-template-columns: minmax(0, 1fr); }
.st-float:not(.is-phone):not(.st-flat) .st-sheet {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: var(--st-sheet-w);
  max-height: calc(100% - 32px);
  border: 1px solid var(--ou-line-strong);
  border-radius: var(--ou-radius);
  box-shadow: var(--ou-drop);
  animation: st-sheet-in var(--ou-dur-slow, 320ms) var(--ou-ease) both;
}
.st-lobby.st-float:not(.is-phone):not(.st-flat) .st-sheet { bottom: 16px; }   /* Chat braucht die Höhe */
@keyframes st-sheet-in { from { opacity: 0; transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .st-float .st-sheet { animation: none; } }
/* Leiste und Profil-Knopf rücken neben die Karte */
.st-float.is-open:not(.is-phone):not(.st-flat) .st-nav { right: calc(var(--st-sheet-w) + 28px); }
.st-float.is-open:not(.is-phone):not(.st-flat) .start-profile { right: calc(var(--st-sheet-w) + 32px); }
.st-store { display: none; }

/* ---------------------------------------------------------------- Raum */
.st-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--ou-surface-2);
  color: var(--ou-text);   /* dunkle Insel (data-ou-theme="dark"): Schrift aus der Insel, nicht vererbt */
}
.st-viewport { position: relative; flex: 1 1 0; min-height: 0; }
.st-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 600ms var(--ou-ease); touch-action: pan-y; }
.st-studio.is-3d .st-canvas { opacity: 1; }
.st-studio.is-3d .st-canvas.is-swap { opacity: 0; transition-duration: 160ms; }   /* Raumwechsel: kurz abblenden */

/* Bild einer Station über dem Raum (data-visual): erscheint, wenn die Kamera angekommen ist */
.st-layer { position: absolute; inset: 0; z-index: 1; opacity: 0; visibility: hidden; transition: opacity 260ms var(--ou-ease), visibility 0s 260ms; }
.st-layer.is-on { opacity: 1; visibility: visible; transition: opacity 260ms var(--ou-ease); }

/* Kopf auf der Szene: Begrüßung (Startseite) bzw. Status (Lobby) */
.st-head { position: absolute; top: 16px; left: 16px; z-index: 3; max-width: min(430px, calc(100% - 130px)); margin: 0; }
.st-head.start-head {
  padding: 10px 16px 10px 10px;
  border-radius: var(--ou-radius);
  background: color-mix(in srgb, var(--ou-surface) 88%, transparent);
  box-shadow: var(--ou-drop);
}
.st-head.start-head .avatar { width: 48px; height: 48px; font-size: 1.7rem; }
.st-head .start-who h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.1rem); overflow-wrap: anywhere; }
.st-head .start-who .kicker { display: none; }
.home-cash { color: var(--ou-yellow-ink); font-size: var(--ou-fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.st-scene .start-profile { position: absolute; top: 16px; right: 16px; z-index: 3; background: var(--ou-surface); }
.lobby-head { max-width: min(400px, calc(100% - 32px)); }
.lobby-head .joined-head { margin-bottom: 8px; }
:where(.app-main) .lobby-head .joined-head h2 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 2.25rem); }
.lobby-head .lobby-status { margin: 0; box-shadow: var(--ou-drop); }
.lobby-head .me-badge { background: var(--ou-surface); }

/* Schilder vor den Stationen (Übersicht) */
.st-tags { position: absolute; inset: 0; z-index: 1; display: none; pointer-events: none; }
.st-studio.is-overview.is-3d .st-tags { display: block; }
.st-tag {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 6px 14px 7px;
  border: 1px solid var(--ou-line-strong);
  border-radius: var(--ou-radius-sm);
  background: color-mix(in srgb, var(--ou-surface) 92%, transparent);
  box-shadow: var(--ou-drop);
  pointer-events: auto;
  white-space: nowrap;
}
.st-tag b { font: 400 1.375rem/1 var(--ou-font-display); letter-spacing: .02em; text-transform: uppercase; }
.st-tag-status { color: var(--ou-muted); font: 500 .75rem/1.3 var(--ou-font-body); letter-spacing: 0; }
.st-tag:hover, .st-tag:focus-visible { z-index: 2; border-color: var(--ou-primary); }
/* Vorschau beim Überfahren: was dort wartet, und die Taste dafür (nur mit Maus und Tastatur) */
.st-tag-more { display: none; max-width: 220px; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--ou-line); color: var(--ou-text); font: 500 .8125rem/1.4 var(--ou-font-body); white-space: normal; text-align: center; }
.st-tag-key { display: block; margin-top: 4px; color: var(--ou-muted); font-size: .75rem; }
.st-tag-key kbd { padding: 0 5px; border: 1px solid var(--ou-line-strong); border-radius: var(--ou-radius-sm); font: 600 .75rem/1.4 var(--ou-font-body); }
@media (hover: hover) { .st-tag:hover .st-tag-more, .st-tag:focus-visible .st-tag-more { display: grid; justify-items: center; } }
.st-tag.is-off, .st-tag.is-away { display: none; }
.st-tag.has-news .st-tag-status, .st-nav-now span.has-news { color: var(--ou-primary-ink); font-weight: 700; }
.st-tag.has-news .st-tag-status::before, .st-nav-now span.has-news::before, .st-nav-all.has-news::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ou-primary);
}
.st-tag.has-news .st-tag-status::before, .st-nav-now span.has-news::before { margin-right: 6px; vertical-align: 1px; }

/* Schild am Rand: Station ganz außen, außerhalb der Übersicht (RAEUME.md, Etappe 4) */
.st-edge {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--ou-line-strong);
  background: color-mix(in srgb, var(--ou-surface) 92%, transparent);
  box-shadow: var(--ou-drop);
  color: var(--ou-text);
  transform: translateY(-50%);
  cursor: pointer;
  transition: padding var(--ou-dur-fast) var(--ou-ease), border-color var(--ou-dur-fast) var(--ou-ease);
}
.st-edge.hidden { display: none; }
.st-edge.is-left { left: 0; border-left: 0; border-radius: 0 var(--ou-radius) var(--ou-radius) 0; }
.st-edge.is-right { right: 0; flex-direction: row-reverse; border-right: 0; border-radius: var(--ou-radius) 0 0 var(--ou-radius); text-align: right; }
.st-edge:hover, .st-edge:focus-visible { border-color: var(--ou-primary); }
.st-edge.is-left:hover { padding-left: 20px; }
.st-edge.is-right:hover { padding-right: 20px; }
.st-edge .icon svg { width: 20px; height: 20px; }
.st-edge-text { display: grid; gap: 1px; }
.st-edge-text b { font: 400 1.375rem/1 var(--ou-font-display); letter-spacing: .02em; text-transform: uppercase; }
.st-edge-status { color: var(--ou-muted); font-size: .75rem; }
.st-studio:not(.is-overview) .st-edge, .st-studio:not(.is-3d) .st-edge { display: none; }

/* Leiste unter der gewählten Station: vor, zurück, alle Stationen */
.st-nav {
  position: absolute;
  right: 12px;
  bottom: 14px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin-inline: auto;
  padding: 7px 8px;
  border: 1px solid var(--ou-line-strong);
  border-radius: var(--ou-radius);
  background: color-mix(in srgb, var(--ou-surface) 92%, transparent);
  box-shadow: var(--ou-drop);
}
.st-studio.is-overview.is-3d .st-nav { display: none; }
.st-nav-btn { width: 40px; height: 40px; flex: none; }
.st-nav-now { display: grid; justify-items: center; gap: 2px; min-width: 150px; text-align: center; }
.st-nav-now b { font: 400 1.5rem/1 var(--ou-font-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.st-nav-now span { color: var(--ou-muted); font-size: .75rem; line-height: 1.3; white-space: nowrap; }
.st-nav-all { flex: none; margin-left: 4px; }
.st-nav-all.has-news::after { margin-left: 2px; }

/* ---------------------------------------------------------------- Bereich der Station */
.st-sheet { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--ou-line); background: var(--ou-surface); }
.st-sheet.hidden { display: none; }
.st-sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  flex: none;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--ou-line);
}
.st-sheet-title { grid-column: 1; margin: 0; font-size: 2rem; line-height: 1; }
.st-sheet-status { grid-column: 1; margin-top: 4px; color: var(--ou-muted); font-size: var(--ou-fs-sm); }
.st-sheet-status:empty { display: none; }
.st-sheet-status.has-news { color: var(--ou-primary-ink); font-weight: 700; }
.st-sheet-close { grid-column: 2; grid-row: 1 / span 2; }
.st-sheet-body { flex: 1 1 0; min-height: 0; overflow: auto; padding: 16px 18px 18px; }
.st-float:not(.is-phone):not(.st-flat) .st-sheet-body { flex: 0 1 auto; }
/* Überschrift, die nur den Titel wiederholt: bleibt für Vorleser, ist aber nicht zu sehen */
.st-sheet .st-dup { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Keine Karte in der Karte: die Inhalte liegen flach im Bereich, getrennt durch eine Linie */
.st-sheet .st-panel > .home-card, .st-sheet .st-panel > .lobby-card { padding: 0; border: 0; border-radius: 0; background: none; }
.st-sheet .st-panel > :is(.home-card, .lobby-card) ~ :is(.home-card, .lobby-card):not(.hidden) { padding-top: 16px; border-top: 1px solid var(--ou-line); }
.st-sheet .st-panel { gap: 16px; }
.st-panel { display: grid; gap: 14px; align-content: start; }
.st-panel > .hidden { display: none; }
.st-panel:has(#homeShop:not(.hidden)) .st-shopdoor { display: none; }
.st-sheet .home-card .start-shows-head, .st-sheet .lobby-card-head { margin-bottom: 0; }
.st-sheet .lobby-card { display: grid; gap: 12px; }
.st-sheet .session-board h3 { margin: 0; }
/* Der Bereich ist schmal: Mitspieler untereinander, Tagesrad über seinen Chancen */
.st-sheet ul#players { grid-template-columns: minmax(0, 1fr); }
.st-sheet .dw { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.st-sheet .dw-side { justify-items: center; }
.st-sheet .dw-odds { justify-content: center; }
.st-sheet .dq-answers { grid-template-columns: minmax(0, 1fr); }

/* Lobby: der Chat bleibt unter dem Bereich immer sichtbar */
.st-dock { flex: none; max-height: 46%; overflow: auto; padding: 12px 16px 14px; border-top: 1px solid var(--ou-line); }
.st-dock .lobby-card.chat { gap: 10px; padding: 0; border: 0; background: none; }
.st-dock .chat h3 { margin: 0; }
.st-dock .chat-log { min-height: 64px; }
.st-dock .react-label { margin: 2px 0 0; }

/* ---------------------------------------------------------------- Schmal (Handy) und ohne 3D */
.st-studio.is-phone, .st-studio.st-flat { grid-template-columns: minmax(0, 1fr); height: auto; }
.st-studio.is-phone .st-viewport { flex: none; height: clamp(280px, 44dvh, 420px); }
.st-studio.st-flat .st-viewport { display: none; }
.st-studio.st-flat.has-layer .st-viewport { display: block; flex: none; height: clamp(280px, 44dvh, 420px); }
.st-studio.is-phone .st-head, .st-studio.st-flat .st-head {
  position: static;
  order: -1;
  max-width: none;
  border-bottom: 1px solid var(--ou-line);
  border-radius: 0;
  background: var(--ou-surface);
  box-shadow: none;
}
.st-studio.is-phone .st-head.start-head, .st-studio.st-flat .st-head.start-head { gap: 10px; padding: 10px 104px 10px 12px; }
.st-studio.is-phone .st-head.start-head .avatar, .st-studio.st-flat .st-head.start-head .avatar { width: 40px; height: 40px; font-size: 1.4rem; }
.st-studio.is-phone .st-head .start-who h2 { font-size: 1.5rem; }
.st-studio.is-phone .home-cash { font-size: .75rem; }
.st-studio.is-phone .start-profile, .st-studio.st-flat .start-profile { top: 13px; right: 12px; }
.st-studio.is-phone .lobby-head, .st-studio.st-flat .lobby-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; }
.st-studio.is-phone .lobby-head .joined-head { margin: 0; }
.st-studio.is-phone .lobby-head .joined-head h2 { font-size: 1.5rem; }
.st-studio.is-phone .lobby-head .lobby-status { padding: 6px 10px; border-left-width: 1px; box-shadow: none; font-size: var(--ou-fs-sm); }
.st-studio.is-phone .st-nav, .st-studio.st-flat .st-nav {
  position: static;
  justify-content: space-between;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--ou-line);
  border-radius: 0;
  background: var(--ou-surface);
  box-shadow: none;
}
.st-studio.is-phone .st-nav-btn, .st-studio.st-flat .st-nav-btn { width: 44px; height: 44px; }
.st-studio.is-phone .st-nav-now b { font-size: 1.75rem; }
.st-studio.is-phone .st-nav-now span { font-size: .8125rem; }
.st-studio.is-phone .st-sheet, .st-studio.st-flat .st-sheet { border-top: 1px solid var(--ou-line); border-left: 0; }
.st-studio.is-phone .st-sheet-head, .st-studio.st-flat .st-sheet-head { display: none; }
.st-studio.is-phone .st-sheet-body, .st-studio.st-flat .st-sheet-body { flex: none; overflow: visible; padding: 14px 12px 16px; }
.st-studio.is-phone .st-dock, .st-studio.st-flat .st-dock { max-height: none; overflow: visible; padding: 14px 12px 16px; }
/* Breite Bereiche (data-wide, etwa die Gesamtwertung der Ruhmeshalle) als breitere Karte */
.st-float.is-wide:not(.is-phone):not(.st-flat) { --st-sheet-w: clamp(420px, 52vw, 780px); }

/* Übergang zwischen Räumen (RAEUME.md, Etappe 6): abblenden beim Hinausfahren, aufblenden beim Ankommen */
.st-studio::after { content: ""; position: absolute; inset: 0; z-index: 8; background: var(--ou-bg); opacity: 0; pointer-events: none; transition: opacity 420ms var(--ou-ease); }
.st-studio.is-leaving::after { opacity: 1; transition-delay: 200ms; }
.st-studio.is-arriving::after { opacity: 1; transition: none; }
@media (prefers-reduced-motion: reduce) { .st-studio::after { display: none; } }
