:root {
  color-scheme: dark;
  --background: #0c0e12;
  --surface: #15181e;
  --surface-high: #1d2129;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1ea;
  --muted: #9ba1ac;
  --amber: #f2b84b;
  --coral: #ff7867;
  --violet: #a88aff;
  --aqua: #63d7cf;
  --player-height: 104px;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  background: var(--background);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(99, 215, 207, 0.08), transparent 30rem),
    radial-gradient(circle at 92% 8%, rgba(242, 184, 75, 0.1), transparent 26rem),
    var(--background);
  padding-bottom: calc(var(--player-height) + env(safe-area-inset-bottom, 0px));
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  padding: 12px 0;
  background: linear-gradient(to bottom, rgba(12, 14, 18, 0.94) 70%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 38px;
  height: 38px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.brand-mark i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--amber);
  animation: equalize 1.4s ease-in-out infinite alternate;
}

.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 18px; animation-delay: -0.6s; }
.brand-mark i:nth-child(3) { height: 13px; animation-delay: -0.25s; }

@keyframes equalize {
  to { height: 5px; }
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.header-actions,
.cast-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.install-button,
.load-more-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 18px;
  cursor: pointer;
}

.cast-control {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 5px 3px 16px;
  transition: border-color 180ms ease, background 180ms ease;
}

.cast-control.connected {
  border-color: rgba(99, 215, 207, 0.55);
  background: rgba(99, 215, 207, 0.1);
}

.cast-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.connected .cast-label {
  color: var(--aqua);
}

google-cast-launcher {
  display: none;
  width: 38px;
  height: 38px;
  padding: 7px;
  border-radius: 50%;
  --connected-color: var(--aqua);
  --disconnected-color: var(--text);
}

.cast-ready google-cast-launcher {
  display: block;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  min-height: 540px;
  padding: 70px 4% 80px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 15px;
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 9.5vw, 8.8rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero h1 em {
  color: var(--amber);
  font-weight: 400;
}

.hero-description {
  max-width: 520px;
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
  word-break: keep-all;
}

.orbit {
  position: relative;
  width: min(32vw, 390px);
  aspect-ratio: 1;
  justify-self: center;
}

.orbit-ring,
.orbit-core {
  position: absolute;
  border-radius: 50%;
}

.orbit-ring {
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.orbit-ring::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 30px var(--coral);
}

.orbit-ring-one {
  animation: spin 13s linear infinite;
}

.orbit-ring-two {
  inset: 25%;
  border-style: dashed;
  animation: spin 21s linear infinite reverse;
}

.orbit-ring-two::before {
  top: auto;
  bottom: -5px;
  background: var(--aqua);
  box-shadow: 0 0 30px var(--aqua);
}

.orbit-core {
  inset: 36%;
  display: grid;
  place-content: center;
  border: 1px solid rgba(242, 184, 75, 0.45);
  background: radial-gradient(circle at 30% 25%, #34302a, #151515 70%);
  box-shadow: 0 0 70px rgba(242, 184, 75, 0.12);
  text-align: center;
}

.orbit-core b {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 0.8;
}

.orbit-core small {
  margin-top: 8px;
  color: var(--amber);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.content-section {
  padding: 90px 0;
}

.jazz-section,
.podcast-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
}

.section-heading > p {
  max-width: 360px;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
  word-break: keep-all;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.compact-grid .station-card {
  min-height: 228px;
  padding: 23px;
}

.compact-grid .station-card h3 {
  max-width: 86%;
  margin-top: 32px;
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
}

.compact-grid .station-card p {
  max-width: 80%;
  font-size: 0.9rem;
}

.compact-grid .station-play {
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
}

.station-card {
  --card-accent: var(--amber);
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  padding: 28px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.station-card::after {
  content: "";
  position: absolute;
  right: -75px;
  bottom: -95px;
  width: 250px;
  height: 250px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 45%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px color-mix(in srgb, var(--card-accent) 7%, transparent),
    0 0 0 52px color-mix(in srgb, var(--card-accent) 4%, transparent);
}

.station-card:hover,
.station-card:focus-within {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-accent) 55%, transparent);
  background: var(--surface-high);
}

.station-card[data-accent="coral"] { --card-accent: var(--coral); }
.station-card[data-accent="violet"] { --card-accent: var(--violet); }
.station-card[data-accent="aqua"] { --card-accent: var(--aqua); }

.station-top,
.station-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.station-location,
.station-quality {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.station-card h3 {
  position: relative;
  z-index: 1;
  max-width: 78%;
  margin: 42px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.station-card p {
  position: relative;
  z-index: 1;
  max-width: 72%;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  word-break: keep-all;
}

.station-play {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--card-accent);
  color: #111318;
  cursor: pointer;
}

.station-play svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.episode-list {
  border-top: 1px solid var(--line);
}

.episode-card {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 124px;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.episode-date {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.episode-copy h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.45;
  word-break: keep-all;
}

.episode-copy p {
  display: -webkit-box;
  max-width: 770px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.episode-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.episode-duration {
  min-width: 48px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.episode-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.episode-play:hover {
  border-color: var(--aqua);
  background: rgba(99, 215, 207, 0.1);
}

.episode-play svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.load-more-button {
  display: block;
  margin: 28px auto 0;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.5s infinite;
}

.station-skeleton { min-height: 270px; }
.episode-skeleton { height: 124px; border-bottom: 1px solid var(--line); border-radius: 0; }

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.error-card {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid rgba(255, 120, 103, 0.35);
  border-radius: 20px;
  background: rgba(255, 120, 103, 0.08);
  color: #ffc0b8;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

footer p { margin: 0; }

.player {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 18px;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.75fr) auto;
  align-items: center;
  gap: 22px;
  min-height: var(--player-height);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: rgba(25, 28, 34, 0.94);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.48);
  padding: 15px 22px 15px 26px;
  backdrop-filter: blur(24px);
}

.player-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--amber);
}

.now-playing {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.now-playing > div {
  min-width: 0;
}

.now-playing strong,
.now-playing small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing strong { font-size: 0.98rem; }
.now-playing small { margin-top: 5px; color: var(--muted); font-size: 0.8rem; }

.live-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 120, 103, 0.45);
  border-radius: 999px;
  color: var(--coral);
  padding: 5px 8px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.player-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button,
.play-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
}

.icon-button span {
  font-size: 0.72rem;
  font-weight: 800;
}

.play-button {
  width: 54px;
  height: 54px;
  border: 0;
  background: var(--text);
  color: #111318;
}

.play-button svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.play-button .pause-icon { display: none; }
.player.is-playing .play-button .play-icon { display: none; }
.player.is-playing .play-button .pause-icon { display: block; }

.volume-control {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 5px;
}

.volume-control svg {
  width: 21px;
  height: 21px;
  fill: var(--muted);
}

input[type="range"] {
  height: 4px;
  border-radius: 999px;
  appearance: none;
  background: rgba(255, 255, 255, 0.16);
  accent-color: var(--aqua);
}

input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: var(--text);
  cursor: pointer;
}

#volume-range { width: 86px; }
#progress-range { width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-height) + 42px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  max-width: min(420px, calc(100% - 32px));
  transform: translate(-50%, 20px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #292d35;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  padding: 12px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  text-align: center;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 1080px) {
  .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  :root { --player-height: 150px; }

  .site-header,
  main {
    width: min(100% - 28px, 1180px);
  }

  .site-header { min-height: 70px; }
  .cast-label { display: none; }
  .cast-control { padding: 3px; }
  .install-button { display: none; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 56px 0 78px;
  }

  .hero h1 { font-size: clamp(4rem, 20vw, 7rem); }
  .hero-description { max-width: 92%; margin-top: 30px; }

  .orbit {
    position: absolute;
    top: 125px;
    right: -95px;
    width: 260px;
    opacity: 0.42;
    pointer-events: none;
  }

  .content-section { padding: 68px 0; }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 16px;
  }

  .station-grid,
  .compact-grid { grid-template-columns: 1fr; }
  .station-card { min-height: 245px; padding: 24px; }
  .station-card h3 { margin-top: 36px; }

  .episode-card {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 116px;
  }

  .episode-copy p,
  .episode-duration { display: none; }
  .episode-copy h3 { font-size: 0.96rem; }

  footer {
    display: block;
    padding-bottom: 55px;
  }

  footer p + p { margin-top: 10px; }

  .player {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 10px 12px;
    min-height: 0;
    padding: 15px 14px 13px 18px;
  }

  .player-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .player-controls {
    grid-column: 2;
    grid-row: 1;
  }

  .volume-control { display: none; }
  .play-button { width: 50px; height: 50px; }
  .icon-button { width: 38px; height: 38px; }
  .now-playing { min-width: 0; }
  .live-pill { display: none; }
}

@media (max-width: 430px) {
  .brand small { display: none; }
  .station-card p { max-width: 75%; font-size: 0.9rem; }
  .episode-card { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .episode-date { font-size: 0.73rem; }
  .player { grid-template-columns: minmax(0, 1fr) auto; }
  .podcast-skip { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
