:root {
  color-scheme: dark;
  --bg: #0f141b;
  --surface: #171e27;
  --surface-muted: #1d2631;
  --surface-strong: #263241;
  --surface-soft: #131a22;
  --border: #324050;
  --border-strong: #4a5c70;
  --text: #eef4fb;
  --muted: #9baabd;
  --accent: #35b7a6;
  --accent-strong: #5bd8c8;
  --accent-soft: #173f3b;
  --danger: #e05f5f;
  --danger-strong: #ff8686;
  --danger-soft: #402022;
  --focus: #7aa7ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select {
  border-radius: 7px;
}

button {
  border: 1px solid var(--border);
  padding: 9px 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

button:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input[type="text"],
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

input[type="text"]::placeholder {
  color: #728196;
}

select {
  cursor: pointer;
}

input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  background: var(--surface);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field input {
  grid-column: 1 / -1;
}

.range-field output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0;
  padding: 14px;
  background: var(--surface-muted);
}

legend {
  color: var(--muted);
  padding: 0 7px;
  font-size: 12px;
  font-weight: 750;
}

legend .info-tooltip {
  margin-left: 5px;
  vertical-align: -2px;
}

.label-title {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
}

.field-heading {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
}

.field-heading label {
  display: inline;
}

.mic-page {
  width: min(760px, calc(100% - 20px));
  margin: 0 auto;
  padding: 18px 0 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.page-header,
.top-control-bar,
.panel,
.page-footer {
  grid-column: 1 / -1;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--border);
}

.page-header h1,
.page-header p,
.panel h2,
.panel h3 {
  margin: 0;
}

.page-header h1 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.page-header p {
  color: var(--accent-strong);
  font-weight: 750;
}

.page-title {
  display: grid;
  gap: 2px;
}

.ui-language-field {
  width: min(220px, 100%);
  justify-self: end;
}

.ui-language-field select {
  min-height: 36px;
}

.section-heading p {
  color: var(--muted);
  margin: 4px 0 0;
}

.top-control-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 20, 27, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.top-bar-account,
.top-bar-live {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.top-bar-account {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.top-control-bar .auth-card {
  gap: 0;
  align-self: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.top-control-bar .auth-signin-row {
  gap: 0;
}

.top-control-bar .legal-consent-note {
  display: none;
}

.top-control-bar .auth-profile {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.top-control-bar .auth-profile-main {
  grid-template-columns: 30px minmax(82px, 180px) 34px;
}

.top-control-bar .auth-profile-actions {
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
}

.top-control-bar .account-actions-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.top-control-bar .account-actions-toggle svg {
  transition: transform 140ms ease;
}

.top-control-bar .account-actions-toggle.is-open svg {
  transform: rotate(180deg);
}

.diagnostic-live-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.diagnostic-live-status > span {
  min-height: 34px;
  border: 1px solid rgba(74, 92, 112, 0.72);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
}

.diagnostic-live-status .status-chip {
  min-height: 26px;
  padding: 3px 7px;
  border-color: rgba(74, 92, 112, 0.56);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.diagnostic-live-status .status-chip[data-state="good"] {
  border-color: rgba(53, 183, 166, 0.52);
  background: rgba(23, 63, 59, 0.72);
  color: var(--accent-strong);
}

.diagnostic-live-status .status-chip[data-state="warn"] {
  border-color: rgba(214, 170, 74, 0.58);
  background: rgba(72, 52, 20, 0.58);
  color: #ffd98a;
}

.diagnostic-live-status .status-chip[data-state="bad"] {
  border-color: rgba(224, 95, 95, 0.56);
  background: rgba(64, 32, 34, 0.72);
  color: var(--danger-strong);
}

.top-bar-live .button-row {
  grid-template-columns: repeat(3, 42px);
  gap: 6px;
  justify-content: start;
}

.top-bar-live {
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.top-bar-live .button-row button {
  width: 42px;
  min-width: 42px;
  height: 38px;
  min-height: 36px;
  padding: 0;
}

.runtime-activity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.runtime-status {
  min-height: 34px;
  border: 1px solid rgba(74, 92, 112, 0.72);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
}

.runtime-status {
  color: var(--accent-strong);
  border-color: rgba(53, 183, 166, 0.52);
  background: rgba(23, 63, 59, 0.72);
  font-weight: 800;
}

.panel {
  position: relative;
  z-index: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  padding: 0;
}

.panel h2 {
  font-size: 16px;
}

.panel h3 {
  font-size: 14px;
}

.panel-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

.panel-summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.panel[open] > .panel-summary::after {
  transform: translateY(3px) rotate(225deg);
}

.panel-summary span {
  display: grid;
  gap: 2px;
}

.panel-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.panel-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.mic-screen-panel,
.controls-panel,
.transcript-panel,
.diagnostics-panel,
.language-panel {
  grid-column: 1 / -1;
  align-content: start;
}

.add-time-grid {
  display: grid;
  gap: 12px;
}

.auth-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.auth-card[hidden] {
  display: none;
}

.auth-signin-row {
  display: grid;
  gap: 8px;
  align-items: start;
  justify-items: start;
  min-width: 0;
}

.auth-signin-row[hidden] {
  display: none;
}

.legal-consent-note {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.legal-consent-note a,
.payment-legal-links a {
  color: var(--accent-strong);
}

.auth-profile-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-profile-actions button,
.account-actions button {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.auth-profile #logoutButton,
.auth-profile-actions button,
.account-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.account-detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(74, 92, 112, 0.72);
  border-radius: 8px;
  background: var(--surface-soft);
}

.top-control-bar > .account-detail-panel {
  grid-column: 1 / -1;
  max-height: min(55vh, 430px);
  overflow: auto;
  box-shadow: none;
}

.account-detail-panel[hidden] {
  display: none;
}

.account-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.account-detail-header h3,
.account-detail-content h4 {
  margin: 0;
}

.account-detail-header h3 {
  font-size: 14px;
}

.account-detail-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.account-detail-content {
  display: grid;
  gap: 10px;
}

.account-detail-content h4 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-detail-summary,
.account-detail-list {
  display: grid;
  gap: 8px;
}

.account-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.account-metric,
.account-detail-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(74, 92, 112, 0.55);
  border-radius: 8px;
  background: rgba(23, 30, 39, 0.72);
}

.account-metric span,
.account-detail-meta,
.account-detail-empty {
  color: var(--muted);
  font-size: 11px;
}

.account-metric strong {
  color: var(--text);
  font-size: 14px;
}

.account-detail-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.account-detail-main strong {
  color: var(--text);
  font-size: 13px;
}

.account-detail-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail-empty {
  margin: 0;
}

.usage-day-start-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(74, 92, 112, 0.55);
  border-radius: 8px;
  background: rgba(23, 30, 39, 0.72);
}

.usage-day-start-control input {
  width: 100%;
  min-height: 34px;
}

.usage-chart-section {
  display: grid;
  gap: 10px;
}

.usage-chart-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.usage-chart-tabs button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}

.usage-chart-tabs button[aria-pressed="true"] {
  border-color: #2f756b;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.usage-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.usage-bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.usage-bar-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.usage-legend-intended::before {
  background: rgba(132, 151, 172, 0.55);
}

.usage-legend-active::before {
  background: var(--accent);
}

.usage-bar-chart {
  display: flex;
  align-items: end;
  gap: 5px;
  min-height: 150px;
  padding: 12px 8px 8px;
  border: 1px solid rgba(74, 92, 112, 0.55);
  border-radius: 8px;
  background: rgba(12, 17, 24, 0.48);
  overflow-x: auto;
}

.usage-bar-chart.monthly {
  gap: 8px;
}

.usage-bar-item {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  min-width: 28px;
  height: 124px;
  align-items: end;
}

.usage-bar-chart.weekly .usage-bar-item,
.usage-bar-chart.monthly .usage-bar-item {
  min-width: 42px;
}

.usage-bar-track {
  position: relative;
  width: 100%;
  height: 96px;
  border-radius: 5px;
  background: rgba(74, 92, 112, 0.28);
  overflow: hidden;
}

.usage-bar-track span {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 100%;
  border-radius: inherit;
}

.usage-bar-intended {
  background: rgba(132, 151, 172, 0.45);
}

.usage-bar-active {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

.usage-bar-item {
  cursor: pointer;
}

.usage-bar-item:focus-visible .usage-bar-track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.usage-bar-item.is-selected .usage-bar-track {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.usage-bar-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-chart-summary {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.premium-access-panel {
  border: 1px solid rgba(53, 183, 166, 0.36);
  border-radius: 8px;
  background: rgba(14, 28, 41, 0.58);
}

.premium-access-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.premium-access-summary::-webkit-details-marker {
  display: none;
}

.premium-access-summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.premium-access-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.premium-access-summary strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.premium-access-summary small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.premium-access-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  justify-self: end;
}

.premium-access-toggle svg {
  transition: transform 140ms ease;
}

.premium-access-panel[open] .premium-access-toggle svg {
  transform: rotate(180deg);
}

.premium-access-content {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.subscription-card {
  display: grid;
  gap: 8px;
  padding: 0;
  width: 100%;
}

.subscription-card[hidden] {
  display: none;
}

.subscription-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.credit-login-notice {
  display: grid;
  gap: 8px;
  max-width: 620px;
  padding: 4px 0 6px;
}

.credit-login-notice[hidden] {
  display: none;
}

.credit-login-notice strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.credit-login-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.credit-login-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credit-login-facts span {
  border: 1px solid rgba(53, 183, 166, 0.34);
  border-radius: 999px;
  background: rgba(53, 183, 166, 0.08);
  color: var(--accent-strong);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
}

.discord-invite-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(88, 101, 242, 0.52);
  border-radius: 8px;
  background: rgba(88, 101, 242, 0.11);
  color: var(--text);
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.discord-invite-link:hover {
  border-color: rgba(134, 145, 255, 0.78);
  background: rgba(88, 101, 242, 0.18);
}

.discord-invite-link:active {
  transform: translateY(1px);
}

.discord-invite-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.discord-invite-link span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.discord-invite-link strong {
  color: var(--text);
  font-size: 13px;
}

.discord-invite-link small {
  color: var(--muted);
  font-size: 12px;
}

.discord-invite-link b {
  border: 1px solid rgba(134, 145, 255, 0.48);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.22);
  color: #d9ddff;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.subscription-purchase-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(74, 92, 112, 0.55);
}

.subscription-option-copy {
  display: grid;
  gap: 4px;
  align-items: start;
  min-width: 0;
}

.purchase-eyebrow,
.subscription-option-copy .purchase-eyebrow {
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subscription-option-copy strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.subscription-option-copy span {
  color: #b8d5ff;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.twitch-chat-settings {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border-color: rgba(145, 70, 255, 0.42);
  background: rgba(145, 70, 255, 0.08);
}

.twitch-chat-settings legend {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.twitch-chat-grid {
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(180px, 1fr) minmax(160px, 220px);
  gap: 10px;
  align-items: end;
}

.twitch-chat-grid button {
  min-height: 38px;
  border-color: rgba(145, 70, 255, 0.72);
  background: rgba(145, 70, 255, 0.24);
  color: #eadfff;
}

.twitch-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .twitch-chat-grid {
    grid-template-columns: 1fr;
  }
}

.credit-quantity-field {
  display: grid;
  gap: 4px;
  min-width: 110px;
  justify-items: end;
}

.credit-stepper {
  display: grid;
  grid-template-columns: 30px 42px 30px;
  gap: 4px;
  align-items: center;
}

.credit-stepper button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
}

.credit-stepper input {
  width: 42px;
  min-height: 30px;
  padding: 5px 4px;
  text-align: center;
}

.paddle-checkout-host {
  display: grid;
  gap: 10px;
}

.paddle-checkout-button {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #061413;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(57, 217, 201, 0.16);
}

.paddle-extra-pack-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(12, 23, 35, 0.7);
}

.paddle-extra-pack-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 650;
}

.paddle-extra-pack-row .extra-pack-total {
  color: var(--accent-strong);
}

.welcome-page {
  min-height: 100vh;
  justify-content: center;
}

.welcome-panel {
  max-width: 560px;
  margin: auto;
}

.welcome-panel h1 {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1.1;
}

.welcome-panel p {
  margin: 0;
  color: var(--muted);
}

.welcome-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 18px;
  text-decoration: none;
}

#subscriptionStatus {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.premium-feature-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.subscription-card.is-subscribed #subscriptionStatus {
  color: var(--accent-strong);
}

.payment-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: -2px;
  font-size: 12px;
}

.payment-legal-links a {
  text-decoration: none;
}

.payment-legal-links a:hover {
  text-decoration: underline;
}

.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.info-tooltip.is-open {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.info-tooltip-small {
  width: 16px;
  height: 16px;
  font-size: 11px;
}

.info-tooltip-bubble {
  display: block;
  width: 100%;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  padding: 0 12px;
  border: 0 solid var(--border-strong);
  border-radius: 8px;
  background: #0c1118;
  box-shadow: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: max-height 160ms ease, margin 160ms ease, padding 160ms ease, border-width 160ms ease, opacity 120ms ease, transform 120ms ease;
}

.info-tooltip-bubble.is-open {
  max-height: 420px;
  margin-top: 8px;
  padding: 10px 12px;
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.google-signin-button {
  width: min(260px, 100%);
  max-width: 100%;
  min-height: 36px;
  overflow: hidden;
  border-radius: 4px;
  background: #131820;
  justify-self: start;
}

.auth-profile {
  display: grid;
  gap: 8px;
  align-items: center;
}

.auth-profile[hidden] {
  display: none;
}

.auth-profile img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-strong);
}

.auth-profile-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.auth-profile-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.auth-profile-text strong,
.auth-profile-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-profile-text strong {
  font-size: 12px;
}

.auth-profile-text span {
  color: var(--muted);
  font-size: 11px;
}

.controls-panel {
  align-content: start;
}

.controls-panel > .panel-body > .language-panel {
  width: 100%;
  border-color: rgba(74, 92, 112, 0.62);
  background: var(--surface-muted);
  box-shadow: none;
}

.controls-panel > .panel-body > .language-panel > .panel-summary {
  min-height: 50px;
  padding: 12px 14px;
}

.controls-panel > .panel-body > .language-panel > .panel-body {
  padding: 0 14px 14px;
}

.vad-settings {
  display: grid;
  gap: 12px;
}

.audio-cleanup-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

.audio-cleanup-settings legend {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-field .info-tooltip {
  flex: 0 0 auto;
  margin-left: auto;
}

.checkbox-field-with-tooltip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

.audio-cleanup-settings .checkbox-field-with-tooltip {
  position: relative;
  overflow: visible;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.checkbox-inline span {
  min-width: 0;
}

.checkbox-field-with-tooltip > .info-tooltip-bubble {
  grid-column: 1 / -1;
  width: 100%;
}

.audio-cleanup-settings .checkbox-field-with-tooltip > .info-tooltip-bubble {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, min(280px, calc(100vw - 40px)));
  margin-top: 0;
}

.audio-cleanup-settings .checkbox-field-with-tooltip > .info-tooltip-bubble.is-open {
  margin-top: 0;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.warning-tooltip {
  border-color: #8b6a22;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.warning-tooltip.is-open {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.auto-stop-settings {
  display: grid;
  gap: 12px;
}

.auto-stop-settings p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.transcript-panel,
.language-panel {
  grid-column: 1 / -1;
}

.connection-guide {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: connection-step;
}

.connection-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(74, 92, 112, 0.62);
  border-radius: 8px;
  background: rgba(20, 28, 38, 0.74);
}

.connection-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(59, 194, 178, 0.5);
  border-radius: 999px;
  background: rgba(59, 194, 178, 0.12);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.connection-step-body,
.connection-step-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.connection-step-copy {
  gap: 3px;
}

.connection-step-copy h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.connection-step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.mic-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.mic-name-field {
  display: grid;
  gap: 6px;
  position: relative;
}

.mic-name-row input {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.mic-name-menu {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  max-height: 0;
  overflow-y: auto;
  border: 0 solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  opacity: 0;
  transform: translateY(-2px);
  transition: max-height 160ms ease, border-width 160ms ease, opacity 120ms ease, transform 120ms ease;
}

.mic-name-menu.is-open {
  max-height: 220px;
  border-width: 1px;
  opacity: 1;
  transform: translateY(0);
}

.mic-name-menu[hidden] {
  display: none;
}

.mic-name-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 3px;
  border-bottom: 1px solid var(--border);
}

.mic-name-option:last-child {
  border-bottom: 0;
}

.mic-name-select,
.mic-name-remove {
  border-color: transparent;
  background: transparent;
}

.mic-name-select {
  min-width: 0;
  padding: 7px 9px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mic-name-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--danger);
}

.mic-name-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.screen-link-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.screen-link-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.screen-link-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.screen-link-field input {
  min-width: 0;
  font-size: 13px;
}

#setMicNameButton,
#regenerateScreenLinkButton {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
}

.icon-button svg[hidden] {
  display: none;
}

#screenLinkStatus {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.connection-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.connection-status span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  padding: 5px 9px;
}

.connection-status strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stt-provider {
  display: grid;
  gap: 10px;
}

.provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.provider-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 11px 12px;
  cursor: pointer;
}

.provider-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(55, 225, 205, 0.08);
}

.provider-option input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.provider-option span {
  color: var(--text);
  font-weight: 800;
}

.provider-option small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.engine-difference-toggle {
  justify-self: end;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.engine-difference-toggle:hover,
.engine-difference-toggle:focus-visible {
  color: var(--accent-strong);
}

.engine-comparison-panel {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8, 16, 26, 0.42);
}

.engine-comparison-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
}

.engine-comparison-table th,
.engine-comparison-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.engine-comparison-table tr:last-child th,
.engine-comparison-table tr:last-child td {
  border-bottom: 0;
}

.engine-comparison-table thead th {
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}

.engine-comparison-table tbody th {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.engine-comparison-table td {
  color: var(--muted);
}

.language-hints {
  display: grid;
  gap: 10px;
}

.language-hint-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.language-hint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.language-hint-chip {
  min-width: 34px;
  min-height: 30px;
  padding: 0 10px;
  border-color: #2f685e;
  background: #142821;
  color: var(--accent-strong);
  text-transform: lowercase;
}

.language-hint-chip:hover {
  background: var(--danger-soft);
  border-color: #6c3438;
  color: var(--danger-strong);
}

.language-item-header button {
  background: var(--danger-soft);
  border-color: #6c3438;
  color: var(--danger-strong);
}

.language-item-header button:hover {
  background: #562a2e;
}

#addLanguageHintButton {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

#addLanguageButton,
#pauseButton {
  background: var(--surface);
}

#startButton,
#saveParametersButton {
  background: var(--accent);
  border-color: var(--accent);
  color: #06211e;
}

#startButton:hover,
#saveParametersButton:hover {
  background: var(--accent-strong);
}

#stopButton {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.transcript-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finished-transcript,
.unfinished-transcript {
  min-height: 178px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.finished-transcript h3,
.unfinished-transcript h3 {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.finished-transcript p,
.unfinished-transcript p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  min-height: 108px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
}

.unfinished-transcript p {
  color: var(--accent-strong);
}

.section-heading {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  align-items: stretch;
}

.translation-folder {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.translation-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 17, 24, 0.52);
}

.translation-tabs::-webkit-scrollbar {
  display: none;
}

.translation-tab {
  min-width: 72px;
  max-width: 180px;
  min-height: 34px;
  padding: 7px 11px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.translation-tab[draggable="true"] {
  cursor: grab;
}

.translation-tab.is-dragging {
  cursor: grabbing;
  opacity: 0.48;
}

.translation-tab.is-drop-target {
  border-color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--accent-strong);
}

.translation-tab[aria-selected="true"] {
  border-color: var(--border-strong);
  border-bottom-color: var(--surface-muted);
  background: var(--surface-muted);
  color: var(--text);
}

.translation-panels {
  display: grid;
  padding: 12px;
}

.language-list {
  display: grid;
  gap: 12px;
}

.language-item {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.translation-panel[hidden] {
  display: none !important;
}

.source-item,
.source-item[data-source-visible="true"] {
  border-color: #2d6a61;
  background: #142923;
}

.source-item[data-source-visible="false"] {
  border-color: #693539;
  background: #2a181b;
}

.language-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.source-item .language-item-header button,
.source-item[data-source-visible="true"] .language-item-header button {
  background: var(--accent-soft);
  border-color: #2f756b;
  color: var(--accent-strong);
}

.source-item[data-source-visible="false"] .language-item-header button {
  background: var(--danger-soft);
  border-color: #6c3438;
  color: var(--danger-strong);
}

.language-item fieldset {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.color-control-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.color-control-group > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.color-control-group label {
  align-items: center;
  justify-items: start;
}

.parameter-actions {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.page-footer {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.page-footer span {
  color: var(--muted) !important;
  font-size: 12px;
  text-align: right;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  font-size: 12px;
}

.legal-footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-footer-links a:hover {
  color: var(--accent-strong);
}

.business-footer-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px 9px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
  opacity: 0.72;
  text-align: right;
}

@media (min-width: 680px) {
  .top-control-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: start;
  }

  .top-bar-account {
    grid-column: 1;
    grid-row: 1;
  }

  .top-control-bar > .account-detail-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .top-bar-live {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-items: center;
  }

  .add-time-grid {
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .mic-page {
    width: min(100% - 20px, 760px);
    padding-top: 14px;
    gap: 12px;
  }

  .page-header,
  .section-heading {
    align-items: stretch;
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .ui-language-field {
    justify-self: stretch;
    width: 100%;
  }

  .screen-link-tools,
  .provider-options,
  .audio-cleanup-settings,
  .language-item fieldset {
    grid-template-columns: 1fr;
  }

  .screen-link-actions {
    grid-template-columns: 1fr;
  }

  .paddle-extra-pack-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .paddle-extra-pack-row .credit-stepper {
    justify-content: start;
  }

  .top-bar-account {
    grid-template-columns: 1fr;
  }

  .top-control-bar .auth-card {
    width: 100%;
  }

  .top-control-bar .auth-profile {
    width: 100%;
  }

  .top-control-bar .auth-profile-main {
    grid-template-columns: 30px minmax(0, 1fr) 34px;
  }

  .top-control-bar .auth-profile-actions {
    justify-content: stretch;
  }

  .top-control-bar .auth-profile-actions button {
    flex: 1 1 160px;
  }

  .panel .button-row button,
  #addLanguageButton,
  .screen-link-actions button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .top-control-bar {
    padding: 8px;
  }

  .top-bar-account {
    gap: 10px;
  }

  .top-bar-live {
    justify-content: flex-start;
  }

  .diagnostic-live-status > span {
    justify-content: center;
  }

  .transcript-output {
    grid-template-columns: 1fr;
  }
}
