/* Voice Room — one stylesheet, shared semantic tokens, no remote assets. */
:root {
  color-scheme: light;
  --page: #f4f3f8;
  --surface: #fff;
  --subtle: #f7f6fa;
  --ink: #282534;
  --ink-soft: #484357;
  --muted: #686173;
  --muted-light: #686173;
  --blue: #6951c8;
  --blue-deep: #5339af;
  --blue-pale: #eee9fb;
  --line: #e9e6ef;
  --line-strong: #cec8db;
  --green: #226e59;
  --red: #b73e56;
  --focus: #6951c8;
  --font-sans:
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC",
    "WenQuanYi Zen Hei", sans-serif;
  --font-display: var(--font-sans);
  --font-tech: var(--font-sans);
  --radius: 20px;
  --shadow: 0 24px 80px #30234e16;
  --small-shadow: 0 6px 24px #30234e0b;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* {
  box-sizing: border-box;
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
}
html {
  min-width: 320px;
  background: var(--page);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 14px/1.6 var(--font-sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3,
strong {
  font-weight: 600;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  touch-action: manipulation;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button {
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled),
a:hover {
  filter: brightness(0.96);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
input,
textarea,
select {
  accent-color: var(--blue);
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:not([type="checkbox"]):not([type="range"]),
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input[type="range"] {
  width: 100%;
  min-height: 30px;
  cursor: pointer;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
[hidden] {
  display: none !important;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.muted,
.quiet,
.form-hint,
.field-help {
  color: var(--muted);
}
.form-hint,
.field-help,
.quiet {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 8px;
}
.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
[aria-busy="true"] {
  cursor: wait;
  opacity: 0.65;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-mark,
.room-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--blue);
}
.brand-mark svg,
.room-brand-mark svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.5;
}
.primary-cta,
.primary,
.full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 500;
}
.primary-cta__icon {
  display: grid;
  place-items: center;
}
.primary-cta__icon svg {
  width: 18px;
  height: 18px;
}
.primary-cta--compact {
  min-height: 44px;
}
.secondary,
.text-button,
.header-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--subtle);
}
.danger {
  min-height: 44px;
  padding: 10px 16px;
  background: var(--red);
  color: white;
  border-radius: 12px;
}
.icon-ghost,
.close-button,
.dialog-close,
.icon-button,
.round-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--muted);
}
.icon-ghost:hover,
.close-button:hover,
.dialog-close:hover {
  background: var(--subtle);
}
/* Entry: one action, a quiet, sculptural waveform. */
.lobby-screen {
  min-height: 100svh;
  padding: 28px 48px 60px;
  display: flex;
  flex-direction: column;
}
.site-header {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.lobby-main {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 45px 0 70px;
}
.join-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(880px, 100%);
  min-height: 450px;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.entry-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  overflow: hidden;
  background: #eae5f6;
}
.entry-art::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: #d8cff1;
  filter: blur(35px);
}
.entry-disc {
  display: grid;
  place-items: center;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: #f3effc;
  box-shadow:
    12px 20px 35px #68509522,
    inset 0 2px 1px #fff,
    inset -5px -6px 14px #c8bce54d;
  transform: rotate(-12deg);
  z-index: 1;
}
.entry-disc svg {
  width: 108px;
  height: 108px;
  color: var(--blue);
  stroke-width: 8;
}
.entry-orbit {
  position: absolute;
  border: 1px solid #b3a5cc80;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.orbit-a {
  width: 340px;
  height: 230px;
}
.orbit-b {
  width: 450px;
  height: 320px;
}
.entry-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  font-size: 32px;
  background: #ffffffab;
  box-shadow: 0 8px 24px #61478910;
  z-index: 2;
}
.node-a {
  top: 19%;
  left: 16%;
  transform: rotate(-10deg);
}
.node-b {
  right: 12%;
  top: 44%;
  transform: rotate(10deg);
}
.node-c {
  bottom: 14%;
  left: 28%;
  transform: rotate(-6deg);
}
.join-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 46px;
}
.join-heading {
  margin-bottom: 32px;
}
.join-heading h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
}
.field-label {
  display: block;
  margin: 16px 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
}
.code-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: var(--subtle);
  border-radius: 12px;
  padding: 0 14px;
}
.code-field:focus-within,
.text-field:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.code-field__icon {
  color: var(--muted);
  margin-right: 10px;
}
.code-field__icon svg {
  width: 18px;
  height: 18px;
}
.code-field #room-code {
  border: 0;
  padding: 16px 0;
  background: transparent;
  outline: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
}
.code-field__tag {
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
}
#join-button {
  width: 100%;
  margin-top: 20px;
  justify-content: space-between;
}
#entry-mark {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
/* Room: information rail, stable participant seats, conversation. */
.room-screen {
  padding: 20px 28px 24px;
  height: 100dvh;
}
.room-shell {
  max-width: 1800px;
  margin: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  flex-shrink: 0;
  padding: 0 6px;
}
.room-header__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.room-titles {
  min-width: 0;
}
.room-titles h1 {
  font-size: 22px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.room-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
#mobile-music-open {
  display: none;
}
.room-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 16px;
  min-height: 0;
}
.room-layout > * {
  min-width: 0;
}
.music-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
  padding: 22px 18px;
  background: #eeebf5;
  border-radius: var(--radius);
}
.sidebar-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.sidebar-info-head h2 {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--green);
  white-space: nowrap;
}
.sidebar-status i,
.status-dot,
.listening-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.code-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  text-align: left;
}
.code-button > span {
  display: none;
}
.code-button strong {
  flex: 1;
  font-size: 21px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.code-button svg {
  width: 16px;
  color: var(--muted);
}
.sidebar-invite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.sidebar-invite button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  height: auto;
  font-size: 12px;
  border-radius: 10px;
  background: #ffffffb8;
  color: var(--ink-soft);
}
.sidebar-invite svg {
  width: 16px;
  height: 16px;
}
.sidebar-announcement {
  margin-top: 22px;
  border-top: 1px solid #dad5e5;
  padding-top: 18px;
}
.sidebar-announcement strong {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.sidebar-announcement strong svg {
  width: 15px;
  height: 15px;
}
.sidebar-announcement p {
  margin-top: 8px;
  font-size: 13px;
  max-height: 100px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.sidebar-music {
  border-top: 1px solid #dad5e5;
  padding-top: 20px;
}
.music-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.music-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.music-section-heading svg {
  width: 16px;
  height: 16px;
}
.music-mode {
  font-size: 10px;
  color: var(--muted);
}
.music-now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  min-width: 0;
}
.music-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  background: #ddd5ee;
  color: var(--blue);
}
.music-now > div {
  min-width: 0;
}
.music-now strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-now p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}
.music-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffffa8;
}
.music-controls .primary {
  padding: 0;
  background: var(--blue);
  color: white;
  min-height: 44px;
}
.music-time {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.music-volume-heading {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 16px;
}
.music-permission {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 6px;
}
.music-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.music-shortcuts button {
  min-height: 44px;
  padding: 9px 10px;
  background: #ffffffb8;
  border-radius: 10px;
  font-size: 11px;
  color: var(--blue);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.music-shortcuts button:first-child {
  flex: 1;
}
.music-shortcuts svg {
  width: 15px;
  height: 15px;
}
.music-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 8px;
}
.music-error:empty {
  display: none;
}
.music-local-play {
  background: var(--blue);
  color: white;
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  margin-top: 12px;
}
.room-manage-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  color: var(--ink-soft);
  font-size: 12px;
}
.room-manage-button svg {
  width: 16px;
  height: 16px;
}
.room-manage-button svg:last-child {
  width: 13px;
}
.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 16px;
}
.stage-header > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}
.stage-header h2 {
  font-size: 16px;
}
.stage-header #stage-status {
  color: var(--muted);
  font-size: 11px;
}
.people-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.people-count svg {
  width: 17px;
}
.people-count strong {
  color: var(--ink);
  font-weight: 500;
}
.orbit-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  padding: 24px;
}
.stage-ring,
.stage-glow {
  display: none;
}
.voice-members {
  margin-block: auto;
  flex-shrink: 0;
  width: 100%;
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-content: center;
}
.voice-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 10px;
  min-height: 165px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--subtle);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  position: relative;
  min-width: 0;
}
.voice-member:hover {
  background: #f0edf7;
}
.voice-member.is-speaking {
  border-color: rgba(var(--avatar-rgb), 0.65);
  background: rgba(var(--avatar-rgb), 0.055);
}
.avatar {
  font-family:
    "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1.1;
  background: none;
  border: 0;
}
.avatar-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
}
.avatar-shell .avatar {
  font-size: 48px;
  z-index: 1;
}
.voice-ripple {
  position: absolute;
  inset: -7px;
  border: 1.5px solid rgba(var(--avatar-rgb), 0.5);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.is-speaking .voice-ripple:first-child {
  opacity: 1;
  box-shadow: 0 0 0 5px rgba(var(--avatar-rgb), 0.07);
}
.is-speaking .voice-ripple:nth-child(2) {
  opacity: 0.4;
  transform: scale(calc(1.1 + var(--voice-energy, 0) * 0.15));
  transition: transform 0.15s;
}
.voice-member__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.voice-member__copy strong {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
}
.voice-member__copy small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.voice-member__copy small svg {
  width: 12px;
  height: 12px;
}
.is-speaking .voice-member__copy small {
  color: var(--avatar-ink);
}
.micro-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}
.micro-wave i {
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}
.micro-wave i:nth-child(2) {
  height: 11px;
}
.micro-wave i:nth-child(4) {
  height: 9px;
}
.voice-members[data-count="0"]::after {
  content: "正在连接语音…";
  color: var(--muted);
  grid-column: 1/-1;
  text-align: center;
}
.voice-members[data-count="1"] {
  max-width: 300px;
  grid-template-columns: 1fr;
}
.voice-members[data-count="1"] .voice-member {
  min-height: 235px;
}
.voice-members[data-count="7"],
.voice-members[data-count="8"] {
  gap: 12px;
}
.voice-members[data-count="7"] .voice-member,
.voice-members[data-count="8"] .voice-member {
  min-height: 110px;
  padding: 12px 6px;
  gap: 7px;
}
.voice-members[data-count="7"] .avatar-shell,
.voice-members[data-count="8"] .avatar-shell {
  width: 44px;
  height: 44px;
}
.voice-members[data-count="7"] .avatar,
.voice-members[data-count="8"] .avatar {
  font-size: 35px;
}
.stage-lyrics {
  text-align: center;
  padding: 12px 20px 20px;
  flex-shrink: 0;
}
.stage-lyrics p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#lyric-current {
  font-size: 15px;
}
#lyric-next {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.voice-console {
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}
.self-state {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar--self {
  font-size: 29px;
  width: 44px;
  min-height: 44px;
}
.self-state > div {
  flex: 1;
}
.self-state strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
}
.self-state > div > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.level-bars {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 22px;
}
.level-bars i {
  background: var(--green);
  width: 3px;
  border-radius: 3px;
  height: var(--real-level, 3px);
}
.voice-console__actions,
.call-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.voice-console__actions {
  justify-content: space-between;
}
.call-controls {
  flex: 1;
}
.call-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--subtle);
  color: var(--ink-soft);
  font-size: 12px;
}
.call-control svg {
  width: 18px;
  height: 18px;
}
.call-control .icon-off {
  display: none;
}
.call-control[aria-pressed="true"] {
  background: #fbeaf0;
  color: var(--red);
}
.call-control[aria-pressed="true"] .icon-on {
  display: none;
}
.call-control[aria-pressed="true"] .icon-off {
  display: block;
}
.call-control--settings {
  width: 44px;
  padding: 10px;
}
.call-control--settings span {
  display: none;
}
.leave-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--red);
  background: #fcf0f3;
  font-size: 12px;
}
.leave-button svg {
  width: 17px;
}
.audio-retry {
  position: absolute;
  left: 50%;
  bottom: 160px;
  transform: translateX(-50%);
  z-index: 5;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--blue);
  background: var(--surface);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.speaker-notice,
.recovery-banner {
  padding: 10px 16px;
  background: var(--blue-pale);
  color: var(--blue-deep);
  font-size: 12px;
  border-radius: 12px;
}
.speaker-notice {
  margin: 0 24px;
}
.recovery-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.recovery-banner button {
  min-height: 44px;
  white-space: nowrap;
}
/* Conversation */
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
}
.chat-header {
  display: flex;
  align-items: center;
  padding: 18px 18px 16px;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.chat-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-icon {
  display: none;
}
.chat-title h2 {
  font-size: 16px;
}
.chat-title p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.chat-header .icon-ghost {
  width: 36px;
  height: 44px;
}
.chat-header svg {
  width: 17px;
  height: 17px;
}
.chat-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.chat-thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 16px;
}
.chat-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 100px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.msg {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  position: relative;
  margin-bottom: 22px;
}
.msg__avatar {
  flex-shrink: 0;
  font-size: 25px;
  margin-top: 18px;
}
.msg__body {
  min-width: 0;
  max-width: calc(100% - 42px);
}
.msg__meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  padding-right: 22px;
  font-size: 10px;
  color: var(--muted);
}
.msg__name {
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 150px;
}
.msg__meta time {
  font-size: 9px;
  flex-shrink: 0;
}
.msg__bubble {
  display: inline-block;
  background: var(--subtle);
  padding: 10px 13px;
  border-radius: 2px 13px 13px 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.7;
}
.msg--mine .msg__bubble {
  background: var(--blue-pale);
}
.chat-image {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  object-fit: contain;
}
.image-button {
  display: block;
  margin-top: 6px;
}
.chat-pin-action {
  position: absolute;
  right: -4px;
  top: -6px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--muted);
  opacity: 0.65;
  display: grid;
  place-items: center;
}
.chat-pin-action svg {
  width: 13px;
  height: 13px;
}
.chat-pin-action:hover,
.chat-pin-action:focus-visible {
  opacity: 1;
  background: var(--blue-pale);
}
.chat-pinned {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--blue-pale);
}
.chat-pinned > svg {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--blue);
}
.chat-pinned > div {
  min-width: 0;
  flex: 1;
}
.chat-pinned span {
  font-size: 10px;
  color: var(--blue);
}
.chat-pinned p {
  font-size: 12px;
  max-height: 55px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.chat-pinned img {
  max-width: 100px;
  max-height: 60px;
  border-radius: 8px;
}
.chat-pinned button {
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.history-bar {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 8px;
}
.history-bar button {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--blue);
}
.jump-latest {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  min-height: 40px;
  background: var(--surface);
  color: var(--blue);
  border-radius: 20px;
  box-shadow: var(--small-shadow);
  white-space: nowrap;
  font-size: 12px;
}
.jump-latest svg {
  display: none;
}
.composer {
  position: relative;
  flex-shrink: 0;
  margin: 0 14px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 12px 8px;
}
.composer:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px #6951c810;
}
.composer #message {
  border: 0;
  background: transparent;
  outline: 0;
  padding: 0;
  min-height: 38px;
  max-height: 140px;
  resize: none;
  font-size: 13px;
}
.composer-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 0;
}
.composer-tools .icon-ghost {
  width: 36px;
  height: 36px;
}
.composer-tools svg {
  width: 18px;
  height: 18px;
}
.key-hint {
  color: var(--muted);
  font-size: 9px;
  margin-left: 6px;
}
.send-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: white;
  border-radius: 10px;
}
.image-draft {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  font-size: 11px;
  color: var(--muted);
}
.image-draft img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}
.image-draft button {
  margin-left: auto;
}
/* Dialog system */
.dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0;
  margin: auto;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
}
.dialog::backdrop {
  background: #27203366;
  backdrop-filter: blur(5px);
}
.dialog[open] {
  animation: dialog-enter 0.18s var(--ease);
}
@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dialog-card {
  padding: 28px;
}
.dialog-head,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.dialog-head h2,
.dialog-heading h2,
.mobile-music-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.dialog-head > div {
  min-width: 0;
}
.dialog-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.dialog label:not(.switch-row):not(.music-source-label) {
  font-size: 12px;
  color: var(--ink-soft);
}
.dialog-card > label,
.dialog-card form > label {
  display: block;
  margin: 18px 0 8px;
}
.dialog-actions,
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}
.dialog .full {
  width: 100%;
}
.dialog-actions > .full {
  margin: 0;
}
.text-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.text-field input:not([type="checkbox"]):not([type="range"]) {
  border: 0;
  border-radius: 0;
  outline: 0;
}
.random-code {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 12px;
  color: var(--blue);
  font-size: 12px;
}
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row > div,
.switch-row > span:nth-child(2) {
  flex: 1;
}
.switch-row strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.switch-row p,
.switch-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.switch-icon {
  color: var(--muted);
}
.native-switch {
  appearance: none;
  position: relative;
  width: 42px !important;
  height: 25px !important;
  border: 1px solid #bfb8cb;
  border-radius: 20px;
  background: #d9d4e2;
  cursor: pointer;
  margin: 0;
}
.native-switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #29203020;
  transition: transform 0.2s;
}
.native-switch:checked {
  background: var(--blue);
  border-color: var(--blue);
}
.native-switch:checked::after {
  transform: translateX(17px);
}
.select-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.select-field > svg {
  color: var(--muted);
}
.select-field select {
  flex: 1;
}
.mic-meter {
  margin-top: 14px;
}
.mic-meter__head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.mic-meter__bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 30px;
  margin-top: 6px;
}
.mic-meter__bars i {
  flex: 1;
  height: var(--real-level, 3px);
  background: var(--green);
  border-radius: 2px;
  transition: height 0.08s;
}
.range-row {
  margin: 22px 0;
}
.range-copy,
.member-volume-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 6px;
}
.range-copy span {
  color: var(--muted);
}
.effects-settings {
  margin-top: 16px;
}
.profile-setting {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 14px;
  background: var(--subtle);
  border-radius: 14px;
}
.profile-setting .avatar {
  font-size: 32px;
}
.profile-setting > span:nth-child(2) {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.profile-setting small {
  font-size: 10px;
  color: var(--muted);
}
.profile-setting strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.profile-edit-label {
  font-size: 12px;
  color: var(--blue);
}
.member-level-section {
  margin: 24px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.member-level-section h3 {
  font-size: 13px;
}
.member-level-section > p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.member-levels {
  max-height: 240px;
  overflow: auto;
}
.member-level-row {
  display: grid;
  grid-template-columns: 34px 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.member-level-row .avatar {
  font-size: 25px;
}
.member-level-copy {
  min-width: 0;
}
.member-level-copy strong,
.member-level-copy small {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.member-level-copy small {
  font-size: 10px;
  color: var(--muted);
}
.member-options {
  font-size: 11px;
  color: var(--blue);
  min-height: 44px;
}
.member-level-row input {
  grid-column: 1/3;
}
.member-level-row output {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.rename-avatar {
  display: block;
  font-size: 56px;
  margin: 12px 0;
}
.room-found {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.rename-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}
.rename-actions > button {
  flex: 1;
  font-size: 12px;
  padding: 10px;
}
.member-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.member-profile .avatar {
  font-size: 42px;
}
.member-profile strong {
  overflow-wrap: anywhere;
}
.member-volume-heading {
  margin-top: 24px;
}
.member-speaker-action {
  min-height: 44px;
  margin-top: 15px;
  width: 100%;
  color: var(--blue);
  background: var(--blue-pale);
  border-radius: 12px;
}
.manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.manage-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}
.manage-grid input {
  margin: 0;
}
.room-manage-dialog select {
  font-size: 12px;
}
.image-view {
  width: min(900px, calc(100vw - 32px));
}
.image-view .dialog-card {
  padding: 16px;
}
.image-view .close-button {
  margin: 0 0 10px auto;
  display: grid;
}
.image-view img {
  display: block;
  max-width: 100%;
  max-height: 76dvh;
  object-fit: contain;
  margin: auto;
  border-radius: 12px;
}
.mobile-music-dialog {
  padding: 24px;
}
.mobile-music-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
#mobile-music-content .sidebar-music {
  border: 0;
  padding: 0;
}
.qr-panel {
  position: fixed;
  z-index: 200;
  width: 250px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.qr-panel h2 {
  font-size: 17px;
  margin-bottom: 16px;
}
.qr-panel img {
  width: 190px;
  height: 190px;
  max-width: 100%;
  object-fit: contain;
}
.qr-panel p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0;
}
.qr-panel button {
  min-height: 44px;
  color: var(--blue);
  font-size: 12px;
}
.toast {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  text-align: center;
  overflow-wrap: anywhere;
}
.member-dialog {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(320px, calc(100vw - 24px));
  border-radius: 18px;
  z-index: 210;
}
.member-dialog .dialog-card {
  padding: 20px;
}
.member-dialog .dialog-heading {
  margin-bottom: 14px;
}
.member-dialog .dialog-heading h2 {
  font-size: 18px;
}
.member-dialog .member-profile {
  margin-bottom: 14px;
}
.member-dialog .field-help {
  font-size: 11px;
}
.member-dialog .rename-actions {
  margin-top: 16px;
}
.sidebar-status .is-closed {
  background: var(--red);
}
@media (max-width: 760px) {
  .stage-header > div {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 4px;
  }
}
/* Management */
.admin-shell {
  max-width: 1160px;
  min-height: 100svh;
  margin: auto;
  padding: 30px 40px 60px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
}
.admin-header .brand {
  font-weight: 600;
  font-size: 17px;
}
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}
.admin-heading h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
}
.admin-heading .invite-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: white;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 12px;
  font-size: 13px;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--muted);
}
.list-heading h2,
.list-heading .count {
  font-size: 12px;
  font-weight: 400;
}
.room-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.room-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 26px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.room-info {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}
.room-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--blue-pale);
  color: var(--blue);
  border-radius: 14px;
  flex-shrink: 0;
}
.room-details {
  min-width: 0;
}
.room-details h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.room-details p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 6px;
}
.room-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.room-card-actions a,
.room-card-actions button {
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 11px;
}
.room-card-actions a {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.danger-outline {
  color: var(--red);
}
.admin-empty {
  grid-column: 1/-1;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
}
.admin-empty h2 {
  font-size: 20px;
}
.admin-empty p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.empty-action {
  background: var(--blue-pale);
  color: var(--blue);
  padding: 12px 18px;
  border-radius: 12px;
  margin-top: 24px;
  min-height: 44px;
}
/* Music library */
.music-library-dialog {
  width: min(960px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 60px));
  max-width: none;
  padding: 0;
  overflow: hidden;
}
.library-frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 28px 30px 20px;
}
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.library-header h2 {
  font-size: 25px;
  letter-spacing: -0.03em;
}
.library-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  flex-shrink: 0;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}
.library-tabs button {
  min-height: 44px;
  white-space: nowrap;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
}
.library-tabs button[aria-selected="true"] {
  color: var(--blue);
  background: var(--blue-pale);
  font-weight: 500;
}
.library-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 4px 4px;
  overscroll-behavior: contain;
}
.library-body h3 {
  font-size: 16px;
  margin-bottom: 16px;
}
.library-body .form-hint {
  margin: 0 0 16px;
}
.music-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 3px;
}
.music-search-row input {
  flex: 1;
}
.music-search-row button {
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 13px;
}
.music-source-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 3px 22px;
}
.music-source-label select {
  width: auto;
  min-height: 38px;
  font-size: 12px;
  padding: 6px 12px;
}
.music-empty {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  padding: 24px 0;
  text-align: center;
}
.music-track-list {
  display: flex;
  flex-direction: column;
}
.music-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.music-track-row > div {
  flex: 1;
  min-width: 0;
}
.music-track-row strong,
.music-track-row small {
  display: block;
  overflow-wrap: anywhere;
}
.music-track-row strong {
  font-weight: 500;
  font-size: 14px;
}
.music-track-row small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.music-track-row button {
  color: var(--blue);
  background: var(--blue-pale);
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
}
.music-track-row button svg {
  width: 16px;
  height: 16px;
}
.music-track-row button.danger {
  background: #fcecf1;
  color: var(--red);
}
.library-view-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.library-view-toolbar h3 {
  flex: 1;
  margin: 0;
}
.library-view-toolbar button {
  min-height: 44px;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
}
.library-view-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.library-view-toolbar select {
  width: auto;
  padding: 9px 12px;
  min-height: 44px;
}
.library-collections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.collection-wrap {
  position: relative;
  min-width: 0;
}
.library-collection {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 100px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--subtle);
  border-radius: 16px;
}
.collection-symbol {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-pale);
  color: var(--blue);
}
.library-collection > span:last-child {
  min-width: 0;
}
.library-collection strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.library-collection small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  max-height: 36px;
  overflow: hidden;
  margin-top: 4px;
}
.collection-delete {
  position: absolute;
  bottom: 2px;
  right: 8px;
  color: var(--red);
  font-size: 10px;
  padding: 6px;
  min-height: 32px;
}
.small-library-dialog .dialog-card > label {
  display: block;
  margin: 18px 0 8px;
}
.library-error {
  font-size: 12px;
}
.clear-chat-description {
  color: var(--muted);
  line-height: 1.8;
}
/* Live reactions: preserve the existing event-driven animation. */
.reaction-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 400;
}
.reaction-menu {
  position: fixed;
  z-index: 500;
  width: 260px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.reaction-menu__head {
  font-size: 11px;
  color: var(--muted);
  margin: 0 4px 10px;
}
.reaction-menu__options {
  display: flex;
  gap: 5px;
}
.reaction-option {
  flex: 1;
  min-height: 64px;
  border-radius: 10px;
  background: var(--subtle);
}
.reaction-option > span {
  display: block;
  font-size: 26px;
}
.reaction-option small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.delight-emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: 16px;
  z-index: 30;
  margin-bottom: 8px;
}
.delight-emoji-picker button {
  min-height: 44px;
  font-size: 25px;
  border-radius: 9px;
}
.delight-emoji-picker button:hover {
  background: var(--subtle);
}
#emoji-picker {
  display: none !important;
}
.reaction-projectile,
.floating-heart,
.reaction-impact,
.avatar-burst,
.chat-emoji-bubble {
  position: fixed;
  pointer-events: none;
}
.chat-emoji-bubble {
  position: absolute;
  z-index: 10;
  top: -16px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 9px;
  font-size: 20px;
  box-shadow: var(--small-shadow);
}
@media (min-width: 1500px) {
  .room-layout {
    grid-template-columns: 255px minmax(0, 1fr) 380px;
    gap: 20px;
  }
  .voice-members {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .voice-members[data-count="2"],
  .voice-members[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .voice-members[data-count="1"] {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1200px) and (min-width: 761px) {
  .room-screen {
    padding: 16px;
  }
  .room-layout {
    grid-template-columns: 205px minmax(0, 1fr) 290px;
    gap: 12px;
  }
  .music-sidebar {
    padding: 20px 14px;
  }
  .voice-console {
    padding: 16px 14px;
  }
  .call-control {
    padding: 10px;
    gap: 5px;
  }
  .call-control span {
    display: none;
  }
  .call-control--settings {
    width: 40px;
  }
  .leave-button {
    padding: 10px;
  }
  .stage-header {
    padding: 22px 18px 14px;
  }
  .orbit-stage {
    padding: 18px;
  }
  .voice-members {
    gap: 12px;
  }
  .voice-member {
    min-height: 150px;
    padding: 20px 8px;
  }
  .voice-member__copy strong {
    font-size: 12px;
  }
}
@media (max-width: 980px) and (min-width: 761px) {
  .room-layout {
    grid-template-columns: 180px minmax(0, 1fr) 260px;
    gap: 10px;
  }
  .music-sidebar {
    padding: 18px 12px;
  }
  .sidebar-invite {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .sidebar-invite button {
    min-height: 40px;
  }
  .code-button strong {
    font-size: 18px;
  }
  .music-shortcuts {
    flex-direction: column;
  }
  .voice-console {
    padding: 14px 10px;
  }
  .call-controls,
  .voice-console__actions {
    gap: 4px;
  }
  .call-control {
    padding: 8px;
    min-width: 36px;
  }
  .leave-button {
    padding: 8px;
  }
  .leave-button span {
    display: none;
  }
  .voice-member__copy strong {
    font-size: 11px;
  }
  .avatar-shell .avatar {
    font-size: 40px;
  }
  .orbit-stage {
    padding: 14px;
  }
  .chat-header {
    padding: 14px 12px;
  }
  .chat-header .icon-ghost {
    width: 30px;
  }
  .key-hint {
    display: none;
  }
}
@media (max-height: 780px) and (min-width: 761px) {
  .room-screen {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .room-shell {
    gap: 12px;
  }
  .stage-header {
    padding-top: 18px;
  }
  .voice-member {
    min-height: 115px;
    padding: 14px 8px;
    gap: 8px;
  }
  .voice-members {
    gap: 12px;
  }
  .avatar-shell {
    width: 48px;
    height: 48px;
  }
  .avatar-shell .avatar {
    font-size: 38px;
  }
  .voice-console {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 9px;
  }
  .voice-members[data-count="7"] .voice-member,
  .voice-members[data-count="8"] .voice-member {
    min-height: 95px;
  }
  .voice-members[data-count="7"] .avatar-shell,
  .voice-members[data-count="8"] .avatar-shell {
    width: 32px;
    height: 32px;
  }
  .voice-members[data-count="7"] .avatar,
  .voice-members[data-count="8"] .avatar {
    font-size: 28px;
  }
}
@media (max-width: 760px) {
  .lobby-screen {
    padding: 18px 22px max(28px, env(safe-area-inset-bottom));
  }
  .lobby-main {
    padding: 36px 0 50px;
  }
  .join-card {
    max-width: 430px;
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 24px;
  }
  .entry-art {
    min-height: 220px;
  }
  .entry-disc {
    width: 112px;
    height: 112px;
  }
  .entry-disc svg {
    width: 72px;
    height: 72px;
  }
  .orbit-a {
    width: 245px;
    height: 150px;
  }
  .orbit-b {
    width: 340px;
    height: 215px;
  }
  .entry-node {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 25px;
  }
  .node-a {
    top: 17%;
    left: 20%;
  }
  .node-b {
    right: 13%;
    top: 42%;
  }
  .node-c {
    left: 28%;
    bottom: 10%;
  }
  .join-card__body {
    padding: 30px 28px 36px;
  }
  .join-heading {
    margin-bottom: 20px;
  }
  .join-heading h1 {
    font-size: 25px;
  }
  .brand-name {
    font-size: 16px;
  }
  .room-screen {
    height: auto;
    min-height: 100dvh;
    padding: 12px 12px max(16px, env(safe-area-inset-bottom));
  }
  .room-shell {
    height: auto;
    gap: 12px;
  }
  .room-header {
    min-height: 44px;
    padding: 0 4px;
  }
  .room-header__identity {
    gap: 8px;
  }
  .room-titles h1 {
    font-size: 19px;
  }
  .room-brand-mark {
    width: 30px;
  }
  .room-brand-mark svg {
    width: 26px;
  }
  .room-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .music-sidebar {
    order: 0;
    padding: 14px 16px;
    display: block;
    border-radius: 16px;
    overflow: visible;
  }
  .sidebar-room {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    align-items: center;
  }
  .sidebar-info-head {
    margin: 0;
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    gap: 12px;
  }
  .sidebar-info-head h2 {
    display: none;
  }
  .sidebar-code {
    grid-column: 1;
    grid-row: 2;
  }
  .code-button {
    min-height: 30px;
  }
  .code-button strong {
    flex: 0 1 auto;
    font-size: 18px;
  }
  .code-button svg {
    width: 14px;
    height: 14px;
  }
  .sidebar-invite {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
    gap: 6px;
  }
  .sidebar-invite button {
    width: 44px;
    min-height: 44px;
  }
  .sidebar-invite button span {
    display: none;
  }
  .sidebar-invite svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-announcement {
    grid-column: 1/-1;
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0;
    padding-top: 10px;
  }
  .sidebar-announcement strong {
    flex-shrink: 0;
    font-size: 10px;
  }
  .sidebar-announcement strong svg {
    display: none;
  }
  .sidebar-announcement p {
    margin: 0;
    font-size: 11px;
    max-height: 50px;
  }
  .music-sidebar > .sidebar-music {
    display: none;
  }
  .music-sidebar > .room-manage-button {
    margin-top: 12px;
    min-height: 36px;
    justify-content: flex-start;
    font-size: 11px;
    padding-top: 8px;
    border-top: 1px solid #dad5e5;
  }
  .room-manage-button svg:last-child {
    margin-left: auto;
  }
  #mobile-music-open {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--blue);
    background: var(--blue-pale);
  }
  .stage-card {
    order: 1;
    border-radius: 16px;
    overflow: visible;
  }
  .stage-header {
    padding: 18px 18px 10px;
  }
  .stage-header h2 {
    font-size: 14px;
  }
  .stage-header #stage-status {
    font-size: 10px;
  }
  .stage-header > div {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }
  .people-count {
    font-size: 11px;
  }
  .orbit-stage {
    min-height: 180px;
    padding: 16px;
    overflow: visible;
  }
  .voice-members {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .voice-member {
    min-height: 125px;
    border-radius: 14px;
    padding: 18px 8px;
    gap: 10px;
  }
  .avatar-shell {
    width: 46px;
    height: 46px;
  }
  .avatar-shell .avatar {
    font-size: 36px;
  }
  .voice-member__copy strong {
    font-size: 12px;
  }
  .voice-member__copy small {
    font-size: 10px;
  }
  .voice-members[data-count="1"] {
    max-width: 100%;
  }
  .voice-members[data-count="1"] .voice-member {
    min-height: 150px;
  }
  .voice-members[data-count="7"] .voice-member,
  .voice-members[data-count="8"] .voice-member {
    min-height: 108px;
    padding: 12px 8px;
  }
  .voice-console {
    padding: 12px 16px 16px;
    border-radius: 0 0 16px 16px;
    gap: 10px;
  }
  .self-state {
    display: none;
  }
  .voice-console__actions {
    gap: 8px;
  }
  .call-controls {
    gap: 8px;
  }
  .call-control {
    min-width: 44px;
    min-height: 46px;
    padding: 10px 12px;
    gap: 7px;
  }
  .call-control span {
    font-size: 11px;
    white-space: nowrap;
  }
  .call-control--settings {
    min-width: 44px;
    width: 44px;
    padding: 10px;
  }
  .leave-button {
    min-height: 46px;
    padding: 10px 12px;
  }
  .stage-lyrics {
    padding: 0 18px 18px;
  }
  #lyric-current {
    font-size: 14px;
  }
  .audio-retry {
    bottom: 82px;
    font-size: 11px;
  }
  .speaker-notice {
    margin: 0 16px;
  }
  .chat-card {
    order: 2;
    height: min(560px, 72dvh);
    min-height: 350px;
    border-radius: 16px;
  }
  .chat-header {
    padding: 12px 16px;
  }
  .chat-title h2 {
    font-size: 14px;
  }
  .chat-header .icon-ghost {
    width: 44px;
    height: 44px;
  }
  .chat-title p {
    font-size: 10px;
  }
  .composer {
    margin: 0 12px 12px;
    padding: 12px 10px 8px;
  }
  .composer-tools .icon-ghost,
  .send-button {
    width: 44px;
    height: 44px;
  }
  .chat-pin-action {
    width: 44px;
    height: 44px;
    top: -12px;
    right: -6px;
  }
  .msg__meta {
    padding-right: 32px;
  }
  .chat-thread {
    padding: 20px 16px;
  }
  .key-hint {
    display: none;
  }
  .dialog {
    max-height: calc(100dvh - 24px);
    width: calc(100vw - 24px);
    border-radius: 20px;
  }
  .dialog-card {
    padding: 24px;
  }
  .dialog-head,
  .dialog-heading {
    margin-bottom: 20px;
  }
  .dialog-head h2,
  .dialog-heading h2 {
    font-size: 21px;
  }
  .dialog input:not([type="checkbox"]):not([type="range"]),
  .dialog textarea,
  .dialog select {
    font-size: 16px;
  }
  .manage-grid {
    gap: 8px;
  }
  .manage-grid label {
    font-size: 11px !important;
  }
  .rename-actions > button {
    font-size: 11px;
  }
  .mobile-music-dialog {
    width: min(420px, calc(100vw - 24px));
    padding: 22px;
  }
  .music-library-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .library-frame {
    padding: 20px 16px 14px;
  }
  .library-header h2 {
    font-size: 23px;
  }
  .library-tabs {
    gap: 4px;
    padding: 16px 0 12px;
  }
  .library-tabs button {
    padding: 10px 12px;
    font-size: 12px;
  }
  .library-body {
    padding-top: 18px;
  }
  .music-track-row {
    display: grid;
    grid-template-columns: 1fr repeat(3, auto);
    gap: 6px;
  }
  .music-track-row > div {
    grid-column: 1/-1;
    margin-bottom: 4px;
  }
  .music-track-row button {
    grid-row: 2;
    font-size: 11px;
  }
  .music-track-row button:first-of-type {
    grid-column: 2;
  }
  .music-search-row button {
    padding: 12px 18px;
  }
  .library-collections {
    grid-template-columns: 1fr;
  }
  .library-collection {
    min-height: 92px;
    padding: 16px;
  }
  .collection-delete {
    min-height: 44px;
  }
  .library-view-toolbar {
    gap: 8px;
  }
  .library-view-toolbar select {
    font-size: 12px;
  }
  .music-source-label select {
    font-size: 13px;
  }
  .admin-shell {
    padding: 20px 20px 44px;
  }
  .admin-header {
    margin-bottom: 36px;
  }
  .admin-header .brand {
    font-size: 15px;
    gap: 6px;
  }
  .admin-heading {
    margin-bottom: 26px;
    gap: 12px;
  }
  .admin-heading h1 {
    font-size: 25px;
  }
  .admin-heading .invite-button {
    padding: 12px 14px;
    font-size: 12px;
  }
  .room-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .room-card {
    padding: 22px;
  }
  .room-details h2 {
    font-size: 17px;
  }
  .room-details p {
    font-size: 10px;
  }
  .room-card-actions {
    gap: 4px;
  }
  .room-card-actions a,
  .room-card-actions button {
    font-size: 10px;
    padding: 9px 8px;
  }
}
@media (max-width: 370px) {
  .lobby-screen {
    padding-left: 16px;
    padding-right: 16px;
  }
  .join-card__body {
    padding: 26px 22px 30px;
  }
  .call-control {
    padding: 10px;
  }
  .call-control span {
    display: none;
  }
  .leave-button {
    padding: 10px;
  }
  .room-screen {
    padding-left: 8px;
    padding-right: 8px;
  }
  .stage-header > div {
    flex-direction: column;
    gap: 4px;
  }
  .admin-heading .invite-button {
    padding: 10px;
  }
  .room-card {
    padding: 18px;
  }
}
/* Existing real-time effects; typography and surfaces use the new tokens. */
.audio-health {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--subtle);
  border-radius: 12px;
}
.audio-health strong {
  font-size: 12px;
  font-weight: 500;
}
.audio-health p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.emoji-picker__head {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.emoji-picker__head span + span {
  display: none;
}
.emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.emoji-choice {
  min-height: 44px;
  border-radius: 9px;
  font-size: 25px;
}
.emoji-choice:hover {
  background: var(--subtle);
}
.reaction-heart {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 12px 26px -14px rgba(205, 83, 108, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  font-size: calc(var(--size) * 0.5);
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: heart-float var(--duration) cubic-bezier(0.2, 0.7, 0.2, 1)
    var(--delay) forwards;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  will-change: transform, opacity;
}

.reaction-heart.is-static {
  animation: none !important;
  opacity: 1;
}

.reaction-effect {
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.reaction-effect > span {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 12px rgba(45, 79, 132, 0.12));
}

.effect-ring {
  width: 84px;
  height: 84px;
  border: 1px solid rgba(100, 150, 221, 0.35);
  border-radius: 50%;
  opacity: 0;
  animation: effect-ring 800ms var(--ease) forwards;
}

.effect-core {
  font-size: 42px;
  opacity: 0;
}

.reaction-effect--flower .effect-core {
  animation: flower-pop 1.2s var(--ease) forwards;
}

.effect-petal {
  font-size: 16px;
  opacity: 0;
  animation: petal-fly 1.2s var(--ease) var(--delay) forwards;
}

.effect-projectile {
  font-size: 32px;
  opacity: 0;
}

.effect-payoff {
  font-size: 50px;
  opacity: 0;
  animation: payoff-pop 820ms 380ms var(--ease) forwards;
}

.effect-spark {
  font-size: 14px;
  opacity: 0;
  animation: spark-fly 1s var(--ease) var(--delay) forwards;
}

.effect-smoke {
  font-size: 22px;
  opacity: 0;
  animation: smoke-drift 900ms 480ms ease-out forwards;
}

.reaction-effect--egg .effect-projectile {
  animation: egg-drop 620ms cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}

.reaction-effect--egg .effect-ring {
  animation-delay: 380ms;
}

.reaction-effect--bomb .effect-projectile {
  animation: bomb-drop 560ms cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
}

.reaction-effect--bomb .effect-ring {
  border-color: rgba(244, 158, 91, 0.5);
  box-shadow: 0 0 28px rgba(244, 158, 91, 0.22);
  animation-delay: 390ms;
}

.reaction-effect--clap .effect-core {
  animation: clap-pop 1.05s var(--ease) forwards;
}

.reaction-effect--clap .effect-ring {
  animation-delay: 80ms;
}

.emoji-pop {
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translate(-50%, -100%);
  animation: emoji-pop-rise 2.2s var(--ease) forwards;
  will-change: transform, opacity;
}

.emoji-pop.is-static {
  animation: none !important;
  opacity: 1;
}

.emoji-pop__bubble {
  position: absolute;
  left: 0;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92),
    rgba(236, 246, 255, 0.76)
  );
  box-shadow:
    0 22px 46px -22px rgba(28, 67, 128, 0.42),
    inset 0 1px 0 #fff;
  font-size: 38px;
  line-height: 1;
  transform: translateX(-50%);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.emoji-pop__trail {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px -14px rgba(39, 81, 143, 0.34);
}

.emoji-pop__trail--small {
  left: -7px;
  bottom: -9px;
  width: 10px;
  height: 10px;
}

.emoji-pop__trail--mid {
  left: -19px;
  bottom: -25px;
  width: 17px;
  height: 17px;
  opacity: 0.72;
}

.composer {
  position: relative;
  z-index: 2;
}

.emoji-picker {
  position: absolute;
  z-index: 8;
  right: 8px;
  bottom: calc(100% + 9px);
  width: min(286px, calc(100vw - 78px));
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 24px 54px -24px rgba(25, 58, 112, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transform-origin: right bottom;
  transition:
    opacity 150ms ease,
    transform 180ms var(--ease);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.emoji-picker.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.emoji-picker[hidden] {
  display: none !important;
}

.emoji-picker__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 9px;
  color: #4f6a86;
  font-size: 10.5px;
  line-height: 1.4;
}

.emoji-picker__head span + span {
  color: #566f88;
  font-size: 9.5px;
  text-align: right;
}

.emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}

.emoji-choice {
  display: grid;
  place-items: center;
  height: 44px;
  min-width: 0;
  border-radius: 11px;
  font-size: 20px;
  line-height: 1;
  transition:
    background 150ms ease,
    transform 170ms var(--ease);
}

.emoji-choice:hover {
  background: rgba(232, 241, 255, 0.86);
  transform: translateY(-1px) scale(1.04);
}

.emoji-choice:active {
  transform: scale(0.94);
}

.composer-tools .icon-ghost.is-active {
  color: var(--blue);
  background: rgba(228, 239, 255, 0.85);
}

@keyframes heart-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -22%) scale(0.42);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift)), calc(-50% - var(--rise)))
      scale(1.08) rotate(var(--rotate));
  }
}
@keyframes effect-ring {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.18);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.25);
  }
}
@keyframes flower-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -36%) scale(0.35) rotate(-10deg);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.08) rotate(4deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -68%) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -102%) scale(1.04) rotate(-3deg);
  }
}
@keyframes petal-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      rotate(var(--rotate)) scale(1.05);
  }
}
@keyframes egg-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 138px)) rotate(-24deg);
  }
  16% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(9deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 12px)) rotate(17deg);
  }
}
@keyframes bomb-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 142px)) rotate(-20deg);
  }
  16% {
    opacity: 1;
  }
  68% {
    opacity: 1;
    transform: translate(-50%, calc(-50% + 2px)) rotate(8deg);
  }
  84% {
    opacity: 1;
    transform: translate(-50%, calc(-50% - 14px)) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 4px)) rotate(9deg);
  }
}
@keyframes payoff-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(-8deg);
  }
  26% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1.16) rotate(3deg);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -62%) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -84%) scale(0.94) rotate(2deg);
  }
}
@keyframes spark-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(1.12) rotate(20deg);
  }
}
@keyframes smoke-drift {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  30% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + 25px), calc(-50% - 54px)) scale(1.2);
  }
}
@keyframes clap-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.35) rotate(-8deg);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -65%) scale(1.1) rotate(4deg);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -90%) scale(0.96);
  }
}
@keyframes emoji-pop-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-100% + 10px)) scale(0.45);
  }
  14% {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 3px)) scale(1.06);
  }
  26% {
    transform: translate(-50%, calc(-100% - 5px)) scale(1);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 10px)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 44px)) scale(0.92);
  }
}
/* The phone call dock stays available while browsing a full room or chatting. */
@media (max-width: 760px) {
  .room-screen {
    padding-bottom: calc(102px + env(safe-area-inset-bottom));
  }
  .voice-console {
    position: fixed;
    z-index: 80;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 36px #30234e20;
  }
  .stage-card {
    padding-bottom: 4px;
  }
  #message {
    scroll-margin-bottom: 110px;
  }
}
@media (max-width: 370px) {
  .voice-console {
    left: 8px;
    right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
