:root {
  color-scheme: only light;
  --bg: #f3efe8;
  --ink: #1f1d1a;
  --muted: #5a544e;
  --accent: #f26b3a;
  --accent-dark: #d4552a;
  --card: #ffffff;
  --border: rgba(31, 29, 26, 0.12);
  --shadow: 0 22px 60px rgba(31, 29, 26, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff4e4 0%, #f3efe8 45%, #e8e2da 100%);
  min-height: 100vh;
  animation: fadeIn 0.6s ease;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.hero {
  text-align: left;
  margin-bottom: 32px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffe2d5;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(32px, 6vw, 56px);
  margin: 14px 0 10px;
}

.tagline {
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
}

.hero-links {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.hero-links a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.hero-links a#tv-link {
  text-decoration: underline;
}

.support-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  margin-top: 32px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  background: rgba(243, 239, 232, 0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--border);
  z-index: 999;
}

.consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.consent-text {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.consent-text strong {
  color: var(--ink);
  font-size: 15px;
}

.consent-text a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

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

.consent-actions .secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.content {
  display: grid;
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: liftIn 0.5s ease;
}

.card h2 {
  margin-top: 0;
}

.policy-content h2 {
  margin-top: 18px;
}

.policy-content ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.policy-content p {
  color: var(--muted);
}

.landing-card {
  text-align: center;
}

.landing-actions {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.landing-actions button {
  width: 100%;
  font-size: 16px;
  padding: 14px 18px;
}

form {
  display: grid;
  gap: 12px;
}

input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
}

#search-input {
  padding: 14px 18px;
  font-size: 16px;
  width: 100%;
}

select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(242, 107, 58, 0.3);
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: #1f1d1a;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.now-playing,
.queue,
.add-track {
  margin-top: 22px;
}

.now-track {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #f9f6f2;
  border: 1px dashed var(--border);
}

.now-track img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}

.track-title {
  font-weight: 600;
}

.track-meta {
  color: var(--muted);
  font-size: 14px;
}

.queue ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  min-height: 44px;
}

.search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f9f4ef;
  border: 1px solid var(--border);
}

.search-card img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}

.search-info {
  display: grid;
  gap: 4px;
}

.queue li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ef;
  border: 1px solid var(--border);
  animation: fadeIn 0.4s ease;
}

.queue li.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(242, 107, 58, 0.2);
}

.queue .score {
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}

.queue button {
  padding: 8px 12px;
  font-size: 13px;
}

.queue button[disabled] {
  background: #b7b2ad;
  cursor: not-allowed;
  box-shadow: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.helper {
  font-size: 13px;
  color: var(--accent-dark);
}

.hidden {
  display: none;
}

.progress {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #efe8df;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f26b3a, #f0a06d);
  transition: width 0.3s ease;
}

.progress-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.admin-controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.admin-join {
  margin-top: 18px;
}

.admin-token {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.admin-share {
  margin-top: 24px;
}

.share-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.share-row input {
  flex: 1;
}

.qr-wrap {
  margin-top: 16px;
}

.qr-wrap img {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.admin-close {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

button.danger {
  background: #1f1d1a;
}

.spotify-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.spotify-devices {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.tv-body {
  background: radial-gradient(circle at top, #ffe9d3 0%, #f3efe8 40%, #d7cfcb 100%);
}

.tv {
  padding: 48px;
  min-height: 100vh;
  display: grid;
  gap: 36px;
}

.tv-header h1 {
  margin: 12px 0 0;
  font-size: clamp(32px, 6vw, 64px);
}

.tv-join {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tv-join-label {
  font-weight: 600;
  color: var(--muted);
}

.tv-join img {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.tv-support {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: grid;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.tv-support-label {
  font-size: 14px;
  color: var(--muted);
}

.tv-support img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.tv-footer {
  position: fixed;
  left: 24px;
  bottom: 24px;
  margin: 0;
  padding: 0;
  border: none;
}

.tv-footer .footer-links {
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.tv-now {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-size: clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tv-now img {
  width: 160px;
  height: 160px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
}

.tv-progress {
  margin-top: -16px;
}

.tv-queue ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.tv-queue li {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff7ef;
  border: 1px solid var(--border);
  font-size: 20px;
}

.tv-index {
  font-weight: 700;
}

.tv-score {
  font-weight: 700;
  background: #fff;
  padding: 6px 12px;
  border-radius: 12px;
}

.pulse {
  animation: pulse 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .room-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page {
    padding: 32px 16px 60px;
  }

  .hero-links {
    flex-wrap: wrap;
  }

  .now-track {
    grid-template-columns: 48px 1fr;
  }

  .now-track img {
    width: 48px;
    height: 48px;
  }

  .queue li,
  .search-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tv {
    padding: 24px;
  }

  .tv-now {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tv-join {
    justify-content: center;
  }

  .tv-support {
    position: static;
    margin-top: 24px;
  }

  .tv-footer {
    position: static;
    margin-top: 24px;
  }

  .tv-now img {
    width: 140px;
    height: 140px;
    justify-self: center;
  }

  .tv-queue li {
    grid-template-columns: auto 1fr;
    row-gap: 8px;
  }

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