:root {
  --bg: #08141f;
  --panel: rgba(12, 29, 47, 0.8);
  --panel-strong: rgba(8, 22, 36, 0.94);
  --text: #f7f4ec;
  --muted: #c7d3de;
  --accent: #4da1d9;
  --accent-2: #ff9a3d;
  --accent-3: #ffe2bf;
  --stroke: rgba(157, 203, 241, 0.18);
  --danger: #ff5d73;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(77, 161, 217, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 154, 61, 0.18), transparent 24%),
    linear-gradient(160deg, #081520 0%, #0d2031 45%, #163654 100%);
  line-height: 1.5;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.brandbar {
  margin-bottom: 18px;
}

.brand-lockup,
.room-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  justify-content: space-between;
  gap: 20px;
}

.app-brandmark,
.dev-credit {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo,
.room-logo {
  display: block;
  width: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.app-logo {
  display: block;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.app-logo {
  width: 78px;
  height: 78px;
}

.brand-logo {
  height: 52px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.room-logo {
  height: 42px;
}

.brand-copy {
  margin: 0;
  color: var(--muted);
}

.dev-credit {
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(7, 20, 31, 0.48);
  border: 1px solid rgba(157, 203, 241, 0.16);
  backdrop-filter: blur(12px);
}

.dev-copy {
  margin: 0;
  color: var(--accent-3);
  font-weight: 700;
  white-space: nowrap;
}

.card,
.subcard {
  background: var(--panel);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card {
  border-radius: 28px;
  padding: 28px;
}

.subcard {
  border-radius: 22px;
  padding: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 40px 28px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
  gap: 14px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 154, 61, 0.3), transparent 65%);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: var(--accent-3);
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  font-family: "Syne", sans-serif;
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 11ch;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  margin: 0;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

.lede,
.muted,
label,
input,
select,
button {
  font-size: 0.98rem;
}

.lede,
.muted {
  color: var(--muted);
}

.lede {
  max-width: 34ch;
  margin: 0;
}

.hero-actions,
.topbar-actions,
.item-actions,
.section-head,
.party-topbar {
  display: flex;
  gap: 12px;
}

.hero-actions,
.topbar-actions,
.item-actions {
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  justify-content: center;
  width: 100%;
  margin-top: 2px;
}

.resume-card {
  width: min(560px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.resume-copy {
  margin: 0;
  color: var(--muted);
  text-align: left;
}

.resume-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grid,
.experience-grid {
  display: grid;
  gap: 20px;
}

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

.experience-grid {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.panel-header,
.section-head,
.party-topbar {
  justify-content: space-between;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 8px;
  margin-top: 18px;
}

.footer-copy {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-3);
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.footer-links a:hover {
  color: #fff4df;
}

.compact {
  gap: 12px;
}

.wide {
  min-width: 0;
}

.join-inline {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: min(520px, 100%);
  margin: 6px auto 0;
}

.join-inline input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 56px;
}

.join-inline button {
  flex: 0 0 auto;
  min-height: 56px;
}

.join-submit {
  min-width: 128px;
}

.create-submit {
  width: min(520px, 100%);
  min-height: 56px;
  justify-content: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 17, 0.7);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: var(--panel-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.prompt-card {
  width: min(500px, 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-3);
}

.prompt-content {
  padding-top: 10px;
}

.prompt-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

input,
select,
button {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 16px;
  font: inherit;
}

input,
select {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button {
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button.primary:hover,
button.secondary:hover {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

button.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(255, 226, 191, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 154, 61, 0.16);
}

button.primary {
  background: linear-gradient(135deg, var(--accent), #8ac6ef);
  color: #06111a;
  border-color: transparent;
  font-weight: 700;
}

button.secondary {
  background: linear-gradient(135deg, var(--accent-2), #ffbf75);
  color: #281204;
  border-color: transparent;
  font-weight: 700;
}

button.ghost {
  background: transparent;
  color: var(--text);
}

button.warn {
  background: rgba(255, 93, 115, 0.14);
  color: #ffd7de;
}

button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 52px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 700;
}

button.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

button.icon-button .button-label {
  line-height: 1;
}

button.stop-button {
  background: rgba(255, 93, 115, 0.16);
  color: #ffe4e8;
  border-color: rgba(255, 93, 115, 0.3);
}

button:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

button.full {
  width: 100%;
}

.hidden {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 154, 61, 0.14);
  color: var(--accent-3);
  border: 1px solid rgba(255, 154, 61, 0.28);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
}

.song-line {
  font-size: 1rem;
}

.meta-line {
  margin: 4px 0 0;
}

.queue-item {
  border-left: 4px solid rgba(77, 161, 217, 0.85);
}

.empty-state {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 880px) {
  .grid,
  .experience-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 20px;
  }

  .card {
    padding: 20px;
  }

  .list-item,
  .party-topbar,
  .brand-lockup,
  .room-brand {
    flex-direction: column;
    align-items: stretch;
  }

  .app-brandmark,
  .dev-credit {
    justify-content: flex-start;
  }

  .brand-lockup {
    gap: 14px;
  }

  .dev-credit {
    width: 100%;
  }

  .join-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .join-submit,
  .create-submit {
    width: 100%;
  }

  .resume-card,
  .resume-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-logo,
  .room-logo {
    max-width: 100%;
    height: auto;
  }

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

  .footer-links {
    width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    line-height: 1.4;
  }

  .shell {
    width: calc(100vw - 12px);
    padding: calc(10px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
  }

  .brandbar {
    margin-bottom: 12px;
  }

  .brand-lockup {
    gap: 10px;
  }

  .app-brandmark {
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 22px;
    background: rgba(7, 20, 31, 0.48);
    border: 1px solid rgba(157, 203, 241, 0.14);
    backdrop-filter: blur(12px);
  }

  .app-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .brand-copy {
    font-size: 0.9rem;
    max-width: 20ch;
  }

  .dev-credit {
    justify-content: center;
    padding: 10px 12px;
  }

  .brand-logo {
    height: 34px;
  }

  .dev-copy {
    font-size: 0.88rem;
    text-align: center;
  }

  .card {
    border-radius: 24px;
    padding: 18px 16px;
  }

  .hero {
    margin-bottom: 14px;
    padding: 24px 16px 18px;
  }

  .hero::after {
    width: 160px;
    height: 160px;
    inset: auto -28px -52px auto;
  }

  .hero-inner {
    width: 100%;
    gap: 12px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  h1 {
    max-width: 9ch;
    font-size: clamp(2.1rem, 12vw, 3rem);
    line-height: 0.98;
  }

  .lede {
    max-width: 22ch;
    font-size: 0.94rem;
  }

  .join-inline {
    width: 100%;
    gap: 10px;
    margin-top: 4px;
  }

  .join-inline input,
  .join-inline button,
  .create-submit {
    min-height: 54px;
  }

  .join-inline input {
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.08em;
  }

  .join-submit,
  .create-submit,
  .resume-actions button {
    width: 100%;
  }

  .hero-actions {
    margin-top: 0;
  }

  .resume-card {
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .resume-copy {
    text-align: center;
    font-size: 0.92rem;
  }

  .resume-actions {
    width: 100%;
    gap: 8px;
  }

  .site-footer {
    margin-top: 14px;
    padding: 0 4px;
    gap: 10px;
  }

  .footer-copy,
  .footer-links {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .modal {
    align-items: end;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .modal-card,
  .prompt-card {
    width: 100%;
    padding: 22px 16px 18px;
    border-radius: 24px 24px 18px 18px;
  }

  .panel-header {
    padding-right: 34px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 1.35rem;
  }
}
