:root {
  color-scheme: dark;
  --bg: #0b0f12;
  --panel: #11181c;
  --panel-strong: #162126;
  --line: #263339;
  --line-soft: rgba(184, 204, 204, 0.14);
  --text: #edf5f2;
  --muted: #93a4a4;
  --teal: #3bd6c6;
  --teal-dark: #143d3d;
  --amber: #f2b84b;
  --red: #ff6a61;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(34, 52, 55, 0.34), rgba(11, 15, 18, 0) 280px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

[hidden] {
  display: none !important;
}

.peer-translation-audio {
  display: none;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 750;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ui-locale {
  display: grid;
  gap: 4px;
  min-width: 86px;
}

.ui-locale span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-align: right;
}

.ui-locale select {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.signal-dot {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(59, 214, 198, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal) 0 32%, transparent 36%);
  box-shadow: 0 0 26px rgba(59, 214, 198, 0.46);
}

.session-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 184, 75, 0.46);
  border-radius: 8px;
  background: rgba(74, 54, 15, 0.92);
  box-shadow: var(--shadow);
}

.session-notice > div {
  display: grid;
  gap: 3px;
}

.session-notice strong {
  font-size: 13px;
}

.session-notice span {
  color: #ead8ad;
  font-size: 12px;
}

.session-notice a {
  flex: 0 0 auto;
  color: #101615;
  border-radius: 7px;
  background: var(--amber);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
}

.session-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 9, 11, 0.94);
  backdrop-filter: blur(12px);
}

.session-gate-card {
  width: min(100%, 420px);
  padding: 26px 22px;
  border: 1px solid rgba(255, 106, 97, 0.34);
  border-radius: 12px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.session-gate-icon {
  margin-bottom: 12px;
  font-size: 34px;
}

.session-gate h2 {
  margin: 0;
  font-size: 24px;
}

.session-gate p {
  margin: 12px auto 20px;
  color: var(--muted);
  line-height: 1.5;
}

.session-renew-button {
  display: block;
  width: 100%;
  border-radius: 9px;
  background: var(--teal);
  color: #071110;
  padding: 13px 16px;
  font-weight: 800;
  text-decoration: none;
}

.view {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none;
}

.language-row,
.join-form,
.room-head,
.call-console,
.latest-translation,
.participants,
.quality-feed,
.service-menu,
.event-log-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(17, 24, 28, 0.86);
  box-shadow: var(--shadow);
}

.language-row,
.join-form {
  padding: 14px;
}

.language-row {
  display: grid;
  gap: 9px;
}

.language-row.compact {
  grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
}

label,
.room-label,
.section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

select,
input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1316;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

select:focus,
input:focus {
  border-color: rgba(59, 214, 198, 0.72);
  box-shadow: 0 0 0 3px rgba(59, 214, 198, 0.12);
}

.primary-action,
.secondary-action,
.join-row button,
.control-button,
.icon-button,
.mini-button,
.save-button,
.leave-button {
  min-height: 44px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-action:active,
.secondary-action:active,
.join-row button:active,
.control-button:active,
.icon-button:active,
.mini-button:active,
.save-button:active,
.leave-button:active {
  transform: translateY(1px);
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #20b9ad, #2bdfc9);
  color: #021615;
  font-size: 16px;
  font-weight: 780;
}

.secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(59, 214, 198, 0.34);
  background: rgba(59, 214, 198, 0.1);
  color: #a9fff5;
  font-size: 15px;
  font-weight: 760;
}

.join-form {
  display: grid;
  gap: 9px;
}

.join-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.join-row input {
  text-transform: uppercase;
  letter-spacing: 0;
}

.join-row button,
.icon-button,
.mini-button,
.save-button {
  border: 1px solid rgba(242, 184, 75, 0.28);
  background: rgba(242, 184, 75, 0.11);
  color: #ffd78a;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}

.room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.room-head strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  letter-spacing: 0;
}

.icon-button {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.call-console {
  --audio-level: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 18px 14px 14px;
}

.wave-stage {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
}

.ring,
.core-dot {
  position: absolute;
  border-radius: 50%;
}

.ring-one {
  width: 150px;
  height: 150px;
  border: 1px solid rgba(59, 214, 198, 0.2);
}

.ring-two {
  width: 108px;
  height: 108px;
  border: 1px solid rgba(242, 184, 75, 0.28);
}

.ring-three {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(59, 214, 198, 0.44);
}

.core-dot {
  width: 34px;
  height: 34px;
  background: var(--teal);
  transform: scale(calc(1 + (var(--audio-level) * 0.75)));
  transition: transform 80ms linear, box-shadow 80ms linear;
  box-shadow:
    0 0 0 calc(14px + (var(--audio-level) * 20px)) rgba(59, 214, 198, 0.08),
    0 0 calc(34px + (var(--audio-level) * 48px)) rgba(59, 214, 198, 0.4);
}

.audio-hot .ring-one {
  border-color: rgba(59, 214, 198, 0.42);
}

.audio-hot .ring-two {
  border-color: rgba(242, 184, 75, 0.58);
}

.audio-hot .ring-three {
  border-color: rgba(59, 214, 198, 0.78);
}

.connected .ring-one,
.connected .ring-two,
.connected .ring-three {
  animation: pulse 2.7s ease-in-out infinite;
}

.connected .ring-two {
  animation-delay: 250ms;
}

.connected .ring-three {
  animation-delay: 520ms;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.call-state {
  display: grid;
  gap: 4px;
  text-align: center;
}

.call-state strong {
  font-size: 18px;
}

.call-state span {
  color: var(--muted);
  font-size: 13px;
}

.mic-health {
  width: 100%;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 19, 22, 0.78);
  color: var(--muted);
  padding: 7px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.mic-health.active {
  border-color: rgba(59, 214, 198, 0.38);
  color: #a9fff5;
}

.mic-health.warning {
  border-color: rgba(242, 184, 75, 0.42);
  color: #ffd78a;
}

.mic-health.error {
  border-color: rgba(255, 106, 97, 0.36);
  color: #ffb3ad;
}

.mic-level {
  width: 100%;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 14, 0.62);
  padding: 9px 10px;
}

.mic-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.mic-level-head strong {
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mic-level-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(147, 164, 164, 0.18);
}

.mic-level-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 184, 75, 0.78), rgba(59, 214, 198, 0.92));
  transition: width 80ms linear;
}

.mic-level.active {
  border-color: rgba(59, 214, 198, 0.34);
}

.mic-level.active .mic-level-head strong {
  color: #a9fff5;
}

.mode-switch {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 14, 0.78);
  padding: 4px;
}

.live-mode-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-option {
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.mode-option.active {
  background: rgba(59, 214, 198, 0.17);
  color: #a9fff5;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  width: 100%;
}

.sticky-action-bar {
  position: sticky;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
  width: 100%;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(184, 204, 204, 0.18);
  border-radius: 8px;
  background: rgba(11, 15, 18, 0.88);
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.room-action-bar,
.live-action-bar {
  justify-self: stretch;
}

.sticky-action-bar .control-button {
  width: 100%;
}

.control-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #0d1316;
  font-weight: 720;
}

.control-button.connect {
  border-color: rgba(59, 214, 198, 0.38);
  background: rgba(59, 214, 198, 0.12);
  color: #a9fff5;
}

.control-button.muted {
  border-color: rgba(255, 106, 97, 0.4);
  background: rgba(255, 106, 97, 0.12);
  color: #ffb3ad;
}

.control-button.playback-button {
  width: 100%;
  border-color: rgba(242, 184, 75, 0.44);
  background: rgba(242, 184, 75, 0.13);
  color: #ffd78a;
}

.control-button.fallback-button {
  width: 100%;
  border-color: rgba(59, 214, 198, 0.44);
  background: rgba(59, 214, 198, 0.13);
  color: #a9fff5;
}

.control-button.broadcast-talk-button {
  min-height: 72px;
  border-color: rgba(242, 184, 75, 0.46);
  background: rgba(242, 184, 75, 0.14);
  color: #ffe1a3;
  font-size: 16px;
}

.control-button.broadcast-talk-button.active {
  border-color: rgba(59, 214, 198, 0.72);
  background: rgba(59, 214, 198, 0.22);
  color: #cafff9;
  transform: scale(0.99);
}

.control-button:disabled,
.mini-button:disabled,
.save-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.participants {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.latest-translation {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mini-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 760;
}

.latest-card {
  display: grid;
  gap: 10px;
}

.latest-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.latest-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-meta span,
.latest-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.latest-copy {
  display: grid;
  gap: 4px;
}

.latest-copy p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.latest-copy.translated p {
  color: #a9fff5;
  font-size: 17px;
  font-weight: 720;
}

.participant-list {
  display: grid;
  gap: 8px;
}

.participant-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1316;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}

.participant-chip .state {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.participant-chip.present .state {
  background: var(--amber);
  box-shadow: 0 0 16px rgba(242, 184, 75, 0.24);
}

.participant-chip.voice-online .state {
  background: var(--teal);
  box-shadow: 0 0 20px rgba(59, 214, 198, 0.5);
}

.participant-chip.admin {
  border-color: rgba(242, 184, 75, 0.38);
}

.participant-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.participant-name {
  overflow: hidden;
  color: var(--text);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-feed {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.live-console,
.live-transcript {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(17, 24, 28, 0.86);
  box-shadow: var(--shadow);
}

.live-options {
  display: grid;
  gap: 10px;
}

.live-noise-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 28, 0.86);
  box-shadow: var(--shadow);
  padding: 14px;
}

.live-advanced-menu .live-noise-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 14px 14px;
}

.live-noise-label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.live-noise-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.live-noise-controls select {
  min-width: 0;
  height: 44px;
  font-size: 13px;
}

.live-browser-noise {
  position: relative;
  min-width: 84px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 12, 14, 0.78);
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.live-browser-noise input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.live-browser-noise span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-browser-noise span::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid rgba(238, 247, 246, 0.72);
  border-radius: 4px;
  background: transparent;
}

.live-browser-noise input:checked + span::before {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 3px #071012;
}

.live-browser-noise:has(input:focus-visible) {
  border-color: rgba(59, 214, 198, 0.72);
  box-shadow: 0 0 0 3px rgba(59, 214, 198, 0.12);
}

.live-console {
  --audio-level: 0;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 18px 14px 14px;
}

.live-orbit {
  position: relative;
  width: 180px;
  height: 108px;
  display: grid;
  place-items: center;
}

.live-bar {
  position: absolute;
  width: 150px;
  height: 26px;
  border: 1px solid rgba(59, 214, 198, 0.22);
  border-radius: 999px;
  transform-origin: center;
}

.live-bar-one {
  transform: rotate(0deg);
}

.live-bar-two {
  border-color: rgba(242, 184, 75, 0.34);
  transform: rotate(60deg);
}

.live-bar-three {
  transform: rotate(-60deg);
}

.live-core {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  transform: scale(calc(1 + (var(--audio-level) * 0.75)));
  transition: transform 80ms linear, box-shadow 80ms linear;
  box-shadow:
    0 0 0 calc(14px + (var(--audio-level) * 20px)) rgba(59, 214, 198, 0.08),
    0 0 calc(34px + (var(--audio-level) * 48px)) rgba(59, 214, 198, 0.44);
}

.live-console.audio-hot .live-bar-one {
  border-color: rgba(59, 214, 198, 0.54);
}

.live-console.audio-hot .live-bar-two {
  border-color: rgba(242, 184, 75, 0.66);
}

.live-console.audio-hot .live-bar-three {
  border-color: rgba(59, 214, 198, 0.8);
}

.live-console.connected .live-bar {
  animation: liveGlow 2.7s ease-in-out infinite;
}

.live-console.broadcasting .live-core {
  background: #ffd78a;
  box-shadow:
    0 0 0 calc(18px + (var(--audio-level) * 24px)) rgba(242, 184, 75, 0.11),
    0 0 calc(42px + (var(--audio-level) * 52px)) rgba(242, 184, 75, 0.5);
}

.live-console.broadcasting .live-bar {
  border-color: rgba(242, 184, 75, 0.72);
}

.live-console.connected .live-bar-two {
  animation-delay: 250ms;
}

.live-console.connected .live-bar-three {
  animation-delay: 520ms;
}

@keyframes liveGlow {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

.live-console .control-button {
  width: 100%;
}

.voice-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1316;
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.voice-toggle input {
  width: auto;
  min-height: auto;
  accent-color: var(--teal);
}

.live-transcript {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.live-transcript-list {
  display: grid;
  gap: 8px;
}

.live-transcript-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1316;
  padding: 10px;
}

.live-transcript-item.active {
  border-color: rgba(59, 214, 198, 0.34);
}

.live-transcript-item.quality-error {
  border-color: rgba(255, 106, 97, 0.34);
  background: rgba(255, 106, 97, 0.08);
}

.live-transcript-item.quality-error.retrying {
  opacity: 0.72;
}

.live-transcript-item span {
  color: var(--muted);
  font-size: 11px;
}

.live-transcript-line {
  display: grid;
  gap: 4px;
}

.live-transcript-line b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-transcript-line.translated b {
  color: #ffd78a;
}

.live-transcript-item p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.section-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-title {
  min-width: 0;
}

.section-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.section-actions > span,
.section-row > span {
  max-width: 150px;
  overflow: hidden;
  color: var(--teal);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-feed-list {
  display: grid;
  gap: 8px;
}

.quality-empty {
  color: var(--muted);
  font-size: 12px;
}

.quality-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1316;
  padding: 10px;
}

.quality-item.mine {
  border-color: rgba(59, 214, 198, 0.32);
}

.quality-item.quality-error {
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(255, 107, 107, 0.08);
}

.quality-item.quality-error.retrying {
  border-color: rgba(242, 184, 75, 0.42);
}

.quality-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quality-item-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-item-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.quality-item p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.quality-item details {
  color: var(--muted);
  font-size: 11px;
}

.quality-item summary {
  width: max-content;
  cursor: pointer;
  color: #ffd78a;
  font-weight: 700;
}

.quality-item details span {
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}

.quality-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quality-item-actions .mini-button {
  min-height: 32px;
}

.quality-item-actions span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.service-menu {
  overflow: hidden;
}

.service-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--text);
  font-weight: 760;
}

.service-menu summary::-webkit-details-marker {
  display: none;
}

.service-menu[open] summary svg {
  transform: rotate(180deg);
}

.settings-grid {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.settings-grid label {
  display: grid;
  gap: 7px;
}

.settings-grid output {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--teal);
}

.local-capture {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.local-capture label {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.local-capture input {
  width: auto;
  min-height: auto;
  accent-color: var(--teal);
}

.save-button {
  width: 100%;
}

.event-log-panel {
  overflow: hidden;
  box-shadow: none;
}

.event-log-panel summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.event-log-panel summary::-webkit-details-marker {
  display: none;
}

.event-log-panel[open] summary svg {
  transform: rotate(180deg);
}

.event-log {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  padding: 10px 14px 12px;
  color: var(--muted);
  font-size: 12px;
}

.event-log strong {
  color: var(--text);
}

.diagnostics-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(17, 24, 28, 0.72);
  color: var(--muted);
  box-shadow: none;
}

.diagnostics-panel summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.diagnostics-panel summary::-webkit-details-marker {
  display: none;
}

.diagnostics-tools {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 8px;
}

.diagnostics-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding: 0 12px 12px;
  font-size: 11px;
  line-height: 1.35;
}

.diagnostics-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  border-top: 1px solid var(--line-soft);
  padding-top: 6px;
}

.diagnostics-item time {
  color: #ffd78a;
  white-space: nowrap;
}

.diagnostics-item strong {
  color: var(--text);
}

.diagnostics-item span {
  word-break: break-word;
}

.leave-button {
  border: 1px solid rgba(255, 106, 97, 0.32);
  background: rgba(255, 106, 97, 0.1);
  color: #ffb3ad;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 380px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .join-row,
  .control-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .ui-locale {
    min-width: 78px;
  }

  .live-noise-card {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .live-browser-noise {
    min-width: 78px;
    padding: 0 8px;
  }

  .icon-button span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
