:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #777277;
  --muted: #aaa4a8;
  --line: #ebe6e9;
  --pale: #fdfbfc;
  --pink: #f7f3f5;
  --strong: #6d686d;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

a:focus-visible {
  outline: 2px solid #c69ba9;
  outline-offset: 3px;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px, env(safe-area-inset-left));
}

.shell {
  width: min(100%, 390px);
}

.detail-shell {
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 66px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.topbar-centered {
  justify-content: center;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #aaa1a7;
  font-weight: 600;
}

.back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #a39ca0;
}

.back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.playlist-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 0 12px;
}

.cover {
  width: clamp(78px, 23vw, 116px);
  height: clamp(78px, 23vw, 116px);
  border: 1px solid #eee7eb;
  background: #faf5f7;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cover svg {
  width: 48%;
  height: 48%;
  fill: none;
  stroke: #a6a0a4;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-info h1 {
  margin: 18px 0 5px;
  font-size: clamp(17px, 4.4vw, 21px);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--fg);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.playlist-info p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.listen {
  flex: 0 0 auto;
}

.listen h2 {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
  color: #aaa4a8;
  font-weight: 650;
}

.platforms {
  display: grid;
  gap: 10px;
}

.platform {
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--pale);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s;
}

.platform:hover {
  background: #faf6f8;
}

.platform-icon {
  height: 36px;
  width: 36px;
  background: var(--pink);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #969095;
}

.platform-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-icon img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 0.5px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.platform-name {
  flex: 1;
}

.out-arrow {
  font-size: 21px;
  line-height: 1;
  color: #b7afb4;
  font-weight: 300;
}

.platform.unavailable {
  opacity: 0.48;
  cursor: default;
}

.platform.unavailable .out-arrow {
  font-size: 10px;
}

.footnote {
  font-size: 10px;
  text-align: center;
  color: #bbb4b9;
  margin: 22px 0 max(24px, 5vh);
  flex: 0 0 auto;
}

.error {
  color: #aa6177;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.list-heading {
  text-align: center;
  margin: clamp(36px, 10vh, 100px) 0 30px;
}

.tiny-symbol {
  display: block;
  color: #aaa4a8;
  font-size: 26px;
  margin-bottom: 12px;
}

.list-heading h1 {
  margin: 0;
  color: var(--fg);
  font-size: 23px;
  letter-spacing: 0.12em;
}

.list-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}

.playlist-list {
  display: grid;
  gap: 12px;
}

.playlist-card {
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--pale);
  display: flex;
  gap: 13px;
  align-items: center;
}

.playlist-card-cover {
  height: 58px;
  width: 58px;
  flex-shrink: 0;
  background: #faf5f7;
  border: 1px solid #eee7eb;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.playlist-card-cover img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.playlist-card-cover svg {
  height: 27px;
  width: 27px;
  fill: none;
  stroke: #aaa4a8;
  stroke-width: 2;
  stroke-linecap: round;
}

.playlist-card-text {
  flex: 1;
  min-width: 0;
}

.playlist-card-title {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.playlist-card-description {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.playlist-card-arrow {
  font-size: 20px;
  color: #b7afb4;
}

@media (max-height: 690px) {
  .topbar {
    height: 48px;
  }

  .playlist-info {
    padding: 4px 0 8px;
  }

  .cover {
    width: 78px;
    height: 78px;
  }

  .playlist-info h1 {
    margin-top: 10px;
  }

  .platform {
    height: 55px;
  }

  .platforms {
    gap: 7px;
  }

  .listen h2 {
    margin-bottom: 8px;
  }

  .footnote {
    margin: 12px 0 14px;
  }
}

@media (max-height: 565px) {
  .cover {
    width: 62px;
    height: 62px;
  }

  .platform {
    height: 48px;
  }

  .platform-icon {
    height: 30px;
    width: 30px;
  }

  .playlist-info h1 {
    font-size: 16px;
    margin-top: 8px;
  }

  .playlist-info p {
    font-size: 11px;
  }

  .footnote {
    margin: 8px 0;
  }

  .topbar {
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .platform {
    transition: none;
  }
}

