body[data-view="table"] .seat .seat-name:has(> .table-voice-seat-speaker) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 3px;
}

.seat-name-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="table"] .seat-name > .table-voice-seat-speaker {
  display: grid;
  position: relative;
  place-items: center;
  justify-self: end;
  inline-size: 24px;
  min-inline-size: 0;
  min-block-size: 24px;
  padding: 0;
  color: #adf2d0;
  border: 1px solid #4f8169;
  border-radius: 6px;
  background: #1a3128;
  box-shadow: none;
  touch-action: manipulation;
}

body[data-view="table"] #table-stage[data-native-card-portrait] .seat-name > .table-voice-seat-speaker {
  inline-size: clamp(13px, calc(21 * var(--apk-unit)), 24px);
  align-self: start;
  block-size: calc(13 * var(--apk-unit));
  min-block-size: 0;
}

body[data-view="table"] #table-stage[data-native-card-portrait] .seat-name > .table-voice-seat-speaker svg {
  inline-size: min(13px, calc(10 * var(--apk-unit)));
  block-size: min(13px, calc(10 * var(--apk-unit)));
}

body[data-view="table"] .seat-name > .table-voice-seat-speaker[aria-pressed="true"] {
  color: #ffe0b4;
  border-color: #b68c58;
  background: #382b1c;
}

.table-voice-seat-speaker svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.table-voice-seat-speaker .table-voice-off-mark,
.table-voice-seat-speaker[aria-pressed="true"] .table-voice-waves { display: none; }
.table-voice-seat-speaker[aria-pressed="true"] .table-voice-off-mark { display: initial; }
.table-voice-seat-speaker[data-listening="false"]:not([aria-pressed="true"]) {
  opacity: .65;
}
.table-voice-seat-speaker[data-listening="false"] .table-voice-waves { display: none; }
.table-voice-seat-speaker[data-listening="false"] .table-voice-off-mark { display: initial; }
.table-voice-seat-speaker[data-speaking="true"] {
  outline: 2px solid #56e7da;
  outline-offset: 1px;
}
.table-voice-seat-speaker[data-speaking="true"][data-listening="false"] { opacity: 1; }

.table-voice-controls {
  position: absolute;
  top: 28px;
  right: 10px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 210px;
}

.table-voice-dock {
  flex: none;
  min-width: 0;
}

.table-voice-controls--toolbar {
  position: relative;
  inset: auto;
  flex-wrap: nowrap;
  gap: 0;
  max-width: none;
}

.table-voice-controls .table-voice-button,
body[data-view="table"] .table-navigation .table-voice-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #c6cbc8;
  background: transparent;
  box-shadow: none;
  touch-action: manipulation;
}

.table-voice-button::before {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #202422;
  content: '';
}

body[data-view="table"] .table-navigation .table-voice-button:hover:not(:disabled) {
  background: transparent;
}

.table-voice-button svg,
.table-voice-button.table-voice-people {
  position: relative;
}

.table-voice-button svg,
.table-voice-people svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.table-voice-controls .table-voice-button[data-active="true"] {
  color: #081611;
}

.table-voice-button[data-active="true"]::before {
  background: #18d487;
}

.table-voice-button[data-active="true"] .table-voice-symbol {
  fill: currentColor;
}

.table-voice-button[data-active="true"] .table-voice-off-mark,
.table-voice-button[data-active="false"] .table-voice-waves {
  display: none;
}

.table-voice-button:disabled {
  opacity: .55;
}

.table-voice-button:focus-visible,
.table-voice-done:focus-visible,
.table-voice-person-mute:focus-visible {
  outline: 2px solid #18d487;
  outline-offset: -2px;
}

.table-voice-status {
  display: -webkit-box;
  flex-basis: 100%;
  max-width: 210px;
  padding: 4px 6px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  border-radius: 6px;
  background: #101b15f5;
  color: #e2ece5;
  text-align: right;
  font-size: 11px;
  line-height: 1.3;
  pointer-events: none;
}

.table-voice-controls--toolbar .table-voice-status {
  position: absolute;
  inset: calc(100% + 52px) auto auto 0;
  width: min(205px, calc(100vw - 80px));
  max-width: none;
  text-align: left;
}

.table-voice-peers {
  position: absolute;
  inset: 48px 0 auto auto;
  width: min(260px, calc(100vw - 24px));
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #414944;
  border-radius: 12px;
  background: #181d1a;
  color: #edf3ef;
  box-shadow: 0 4px 14px #0007;
}

.table-voice-dock[hidden],
.table-voice-status[hidden],
.table-voice-spectator-speaker[hidden],
.table-voice-peers[hidden],
.table-voice-empty[hidden],
.table-voice-people[hidden] {
  display: none !important;
}

.table-voice-controls .table-voice-spectator-speaker[aria-pressed="true"] {
  color: #ffe0b4;
}

.table-voice-spectator-speaker[data-speaking="true"] {
  outline-offset: -4px;
}

.table-voice-peers--sheet {
  position: fixed;
  inset: 0;
  width: min(420px, 94vw);
  max-height: 78dvh;
  margin: auto;
  padding: 14px;
}

.table-voice-peers--sheet::backdrop {
  background: #000b;
}

.table-voice-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #3a433d;
}

.table-voice-sheet-header h2 {
  margin: 0;
  font-size: 18px;
}

.table-voice-done {
  min-height: 44px;
  color: #98efc9;
}

.table-voice-roster {
  display: grid;
}

.table-voice-empty {
  margin: 12px 0 4px;
  color: #b8c4bc;
  font-size: 13px;
}

.table-voice-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid #333c36;
  font-size: 13px;
}

.table-voice-person:last-child {
  border-bottom: 0;
}

.table-voice-person-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.table-voice-person-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-voice-person-mic {
  color: #b8c4bc;
}

.table-voice-person .table-voice-person-mute {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 44px;
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 8px;
  touch-action: manipulation;
}

.table-voice-person-mute::before {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: '';
}

.table-voice-person-mute[data-active="true"] {
  color: #ffda9f;
  background: #3a2b18;
  border-color: #9a7848;
}

.table-voice-person-mute[data-active="true"]::before {
  background: currentColor;
}

.reference-menu[data-kind="table-options"] > .table-voice-people::before {
  content: none;
}

.reference-menu[data-kind="table-options"] > .table-voice-people svg {
  width: 22px;
  height: 22px;
  color: #c9d8cd;
}

.reference-menu[data-kind="table-options"] > .table-voice-people .table-voice-waves {
  display: none;
}

@media (max-width: 600px) {
  .table-voice-peers--sheet {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
}

@media (max-width: 420px) {
  body[data-view="table"] .table-navigation:has(.table-voice-dock:not([hidden])) {
    gap: 2px;
  }

  body[data-view="table"] .table-navigation:has(.table-voice-dock:not([hidden])) .table-nav-actions > button:not(.table-stand-toggle) {
    width: 36px;
    min-width: 36px;
    padding-inline: 2px;
  }
}


.table-voice-button .table-mic-countdown {
  position: absolute;
  inset: auto 0 1px;
  width: max-content;
  min-width: 26px;
  margin-inline: auto;
  padding: 1px 4px;
  border: 1px solid #e8b771;
  border-radius: 8px;
  background: #372a18;
  color: #ffe8bb;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.table-voice-button[data-pause="active"] .table-mic-countdown {
  border-color: #59d4c5;
  background: #163a34;
  color: #c2fff0;
}

.table-voice-button[data-pause="available"] .table-mic-countdown {
  border-color: #77bc99;
  background: #18342a;
  color: #d7f5e5;
}

.table-voice-controls .table-voice-button:disabled:is([data-pause="retry"],[data-pause="pending"]) {
  opacity: 1;
}

.table-mic-card,
.table-mic-problem,
.domino-play-voice .table-voice-controls .table-voice-status[data-needs-attention="true"] {
  position: fixed;
  z-index: 13;
  inset: max(66px, calc(env(safe-area-inset-top) + 62px)) auto auto 50%;
  width: min(360px, calc(100vw - 28px));
  box-sizing: border-box;
  translate: -50% 0;
}

.table-mic-card {
  padding: 13px 15px;
  border: 1px solid #5c8d82;
  border-radius: 14px;
  background: linear-gradient(160deg, #25433e, #142622 72%);
  color: #f0f9f5;
  box-shadow: 0 8px 22px #0007;
  text-align: start;
}

.table-mic-card-title {
  font-size: 15px;
}

.table-mic-card-detail {
  margin: 4px 0 10px;
  color: #d8e9e1;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-mic-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.table-mic-card-actions button {
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid #638c81;
  border-radius: 9px;
  color: #eaf5ef;
  background: #243b36;
  font-size: 12px;
  font-weight: 700;
}

.table-mic-card-actions .table-mic-card-confirm {
  color: #06241a;
  background: #6be2b3;
}

.table-mic-card-actions button:focus-visible {
  outline: 2px solid #a9f6d6;
  outline-offset: 2px;
}

.table-mic-problem {
  padding: 6px 10px;
  border: 1px solid #96764e;
  border-radius: 8px;
  background: #332a1d;
  color: #ffe3b1;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.table-mic-authorize {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: #19332a;
  color: #d5fce5;
  font: inherit;
  pointer-events: auto;
}

.table-mic-authorize[hidden] { display: none; }

.table-mic-card:not([hidden]) + .table-mic-problem {
  inset-block-start: auto;
  inset-block-end: max(16px, env(safe-area-inset-bottom));
}

.table-mic-card[hidden],
.table-mic-problem[hidden],
.table-mic-countdown[hidden] {
  display: none;
}

.domino-play-voice .table-voice-controls .table-voice-status[data-needs-attention="true"]:not([hidden]) {
  display: block;
  text-align: center;
}

.table-mic-card.table-mic-seat-confirmation {
  inset: 0;
  margin: auto;
  translate: none;
}

.table-mic-seat-confirmation::backdrop {
  background: #0b1512b8;
}
