﻿/* Guest view and unified entry */
.guest-page {
  --bg-outer: color-mix(in srgb, var(--bg) 67%, black);
  --stage-tint: color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--bg-outer);
}
.phone-shell {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 68px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 460px) {
  .guest-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
  }
  .phone-shell {
    width: 390px;
    height: min(844px, calc(100dvh - 32px));
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  }
}

.m-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.room-code-chip {
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.guest-profile-btn {
  height: 30px;
  padding: 0 10px 0 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.guest-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.m-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
}

.m-body::-webkit-scrollbar { display: none; }

.stage-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.stage-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
  border-radius: inherit;
  overflow: hidden;
}

.stage-card-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: brightness(0.68) saturate(0.84);
  display: block;
  border-radius: inherit;
}

.stage-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 12, 14, 0.52) 0%, rgba(11, 12, 14, 0.72) 52%, rgba(8, 12, 12, 0.94) 100%),
    linear-gradient(135deg, var(--stage-tint) 0%, transparent 65%);
}

.stage-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.track-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.track-mini-cover {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.track-mini-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.track-mini-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-mini-artist {
  font-size: 11.5px;
  color: rgba(242, 239, 233, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.onstage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(11, 12, 14, 0.72);
  border: 1px solid var(--accent-line);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
}

.stage-card-lyric {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.m-lyric-active {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}

.m-lyric-next {
  font-size: 12.5px;
  color: rgba(242, 239, 233, 0.56);
  margin: 0;
}

.stage-card-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-progress-rail {
  width: 100%;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.mini-progress-fill {
  width: 50.6%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.stage-foot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(242, 239, 233, 0.58);
}

.order-bar {
  height: 46px;
  padding: 0 5px 0 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  transition: border-color 140ms ease;
}

.order-bar:focus-within {
  border-color: var(--accent-line);
}

.order-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.order-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink);
}

.order-input::placeholder {
  color: var(--ink-muted);
}

.order-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: opacity 120ms ease;
}

.order-btn:hover { opacity: 0.92; }

.view-panel { display: none; flex-direction: column; gap: 10px; }

.view-panel.active { display: flex; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}

.section-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.mini-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  gap: 2px;
}

.mini-switch-btn {
  height: 24px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.mini-switch-btn.active {
  background: var(--surface-hover);
  color: var(--ink);
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-row {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 20px 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.q-row.is-mine {
  background: var(--surface-hover);
  border-color: var(--accent-line);
}

.q-row.is-now {
  border-color: var(--line-strong);
}

.q-idx {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.q-row.is-now .q-idx,
.q-row.is-mine .q-idx {
  color: var(--accent);
  font-weight: 500;
}

.q-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.q-row.is-mine .q-avatar {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.q-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.q-title-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-track {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-sub {
  font-size: 11.5px;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-sub .me-tag {
  color: var(--accent);
  font-weight: 500;
}

.q-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

.st-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
}

.st-next {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.st-ready {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.st-sync {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink);
}

.st-bar {
  width: 58px;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.st-bar-fill {
  width: 68%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.cat-add {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.remote-card {
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.remote-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}

.vocal-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.v-btn {
  height: 34px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.v-btn.active {
  background: var(--surface-hover);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.v-btn.active::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.remote-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4px 0;
}

.r-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  display: grid;
  place-items: center;
}

.r-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
}

.wait-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-secondary);
}

.wait-strip strong {
  color: var(--ink);
  font-weight: 500;
}

.m-nav {
  height: 68px;
  padding: 6px 12px 10px;
  border-top: 1px solid var(--line);
  background: rgba(8, 12, 12, 0.94);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 10px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
  transition: color 120ms ease, background-color 120ms ease;
}

.nav-btn.active {
  color: var(--ink);
  background: var(--surface);
}

.nav-btn.active svg {
  color: var(--accent);
}

:where(.guest-page button:not(.theme-switcher button, .track-modal button)) {
  background: none; border: 0; padding: 0; line-height: 1.15;
}
.stage-card:not([data-bg-mode="cover"])::before,
.stage-card:not([data-bg-mode="cover"])::after { display: none; }
.stage-card[data-bg-mode="cover"] .stage-card-scrim {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 88%, transparent));
}
.stage-card[data-bg-mode="night"] .stage-card-scrim {
  background: radial-gradient(ellipse at 30% 0, var(--stage-tint), transparent 78%);
}
.stage-card-lyric .beat-dots { height: 8px; }
.m-lyric-active { overflow-wrap: anywhere; }
.m-lyric-next { padding-top: 2px; }
.track-mini-meta, .q-main { min-width: 0; }
.onstage-pill { max-width: 40%; }
.onstage-pill span:last-child, #guestName { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.guest-profile-btn { max-width: 45%; }
.guest-avatar { flex-shrink: 0; }
.section-title { margin: 0; }
.remote-fields { min-width: 0; display: grid; gap: 10px; border: 0; margin: 0; padding: 0; }
.remote-lock, .guest-note { color: var(--ink-secondary); font-size: 12px; margin: 0; }
.remote-lock { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; }
.remote-themes { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; }
.remote-themes .remote-row-head { margin: 0; }
.r-play-btn { color: var(--accent-ink); }
.r-play-btn > span { display: flex; }
.wait-strip { margin: 0; }
.catalog-search, .entry-form input {
  width: 100%; min-width: 0; min-height: 41px; padding: 8px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  background: var(--bg); color: var(--ink);
}
.catalog-search { background: var(--surface); font-size: 13px; }
.q-remove {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-secondary);
  padding: 3px 6px; border-radius: 5px; font-size: 10px;
}
.q-remove:hover { color: var(--ink); }
.st-error { color: #ffaba0; }
.m-nav { background: color-mix(in srgb, var(--bg) 94%, transparent); }
.toast { position: absolute; inset: auto 16px 80px; max-width: none; }

.entry-page {
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 24%, var(--surface), var(--bg) 67%);
}
.join-overlay {
  position: absolute; z-index: 5; inset: 0;
  display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(8px);
  overflow: auto;
}
.entry-card {
  width: 100%; max-width: 420px; padding: 24px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--surface);
}
.entry-header, .entry-heading { display: flex; align-items: center; gap: 8px; }
.entry-header { justify-content: space-between; margin-bottom: 20px; }
.entry-heading h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -.025em; }
#joinTitle { font-size: 20px; font-weight: 500; margin: 15px 0; }
.entry-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  margin-bottom: 16px;
}
.entry-tabs button, .profile-actions button {
  min-height: 36px; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--ink-secondary); font-size: 12px;
}
.entry-tabs button[aria-pressed="true"] {
  border-color: var(--line-strong); background: var(--surface-hover); color: var(--ink);
}
.entry-form { display: grid; gap: 12px; }
.entry-form label { display: grid; gap: 5px; color: var(--ink-secondary); font-size: 12px; }
.entry-form input { font-size: 16px; }
.entry-form .code-input { font: 500 25px var(--font-mono); letter-spacing: .19em; }
.entry-submit {
  min-height: 40px; margin-top: 2px;
  border: 1px solid var(--accent); border-radius: var(--radius-control);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
}
.entry-submit:hover { filter: brightness(1.08); }
.entry-error {
  margin: 0; padding: 7px 9px; border: 1px solid rgb(255 171 160 / .25);
  border-radius: 7px; background: rgb(255 171 160 / .08); color: #ffaba0; font-size: 12px;
}
.profile-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.profile-actions button:hover { color: var(--ink); }
@media (max-width: 459px) {
  .phone-shell { max-width: none; }
}
@media (max-width: 360px) {
  .entry-page { padding: 12px; }
  .entry-card { padding: 16px; }
  .section-head { flex-wrap: wrap; }
  .q-row { gap: 6px; padding-inline: 9px; }
}
