/* World Radio — worldradio.live */
:root {
  --bg: #0a0d16;
  --bg-soft: #10141f;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --accent: #8ab4ff;
  --line: #232a3a;
  --maxw: 42rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 1.0625rem;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.wordmark {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.wordmark:hover { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* Main */
main { padding: 40px 0 64px; }

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; margin: 1.8em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}

blockquote {
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Landing */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.25em; }
.hero .tagline {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 1.2em;
}
.hero .lead { font-size: 1.15rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #0a0d16;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  margin: 0.6em 0 0.4em;
}
.btn:hover { filter: brightness(1.1); }
.btn-note {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.features {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
}
.features li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0;
}
.features h3 { margin: 0 0 0.35em; font-size: 1rem; }
.features p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.quote-band {
  margin: 3em 0 0;
  text-align: center;
}
.quote-band p {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text);
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .wrap > * { margin: 0 0 0.6em; }
.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Doc pages */
.doc-meta { color: var(--muted); margin-bottom: 2em; }

/* 목록 페이지 (/radio/, /genre/) */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.dir-lead { font-size: 1.15rem; }
.dir-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 1.4em 0 0.6em; }
.dir-cta .btn { margin: 0; }
.dir-badge { line-height: 0; }
.dir-badge img { height: 44px; width: auto; display: block; }
.station-list, .dir-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.station-list li, .dir-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 2px 16px; padding: 10px 2px; margin: 0; border-bottom: 1px solid var(--line);
}
.station-list a, .dir-list a { text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.station-list a:hover, .dir-list a:hover { text-decoration: underline; }
.station-list span, .dir-list span { color: var(--muted); font-size: 0.85rem; margin-left: auto; text-align: right; }
@media (min-width: 640px) {
  .dir-list { columns: 2; column-gap: 32px; }
  .dir-list li { break-inside: avoid; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Globe hero (웹 플레이어): 랜딩은 지구본 전면 단일 화면 */
body.map-only { overflow: hidden; height: 100dvh; }
.globe-hero {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #101a33 0%, var(--bg) 62%);
}
#globe-wrap { position: absolute; inset: 0; }
#globe { position: absolute; inset: 0; }
#globe-wrap canvas { display: block; }
.maplibregl-ctrl-attrib { background: rgba(10, 13, 22, 0.5); color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--muted); }

/* Liquid glass */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(0, 0, 0, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.38);
  color: var(--text);
}

.brand-pill {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: calc(14px + env(safe-area-inset-left));
  z-index: 8; /* 첫 진입 오버레이(7) 위: 재생 전에도 메뉴는 열려야 한다 */
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}
.brand-pill:hover { background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)); }

/* 하단 독: 주사위 + 미니 플레이어 바 */
.dock {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.round-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  align-self: flex-end;
  margin-right: calc((100% - min(100%, 600px)) / 2); /* 플레잉 바 오른쪽 끝에 맞춘다 */
}
.round-btn:hover { color: var(--accent); }
.mini {
  width: min(100%, 600px);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
}
#st-thumb {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}
#st-thumb[hidden] { display: none; }
.mini-meta { padding-left: 10px; }
.mini-meta { flex: 1; min-width: 0; }
.mini-meta p { margin: 0; }
#st-name {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
#st-sub, #st-status {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#st-status { color: var(--accent); display: none; }
#st-status:not(:empty) { display: block; }
#st-status:not(:empty) + #st-sub { display: none; }
#btn-play {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#btn-play:hover { background: rgba(255, 255, 255, 0.2); }
#btn-play .ic-pause, #btn-play .ic-wait { display: none; }
#btn-play[data-state="playing"] .ic-play { display: none; }
#btn-play[data-state="playing"] .ic-pause { display: block; }
#btn-play[data-state="loading"] .ic-play { display: none; }
#btn-play[data-state="loading"] .ic-wait { display: block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* World Radio 캡슐 앞 팝오버 메뉴 */
#sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
}
#sheet-backdrop[hidden] { display: none; }
.sheet {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top));
  left: calc(14px + env(safe-area-inset-left));
  width: 230px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform-origin: top left;
  animation: pop-in 0.16s ease-out;
}
@keyframes pop-in { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.glass-card {
  background: linear-gradient(160deg, rgba(30, 36, 52, 0.82), rgba(16, 20, 31, 0.82));
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 40px rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  overflow: hidden;
}
.sheet-group a, .sheet-group button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 18px;
  font-size: 0.98rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  font-family: inherit;
}
.sheet-group a:last-child, .sheet-group button:last-child { border-bottom: none; }
.sheet-group a:hover, .sheet-group button:hover { background: rgba(255, 255, 255, 0.07); }
.sheet-primary { color: var(--accent); font-weight: 700; }

/* Browse: 상단 중앙 버튼 + 위에서 내려오는 시트 */
.browse-pill {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 8; /* World Radio 캡슐처럼 첫 진입 오버레이(7) 위 */
  /* 돋보기 원형 버튼. 글자(Browse)는 휴대폰에서 World Radio 캡슐과 겹쳐서 뺐다 */
  width: 42px; height: 42px; padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.browse-pill:hover { background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)); color: var(--accent); }
#browse {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: rgba(5, 7, 12, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 14px;
}
#browse[hidden] { display: none; }
.browse-card {
  width: min(100%, 600px);
  max-height: 66vh;
  border-radius: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
  animation: sheet-down 0.24s cubic-bezier(0.3, 0.7, 0.3, 1);
}
@keyframes sheet-down { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.browse-head { display: flex; align-items: center; gap: 10px; padding: 2px 8px 10px; }
#browse-title { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browse-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 6px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  cursor: text;
}
.browse-search[hidden] { display: none; }
.browse-search:focus-within { border-color: rgba(138, 180, 255, 0.55); }
.browse-search svg { flex: none; }
#browse-q {
  flex: 1; min-width: 0; height: 100%;
  margin: 0; padding: 0;
  border: none; outline: none; background: none;
  -webkit-appearance: none; appearance: none;
  color: var(--text); font-family: inherit;
  font-size: 16px; /* 16px 미만이면 iOS Safari 가 입력할 때 화면을 확대한다 */
  color-scheme: dark;
}
#browse-q::placeholder { color: var(--muted); }
#browse-q::-webkit-search-decoration { -webkit-appearance: none; }
#browse-back, #browse-close {
  flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#browse-back:hover, #browse-close:hover { color: var(--text); }
#browse-back[hidden] { display: none; }
#browse-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 4px 4px; }
.browse-sec { margin: 4px 0 16px; }
.browse-sec h3 { margin: 4px 10px 8px; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.browse-rows { list-style: none; margin: 0; padding: 0; }
.browse-rows button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; border-radius: 12px;
  background: none; color: var(--text); cursor: pointer; font-family: inherit;
}
.browse-rows button:hover { background: rgba(255, 255, 255, 0.07); }
.browse-rows .bname { margin: 0; font-size: 0.98rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browse-rows .bsub { margin: 2px 0 0; color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browse-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px; }
.browse-chips button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
}
.browse-chips button:hover { background: rgba(255, 255, 255, 0.12); }
.browse-chips button span { color: var(--muted); margin-left: 6px; font-size: 0.8rem; }
.browse-chips .more { color: var(--accent); border-color: rgba(138, 180, 255, 0.35); }
.browse-note { margin: 12px 12px 6px; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.browse-more {
  display: block; margin: 8px auto 4px; padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--accent);
  font-family: inherit; font-size: 0.9rem; cursor: pointer;
}

/* 첫 진입 오버레이 */
#land-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(10, 13, 22, 0.45);
  padding: 0 16px; text-align: center;
}
#land-overlay[hidden] { display: none; }
#btn-land {
  background: var(--accent); color: #0a0d16;
  font-size: 1.05rem; font-weight: 700;
  border: none; border-radius: 999px; padding: 14px 28px; cursor: pointer;
  font-family: inherit;
}
#btn-land:hover { filter: brightness(1.1); }
#land-hint { color: var(--muted); font-size: 0.9rem; margin: 0; max-width: min(90vw, 520px); line-height: 1.5; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
/* 방송국 페이지: 소개·사실 문장은 위성 지도 위에서 안 읽혀서 About 카드와 같은 받침을 깐다 */
#land-overlay[data-ssr] #land-hint {
  color: var(--text); text-shadow: none; text-align: center;
  background: rgba(10, 13, 22, 0.78); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
  padding: 10px 14px; width: 100%; box-sizing: border-box;
}
/* 방송국 페이지(/listen/)에서 Worker 가 넣는 방송국 이름·나라·장르 */
.land-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.2;
  max-width: min(90vw, 640px);
  overflow-wrap: anywhere;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.land-meta { margin: -6px 0 4px; color: var(--muted); font-size: 0.95rem; text-align: center; }
.land-meta a { color: var(--text); text-decoration: none; }
.land-meta a:hover { text-decoration: underline; }
.land-about { width: 100%; max-width: min(90vw, 520px); color: var(--muted); font-size: 0.88rem; text-align: left; }
.land-about summary { cursor: pointer; text-align: center; list-style: none; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.land-about summary::-webkit-details-marker { display: none; }
.land-about summary::after { content: " \25BE"; }
.land-about[open] summary::after { content: " \25B4"; }
.land-about[open] {
  background: rgba(10, 13, 22, 0.78); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px;
  padding: 10px 14px; max-height: 45vh; overflow-y: auto; overscroll-behavior: contain;
}
.land-about dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 4px; }
.land-about dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.land-about a { color: var(--text); }
.land-about h2 { margin: 12px 0 4px; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.land-about ul { list-style: none; margin: 0; padding: 0; }
.land-about li { padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 휴대폰: 아래 스토어 배지·미니 바가 안내층보다 위에 그려져, 펼친 카드가 그 영역을 비켜 가게 한다 */
@media (max-width: 640px) {
  .land-about[open] { max-height: 30vh; }
  /* 방송국 페이지는 소개 카드만큼 길어서, 접힌 상태에서도 아래 배지를 비켜 가게 위로 올린다 */
  #land-overlay[data-ssr] { padding-bottom: 150px; }
  #land-overlay:has(.land-about[open]) { padding-bottom: 190px; }
  /* 소개가 길면 카드를 펼쳤을 때 제목이 위로 밀려 가려져서, 그동안만 소개를 3줄로 접는다(글은 그대로 있다) */
  /* 아래 여백(padding) 자리에 넷째 줄이 비쳐서, 접힌 동안은 여백을 투명 테두리로 바꾼다(잘림은 padding 안쪽까지라) */
  #land-overlay:has(.land-about[open]) #land-hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; padding-bottom: 0; border-bottom: 10px solid transparent; }
}

/* 주사위 눈: data-face 로 1~6 중 하나만 보인다 */
.round-btn .face { display: none; }
.round-btn[data-face="1"] .f1, .round-btn[data-face="2"] .f2, .round-btn[data-face="3"] .f3,
.round-btn[data-face="4"] .f4, .round-btn[data-face="5"] .f5, .round-btn[data-face="6"] .f6 { display: block; }

/* 주사위 굴림 */
@keyframes dice-roll {
  0% { transform: none; }
  30% { transform: translateY(-16px) rotate(200deg) scale(1.08); }
  55% { transform: translateY(3px) rotate(340deg) scale(0.96); }
  75% { transform: translateY(-7px) rotate(440deg); }
  100% { transform: translateY(0) rotate(540deg); }
}
.round-btn.rolling svg { animation: dice-roll 0.62s cubic-bezier(0.3, 0.7, 0.4, 1); }

/* 풀 플레이어 시트 */
#player-sheet {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: rgba(5, 7, 12, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 14px;
}
#player-sheet[hidden] { display: none; }
.player-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 600px);
  border-radius: 24px 24px 0 0;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom));
}
#pp-art {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(46px) saturate(1.5) brightness(0.6);
  opacity: 0.6;
}
.player-card > :not(#pp-art) { position: relative; z-index: 1; }
#pp-close {
  display: block;
  margin: 0 auto 2px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 6px 18px;
}
#pp-close:hover { color: var(--text); }
.pp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pp-title { flex: 1; min-width: 0; }
.pp-title p { margin: 0; }
#pp-name { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
#pp-sub { color: var(--muted); font-size: 0.95rem; }
#pp-locate, #pp-share {
  flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
#pp-locate:hover, #pp-share:hover { color: var(--accent); border-color: var(--accent); }
.pp-controls {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  margin: 6px 0 18px;
}
.pp-controls button {
  background: none; border: none; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
}
.pp-controls button:hover { background: rgba(255, 255, 255, 0.08); }
.pp-controls button:disabled { opacity: 0.35; cursor: default; background: none; }
#pp-play {
  width: 68px; height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}
#pp-play:hover { background: rgba(255, 255, 255, 0.18); }
#pp-play .ic-pause, #pp-play .ic-wait { display: none; }
#pp-play[data-state="playing"] .ic-play { display: none; }
#pp-play[data-state="playing"] .ic-pause { display: block; }
#pp-play[data-state="loading"] .ic-play { display: none; }
#pp-play[data-state="loading"] .ic-wait { display: block; animation: spin 1s linear infinite; }
.pp-info { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.pp-info > div[hidden] { display: none; }
.pp-info > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.pp-info > div:last-child { border-bottom: none; }
.pp-info dt { color: var(--muted); font-size: 0.9rem; flex: none; }
.pp-info dd { margin: 0; text-align: right; font-size: 0.95rem; min-width: 0; overflow-wrap: anywhere; }
#pi-genre { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#pi-genre span {
  background: rgba(138, 180, 255, 0.16);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}
#pi-web { color: var(--accent); text-decoration: none; }
#pi-web:hover { text-decoration: underline; }

/* 미니 바 ↔ 풀 플레이어 hero 전환 (View Transitions 지원 브라우저) */
body:not(.expanded) .mini { view-transition-name: wr-card; }
body:not(.expanded) #st-name { view-transition-name: wr-title; }
body:not(.expanded) #st-sub { view-transition-name: wr-sub; }
body.expanded .player-card { view-transition-name: wr-card; }
body.expanded #pp-name { view-transition-name: wr-title; }
body.expanded #pp-sub { view-transition-name: wr-sub; }
body.expanded .dock { visibility: hidden; }
::view-transition-group(wr-card),
::view-transition-group(wr-title),
::view-transition-group(wr-sub) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.3, 0.7, 0.3, 1);
}

/* 스토어 배지 (좌하단) */
.store-badges {
  position: absolute;
  left: calc(14px + env(safe-area-inset-left));
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
@media (min-width: 900px) {
  .store-badges { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
.store-badges .badge {
  display: block;
  background: none; border: none; padding: 0; cursor: pointer;
  line-height: 0;
}
.badge-as img { height: 44px; display: block; }
.badge-gp img { height: 66px; margin: -11px -12px; display: block; }
body.expanded .store-badges { visibility: hidden; }

/* 겹친 점: 같은 지점에 쌓인 방송국 리스트 시트 */
#stack-sheet {
  position: absolute;
  inset: 0;
  z-index: 9;
  background: rgba(5, 7, 12, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 14px;
}
#stack-sheet[hidden] { display: none; }
.stack-card {
  width: min(100%, 600px);
  max-height: min(58vh, 480px);
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  padding: 14px 10px calc(10px + env(safe-area-inset-bottom));
  animation: sheet-up 0.22s cubic-bezier(0.3, 0.7, 0.3, 1);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.stack-head { display: flex; align-items: center; gap: 12px; padding: 0 12px 10px; }
.stack-title { flex: 1; min-width: 0; }
.stack-title p { margin: 0; }
#stack-count { font-size: 1.1rem; font-weight: 700; }
#stack-place { color: var(--muted); font-size: 0.88rem; }
#stack-close {
  flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#stack-close:hover { color: var(--text); }
#stack-list {
  list-style: none;
  margin: 0;
  padding: 0 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#stack-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: none;
  border-radius: 12px;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
#stack-list button:hover { background: rgba(255, 255, 255, 0.07); }
#stack-list .sname {
  margin: 0;
  font-size: 0.98rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#stack-list .ssub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#stack-list button.now .sname { color: #ff9f0a; }

/* Google Play 준비 중 토스트 */
#toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100px + env(safe-area-inset-bottom));
  z-index: 11;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 0.95rem;
  white-space: nowrap;
}
#toast[hidden] { display: none; }
