/* room.css — styles unique to the live room view.
   Loaded on /room/:slug and /embed routes only.
   The embed loads tokens.css + room.css without app.css,
   so all variables used here must come from tokens.css only. */


/* ── Audio blocked notice ────────────────────────────────── */
.audio-notice {
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-md);
  text-align: center;
  padding: 0;
}

.audio-notice__btn {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: inherit;
}

/* ── Room UI wrapper ─────────────────────────────────────── */
.room-ui {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}

/* Explicit override so display:flex doesn't beat the hidden attribute */
.room-ui[hidden] { display: none; }

/* ── Three-tier participant panel ────────────────────────── */
.participants {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.tier {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tier[hidden] { display: none; }

.tier__heading {
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin: 0;
  padding-block-end: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

/* ── Avatar grid layouts ─────────────────────────────────── */
.avatar-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.avatar-grid--stage {
  gap: var(--space-6);
}

.avatar-grid--hands {
  gap: var(--space-3);
}

.avatar-grid--listeners {
  gap: var(--space-2);
}

/* ── Avatar circle ───────────────────────────────────────── */
.avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.avatar-circle {
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-avatar-initials);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.2s;
}

.avatar-circle--lg {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  font-size: 1.375rem;
}

.avatar-circle--md {
  width: var(--avatar-md);
  height: var(--avatar-md);
  font-size: 1rem;
}

.avatar-circle--sm {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
  font-size: 0.75rem;
}

/* Speaking indicator */
.avatar-circle.is-speaking {
  box-shadow: 0 0 0 3px var(--color-accent);
  animation: speaking-pulse 1s ease-in-out infinite;
}

@keyframes speaking-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--color-accent); }
  50%       { box-shadow: 0 0 0 3px var(--color-accent), 0 0 10px 2px color-mix(in srgb, var(--color-accent) 45%, transparent); }
}

/* Muted icon — small overlay badge */
.avatar-muted-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}
/* Override display:flex when the element is hidden */
.avatar-muted-icon[hidden] { display: none; }

/* Role badge under avatar */
.avatar-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-role {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-align: center;
}

.avatar-grid--listeners .avatar-name {
  /* Name hidden by default for listeners, shown on :focus/:hover via JS tooltip or title */
  display: none;
}

/* ── Inline host action buttons on avatars ───────────────── */
.avatar-host-actions {
  display: flex;
  gap: var(--space-1);
  justify-content: center;
  margin-block-start: var(--space-1);
}

.btn-host-action {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.7rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-host-action--accept {
  color: var(--color-success);
  border-color: var(--color-success);
}

.btn-host-action--accept:hover {
  background: var(--color-success);
  color: #fff;
}

.btn-host-action--decline,
.btn-host-action--demote {
  color: var(--color-text-muted);
}

.btn-host-action--decline:hover,
.btn-host-action--demote:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
  background: var(--color-surface-alt);
}

/* Hand-raised indicator */
.avatar-hand-icon {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Host photo avatar */
.avatar-photo {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* Listeners overflow pill */
.listeners-overflow[hidden] { display: none; }

.listeners-overflow {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface-alt);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  margin: 0;
  margin-top: var(--space-2);
}

/* ── Reaction bar ────────────────────────────────────────── */
/* ── Controls stage (merged controls + reactions) ────────── */
.controls-stage,
.controls-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 2 * var(--space-4)));
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease;
}

.controls-stage--collapsed {
  transform: translateX(-50%) translateY(calc(100% - 2.5rem));
}

/* Collapse toggle */
.controls-collapser {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-block: var(--space-1);
  color: var(--color-text-muted);
  transition: color 0.15s;
}

.controls-collapser:hover,
.controls-collapser:focus-visible { color: var(--color-text); }

.controls-collapser__chevron {
  transition: transform 0.2s ease;
}

.controls-stage--collapsed .controls-collapser__chevron {
  transform: rotate(180deg);
}

/* Mobile: stretch edge-to-edge */
@media (max-width: 600px) {
  .controls-stage {
    left: var(--space-2);
    right: var(--space-2);
    width: auto;
    transform: none;
  }
  .controls-stage--collapsed {
    transform: translateY(calc(100% - 2.5rem));
  }
}

.controls-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.reaction-grid {
  display: flex;
  flex-direction: row;
  gap: var(--space-1);
  align-items: center;
  justify-content: center;
}

.audio-btns {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

.controls-secondary {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.controls-secondary__sep {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  user-select: none;
}

.btn-text-action {
  background: none;
  border: none;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.btn-text-action:hover {
  color: var(--color-text);
}

.btn-text-action--leave,
.btn-text-action--danger {
  color: var(--color-danger);
}

.btn-text-action--leave:hover,
.btn-text-action--danger:hover {
  color: var(--color-danger);
  opacity: 0.8;
}

.btn-reaction {
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-1);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.1s, transform 0.1s, border-color 0.1s;
}

.btn-reaction__emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.btn-reaction__count {
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text-muted);
  min-height: 0.75rem;
}

.btn-reaction__count:empty {
  display: none;
}

.btn-reaction:hover:not(:disabled) {
  background: var(--color-surface-alt);
  border-color: var(--color-secondary);
  transform: scale(1.1);
}

.btn-reaction:disabled,
.btn-reaction[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Floating reaction animation ─────────────────────────── */
.reactions-float {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 80vh;
  pointer-events: none;
  z-index: 50;
}

.reaction-float {
  font-size: 1.75rem;
  position: absolute;
  bottom: 180px; /* clears the controls panel */
  animation: float-up 2.8s ease-out forwards;
}

.reaction-static {
  display: none;
  font-size: 1.5rem;
  position: fixed;
  bottom: var(--space-12);
  left: 50%;
  transform: translateX(-50%);
  z-index: 51;
  animation: fade-static 1.5s ease forwards;
}

@keyframes float-up {
  0%   { transform: translateY(0)      scale(1);   opacity: 1; }
  60%  { opacity: 0.9; }
  85%  { transform: translateY(-380px) scale(1.2); opacity: 0.5; }
  100% { transform: translateY(-440px) scale(0.9); opacity: 0; }
}

@keyframes fade-static {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reaction-float { animation: none; opacity: 0; }
  .reaction-static { display: block; }
  .avatar-circle.is-speaking { animation: none; box-shadow: 0 0 0 3px var(--color-accent); }
}

/* ── Mic + hand buttons (ctrl-btn) ───────────────────────── */
.ctrl-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: 64px;
  min-height: 64px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.ctrl-btn:hover:not(.btn-locked) {
  background: var(--color-surface-alt);
  border-color: var(--color-secondary);
}

.ctrl-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Locked state — visually inert */
.ctrl-btn.btn-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Loading state — while mic is connecting */
.ctrl-btn:disabled:not(.btn-locked) {
  opacity: 0.7;
  cursor: wait;
}
.ctrl-btn:disabled .btn-label {
  animation: ctrl-pulse 1s ease-in-out infinite;
}
@keyframes ctrl-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Speaking state — green tint */
.ctrl-btn--speaking {
  background: color-mix(in srgb, #16a34a 12%, var(--color-bg));
  border-color: #16a34a;
}
.ctrl-btn--speaking:hover {
  background: color-mix(in srgb, #16a34a 20%, var(--color-bg));
  border-color: #15803d;
}
.ctrl-btn--speaking .btn-label,
.ctrl-btn--speaking .icon-mic { color: #15803d; }

/* Hand raised state — amber tint */
.ctrl-btn--hand-raised {
  background: color-mix(in srgb, #d97706 12%, var(--color-bg));
  border-color: #d97706;
}
.ctrl-btn--hand-raised:hover {
  background: color-mix(in srgb, #d97706 20%, var(--color-bg));
  border-color: #b45309;
}
.ctrl-btn--hand-raised .btn-label,
.ctrl-btn--hand-raised .icon-hand { color: #92400e; }

/* Dark mode text colors for tinted states */
@media (prefers-color-scheme: dark) {
  .ctrl-btn--speaking .btn-label,
  .ctrl-btn--speaking .icon-mic { color: #4ade80; }
  .ctrl-btn--hand-raised .btn-label,
  .ctrl-btn--hand-raised .icon-hand { color: #fbbf24; }
}
[data-theme="dark"] .ctrl-btn--speaking .btn-label,
[data-theme="dark"] .ctrl-btn--speaking .icon-mic { color: #4ade80; }
[data-theme="dark"] .ctrl-btn--hand-raised .btn-label,
[data-theme="dark"] .ctrl-btn--hand-raised .icon-hand { color: #fbbf24; }

/* Icon wrapper */
.icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

/* Mic SVG icon */
.icon-mic {
  width: 100%;
  height: 100%;
  color: var(--color-text);
}

/* Mic slash — visible in locked/muted, hidden in speaking */
.ctrl-btn--speaking .mic-slash { display: none; }

/* Lock badge overlay */
.badge-lock {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge hidden when not in locked state */
.ctrl-btn:not(.btn-locked) .badge-lock { display: none; }

.icon-lock {
  width: 9px;
  height: 9px;
  color: var(--color-text-muted);
}

/* Hand icon (emoji) */
.icon-hand {
  font-size: 1.5rem;
  line-height: 1;
  display: block;
}

/* Button label */
.btn-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-align: center;
}

/* Nudge animation on hand raise */
@keyframes hand-nudge {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.icon-wrap.nudge { animation: hand-nudge 350ms ease-out; }

/* Status message (visible aria-live region) */
.status-message {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  min-height: 1.25rem;
  font-style: italic;
}

/* ── Embed leave button (kept from previous design) ──────── */
.btn-control {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 56px;
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s;
}

.btn-control:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-secondary);
}

.btn-control__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.btn-control__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-control--leave {
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.btn-control--leave .btn-control__label {
  color: var(--color-danger);
}
.btn-control--leave:hover {
  background: color-mix(in srgb, var(--color-danger) 10%, var(--color-surface));
  border-color: var(--color-danger);
}

/* ── Settings modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--space-4);
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.modal__close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s;
}

.modal__close:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modal__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.modal__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.modal__btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.modal__btn:hover {
  background: var(--color-surface-alt);
}

.modal__btn--danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}

.modal__btn--danger:hover {
  background: color-mix(in srgb, var(--color-danger) 85%, #000);
  border-color: color-mix(in srgb, var(--color-danger) 85%, #000);
}

/* ── Device selector rows (used inside modal) ────────────── */
.device-panel__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.device-panel__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-panel__select {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  width: 100%;
  max-width: 320px;
}

.btn-control--settings[aria-expanded="true"] {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
}

/* ── Host controls panel ─────────────────────────────────── */
.host-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.host-panel__heading {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-block: 0 var(--space-4);
  padding-block-end: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.host-panel__subheading {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-block: 0 var(--space-3);
}

.host-panel__section {
  margin-block-end: var(--space-6);
}

.host-hands-list,
.host-speakers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.host-hands-empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}

.host-participant-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.host-participant-item__name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-participant-item__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Countdown / scheduled notice ───────────────────────── */
.countdown {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  margin-block: var(--space-2) 0;
  font-variant-numeric: tabular-nums;
}

/* ── Embed-specific styles ───────────────────────────────── */
.embed-body {
  /* No separate app.css — must define font and bg here */
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  min-height: 100dvh;
}

.embed-room {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: var(--space-4);
  gap: var(--space-4);
}

.embed-room--minimal .participants { display: none; }

/* Embed join panel — more compact than full page version */
.join-panel--embed {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.join-panel__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-block: 0 var(--space-2);
  color: var(--color-text);
}

.join-panel__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-block: 0 var(--space-4);
}

/* Embed needs its own form-field / form-label / form-input / btn styles
   since app.css is not loaded. Scoped under .embed-body. */
.embed-body .form-field {
  margin-block-end: var(--space-3);
}

.embed-body .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-block-end: var(--space-1);
}

.embed-body .form-input {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  box-sizing: border-box;
  appearance: none;
}

.embed-body .form-input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.embed-body .form-error {
  font-size: var(--text-sm);
  color: var(--color-danger);
  font-weight: 600;
  margin-block: var(--space-1) 0;
}

.embed-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  text-decoration: none;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s;
}

.embed-body .btn--primary {
  background: var(--color-accent);
  color: var(--color-surface);
  border-color: var(--color-accent);
}

.embed-body .btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.embed-body .btn--wide { width: 100%; }

.embed-body .notice--ended {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.embed-body .notice p { margin: 0; }

.embed-body .badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-full);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.embed-body .badge--live     { background: var(--color-live);        color: var(--color-surface); }
.embed-body .badge--scheduled { background: var(--color-surface-alt); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.embed-body .badge--ended     { background: var(--color-surface-alt); color: var(--color-text-muted); border: 1px solid var(--color-border); opacity: 0.7; }

.embed-body .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Mobile preview card */
.embed-preview-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  margin: var(--space-4);
}

.embed-preview-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.embed-preview-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.embed-preview-card__description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.embed-preview-card__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.embed-preview-card__cta {
  margin-block-start: var(--space-2);
  /* Ensure 44px touch target */
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.embed-preview-card__cta:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Expand / collapse fullscreen controls */
.embed-expand-controls {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  display: flex;
  gap: var(--space-2);
  z-index: 20;
}

.btn-embed-expand {
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  transition: background 0.15s;
}
.btn-embed-expand:hover {
  background: var(--color-surface-alt);
}

/* Controls stage in embed */
.controls-stage--embed {
  position: static;
  margin-block-start: auto;
}

/* Room UI in embed */
.room-ui--embed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Pad content so it never hides behind the fixed controls card */
.participants {
  padding-bottom: 13rem;
}

/* ── Room page responsive ────────────────────────────────── */
@media (max-width: 600px) {
  .controls-stage {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .btn-control {
    min-width: 56px;
    min-height: 52px;
    padding: var(--space-2);
  }

  .avatar-grid--stage {
    gap: var(--space-4);
  }
}

/* ── Focus visible in room context ───────────────────────── */
.btn-reaction:focus-visible,
.btn-control:focus-visible,
.btn-embed-expand:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .icon-wrap.nudge { animation: none; }
}
