:root {
  color-scheme: dark;
  --bg: #091b1a;
  --panel: #102522;
  --line: #29413b;
  --muted: #97b1a8;
  --text: #eef7ef;
  --mint: #a9e8c3;
  --amber: #f1ca86;
  --red: #ffb4a8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 55% -20%, #224b3c 0, transparent 65%), var(--bg);
  color: var(--text);
  font:
    15px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 4px;
}
button:hover:not(:disabled) {
  filter: brightness(1.1);
}
[hidden] {
  display: none !important;
}
.shell {
  max-width: 1240px;
  margin: auto;
  padding: 0 42px;
}
header {
  height: 114px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
.brand > img {
  width: 51px;
  height: 51px;
  object-fit: contain;
  border-radius: 12px;
}
.brand small {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-top: -3px;
}
.brand small img {
  width: 13px;
  height: 13px;
}
.private {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  color: #cbe2d4;
}
.private #identity {
  margin-left: 14px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
  color: var(--muted);
}
.lock {
  color: var(--mint);
  font-size: 22px;
}
main {
  padding-top: 39px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 7px;
}
h1 {
  font-size: 35px;
  font-weight: 550;
  letter-spacing: -1.2px;
  margin: 0;
}
p {
  margin: 0;
}
.intro {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.account small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid #436154;
  border-radius: 50%;
  color: var(--mint);
  background: #173b2e;
}
.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 20px;
  background: #1e3128;
  border: 1px solid #46513a;
  border-radius: 12px;
  margin-bottom: 24px;
}
.notice-icon {
  border: 1px solid var(--amber);
  border-radius: 50%;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: var(--amber);
  font-size: 12px;
  flex-shrink: 0;
}
.notice strong {
  font-weight: 550;
  font-size: 14px;
}
.notice p {
  font-size: 12px;
  color: #bcc9b5;
  margin-top: 3px;
}
.text-button {
  background: transparent;
  color: var(--mint);
  font-size: 12px;
  padding: 8px 0;
  white-space: nowrap;
}
.notice .text-button {
  margin-left: auto;
  padding-left: 18px;
}
.workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
}
.sources,
.player {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(130deg, #132e27, var(--panel));
  overflow: hidden;
}
.sources {
  padding: 23px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-heading h2 {
  font-weight: 550;
  font-size: 15px;
  margin: 0;
}
.count {
  font-size: 11px;
  color: var(--muted);
  background: #0b201b;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.source-empty {
  padding: 30px 14px 22px;
  text-align: center;
}
.app-symbol {
  color: #80a697;
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}
.source-empty h3 {
  font-size: 14px;
  font-weight: 550;
  margin: 0 0 8px;
}
.source-empty p,
.source-note p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.source-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border: 1px solid #65816b;
  background: #233f31;
  border-radius: 10px;
}
.source-card strong {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
.source-card small {
  font-size: 10px;
  color: #b6cdbb;
  display: block;
  margin-top: 4px;
}
.device-icon {
  font-size: 25px;
  color: var(--mint);
}
.selected {
  color: var(--mint);
  margin-left: auto;
}
.source-note {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin-top: 22px;
}
.source-note > span {
  color: var(--muted);
}
.player {
  padding: 25px 28px;
}
.player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.player-top .eyebrow {
  margin: 0;
}
.state-pill {
  font-size: 11px;
  border: 1px solid #496252;
  border-radius: 30px;
  padding: 4px 10px;
  color: #c4d5c7;
}
.player-focus {
  text-align: center;
  padding: 27px 0 21px;
}
.speaker-art {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 20px;
  opacity: 0.35;
}
.speaker-art div {
  width: 4px;
  background: var(--mint);
  border-radius: 4px;
  height: 18px;
}
.speaker-art div:nth-child(2n) {
  height: 30px;
}
.speaker-art div:nth-child(3n) {
  height: 43px;
}
.speaker-art div:nth-child(5) {
  height: 54px;
}
.player h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  font-weight: 500;
  margin: 0 0 6px;
}
.player-focus p {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
}
.meter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 9px 0 20px;
}
.meter-row meter {
  flex: 1;
  height: 5px;
  border: 0;
  border-radius: 5px;
  background: #293c34;
}
.meter-row meter::-webkit-meter-bar {
  height: 5px;
  background: #293c34;
  border: 0;
}
.meter-row meter::-webkit-meter-optimum-value {
  background: var(--mint);
}
.controls {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}
.primary,
.secondary {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 19px;
  white-space: nowrap;
}
.primary {
  background: var(--mint);
  color: #153327;
}
.secondary {
  background: #1f382e;
  border: 1px solid #405d4d;
  color: #deecdf;
}
.volume {
  margin-left: auto;
  width: 136px;
  padding: 0 10px;
}
.volume label {
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  height: 5px;
  accent-color: var(--mint);
}
.icon-button {
  font-size: 11px;
  color: #c4d7c9;
  background: #173126;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.icon-button[aria-pressed="true"] {
  background: #a9e8c3;
  color: #153327;
}
.local-note {
  text-align: center;
  font-size: 10px;
  color: #7d9b8d;
  margin-top: 19px;
}
.connection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 27px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0c211c;
}
.connection > div {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
}
.step {
  font-size: 10px;
  border: 1px solid #3a5245;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #839e8c;
}
.connection small {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  display: block;
}
.connection strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin-top: 4px;
}
.arrow {
  margin: 0 34px 0 10px;
  color: #4c6c58;
}
.bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 19px 0 30px;
  font-size: 11px;
  color: var(--muted);
}
details {
  text-align: right;
  max-width: 530px;
}
summary {
  cursor: pointer;
  color: #b6cebd;
}
dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  text-align: left;
  background: #10271f;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 22px 0 28px;
  color: #7e9c8a;
  font-size: 10px;
}
.preview {
  margin-top: 16px;
  padding: 9px 14px;
  color: #e6ca93;
  background: #352e20;
  border: 1px solid #625139;
  border-radius: 7px;
  font-size: 11px;
  letter-spacing: 0.4px;
}
body[data-error="true"] .notice {
  border-color: #9a6258;
  background: #342823;
}
body[data-error="true"] .notice-icon {
  border-color: var(--red);
  color: var(--red);
}
@media (max-width: 850px) {
  .shell {
    padding: 0 22px;
  }
  .workspace {
    grid-template-columns: 280px 1fr;
    gap: 14px;
  }
  .player {
    padding: 22px 18px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .volume {
    margin-left: 0;
    flex: 1;
  }
  .private #identity {
    display: none;
  }
  .arrow {
    margin: 0 12px;
  }
  .connection {
    padding: 22px 17px;
  }
}
@media (max-width: 650px) {
  header {
    height: 92px;
  }
  .shell {
    padding: 0 18px;
  }
  main {
    padding-top: 25px;
  }
  .heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 29px;
  }
  .account {
    margin-top: 30px;
  }
  .account small {
    display: none;
  }
  .avatar {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .source-empty {
    padding: 21px 5px;
  }
  .notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .notice .text-button {
    margin-left: 34px;
    padding-left: 0;
  }
  .private {
    font-size: 11px;
  }
  .brand {
    font-size: 22px;
  }
  .source-note {
    margin-top: 16px;
  }
  .connection {
    gap: 18px;
    flex-direction: column;
    align-items: stretch;
  }
  .arrow {
    display: none;
  }
  .bottom {
    gap: 15px;
  }
  .intro {
    font-size: 13px;
  }
  .player {
    min-height: 375px;
  }
  footer span:last-child {
    display: none;
  }
}

.auth-panel {
  max-width: 580px;
  margin: 52px auto 66px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(23px, 5vw, 39px);
}
.auth-panel .intro { margin: 10px 0 20px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.auth-panel .local-note { margin-top: 22px; }
#pair-info { color: var(--mint); overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .private #identity { display: none; }
  .auth-panel { margin-top: 34px; }
}
