.mic-settings {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 2px 0;
  padding: 12px;
  border: 1px solid #d8d9d0;
  border-radius: 11px;
  background: #fafaf6;
}
.mic-settings legend { padding: 0 4px; font-size: 14px; font-weight: 700; }
.device-audio [data-device-controls], .device-game { display:grid; gap:9px; }
.device-game { border-top:1px solid #d8d9d0; padding-top:9px; }
.device-game strong { font-size:14px; }
.device-game button { justify-self:start; }
.device-audio [hidden], #device-audio-notice[hidden], #device-audio-notice [hidden] { display:none; }
.device-audio select { min-width:0; width:100%; max-width:100%; }
#device-audio-notice {
  position:fixed; left:50%; transform:translateX(-50%); bottom:max(10px,env(safe-area-inset-bottom));
  z-index:9; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:7px;
  width:max-content; max-width:calc(100% - 24px); padding:8px 12px; background:#24241f; color:#fff;
  border-radius:12px; box-shadow:0 3px 12px #1c1c1826; font-size:.83rem;
}
#device-audio-notice > svg { color:#f6c348; }
#device-audio-notice button { padding:4px 9px; min-height:32px; }
.android-view #device-audio-notice { bottom:calc(4.5rem + env(safe-area-inset-bottom)); }
.mic-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; }
.mic-modes label { position: relative; min-width: 0; cursor: pointer; }
.mic-modes input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.mic-modes span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 5px 2px;
  border: 1px solid #d0d1c7;
  border-radius: 7px;
  background: white;
  color: #35362f;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}
.mic-modes input:checked + span { background: #f6c348; color: #211d13; border-color: #a37e20; }
.mic-modes input:focus-visible + span { outline: 2px solid #282a21; outline-offset: 1px; }
.mic-mode-options { display: grid; gap: 8px; }
.mic-option-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; }
.mic-option-line select {
  max-width: 64%; min-height: 38px; padding: 4px 6px; border: 1px solid #c7c8bf;
  border-radius: 6px; font: inherit; background: #fff; color: #202119;
}
#mic-threshold { accent-color: #8a650a; min-width: 0; width: 100%; margin: 0; cursor: pointer; min-height: 23px; }
#mic-threshold-value, [data-mic-reading] { font-variant-numeric: tabular-nums; }
#mic-test { justify-self: start; }
.mic-meter-panel { display: grid; gap: 6px; }
.mic-meter-track { position: relative; height: 9px; }
#mic-level {
  display: block; width: 100%; height: 9px; appearance: none;
  border: 0; border-radius: 5px; background: #dedfd5;
}
#mic-level::-webkit-meter-bar { background: #dedfd5; border: none; border-radius: 5px; height: 9px; }
#mic-level::-webkit-meter-optimum-value { background: #be901c; border-radius: 5px; }
#mic-level::-moz-meter-bar { background: #be901c; border-radius: 5px; }
.mic-threshold-mark { position: absolute; inset-block: -2px; border-left: 2px solid #25261e; }
#mic-threshold-status, .mic-test-error { font-size: 12px; }
#mic-threshold-status { color: #575a50; }
#mic-threshold-status.is-detected { color: #5a470d; font-weight: 750; }
.mic-test-error { margin: 0; color: #942f21; }
.voice-notice { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:8px 0; color:inherit; font-size:.88rem; }
.voice-notice[hidden], #voice-resume[hidden] { display:none; }
.mic-noise { display: grid; gap: 7px; border-top: 1px solid #d8d9d0; padding-top: 9px; }
.mic-noise .field-row { margin: 0; }
.mic-ab-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mic-ab-actions button[aria-pressed=true] { background: #f6c348; border-color: #a37e20; color: #211d13; }
.profile {
  position: relative; gap: 6px; padding: 12px; min-width: 0;
}
.profile-settings {
  min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 3px; text-align: start; border: 0; border-radius: 8px; background: transparent; color: inherit;
}
.profile-settings:hover, .profile-audio button:hover:enabled { background: #cfad4f22; }
.profile-avatar { position: relative; flex: none; }
.profile-avatar svg {
  position: absolute; bottom: -1px; right: -2px; width: 14px; height: 14px;
  padding: 2px; border-radius: 50%; background: #fff; color: #34352f;
}
.profile-name { display: grid; }
.profile-name > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-audio { display: flex; align-items: center; gap: 2px; }
.profile-audio button {
  display: grid; place-items: center; width: 32px; height: 36px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit;
}
.profile-audio svg { width: 19px; height: 19px; }
.profile-audio .is-off:enabled { color: #8e3d2a; background: #f9ede6; }
.windows-view #profile-home .profile { padding-inline: 12px; }
.windows-view #profile-home .profile-avatar svg { color: #ededdf; background: #30322b; }
.windows-view #profile-home .profile-audio .is-off:enabled { color: #ffbd9b; background: #3f302a; }
#profile-top:empty, #profile-mobile:empty { display: none; }
.topbar:has(#profile-top .profile) { position: sticky; top: 0; z-index: 3; }
:is(#profile-top, #profile-mobile) .profile { min-height: 0; padding: 0; border: 0; background: transparent; }
:is(#profile-top, #profile-mobile) .profile-name { display: none; }
.android-view #profile-mobile { margin-left: auto; }
.android-view #profile-mobile .profile-settings { padding: 0; }
.android-view .android-top { position: sticky; top: 0; z-index: 4; background: var(--android-paper); }
.android-view.android-call .mobile-invite { margin-left: auto; }
.android-view.android-call #profile-mobile { margin-left: 0; }
.android-view .android-home { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.android-view.android-call .main-content { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.android-view #mobile-open-call:not([hidden]) {
  display: flex; align-items: center; width: fit-content; max-width: 100%; gap: 7px;
  margin-top: 9px; padding: 5px 10px; border: 1px solid #70654a; border-radius: 8px;
  background: #333023; color: #fff2c9; font-size: 13px; font-weight: 650;
}
#mobile-open-call svg, .room-session-action svg { width: 15px; height: 15px; }
#mobile-open-call span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.room-session-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 12px; border: 1px solid #ffffff60; border-radius: 8px;
  padding: 6px 12px; color: #fff; background: #272923; font-size: 13px; font-weight: 650;
}
.room-session-action.rejoin { color: #221c0e; border-color: #f6bc39; background: var(--gold); }
.room-session-action:hover { border-color: #eccd77; }
#mic-activation {
  position: absolute; inset-inline-start: 5px; bottom: 100%; z-index: 3;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px;
  width: max-content; max-width: min(300px, calc(100vw - 36px)); border: 1px solid #56584d; border-radius: 10px;
  color: white; background: #23251f; font-size: 12px;
}
#profile-home #mic-activation { max-width: calc(100% - 10px); }
:is(#profile-top, #profile-mobile) #mic-activation { inset: calc(100% + 4px) 0 auto auto; }
#mic-activate { flex-shrink: 0; min-height: 32px; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--gold); color: #211d13; font: inherit; font-weight: 700; cursor: pointer; }
#mic-ptt { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border: 1px solid #b18c3d; }
#mic-ptt[aria-pressed=true], #mic-ptt.mic-sending { background: var(--gold); color: #211d13; }
.mic-settings [hidden], #mic-activation[hidden], #mic-ptt[hidden] { display: none !important; }
@media (max-width: 550px) {
  #profile-top .profile { gap: 1px; }
  .windows-view:has(#profile-top .profile) .top-actions { gap: 4px; }
  .windows-view:has(#profile-top .profile) .online { display: none; }
}
@media (max-width: 450px) {
  .topbar:has(#profile-top .profile) #invite-btn { padding: 9px; }
  .topbar:has(#profile-top .profile) #invite-btn span { display: none; }
  .topbar:has(#profile-top .profile) .crumb-current { display: none; }
}
@media (max-width: 390px) {
  .android-view .android-top { gap: 3px; }
  .android-top:has(#mic-ptt:not([hidden])) .mobile-back { min-width: 44px; }
  .android-top:has(#mic-ptt:not([hidden])) .mobile-back span { display: none; }
}
@media (pointer: coarse) {
  .mic-modes span, #mic-test, #mic-activate, .mic-option-line select, .mic-ab-actions button, .room-session-action, #mobile-open-call { min-height: 44px; }
  .profile-audio button, .profile-settings { min-width: 44px; min-height: 44px; }
}
