:root {
  color-scheme: dark;
  --bg: #070809;
  --panel: #101214;
  --panel-2: #171a1d;
  --line: rgba(255, 255, 255, 0.1);
  --muted: #8e969e;
  --text: #f6f7f7;
  --gold: #f0c66b;
  --gold-strong: #ffd87f;
  --green: #59e39a;
  --red: #ff6f77;
  --amber: #ffbc5f;
  --radius: 18px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(240, 198, 107, 0.11), transparent 34rem),
    radial-gradient(circle at 92% 20%, rgba(69, 224, 198, 0.06), transparent 32rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #050505;
  background: var(--gold);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.v11-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.v11-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  margin-bottom: 16px;
}

.v11-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.v11-brand img {
  width: 150px;
  height: auto;
}

.v11-brand span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.v11-brand strong,
.v11-brand small {
  display: block;
}

.v11-brand strong {
  font-size: 0.74rem;
  letter-spacing: 0.13em;
}

.v11-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.status-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 4px rgba(142, 150, 158, 0.08);
}

.status-pill[data-state="online"] {
  color: var(--green);
  border-color: rgba(89, 227, 154, 0.28);
}

.status-pill[data-state="online"]::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(89, 227, 154, 0.1), 0 0 18px rgba(89, 227, 154, 0.45);
}

.status-pill[data-state="degraded"],
.status-pill[data-state="stale"] {
  color: var(--amber);
  border-color: rgba(255, 188, 95, 0.28);
}

.status-pill[data-state="degraded"]::before,
.status-pill[data-state="stale"]::before {
  background: var(--amber);
}

.status-pill[data-state="offline"],
.status-pill[data-state="error"] {
  color: var(--red);
  border-color: rgba(255, 111, 119, 0.25);
}

.status-pill[data-state="offline"]::before,
.status-pill[data-state="error"]::before {
  background: var(--red);
}

.version-chip {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255, 188, 95, 0.08);
  border: 1px solid rgba(255, 188, 95, 0.22);
  border-radius: 14px;
}

.notice strong,
.notice span {
  display: block;
}

.notice strong {
  margin-bottom: 3px;
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice span {
  color: #c5c9cc;
  font-size: 0.82rem;
}

.surface {
  background: linear-gradient(150deg, rgba(23, 26, 29, 0.96), rgba(13, 15, 17, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px minmax(0, 1fr);
  min-height: 300px;
  overflow: hidden;
}

.deck {
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-width: 0;
  padding: clamp(22px, 3vw, 42px);
}

.deck:first-child {
  border-right: 1px solid var(--line);
}

.deck:last-child {
  border-left: 1px solid var(--line);
}

.deck-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.deck-label b {
  color: var(--gold);
  font-size: 1.1rem;
}

.track-title {
  display: block;
  min-height: 2.4em;
  margin: 0;
  overflow: hidden;
  font-size: clamp(1.35rem, 3vw, 2.5rem);
  line-height: 1.08;
  text-overflow: ellipsis;
}

.track-artist {
  display: block;
  min-height: 1.5em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 24px;
}

.meta-chip {
  padding: 5px 8px;
  color: #bfc5ca;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wave-line {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 44px;
  overflow: hidden;
}

.wave-line i {
  display: block;
  width: 4px;
  height: var(--h, 35%);
  background: rgba(240, 198, 107, 0.55);
  border-radius: 4px;
}

.wave-line.muted i {
  background: rgba(255, 255, 255, 0.14);
}

.mixer-spine {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  padding: 18px 12px;
  background: rgba(0, 0, 0, 0.22);
}

.mixer-spine strong {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
}

.meter {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 92px;
}

.meter i {
  width: 5px;
  height: var(--meter, 30%);
  background: linear-gradient(to top, var(--green), var(--gold));
  border-radius: 5px;
  opacity: 0.75;
}

.automix-light {
  width: 14px;
  height: 14px;
  background: #34393e;
  border: 2px solid #5d646a;
  border-radius: 50%;
}

.automix-light.active {
  background: var(--green);
  border-color: #b7ffda;
  box-shadow: 0 0 24px rgba(89, 227, 154, 0.65);
}

.control-row {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(360px, 1.2fr) minmax(250px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.control-card,
.queue-card,
.requests-card,
.activity-card,
.setup-card {
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-head h2,
.setup-card h2,
.guest-hero h1 {
  margin: 0;
}

.card-head h2,
.setup-card h2 {
  font-size: 1rem;
}

.card-head p {
  max-width: 40rem;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.big-control {
  width: 100%;
  min-height: 62px;
  padding: 15px 18px;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--gold-strong), #dba948);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 30px rgba(240, 198, 107, 0.16);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.big-control[data-active="true"] {
  color: #07100a;
  background: linear-gradient(135deg, #91f4bd, #4bd98a);
}

.big-control:disabled,
.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.45;
}

.state-copy {
  min-height: 44px;
  margin: 13px 2px 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto;
  gap: 9px;
}

.search-form input,
.field input,
.copy-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.search-form input:focus,
.field input:focus,
.copy-field input:focus {
  border-color: rgba(240, 198, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(240, 198, 107, 0.08);
}

.btn {
  min-height: 42px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
}

.btn:hover {
  border-color: rgba(240, 198, 107, 0.42);
}

.btn.gold {
  color: #090909;
  background: var(--gold);
  border-color: var(--gold);
}

.btn.danger {
  color: var(--red);
  border-color: rgba(255, 111, 119, 0.3);
}

.btn.small {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 0.65rem;
}

.guest-link {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.guest-link img {
  width: 84px;
  height: 84px;
  padding: 4px;
  background: #fff;
  border-radius: 10px;
}

.copy-field {
  display: flex;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
  font-size: 0.7rem;
}

.session-code {
  display: inline-flex;
  margin-top: 8px;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.stack {
  display: grid;
  gap: 16px;
}

.queue-list,
.request-list,
.activity-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item,
.request-item,
.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
}

.queue-position {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--gold);
  background: rgba(240, 198, 107, 0.08);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.item-copy {
  min-width: 0;
}

.item-copy strong,
.item-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-copy strong {
  font-size: 0.81rem;
}

.item-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.item-actions {
  display: flex;
  gap: 6px;
}

.state-badge {
  padding: 5px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.empty {
  margin: 0;
  padding: 26px 14px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  font-size: 0.78rem;
  text-align: center;
}

.queue-health {
  display: flex;
  align-items: center;
  gap: 9px;
}

.queue-health meter {
  width: 104px;
  accent-color: var(--green);
}

.queue-health span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.activity-item {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  color: #bdc2c6;
  font-size: 0.72rem;
  line-height: 1.45;
}

.activity-item time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.63rem;
}

details.advanced {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

details.advanced summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.advanced-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.setup-card {
  margin-top: 16px;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.setup-step {
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.setup-step b,
.setup-step span {
  display: block;
}

.setup-step b {
  color: var(--gold);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
}

.setup-step span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.bridge-pairing {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  margin-top: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.v11-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.67rem;
}

.v11-footer nav {
  display: flex;
  gap: 14px;
}

.v11-footer a {
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  width: min(380px, calc(100% - 40px));
  padding: 13px 15px;
  color: #101112;
  background: var(--gold-strong);
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 800;
}

.rotate-gate {
  display: none;
  position: fixed;
  z-index: 120;
  inset: 0;
  place-items: center;
  padding: 28px;
  background: #070809;
  text-align: center;
}

.rotate-gate div {
  max-width: 340px;
}

.phone-icon {
  display: block;
  width: 66px;
  height: 106px;
  margin: 0 auto 24px;
  border: 4px solid var(--gold);
  border-radius: 12px;
  transform: rotate(-90deg);
}

.rotate-gate h1 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.rotate-gate p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.guest-shell {
  width: min(680px, calc(100% - 28px));
  margin: 0 auto;
  padding: 30px 0 46px;
}

.landing-shell {
  width: min(980px, calc(100% - 28px));
  padding-top: 44px;
}

.guest-header {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.guest-hero {
  padding: clamp(24px, 7vw, 44px);
  text-align: center;
}

.guest-hero h1 {
  font-size: clamp(2rem, 8vw, 3.7rem);
  line-height: 0.98;
}

.guest-hero > p {
  max-width: 33rem;
  margin: 17px auto 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-shell .guest-hero > p {
  max-width: 43rem;
}

.launch-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.launch-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-inline: 18px;
  text-decoration: none;
}

.landing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.setup-page {
  width: min(820px, calc(100% - 28px));
}

.setup-guide {
  margin-top: 12px;
}

.setup-guide p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.setup-guide p b {
  color: var(--text);
}

.setup-warning {
  margin-top: 14px;
}

.legal-page {
  width: min(800px, calc(100% - 28px));
}

.legal-page article {
  padding: clamp(24px, 6vw, 48px);
}

.legal-page h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
}

.legal-page h2 {
  margin: 30px 0 8px;
  font-size: 1rem;
}

.legal-page p {
  margin: 8px 0 0;
  color: #b7bdc1;
  font-size: 0.84rem;
  line-height: 1.72;
}

.legal-page .legal-updated {
  color: var(--muted);
  font-size: 0.7rem;
}

.guest-session {
  display: inline-flex;
  gap: 16px;
  margin-top: 20px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guest-session strong {
  color: var(--gold);
}

.guest-card {
  margin-top: 14px;
  padding: 22px;
}

.guest-card h2 {
  margin: 0 0 7px;
  font-size: 1rem;
}

.guest-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.guest-form {
  display: grid;
  gap: 10px;
}

.guest-form .btn {
  min-height: 50px;
}

.guest-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.guest-status.success {
  color: var(--green);
}

.guest-status.error {
  color: var(--red);
}

.now-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
}

.now-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #090909;
  background: var(--gold);
  border-radius: 50%;
  font-size: 1.1rem;
}

.now-strip small,
.now-strip strong,
.now-strip span {
  display: block;
}

.now-strip small {
  color: var(--gold);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.now-strip strong {
  margin-top: 3px;
}

.now-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 1000px) {
  .control-row,
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .control-row > :first-child {
    grid-column: 1 / -1;
  }

  .setup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .v11-shell {
    width: min(100% - 20px, 620px);
    padding-top: 10px;
  }

  .v11-header {
    align-items: flex-start;
  }

  .v11-brand img {
    width: 118px;
  }

  .v11-brand span {
    display: none;
  }

  .version-chip {
    display: none;
  }

  .notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage {
    grid-template-columns: 1fr;
  }

  .deck {
    min-height: 210px;
  }

  .deck:first-child,
  .deck:last-child {
    border: 0;
  }

  .mixer-spine {
    display: none;
  }

  .deck:last-child {
    border-top: 1px solid var(--line);
  }

  .control-row,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .control-row > :first-child {
    grid-column: auto;
  }

  .setup-grid,
  .bridge-pairing {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .landing-grid {
    grid-template-columns: 1fr;
  }

  .v11-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  body.console-page .rotate-gate {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
