@font-face {
  font-family: Inter;
  src: url("./assets/inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070806;
  --panel: rgba(16, 18, 14, 0.88);
  --raised: rgba(27, 30, 23, 0.92);
  --text: #f3f0e7;
  --muted: #a6aa9e;
  --line: rgba(242, 234, 220, 0.12);
  --accent: #f08a2a;
  --gold: #f5c352;
  --cream: #f4ecde;
  --green: #4ade80;
  --red: #f87171;
  --pet-offset-x: 0%;
  --pet-acc-x: 0%;
  --pet-acc-y: 0%;
  --pet-acc-scale: 1;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 38% 45%, #16120b 0%, var(--bg) 72%);
  color: var(--text);
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  padding: 10px 14px;
  gap: 10px;
}

/* --- TOPBAR --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 14px;
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid rgba(245, 195, 82, 0.35);
  box-shadow: 0 0 18px rgba(240, 138, 42, 0.25);
}
.brand-name { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.brand-sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.brand-sub a { color: var(--gold); text-decoration: none; font-weight: 600; }

.sse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fbbf24;
  display: inline-block; flex: none;
}
.sse-dot.connected { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.7); }
.sse-dot.disconnected { background: var(--red); }

.badge-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  background: rgba(239, 68, 68, 0.16); color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.42);
  padding: 2px 8px; border-radius: 999px;
}
.badge-live .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #ef4444;
  animation: pulseDot 1.2s infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }

.badge-room {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  background: rgba(240, 138, 42, 0.14); color: var(--gold);
  border: 1px solid rgba(240, 138, 42, 0.32);
  padding: 2px 8px; border-radius: 999px;
}

.metrics { display: flex; align-items: stretch; gap: 8px; flex: 1; justify-content: center; }
.metric-card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 11px;
  min-width: 132px;
  display: flex; flex-direction: column; justify-content: center;
}
.stage-card { min-width: 245px; flex: 0 1 285px; }
.metric-top, .stage-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; }
.metric-lbl { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.metric-val { font-size: 17px; font-weight: 800; line-height: 1.15; }
.sep { color: var(--muted); font-weight: 500; font-size: 13px; }
.accent { color: var(--gold); }
.green { color: var(--green); }
.red { color: var(--red); }

.delta-pill {
  font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.14); color: var(--green);
}
.delta-pill.neg { background: rgba(248, 113, 113, 0.14); color: var(--red); }
.ath-tag { font-size: 10px; color: var(--muted); font-weight: 600; }
.streak-pill {
  font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: rgba(245, 195, 82, 0.18); color: var(--gold); border: 1px solid rgba(245, 195, 82, 0.4);
}
.pressure-track {
  height: 4px; border-radius: 999px; background: rgba(248, 113, 113, 0.32);
  overflow: hidden; margin-top: 4px;
}
.pressure-fill {
  height: 100%; background: var(--green); border-radius: 999px; transition: width 0.35s ease;
}

.stage-next { font-size: 10px; color: var(--accent); font-weight: 800; }
.progress-track {
  position: relative;
  height: 8px; border-radius: 999px; background: #0b0c09; border: 1px solid var(--line);
  overflow: hidden; margin-top: 6px;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold), #ffe59e);
  box-shadow: 0 0 12px rgba(245, 195, 82, 0.45);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bond-mark {
  position: absolute; right: 18%; top: 0; bottom: 0; width: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.top-actions { display: flex; gap: 6px; align-items: center; }
.btn-ghost, .btn-accent, .btn-mini {
  font-family: inherit; font-weight: 700; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn-ghost { background: var(--raised); color: var(--cream); padding: 7px 11px; font-size: 12px; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--gold)); color: #161006; border-color: var(--gold); padding: 7px 13px; font-size: 12px; }
.btn-mini { background: rgba(25, 28, 22, 0.95); color: var(--cream); padding: 4px 9px; font-size: 11px; border-radius: 8px; }
.btn-mini.green { border-color: rgba(74, 222, 128, 0.38); color: #86efac; }
.btn-mini.gold { border-color: rgba(245, 195, 82, 0.45); color: var(--gold); }
.btn-mini.red { border-color: rgba(248, 113, 113, 0.42); color: #fca5a5; }
.btn-mini.accent-btn { border-color: var(--accent); color: var(--gold); }
.btn-mini.active { background: rgba(240, 138, 42, 0.24); border-color: var(--gold); color: var(--gold); }
button:hover { opacity: 0.92; }
button:active { transform: scale(0.96); }

/* --- STAGE GRID --- */
.stage-grid {
  display: grid;
  grid-template-columns: 1.56fr 1fr;
  gap: 10px;
  min-height: 0;
}

/* --- ARENA & ZEN ROOMS --- */
.arena {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0a0c09;
  overflow: hidden;
  min-height: 0;
}

.room-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.room-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
  opacity: 0;
  transition: opacity 700ms ease-in-out, filter 400ms ease;
}
.room-layer.is-active { opacity: 1; }
.room-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 6, 0.58) 0%, rgba(7, 8, 6, 0.08) 32%, rgba(7, 8, 6, 0.14) 72%, rgba(7, 8, 6, 0.72) 100%),
    radial-gradient(circle at 50% 60%, transparent 45%, rgba(7, 8, 6, 0.55) 100%);
}
.arena[data-pose="sleep"] .room-layer.is-active {
  filter: brightness(0.76) saturate(0.85);
}

.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* --- CINEMATIC EVENT ALERT BANNER --- */
.alert-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(20, 16, 10, 0.92);
  border: 1px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 195, 82, 0.3);
  backdrop-filter: blur(10px);
  animation: alertSlideIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  white-space: nowrap;
}
.alert-banner[data-kind="evolve"] { border-color: var(--green); box-shadow: 0 10px 30px rgba(0,0,0,0.55), 0 0 28px rgba(74, 222, 128, 0.35); }
.alert-kind {
  font-size: 10px; font-weight: 900; letter-spacing: 0.08em;
  padding: 2px 7px; border-radius: 999px;
  background: var(--gold); color: #161006;
}
.alert-banner[data-kind="evolve"] .alert-kind { background: var(--green); }
.alert-title { font-size: 13px; font-weight: 800; color: var(--cream); }
.alert-sub { font-size: 12px; color: var(--muted); }
@keyframes alertSlideIn {
  from { opacity: 0; transform: translate(-50%, -14px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* --- SPEECH BUBBLE --- */
.speech-bubble {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: min(86%, 620px);
  background: rgba(16, 18, 14, 0.84);
  border: 1px solid rgba(245, 195, 82, 0.36);
  border-radius: 14px;
  padding: 9px 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  transition: opacity 220ms ease, border-color 0.25s ease;
}
.arena.has-alert .speech-bubble {
  opacity: 0.08;
  pointer-events: none;
}
.speech-bubble[data-mood="whale"],
.speech-bubble[data-mood="evolve"] {
  border-color: var(--gold);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 0 22px rgba(245, 195, 82, 0.25);
}
.speech-bubble[data-mood="sad"] { border-color: rgba(248, 113, 113, 0.5); }
.speech-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px;
}
.speech-tag { font-size: 10px; font-weight: 800; color: var(--accent); letter-spacing: 0.08em; }
.speech-text { font-size: 14px; font-weight: 600; color: var(--cream); line-height: 1.35; }

.voice-bars {
  display: flex; gap: 3px; align-items: flex-end; height: 14px; opacity: 0.22; transition: opacity 0.2s ease;
}
.voice-bars.speaking { opacity: 1; }
.voice-bars span { width: 3px; height: 4px; background: var(--gold); border-radius: 99px; }
.voice-bars.speaking span { animation: eqBar 0.42s ease-in-out infinite alternate; }
.voice-bars.speaking span:nth-child(2) { animation-delay: 0.08s; }
.voice-bars.speaking span:nth-child(3) { animation-delay: 0.18s; }
.voice-bars.speaking span:nth-child(4) { animation-delay: 0.04s; }
.voice-bars.speaking span:nth-child(5) { animation-delay: 0.22s; }
.voice-bars.speaking span:nth-child(6) { animation-delay: 0.12s; }
.voice-bars.speaking span:nth-child(7) { animation-delay: 0.25s; }
.voice-bars.speaking span:nth-child(8) { animation-delay: 0.09s; }
.voice-bars.speaking span:nth-child(9) { animation-delay: 0.16s; }
@keyframes eqBar { from { height: 3px; } to { height: 14px; } }

/* --- GROUNDED PET STAGE --- */
.pet-stage-visual {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  width: min(305px, 53vh);
  aspect-ratio: 1;
  z-index: 3;
  cursor: pointer;
  outline: none;
  user-select: none;
}

.pet-tooltip {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(16, 18, 14, 0.92);
  border: 1px solid rgba(245, 195, 82, 0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 8;
}
.pet-stage-visual:hover .pet-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pet-ground-shadow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 60%;
  height: 11%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.pet-rig, .pet-talk, .pet-sway, .pet-body {
  position: absolute;
  inset: 0;
  transform-origin: 50% 84%;
}
.pet-sway { animation: petSway 14.6s linear infinite; }
.pet-body { animation: petBreath 4.2s ease-in-out infinite; }
.pet-stage-visual[data-pose="sleep"] .pet-sway { animation-play-state: paused; }

@keyframes petSway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(0.9deg); }
  75% { transform: rotate(-0.9deg); }
}
@keyframes petBreath {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.016, 0.986); }
}

.pet-aura {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 138, 42, 0.24) 0%, transparent 70%);
  filter: blur(14px);
  transition: all 0.5s ease;
  pointer-events: none;
}
.pet-stage-visual[data-stage="2"] .pet-aura { width: 82%; height: 82%; background: radial-gradient(circle, rgba(245, 195, 82, 0.34) 0%, transparent 72%); }
.pet-stage-visual[data-stage="3"] .pet-aura { width: 92%; height: 92%; background: radial-gradient(circle, rgba(167, 243, 208, 0.26) 0%, rgba(245, 195, 82, 0.28) 42%, transparent 74%); }
.pet-stage-visual[data-stage="4"] .pet-aura,
.pet-stage-visual[data-stage="5"] .pet-aura { width: 105%; height: 105%; background: radial-gradient(circle, rgba(74, 222, 128, 0.32) 0%, rgba(245, 195, 82, 0.38) 45%, transparent 75%); }

.pet-pose-atlas,
.pet-blink-atlas {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 300% 300%;
  background-position: 0% 0%;
  transform: translateX(var(--pet-offset-x, 0%));
  pointer-events: none;
}
.pet-pose-atlas {
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.42));
}
.pet-blink-atlas {
  opacity: 0;
  z-index: 2;
}

.pet-accessory {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 3;
}
.pet-accessory.acc-main {
  transform: translate(var(--pet-acc-x, 0%), var(--pet-acc-y, 0%)) scale(var(--pet-acc-scale, 1));
  transform-origin: center;
}
.pet-accessory.acc-sparks {
  animation: sparksOrbit 18s linear infinite;
}
@keyframes sparksOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- TREAT DROP & GAIN CHIPS --- */
.treat-prop {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.treat-orb {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d6, var(--gold) 55%, var(--accent));
  box-shadow: 0 0 18px rgba(245, 195, 82, 0.9), 0 0 36px rgba(240, 138, 42, 0.55);
  border: 2px solid #fff3c4;
}
.treat-prop.dropping {
  animation: treatDrop 620ms cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}
@keyframes treatDrop {
  0% { opacity: 0; transform: translateY(-20px) scale(0.5) rotate(0deg); }
  20% { opacity: 1; transform: translateY(15px) scale(1.1) rotate(90deg); }
  75% { opacity: 1; transform: translateY(105px) scale(0.92) rotate(240deg); }
  100% { opacity: 0; transform: translateY(125px) scale(0.25) rotate(360deg); }
}

.gain-chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}
.gain-chip {
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 18, 14, 0.92);
  border: 1px solid var(--green);
  color: var(--green);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  animation: floatChip 1350ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.gain-chip.whale, .gain-chip.evolve { border-color: var(--gold); color: var(--gold); }
.gain-chip.sell { border-color: var(--red); color: var(--red); }
.gain-chip.pat { border-color: #f9a8d4; color: #f9a8d4; }
@keyframes floatChip {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.85); }
  18% { opacity: 1; transform: translate(-50%, -8px) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(0.95); }
}

/* --- VITALS PILL & EVO STRIP --- */
.vitals-pill {
  position: absolute;
  left: 14px;
  bottom: 48px;
  z-index: 4;
  background: rgba(14, 16, 12, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--cream);
}
.vitals-pill b { color: var(--gold); }

.evo-strip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: 96%;
}
.evo-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 16, 12, 0.84);
  border: 1px solid var(--line);
  color: var(--muted);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.evo-pill.active {
  background: rgba(240, 138, 42, 0.2);
  border-color: var(--accent);
  color: var(--gold);
}
.evo-pill.current {
  box-shadow: 0 0 12px rgba(245, 195, 82, 0.35);
  border-color: var(--gold);
}

/* --- SIDEBAR --- */
.sidebar {
  display: grid;
  grid-template-rows: 0.96fr 1.04fr;
  gap: 10px;
  min-height: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(12px);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted);
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.tab-group { display: flex; gap: 6px; }
.tab-btn {
  background: transparent; border: none; color: var(--muted);
  font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  padding: 3px 8px; border-radius: 7px; cursor: pointer;
}
.tab-btn.active { background: rgba(240, 138, 42, 0.16); color: var(--gold); }
.pill-mini {
  background: var(--raised); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px; font-size: 10px; color: var(--gold); font-weight: 700;
}

.chart-wrap {
  position: relative;
  height: 92px;
  margin-top: 7px;
  border-radius: 10px;
  background: rgba(10, 12, 9, 0.72);
  border: 1px solid var(--line);
  overflow: hidden;
  flex: none;
}
.chart-canvas { width: 100%; height: 100%; display: block; }
.chart-meta {
  position: absolute; top: 5px; right: 8px;
  display: flex; justify-content: flex-end;
  font-size: 9px; font-weight: 700; color: var(--muted); pointer-events: none;
}

.trades-list, .feeders-list, .chat-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-top: 7px;
  scrollbar-width: thin;
}
.trade-row, .feeder-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; padding: 5px 9px; border-radius: 8px;
  background: var(--raised); border-left: 3px solid var(--green);
}
.trade-row.sell { border-left-color: var(--red); }
.trade-row.whale { border-left-color: var(--gold); background: rgba(245, 195, 82, 0.12); }
.feeder-row { border-left-color: var(--accent); }
.feeder-rank { font-weight: 900; color: var(--gold); margin-right: 6px; }

.chat-item {
  font-size: 12px; line-height: 1.35; padding: 6px 9px; border-radius: 8px; background: var(--raised);
}
.chat-item.pet {
  background: rgba(240, 138, 42, 0.12); border: 1px solid rgba(240, 138, 42, 0.32);
}
.chat-author { font-weight: 800; color: var(--gold); margin-right: 6px; }
.chat-item:not(.pet) .chat-author { color: #93c5fd; }

.quick-chips {
  display: flex; gap: 5px; flex-wrap: wrap; padding-top: 6px;
}
.chip-btn {
  background: rgba(27, 30, 23, 0.95); border: 1px solid var(--line); color: var(--cream);
  font-family: inherit; font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; cursor: pointer;
}
.chip-btn.pat-chip { border-color: rgba(249, 168, 212, 0.45); color: #f9a8d4; }

.chat-form {
  display: flex; gap: 6px; padding-top: 7px; border-top: 1px solid var(--line); margin-top: 6px;
}
.chat-user, .chat-input {
  background: #0b0d09; border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); font-family: inherit; font-size: 12px; padding: 7px 10px; outline: none;
}
.chat-user { width: 78px; }
.chat-input { flex: 1; min-width: 0; }
.chat-input:focus, .chat-user:focus { border-color: var(--accent); }

/* --- BOTTOM BAR --- */
.bottom-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px;
}
.links-strip { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.links-strip a {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--cream); text-decoration: none; font-size: 11.5px; font-weight: 700;
}
.links-strip a svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.links-strip a:hover { color: var(--gold); }

.stream-ticker {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.stream-ticker b { color: var(--gold); }

.studio-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%;
  padding-top: 5px; border-top: 1px solid var(--line);
}
.studio-group { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.studio-lbl { font-size: 9.5px; font-weight: 900; color: var(--accent); letter-spacing: 0.08em; margin-right: 2px; }
.empty-note { color: var(--muted); font-size: 11.5px; text-align: center; margin-top: 14px; }
.hidden { display: none !important; }

/* --- STREAM BROADCAST MODE (?stream=1) --- */
body.stream-mode .top-actions,
body.stream-mode .quick-chips,
body.stream-mode .chat-form,
body.stream-mode .studio-bar,
body.stream-mode .pet-tooltip { display: none !important; }
body.stream-mode .stream-ticker { display: flex !important; }
body.stream-mode .pet-stage-visual { width: min(325px, 56vh); bottom: 13%; }
body.stream-mode .speech-text { font-size: 15.5px; }

@media (max-width: 920px) {
  html, body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .topbar { flex-direction: column; align-items: stretch; }
  .metrics { flex-wrap: wrap; }
  .stage-grid { grid-template-columns: 1fr; }
  .arena { min-height: 450px; }
  .pet-stage-visual { width: min(255px, 60vw); bottom: 14%; }
  .vitals-pill { display: none; }
  .sidebar { grid-template-rows: 270px 330px; }
}
