:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --card: #fffdf8;
  --ink: #26312d;
  --muted: #78827b;
  --accent: #e9865b;
  --accent-dark: #c86642;
  --line: #e7e1d6;
  --shadow: 0 18px 50px rgba(70, 55, 35, 0.08);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 20% 0%, #fffdf7 0, var(--paper) 42%, #eee8dc 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 36px 0 42px;
}

.hero {
  padding: 0 8px 20px;
  text-align: center;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 8px;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 6.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.intro {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.player-card, .list-card {
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid rgba(231, 225, 214, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.player-card {
  padding: 24px 28px;
}

.mode-switch {
  width: max-content;
  display: flex;
  gap: 4px;
  margin: 0 0 16px auto;
  padding: 4px;
  background: #f1ece3;
  border-radius: 999px;
}

.mode-switch button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.mode-switch button[aria-pressed="true"] {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 3px 10px rgba(70, 55, 35, 0.09);
}

.now-playing {
  min-height: 96px;
}

.week-badge {
  display: inline-flex;
  background: #fbe2d4;
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
}

.now-playing h2 {
  font-size: clamp(19px, 4.5vw, 26px);
  letter-spacing: -0.03em;
  margin: 12px 0 6px;
  line-height: 1.3;
}

.now-playing p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}

#progress {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}

.main-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 20px 0 16px;
}

.play-button, .icon-button {
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.play-button {
  width: 68px;
  height: 68px;
  color: #fff;
  background: var(--accent);
  font-size: 24px;
  box-shadow: 0 10px 22px rgba(233, 134, 91, 0.3);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.play-button:hover {
  background: var(--accent-dark);
  transform: scale(1.03);
}

.play-button:active {
  transform: scale(0.96);
}

.icon-button {
  width: 44px;
  height: 44px;
  color: var(--accent-dark);
  background: #f8e9df;
  font-size: 22px;
  transition: transform 0.15s ease;
}

.icon-button:active {
  transform: scale(0.92);
}

.secondary-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(231, 225, 214, 0.6);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}

.volume-control input {
  max-width: 140px;
  width: 100%;
  accent-color: var(--accent);
}

select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.list-card {
  margin-top: 18px;
  padding: 22px;
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.list-heading h2 {
  margin: 0;
  font-size: 18px;
}

.list-heading span {
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  margin: 0 0 14px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent);
}

.track-list {
  display: grid;
  gap: 4px;
}

.track-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  border: 1px solid transparent;
  background: transparent;
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 48px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(233, 134, 91, 0.2);
  touch-action: manipulation;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.track-item:hover, .track-item.active {
  background: #fff2e9;
  border-color: #f6d8c7;
}

.track-item:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  background: #fff0e6;
  border-color: var(--accent);
  transform: scale(1.008);
}

body.tv-mode .app-shell {
  width: min(92vw, 1000px);
}
body.tv-mode .track-item {
  min-height: 52px;
  padding: 12px 18px;
}
body.tv-mode .track-name {
  font-size: 16px;
}
body.tv-mode .track-number {
  font-size: 13px;
  width: 70px;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.track-number {
  flex-shrink: 0;
  width: 62px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.track-item.active .track-number {
  color: var(--accent-dark);
  font-weight: 800;
}

.track-name {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-item.active .track-name {
  font-weight: 750;
  color: var(--accent-dark);
}

.review-label {
  display: inline-flex;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 6px;
  background: #fff0bd;
  color: #8a6100;
  font-size: 10px;
  font-weight: 600;
  vertical-align: middle;
}

.track-indicator {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  opacity: 0.3;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.track-item.active .track-indicator {
  opacity: 1;
  color: var(--accent);
  font-weight: 800;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0 0;
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding-top: 20px;
  }
  .hero {
    padding-bottom: 14px;
  }
  .player-card {
    padding: 18px 16px;
    border-radius: 22px;
  }
  .mode-switch {
    width: 100%;
    margin-bottom: 14px;
  }
  .mode-switch button {
    flex: 1;
  }
  .list-card {
    padding: 16px 12px;
    border-radius: 22px;
  }
  .secondary-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .volume-control {
    width: 100%;
  }
  .volume-control input {
    max-width: none;
  }
  .track-item {
    padding: 8px 10px;
    min-height: 44px;
  }
  .track-number {
    width: 54px;
    font-size: 11px;
  }
  .track-name {
    font-size: 13px;
  }
}
