* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #101820;
  --surface: #18232e;
  --line: #344351;
  --text: #edf4fa;
  --muted: #b0bfcc;
  --blue: #0877d5;
  --cyan: #49b9f7;
  --success: #57d9a3;
  --warning: #f2c56c;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
}
.app-shell {
  max-width: 520px;
  margin: auto;
  padding: 0 max(20px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}
header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(20px + env(safe-area-inset-top)) 0 18px;
  border-bottom: 1px solid var(--line);
}
header img {
  object-fit: contain;
  border-radius: 8px;
}
header > span:first-of-type {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.platform {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}
main {
  padding: 24px 0 0;
}
.status-card {
  position: relative;
  padding: 10px 0 26px;
}
.headphones {
  width: 48px;
  height: 48px;
  color: var(--cyan);
  margin-bottom: 16px;
}
.live-indicator {
  position: absolute;
  right: 2px;
  top: 26px;
  width: 9px;
  height: 9px;
  background: #8193a2;
  border-radius: 50%;
}
.status-card[data-state='playing'] .live-indicator {
  background: var(--success);
}
.status-card[data-state='resume'] .live-indicator,
.status-card[data-state='recovering'] .live-indicator {
  background: var(--warning);
}
.status-card[data-state='error'] .live-indicator {
  background: #ff8c92;
}
h1 {
  margin: 0 0 10px;
  font-size: 29px;
  line-height: 1.17;
  letter-spacing: -0.025em;
  font-weight: 650;
}
#statusDetail {
  margin: 0;
  color: var(--muted);
  max-width: 40ch;
  min-height: 48px;
}
label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 550;
  color: #cfdae3;
}
input,
select,
button {
  font: inherit;
}
input:not([type='range']),
select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #526577;
  border-radius: 5px;
  background: #15212c;
  color: var(--text);
  margin-bottom: 20px;
  font-size: 16px;
}
input::placeholder {
  color: #a3b3c1;
}
input.code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.13em;
  font-size: 20px;
}
button {
  border-radius: 5px;
  min-height: 48px;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 16px;
  touch-action: manipulation;
}
.primary,
.secondary {
  display: block;
  width: 100%;
  margin-bottom: 12px;
}
.primary {
  background: var(--blue);
  color: #fff;
  border-color: #3199ec;
}
.primary:hover {
  background: #0969b9;
}
.secondary {
  background: var(--surface);
  border-color: #526577;
  color: var(--text);
}
.secondary:hover {
  background: #223343;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.text-button {
  background: none;
  color: #e8bbc0;
  font-size: 14px;
  padding: 12px 0;
  text-align: left;
  min-height: 44px;
}
.help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.identity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.identity strong {
  font-size: 19px;
  display: block;
  overflow-wrap: anywhere;
}
.identity span {
  color: var(--muted);
  font-size: 14px;
}
.role-control {
  font-size: 12px;
  min-width: 130px;
  margin: 0;
}
.role-control select {
  margin: 4px 0 0;
  padding: 8px;
  font-size: 15px;
}
.session-info {
  margin: 22px 0;
}
.session-info > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.session-info dt {
  color: var(--muted);
}
.session-info dd {
  margin: 0;
  text-align: right;
  font-weight: 550;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 24px 0;
}
legend {
  font-weight: 600;
  margin-bottom: 14px;
}
input[type='range'] {
  accent-color: var(--cyan);
  width: 100%;
  min-height: 44px;
  margin: 0 0 12px;
}
.details {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 4px;
}
.details summary {
  cursor: pointer;
  padding: 15px 0;
  min-height: 48px;
  font-size: 14px;
  color: #cbd8e2;
}
.detail-content {
  padding: 8px 0 0;
}
.detail-content p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
[data-online='true'] {
  color: var(--success) !important;
}
.usage-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.usage-note strong {
  font-size: 13px;
  color: #d4dfe7;
  font-weight: 600;
}
.usage-note p {
  margin: 8px 0 0;
}
footer {
  padding: 26px 0 0;
  font-size: 12px;
  color: var(--muted);
}
footer span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
dialog {
  width: min(92vw, 480px);
  padding: 20px;
  border: 1px solid #526577;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop {
  background: #040910cc;
}
.dialog-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
dialog h2 {
  font-size: 20px;
  margin: 0;
}
dialog button {
  width: auto;
  margin: 0;
}
dialog video {
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
  margin-top: 18px;
  border-radius: 5px;
  background: #080f16;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
:focus-visible {
  outline: 2px solid #83d3ff;
  outline-offset: 4px;
}
::selection {
  background: #145a88;
  color: white;
}
[hidden] {
  display: none !important;
}
#remoteAudio {
  display: none;
}
@media (min-width: 700px) {
  .app-shell {
    margin: 24px auto 0;
  }
  main {
    padding-top: 30px;
  }
}
@media (max-width: 350px) {
  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  h1 {
    font-size: 26px;
  }
  .identity {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .session-info > div {
    flex-wrap: wrap;
    gap: 4px;
  }
  .session-info dd {
    text-align: left;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
