/* Floating Widget Hub - Faceless Animal Studios */
.fas-widget-hub {
  position: fixed;
  right: max(0.85rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  z-index: 10020;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  pointer-events: none;
}

.fas-widget-hub * { box-sizing: border-box; }

.fas-widget-hub__panel {
  width: min(360px, calc(100vw - 1.5rem));
  max-height: min(620px, calc(100dvh - 6.5rem));
  overflow: hidden;
  display: none;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(8,10,15,0.94);
  box-shadow: 0 24px 80px rgba(0,0,0,0.58), 0 0 28px rgba(33,244,208,0.12);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.fas-widget-hub.is-open .fas-widget-hub__panel { display: flex; }

.fas-widget-hub__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 54px;
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fas-widget-hub__back,
.fas-widget-hub__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  color: #eef3ff;
  font: 800 1rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.fas-widget-hub__back[hidden] { display: none; }
.fas-widget-hub__back:hover,
.fas-widget-hub__close:hover { border-color: rgba(33,244,208,0.42); }

.fas-widget-hub__title-wrap { min-width: 0; flex: 1; }
.fas-widget-hub__eyebrow {
  margin: 0 0 0.12rem;
  color: #21f4d0;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fas-widget-hub__title {
  margin: 0;
  color: #f7f8ff;
  font-size: 0.95rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fas-widget-hub__body {
  overflow: auto;
  padding: 0.78rem;
}

.fas-widget-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.fas-widget-hub__tile {
  min-height: 86px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: #f7f8ff;
  font: inherit;
  cursor: pointer;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.38rem;
}

.fas-widget-hub__tile:hover,
.fas-widget-hub__tile:focus-visible {
  outline: none;
  border-color: rgba(33,244,208,0.48);
  background: rgba(33,244,208,0.08);
}

.fas-widget-hub__tile-icon,
.fas-widget-hub__active-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139,92,246,0.88), rgba(33,244,208,0.82));
  color: #050509;
  font-size: 0.78rem;
  font-weight: 1000;
}

.fas-widget-hub__tile-label {
  max-width: 100%;
  color: #dfe6ff;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  line-height: 1.15;
}

.fas-widget-hub__toggle {
  min-width: 148px;
  height: 58px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,0.24), transparent 28%), linear-gradient(135deg, #151827, #080a10);
  box-shadow: 0 16px 38px rgba(0,0,0,0.46), 0 0 0 6px rgba(33,244,208,0.08);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0 0.9rem 0 0.68rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.fas-widget-hub__toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(33,244,208,0.45);
  box-shadow: 0 18px 46px rgba(0,0,0,0.52), 0 0 0 7px rgba(33,244,208,0.12);
}

.fas-widget-hub__toggle-icon { width: 34px; height: 34px; display: block; flex: 0 0 auto; }
.fas-widget-hub__toggle-icon svg { width: 100%; height: 100%; display: block; }
.fas-widget-hub__toggle-label {
  display: block;
  color: #f7f8ff;
  font-size: 0.78rem;
  font-weight: 1000;
  letter-spacing: 0;
  white-space: nowrap;
}
.fas-widget-hub__toggle-text {
  display: none;
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0;
}
.fas-widget-hub.is-widget .fas-widget-hub__toggle-text { display: none; }

.fas-widget-pane { display: grid; gap: 0.72rem; }
.fas-widget-pane__hero {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  padding: 0.78rem;
}
.fas-widget-pane__label {
  margin: 0 0 0.2rem;
  color: #21f4d0;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fas-widget-pane__title {
  margin: 0;
  color: #f7f8ff;
  font-size: 0.98rem;
  font-weight: 900;
}
.fas-widget-pane__text {
  margin: 0.3rem 0 0;
  color: #aab5cf;
  font-size: 0.76rem;
  line-height: 1.45;
}
.fas-widget-pane__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.fas-widget-hub__btn {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  color: #f7f8ff;
  font: 850 0.76rem/1 Inter, system-ui, sans-serif;
  padding: 0.58rem 0.72rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}
.fas-widget-hub__btn:hover { border-color: rgba(33,244,208,0.45); }
.fas-widget-hub__btn--primary {
  background: linear-gradient(135deg, rgba(139,92,246,0.9), rgba(33,244,208,0.78));
  color: #050509;
}

.fas-widget-hub__station-row,
.fas-widget-hub__quick-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.fas-widget-hub__station {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  color: #f7f8ff;
  font: 850 0.72rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.fas-widget-hub__station:hover { border-color: rgba(33,244,208,0.45); }

.fas-widget-hub__chat-users {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.62rem;
  background: rgba(255,255,255,0.035);
}
.fas-widget-hub__chat-feed {
  min-height: 170px;
  max-height: 230px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.72rem;
  background: rgba(255,255,255,0.035);
}
.fas-widget-hub__chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 0.48rem;
}
.fas-widget-hub__chat-input {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  color: #f7f8ff;
  font: 500 0.82rem/1.2 Inter, system-ui, sans-serif;
  padding: 0.68rem 0.72rem;
  outline: none;
}
.fas-widget-hub__chat-send {
  border: 0;
  border-radius: 10px;
  background: #21f4d0;
  color: #050509;
  font: 1000 1rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.fas-widget-hub .rp-user-list-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.fas-widget-hub .rp-user-list-head strong {
  color: #21f4d0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fas-widget-hub .rp-user-list-head span {
  color: #aab5cf;
  font-size: 0.66rem;
}
.fas-widget-hub .rp-user-list-grid {
  display: flex;
  gap: 0.38rem;
  overflow-x: auto;
}
.fas-widget-hub .rp-user-pill {
  flex: 0 0 auto;
  max-width: 126px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  color: #f7f8ff;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.42rem;
  font: 800 0.68rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.fas-widget-hub .rp-user-pill:disabled { opacity: 0.7; cursor: default; }
.fas-widget-hub .rp-user-pill--self,
.fas-widget-hub .rp-user-pill--requested { color: #21f4d0; border-color: rgba(33,244,208,0.38); }
.fas-widget-hub .rp-user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #21f4d0);
  color: #050509;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.55rem;
  font-weight: 1000;
}
.fas-widget-hub .rp-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fas-widget-hub .fas-widget-msg {
  display: flex;
  gap: 0.5rem;
  color: #f7f8ff;
  font-size: 0.78rem;
}
.fas-widget-hub .fas-widget-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(33,244,208,0.12);
  color: #21f4d0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 1000;
}
.fas-widget-hub .fas-widget-msg-body {
  min-width: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.055);
  padding: 0.48rem 0.58rem;
}
.fas-widget-hub .fas-widget-handle {
  margin: 0 0 0.15rem;
  color: #21f4d0;
  font-size: 0.66rem;
  font-weight: 850;
}
.fas-widget-hub .fas-widget-msg-text {
  margin: 0;
  color: #f7f8ff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .fas-widget-hub {
    right: max(0.62rem, env(safe-area-inset-right));
    bottom: max(0.62rem, env(safe-area-inset-bottom));
  }
  .fas-widget-hub__panel {
    width: calc(100vw - 1.24rem);
    max-height: calc(100dvh - 5.75rem);
    border-radius: 16px;
  }
  .fas-widget-hub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fas-widget-hub__tile { min-height: 78px; }
  .fas-widget-hub__toggle {
    min-width: 134px;
    height: 54px;
    padding: 0 0.78rem 0 0.58rem;
  }
  .fas-widget-hub__toggle-icon { width: 31px; height: 31px; }
  .fas-widget-hub__toggle-label { font-size: 0.72rem; }
}
