/* K-Radio 웹 플레이어 (외부 글꼴·CDN 없이)
   원칙: 한눈에 보이게 · 크게 누르게 · 부드럽게 움직이게 */
:root {
  --bg: #0b0820;
  --card: rgba(255, 255, 255, 0.06);
  --card-solid: #171233;
  --line: rgba(255, 255, 255, 0.10);
  --text: #f4f2ff;
  --muted: #a9a3cc;
  --pink: #ff5f8f;
  --violet: #7b61ff;
  --cyan: #3fd8ff;
  --ok: #43e6a8;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 22px;
  --tap: 52px; /* 손가락으로 누르기 편한 최소 크기 */
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16.5px;
  line-height: 1.5;
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px 110px;
  overflow-x: hidden;
}
.ko { color: var(--muted); font-size: 0.86em; font-weight: 500; }
.small { font-size: 0.82em; }
a { color: var(--cyan); }

/* ── 움직이는 배경 ───────────────────────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; background: #ff4f8b; top: -160px; left: -140px; }
.b2 { width: 600px; height: 600px; background: #6a4dff; bottom: -220px; right: -180px; animation-duration: 28s; }
.b3 { width: 380px; height: 380px; background: #1fc8ff; top: 40%; left: 45%; opacity: 0.25; animation-duration: 34s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } 100% { transform: translate(-40px, 80px) scale(0.95); } }
.hangul span {
  position: absolute; bottom: -60px; color: rgba(255, 255, 255, 0.07); font-weight: 800;
  animation: rise linear infinite; will-change: transform;
}
@keyframes rise { to { transform: translateY(-115vh) rotate(25deg); } }
.grain { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 3, 18, 0.7)); }

/* ── 버튼 (크게, 누르면 살짝 눌림) ─────────── */
button {
  font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; min-height: var(--tap);
  cursor: pointer; transition: transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
  font-weight: 600;
}
button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.25); }
button:active:not(:disabled) { transform: scale(0.96); }
button:disabled { opacity: 0.4; cursor: default; }
button:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button.primary { background: var(--grad); border: 0; box-shadow: 0 10px 30px -8px rgba(255, 95, 143, 0.6); }
button.primary .ko { color: rgba(255, 255, 255, 0.85); }
button.primary:hover { box-shadow: 0 14px 40px -8px rgba(255, 95, 143, 0.8); filter: brightness(1.08); }
button.active { background: var(--grad); border-color: transparent; color: #fff; }
button.active .ko { color: rgba(255, 255, 255, 0.85); }
select {
  font: inherit; background: var(--card-solid); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; min-height: 46px;
}

/* ── 머리 ───────────────────────────────── */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  position: relative; width: 54px; height: 54px; border-radius: 17px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 8px 26px -6px rgba(123, 97, 255, 0.7);
}
.logo span { font-weight: 900; font-size: 1.7rem; color: #fff; font-family: Arial, sans-serif; }
.logo .wave { position: absolute; inset: -6px; border-radius: 22px; border: 2px solid rgba(255, 95, 143, 0.5); animation: ping 2.6s ease-out infinite; }
.logo .w2 { animation-delay: 1.3s; }
@keyframes ping { 0% { transform: scale(0.9); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -0.02em; }
h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { margin: 0; color: var(--muted); font-size: 0.92rem; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(123, 97, 255, 0.16);
  border: 1px solid rgba(123, 97, 255, 0.5); border-radius: 999px; padding: 8px 14px; font-size: 0.88rem; font-weight: 600;
}
.spark { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ── 흐르는 한국어 띠 ─────────────────────── */
.ticker {
  margin: 14px -16px 4px; overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: inline-block; padding: 9px 0; animation: marquee 60s linear infinite; }
.ticker-track span { margin: 0 22px; font-size: 0.92rem; }
.ticker-track b { color: #fff; margin-right: 6px; }
.ticker-track i { color: var(--muted); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── 채널 탭 (크게) ──────────────────────── */
.channels { display: flex; gap: 10px; margin: 16px 0; padding: 6px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.channels button { flex: 1 1 0; min-height: 56px; font-size: 1.05rem; border: 0; background: transparent; border-radius: 15px; }
.channels button:hover:not(.active) { background: rgba(255, 255, 255, 0.07); }

/* ── 카드 ───────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card h3 { margin: 0 0 12px; font-size: 1.12rem; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.h-ico { font-size: 1.1rem; }
.label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── 지금 방송 (가장 크게) ─────────────────── */
.hero { padding: 26px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 95, 143, 0.6), rgba(123, 97, 255, 0.2), rgba(63, 216, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hero-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center; }
.disc-wrap { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.disc {
  width: 190px; height: 190px; border-radius: 50%; position: relative; z-index: 1;
  background:
    radial-gradient(circle, transparent 0 30%, rgba(255,255,255,.05) 31% 32%, transparent 33% 40%, rgba(255,255,255,.05) 41% 42%, transparent 43% 52%, rgba(255,255,255,.05) 53% 54%, transparent 55%),
    conic-gradient(from 0deg, #1c1640, #2b1f5e, #1c1640, #3a1d4f, #1c1640);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), inset 0 0 0 6px rgba(255, 255, 255, 0.04);
  display: grid; place-items: center; animation: spin 6s linear infinite; animation-play-state: paused;
}
.disc-label { width: 74px; height: 74px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; align-content: center; line-height: 1; }
.disc-label b { font-size: 1.7rem; font-family: Arial, sans-serif; }
.disc-label small { font-size: 0.6rem; letter-spacing: 0.2em; font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }
.ring { position: absolute; inset: 15px; border-radius: 50%; border: 2px solid rgba(255, 95, 143, 0.0); }
body.playing .disc { animation-play-state: running; }
body.playing .ring { animation: ripple 3s ease-out infinite; }
body.playing .r2 { animation-delay: 1s; }
body.playing .r3 { animation-delay: 2s; }
@keyframes ripple { 0% { transform: scale(0.9); border-color: rgba(255, 95, 143, 0.6); } 100% { transform: scale(1.25); border-color: rgba(123, 97, 255, 0); } }

.onair-head { display: flex; align-items: center; gap: 10px; }
.clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #5c5680; flex: none; }
.live-dot.on { background: var(--pink); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 95, 143, .7); } 70% { box-shadow: 0 0 0 12px rgba(255, 95, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 143, 0); } }
.onair h2 { margin: 10px 0 4px; font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; }
.onair h2 .ko { display: block; font-size: 1rem; margin-top: 4px; }
.hosts { margin: 0 0 10px; color: var(--muted); }

.eq { display: flex; align-items: flex-end; gap: 4px; height: 34px; margin: 8px 0 12px; }
.eq i { flex: 1; max-width: 10px; height: 18%; border-radius: 4px; background: var(--grad); opacity: 0.45; transition: height .3s; }
body.playing .eq i { opacity: 1; animation: bounce 1s ease-in-out infinite alternate; }
.eq i:nth-child(2n) { animation-duration: .7s !important; } .eq i:nth-child(3n) { animation-duration: 1.3s !important; }
.eq i:nth-child(4n) { animation-delay: -.4s; } .eq i:nth-child(5n) { animation-duration: .55s !important; } .eq i:nth-child(7n) { animation-delay: -.8s; }
@keyframes bounce { 0% { height: 12%; } 100% { height: 100%; } }

.progress { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--grad); transition: width 1s linear; border-radius: 4px; }
.meta { color: var(--muted); font-size: 0.92rem; margin: 10px 0 14px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; }
.controls .big { font-size: 1.15rem; padding: 16px 28px; min-height: 62px; border-radius: 20px; flex: 1 1 260px; }
.controls #btnPause { flex: 0 1 180px; }
.status { color: var(--muted); font-size: 0.88rem; min-height: 1.2em; margin: 10px 0 0; }

/* ── 지금 재생 ──────────────────────────── */
/* 플레이어는 위 '지금 방송 중' 칸 하나. 회색 재생 막대·에피소드 제목은 다시 듣기 때만 보임 */
#audio { width: 100%; margin: 12px 0 8px; height: 48px; border-radius: 14px; }
#audio:not([controls]) { display: none; }
.replay-only { display: none; margin-top: 12px; }
body.replaying .replay-only { display: block; }
.replay-only h3 { margin-top: 4px; font-size: 1.15rem; }
.now-extra .corner-now:empty { display: none; }
#epTopic { margin: 0; }
.corner-now { color: var(--ok); font-weight: 600; min-height: 1.4em; }
.sleep { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sleep-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sleep-btns button { min-height: 46px; padding: 8px 16px; border-radius: 999px; }
.sleep-left { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── 두 칸 ──────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid .card { margin-bottom: 0; }
.chapters, .vocab, .replay { list-style: none; padding: 0; margin: 0; }
.chapters li { padding: 12px; border-radius: 14px; display: flex; gap: 12px; cursor: pointer; transition: background .2s; min-height: 48px; align-items: center; }
.chapters li:hover:not(.empty) { background: rgba(255, 255, 255, 0.06); }
.chapters li .t { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.4em; font-weight: 600; }
.chapters li.current { background: rgba(67, 230, 168, 0.12); color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.chapters li.empty, .vocab li.empty, .replay li.empty { color: var(--muted); cursor: default; }
.vocab li { padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.vocab li:hover { transform: translateX(4px); border-color: rgba(255, 95, 143, 0.5); }
.vocab li.empty { background: none; border: 0; }
.vocab .w { font-size: 1.35rem; font-weight: 800; }
.vocab .r { color: var(--cyan); font-style: italic; margin-left: 8px; }
.vocab .e { display: block; color: var(--muted); }

/* ── 편성표 ─────────────────────────────── */
table.schedule { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.schedule td { padding: 12px 12px; vertical-align: top; background: rgba(255, 255, 255, 0.03); }
.schedule td:first-child { border-radius: 12px 0 0 12px; }
.schedule td:last-child { border-radius: 0 12px 12px 0; }
.schedule td.time { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; width: 1%; font-weight: 700; }
.schedule tr.onair td { background: linear-gradient(90deg, rgba(255, 95, 143, 0.22), rgba(123, 97, 255, 0.12)); color: #fff; }
.schedule tr.onair td.time { color: var(--pink); }
.schedule tr.onair td.time::before { content: "● "; animation: blink 1.4s infinite; }
#tzLabel { color: var(--muted); font-weight: normal; }
.schedule .rerun { font-size: 0.75rem; color: var(--muted); margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }

/* ── 다시 듣기 ──────────────────────────── */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.9rem; flex: 1 1 200px; }
.replay li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.replay li.empty { background: none; border: 0; }
.replay .info { min-width: 0; }
.replay .info b { display: block; overflow: hidden; text-overflow: ellipsis; }
.replay .info span { color: var(--muted); font-size: 0.86rem; }
.replay li button { flex: none; border-radius: 999px; }

/* ── 뉴스·새 소식·앱 ─────────────────────── */
#newsBox { margin-top: 16px; }
ul.news { list-style: none; padding: 0; margin: 6px 0; font-size: 0.92em; }
ul.news li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.news a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
ul.news .src { opacity: 0.7; }
#newsBox .note { font-size: 0.8em; opacity: 0.65; margin: 6px 0 0; }
ul.updates { list-style: none; padding: 0; margin: 6px 0; }
ul.updates li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.updates li:last-child { border-bottom: 0; }
ul.updates .when { color: var(--muted); font-size: 0.8rem; margin-right: 6px; font-variant-numeric: tabular-nums; }
ul.updates .tag { display: inline-block; font-size: 0.72rem; padding: 2px 9px; border-radius: 9px; background: rgba(255, 95, 143, 0.18); color: var(--pink); margin-right: 6px; font-weight: 700; }
ul.updates p { margin: 4px 0 0; }
ul.updates p.ko { font-size: 0.86rem; }
ul.updates a { font-weight: 700; }
#updatesMore { margin-top: 6px; }

/* 재방송 안내 */
.replay-banner { background: rgba(123, 97, 255, 0.14); border: 1px solid rgba(123, 97, 255, 0.4); border-radius: 16px; padding: 12px 16px; margin: 18px 0 0; font-size: 0.9rem; }
.replay-banner .ko { font-size: 0.84rem; opacity: 0.9; }

/* 광고 나올 때 누르는 카드 */
.ad-now {
  margin-top: 12px; padding: 14px 16px; border-radius: 16px; font-size: 1rem;
  background: linear-gradient(135deg, rgba(67, 230, 168, 0.18), rgba(63, 216, 255, 0.12)); border: 1px solid rgba(67, 230, 168, 0.5);
  animation: popin .5s cubic-bezier(.2, 1.4, .4, 1);
}
.ad-now .get { display: inline-block; margin: 8px 0 0; padding: 10px 16px; border-radius: 999px; background: var(--ok); color: #062b1c; font-weight: 800; text-decoration: none; }
.ad-now .tag { font-size: 0.72rem; padding: 2px 7px; border-radius: 6px; background: rgba(67, 230, 168, 0.3); color: #dfffee; font-weight: 800; }
@keyframes popin { from { transform: scale(0.9); opacity: 0; } }

footer { text-align: center; color: var(--muted); font-size: 0.86rem; margin-top: 26px; }

/* ── 아래 고정 미니 플레이어 (스크롤 내려도 바로 누르게) ── */
.mini {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  border-radius: 999px; background: rgba(23, 18, 51, 0.88); border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  transition: transform .45s cubic-bezier(.2, 1.2, .4, 1); z-index: 20;
}
.mini.show { transform: translate(-50%, 0); }
.mini-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
.mini-btn { width: 52px; height: 52px; padding: 0; border-radius: 50%; background: var(--grad); border: 0; font-size: 1.2rem; flex: none; }
.mini-eq { display: flex; align-items: flex-end; gap: 3px; height: 20px; width: 22px; }
.mini-eq i { flex: 1; height: 30%; background: var(--pink); border-radius: 2px; }
body.playing .mini-eq i { animation: bounce .8s ease-in-out infinite alternate; }
.mini-eq i:nth-child(2) { animation-delay: -.3s !important; } .mini-eq i:nth-child(3) { animation-delay: -.6s !important; }

/* ── 휴대폰 ─────────────────────────────── */
@media (max-width: 760px) {
  body { padding: 10px 12px 110px; font-size: 16px; }
  .hero { padding: 20px 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 14px; text-align: left; }
  .disc-wrap { width: 150px; height: 150px; margin: 0 auto; }
  .disc { width: 130px; height: 130px; }
  .disc-label { width: 52px; height: 52px; }
  .disc-label b { font-size: 1.2rem; }
  .onair h2 { font-size: 1.55rem; }
  .grid { grid-template-columns: 1fr; }
  .controls .big { flex-basis: 100%; }
  .controls #btnPause { flex: 1 1 100%; }
  .ticker { margin: 12px -12px 4px; }
  h1 { font-size: 1.3rem; }
  .ai-badge { font-size: 0.8rem; padding: 6px 12px; }
}

/* 움직임 줄이기 설정을 켠 사람 배려 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 손질: 채널 이름 줄바꿈 깔끔하게 · 재생 전엔 일시정지 버튼 숨김 */
.channels button .ko { display: block; font-size: 0.82rem; }
#btnPause:disabled { display: none; }

/* 자동 재생이 막혔을 때: 아무 데나 누르면 시작 */
.tap-start { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 5, 26, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; animation: fadein .4s ease; }
.tap-start[hidden] { display: none; }
.tap-box { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 24px; }
.tap-box b { font-size: 1.4rem; }
.tap-box span { color: var(--muted); }
.tap-circle { width: 110px; height: 110px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 2.6rem; padding-left: 8px; box-shadow: 0 0 0 0 rgba(255, 95, 143, .6); animation: pulse 1.6s infinite; margin-bottom: 8px; }
@keyframes fadein { from { opacity: 0; } }

/* 볼륨 · 음소거 */
.vol { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); max-width: 420px; }
.vol-mute, .mini-mute { width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; font-size: 1.25rem; flex: none; }
.vol-mute.on, .mini-mute.on { background: rgba(255, 95, 143, 0.25); border-color: var(--pink); }
.vol input[type=range] { --p: 80%; flex: 1; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--pink), var(--violet)) 0 / var(--p) 100% no-repeat, rgba(255, 255, 255, 0.15); }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.vol input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.vol-num { min-width: 3.2em; text-align: right; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.mini-mute { width: 44px; height: 44px; min-height: 44px; background: rgba(255, 255, 255, 0.08); }
@media (max-width: 760px) { .vol { max-width: none; } }

/* ── 청취자 참여: 듣는 사람 수 · 채팅 · 사연 ── */
.listen-count { padding: 3px 10px; border-radius: 999px; background: rgba(67, 230, 168, 0.15); color: var(--ok); font-size: 0.8rem; font-weight: 700; }
.note { color: var(--muted); font-size: 0.82rem; margin: 8px 0 0; }
.note.warn, .form-msg.warn { color: #ffb4c6; }
.form-msg.ok { color: var(--ok); }
input:not([type=range]), textarea {
  font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; min-height: 50px; width: 100%; transition: border-color .2s, background .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--violet); background: rgba(255, 255, 255, 0.09); }
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #7f78a8; }

.chat-ch { color: var(--muted); font-weight: 500; }
.chat-list { list-style: none; margin: 0 0 12px; padding: 6px; height: 280px; overflow-y: auto; border-radius: 16px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line); scroll-behavior: smooth; }
.chat-list li { padding: 7px 10px; border-radius: 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; animation: popin .3s ease; }
.chat-list li.empty { color: var(--muted); justify-content: center; padding-top: 110px; }
.chat-list li:hover { background: rgba(255, 255, 255, 0.04); }
.chat-list .who { flex: none; }
.chat-list .msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-list time { color: #6f6894; font-size: 0.75rem; }
.chat-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; }
.chat-form button { padding: 0 20px; }

.letters .lead { color: var(--muted); margin: 0 0 14px; }
.letter-form { display: grid; gap: 10px; margin-bottom: 18px; }
.letter-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.kinds button { border-radius: 999px; min-height: 46px; padding: 8px 14px; font-size: 0.92rem; }
.send-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.send-row .count { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { margin: 0; min-height: 1.2em; font-weight: 600; }
.letter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.letter-list li { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.letter-list li.empty { color: var(--muted); text-align: center; }
.l-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.l-country { color: var(--muted); font-size: 0.86rem; }
.l-kind { font-size: 0.75rem; padding: 2px 9px; border-radius: 999px; background: rgba(123, 97, 255, 0.2); }
.l-head time { margin-left: auto; color: #6f6894; font-size: 0.78rem; }
.l-body { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.l-reply { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 95, 143, 0.14), rgba(123, 97, 255, 0.14)); border-left: 3px solid var(--pink); }
.l-reply p { margin: 4px 0 0; }
.l-air { display: inline-block; margin-top: 6px; font-size: 0.82rem; color: var(--ok); font-weight: 700; }

@media (max-width: 760px) {
  .chat-form { grid-template-columns: 1fr auto; }
  .chat-form #chatNick { grid-column: 1 / -1; }
  .letter-form .row { grid-template-columns: 1fr; }
  .chat-list { height: 240px; }
}

/* 사연함: 방송 동의 체크 */
.letter-form .consent { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 0.92rem; cursor: pointer; }
.letter-form .consent input { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.letter-form .note { color: var(--muted); font-size: 0.82rem; margin: 2px 0 8px; }

/* 어느 나라에서 듣는지 (국기) */
.from-countries { font-size: 0.95rem; letter-spacing: 2px; opacity: 0.9; }

/* 대본 보기 */
#transcriptCard summary { cursor: pointer; list-style: none; }
#transcriptCard summary::-webkit-details-marker { display: none; }
#transcriptCard summary::after { content: ' ▾'; color: var(--muted); }
.transcript { list-style: none; margin: 12px 0 0; padding: 0; max-height: 420px; overflow-y: auto; }
.transcript li { display: flex; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; line-height: 1.45; }
.transcript li .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-size: 0.85em; padding-top: 2px; }
.transcript li.ko-line span:last-child { color: var(--ok); font-weight: 600; }
.transcript li.current { background: rgba(255, 255, 255, 0.10); }

/* 연속 청취일 🔥 */
.streak { font-size: 0.82rem; font-weight: 700; color: #ffcf70; background: rgba(255, 160, 60, 0.14); border: 1px solid rgba(255, 160, 60, 0.35); border-radius: 999px; padding: 3px 10px; }
.streak.pop { animation: streakPop 0.9s ease; }
@keyframes streakPop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .streak.pop { animation: none; } }

/* 큰 버튼 하나 + 음악만 듣기 */
#btnLive.playing { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.music-only { min-height: 56px; padding: 0 18px; border-radius: 16px; font-weight: 700; }
.music-only.on { background: var(--ok); color: #062b1c; border-color: transparent; }

/* 컴퓨터: 재생 바 끌어서 옮기기 */
.mini-grip { display: none; cursor: grab; font-size: 1.2rem; color: var(--muted); user-select: none; touch-action: none; padding: 0 2px; }
@media (pointer: fine) and (min-width: 900px) { .mini-grip { display: inline-block; } }
.mini.moved { bottom: auto; transform: none; width: 380px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.mini.moved.show { opacity: 1; pointer-events: auto; transform: none; }
.mini.dragging { transition: none; cursor: grabbing; }
.mini.dragging .mini-grip { cursor: grabbing; }

/* 📲 앱 설치 버튼 */
.install-btn { margin-left: 10px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.25); }
.install-tip { margin: 6px 16px 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); font-size: 0.9rem; }

/* 친구 초대 · 바로 가기 · 환영 */
.invite-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.invite-row input { flex: 1 1 160px; min-height: 48px; }
.invite-row button { min-height: 48px; }
.quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 16px 0; }
.quick a { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); color: inherit; text-decoration: none; font-weight: 700; font-size: 0.88rem; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.welcome-ref { margin: 8px 16px 0; padding: 12px 16px; border-radius: 14px; background: rgba(67, 230, 168, 0.15); border: 1px solid rgba(67, 230, 168, 0.4); font-weight: 600; text-align: center; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* "잠깐만요!" 새 친구 감사 인사 */
.live-thanks { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -160%); z-index: 40; max-width: min(640px, calc(100% - 24px)); padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, #ff5f8f, #7b61ff); color: #fff; font-weight: 700; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6); transition: transform .5s cubic-bezier(.2, 1.2, .4, 1); text-align: center; }
.live-thanks.show { transform: translate(-50%, 0); }

/* 생방송 뒤로 돌려 듣기: 진행 막대를 누르기 쉽게 */
.progress.seekable { position: relative; height: 14px; border-radius: 7px; cursor: pointer; touch-action: none; overflow: visible; }
.progress.seekable .bar { height: 100%; border-radius: 7px; }
.progress.seekable .bar-play { position: absolute; left: 0; top: 0; height: 100%; border-radius: 7px; background: rgba(255, 255, 255, 0.85); }
.progress.seekable .live-mark { display: none; }
.progress.seekable:focus-visible { outline: 2px solid var(--ok); outline-offset: 3px; }
@media (pointer: coarse) { .progress.seekable { height: 18px; border-radius: 9px; } }

/* 휴대폰: 재생 버튼이 첫 화면에 바로 보이게 (회장님 지적 2026-11-23 "재생이 맨 위에 있어야") */
@media (max-width: 760px) {
  .hero { position: relative; }
  .hero-grid { display: block; }
  .disc-wrap { position: absolute; top: 14px; right: 14px; width: 60px; height: 60px; margin: 0; }
  .disc { width: 56px; height: 56px; }
  .disc-wrap .ring { display: none; }
  .disc-label { width: 24px; height: 24px; }
  .disc-label b { font-size: 0.7rem; }
  .disc-label small { display: none; }
  .hero-info { display: flex; flex-direction: column; }
  .onair-head { order: 0; padding-right: 70px; }
  #nowTitle { order: 1; padding-right: 64px; }
  .hero-info .hosts { order: 2; }
  .hero-info .controls { order: 3; margin-top: 10px; }
  .hero-info .progress { order: 4; margin-top: 14px; }
  .hero-info .meta { order: 5; }
  .hero-info .vol { order: 6; }
  .hero-info .status { order: 7; }
  .hero-info .now-extra { order: 8; }
  .hero-info .eq { display: none; }
  .quick { margin-top: 14px; }
}

/* 플레이어 윗줄: 글자가 중간에 끊겨 줄바꿈되지 않게 (회장님 지적 2026-11-23 "1/7 엔터 DAYS 엔터 일째") */
.onair-head { flex-wrap: wrap; row-gap: 6px; }
.onair-head .label, .listen-count, .streak, .from-countries, .clock { white-space: nowrap; }
@media (max-width: 760px) {
  .onair-head { gap: 6px 8px; }
  .listen-count, .streak { font-size: 0.75rem; padding: 3px 8px; }
  .onair-head .label { font-size: 0.72rem; }
}

/* ───────── 디자인 개편 v2 (회장님 지적 2026-11-23 "너 같음 누르고 싶겠어?") ─────────
   원칙: ① 한가운데 하나로 모으기(그림 → 제목 → 진행 막대 → 큰 재생 버튼, 모두 가운데)
        ② 색으로 채널 구분(☀️ 공부 = 해 뜨는 주황·분홍, 🌙 수면 = 깊은 밤 파랑)
        ③ 위쪽 작은 정보는 줄이고 아래로  ④ 누르는 곳은 크게 */
body[data-channel="study"] { --grad: linear-gradient(135deg, #ff9a5a, #ff5f8f); --accent: #ffb070; }
body[data-channel="sleep"] { --grad: linear-gradient(135deg, #3d5afe, #7b61ff); --accent: #8fb0ff; }
body[data-channel="sleep"] .hero { background: linear-gradient(180deg, rgba(61, 90, 254, 0.16), rgba(23, 18, 51, 0.6)); border-color: rgba(143, 176, 255, 0.3); }
body[data-channel="study"] .hero { background: linear-gradient(180deg, rgba(255, 154, 90, 0.14), rgba(23, 18, 51, 0.6)); border-color: rgba(255, 176, 112, 0.3); }

.channels button { font-weight: 800; transition: background .25s, color .25s, transform .15s; }
.channels button[data-ch="study"].active { background: linear-gradient(135deg, #ff9a5a, #ff5f8f); color: #fff; box-shadow: 0 8px 22px -8px rgba(255, 122, 90, 0.7); }
.channels button[data-ch="sleep"].active { background: linear-gradient(135deg, #3d5afe, #7b61ff); color: #fff; box-shadow: 0 8px 22px -8px rgba(80, 100, 255, 0.7); }
.channels button.active .ko { color: rgba(255, 255, 255, 0.9); }
.channels button:active { transform: scale(0.98); }

/* 플레이어: 모두 가운데 */
.hero .hero-grid { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.hero .disc-wrap { position: relative; top: auto; right: auto; width: 132px; height: 132px; margin: 0 auto; }
.hero .disc { width: 120px; height: 120px; }
.hero .disc-wrap .ring { display: none; }
.hero .disc-label { width: 46px; height: 46px; }
.hero .disc-label b { font-size: 1.1rem; }
.hero .disc-label small { display: inline; }
.hero .hero-info { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 560px; margin: 0 auto; }
.hero .onair-head { order: 0; justify-content: center; padding-right: 0; }
.hero .onair-head .clock { margin-left: 0; font-size: 0.85rem; }
.hero #nowTitle { order: 1; padding-right: 0; font-size: 1.9rem; margin: 10px 0 2px; }
.hero .hosts { order: 2; }
.hero .eq { display: none; }
.hero .progress { order: 3; width: 100%; margin-top: 16px; }
.hero .meta { order: 4; font-size: 0.85rem; }
.hero .controls { order: 5; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; margin-top: 6px; }
.hero #btnLive { width: 100%; max-width: 340px; min-height: 64px; border-radius: 999px; font-size: 1.2rem; font-weight: 800; background: var(--grad); border: 0; color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7); }
.hero #btnLive.playing { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.hero .music-only { min-height: 44px; border-radius: 999px; font-size: 0.95rem; padding: 0 18px; background: rgba(255, 255, 255, 0.06); }
.hero .music-only.on { background: var(--accent); color: #1a1033; }
.hero .vol { order: 6; width: 100%; max-width: 340px; margin: 12px auto 0; }
.hero .status { order: 7; }
.hero .now-extra { order: 8; width: 100%; }
.hero .replay-banner { text-align: center; }
@media (max-width: 760px) {
  .hero .disc-wrap { width: 92px; height: 92px; }
  .hero .disc { width: 84px; height: 84px; }
  .hero .disc-label { width: 34px; height: 34px; }
  .hero .disc-label b { font-size: 0.85rem; }
  .hero .disc-label small { display: none; }
  .hero #nowTitle { font-size: 1.5rem; padding-right: 0; }
  .hero .onair-head { padding-right: 0; }
  .channels button { min-height: 52px; font-size: 0.98rem; }
}
.hero .controls > * { flex: 0 0 auto !important; }
.hero #btnLive { height: 64px; }

/* ───────── 디자인 개편 v3 (회장님 지적 2026-11-23 2차) ─────────
   글자 기준(타이포 스케일): 본문 16px·행간 1.55 / 작은 글 13px / 방송 제목 28px(휴대폰 24px)·행간 1.2·자간 -0.02em
   한국어는 단어 중간에서 줄이 끊기지 않게(keep-all) */
body { line-height: 1.55; letter-spacing: -0.005em; word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
.ko { font-size: 0.86em; letter-spacing: 0; }

/* 로고 가운데 */
.top { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.brand { flex-direction: column; align-items: center; gap: 8px; }
.brand h1 { font-size: 1.35rem; margin: 0; }
.brand .sub { margin: 2px 0 0; font-size: 0.82rem; }
.install-btn { margin-left: 0; }

/* 플레이어 윗줄: 동그라미(배지) 없이 한 줄로 나열 · 로 구분, 글자 크기 하나로 */
.hero .onair-head { gap: 0; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.hero .onair-head > * { display: inline-flex; align-items: center; }
.hero .onair-head > *:not([hidden]) ~ *:not([hidden])::before { content: '·'; margin: 0 8px; color: var(--muted); opacity: 0.7; }
.hero .onair-head .live-dot::before, .hero .onair-head .live-dot + .label::before { content: none !important; margin: 0 !important; }
.hero .onair-head .label { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--text); }
.hero .onair-head .label .ko { display: none; }
.hero .listen-count, .hero .streak { background: none; border: 0; padding: 0; font-size: 0.8rem; color: var(--muted); font-weight: 600; border-radius: 0; }
.hero .from-countries { letter-spacing: 1px; font-size: 0.8rem; }
.hero .live-dot { margin-right: 6px; }

/* 채널 표시: 플레이어 맨 위 큰 이름 + 버튼은 늘 자기 색 */
.ch-badge { order: -1; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; padding: 6px 14px; border-radius: 999px; margin-bottom: 10px; color: #fff; background: var(--grad); }
.ch-badge .ko { letter-spacing: 0; font-weight: 600; opacity: 0.9; margin-left: 4px; }
.channels button[data-ch="study"]:not(.active) { background: rgba(255, 154, 90, 0.10); border: 1px solid rgba(255, 176, 112, 0.35); color: #ffd2b0; }
.channels button[data-ch="sleep"]:not(.active) { background: rgba(61, 90, 254, 0.12); border: 1px solid rgba(143, 176, 255, 0.35); color: #cdd8ff; }
.channels button.active { transform: scale(1.02); }

/* 소리 막대: 가운데, 실제 소리에 맞춰 (분석기가 키를 정함 — 흔들리는 가짜 움직임은 끔) */
.hero .eq { display: flex !important; order: 2; justify-content: center; align-items: flex-end; gap: 4px; height: 34px; margin: 10px auto 0; width: 100%; max-width: 260px; }
.hero .eq i { flex: 1; height: 8%; border-radius: 3px; background: var(--grad); transition: height .08s linear; }
body.live-eq .hero .eq i, body.live-eq .mini-eq i { animation: none !important; }
.hero .hosts { order: 2; }
.hero .eq { order: 3; }
.hero .progress { order: 4; }
.hero .meta { order: 5; }
.hero .controls { order: 6; }
.hero .vol { order: 7; }
.hero .status { order: 8; }
.hero .now-extra { order: 9; }

/* 누르자마자 "시작하는 중" */
#btnLive.loading { opacity: 0.85; animation: pulseStart 1s ease-in-out infinite; }
@keyframes pulseStart { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
body.starting::after { content: '⏳ Starting… 시작하는 중'; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 16px 24px; border-radius: 16px; background: rgba(10, 8, 30, 0.88); color: #fff; font-weight: 800; z-index: 60; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #btnLive.loading { animation: none; } }

/* 밤(밤 8시~아침 6시·수면 채널): 검은 화면, 눈부신 것 줄이기 */
body.night { background: #050508; }
body.night .bg .blob, body.night .bg .grain, body.night .hangul { opacity: 0.12; }
body.night .card { background: rgba(255, 255, 255, 0.035); border-color: rgba(255, 255, 255, 0.07); }
body.night .ticker { opacity: 0.45; }
body.night .hero { box-shadow: none; }

@media (max-width: 760px) {
  .hero #nowTitle { font-size: 1.5rem; }
  .brand h1 { font-size: 1.2rem; }
  .hero .onair-head { font-size: 0.75rem; }
}

/* 화면 고르기 버튼 (자동 / 어둡게 / 컬러) */
.theme-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); }
.top .theme-btn, .top .ai-badge, .top .install-btn { margin: 0 4px; }

/* ───────── 디자인 v4: 글자 또렷하게·줄 맞추기 (회장님 2026-11-23 밤) ─────────
   흐린 글 없애기: 회색 글도 배경 위에서 충분히 진하게(명암비 4.5 이상) */
:root { --muted: #cdc8ea; }
.ch-badge .ko, button.primary .ko, button.active .ko, .channels button.active .ko { color: #fff !important; opacity: 1 !important; }
body.night .ticker { opacity: 0.75; }

/* 지금 방송 중 줄: 가운데 한 줄, 각 칸은 안에서 줄바꿈 안 함 */
.hero .onair-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 4px; text-align: center; width: 100%; }
.hero .onair-head > * { white-space: nowrap; }

/* 남은 시간 / 다음 방송: 두 줄로 */
.hero .meta { text-align: center; line-height: 1.6; }
.hero .meta > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .meta > span:empty { display: none; }

/* 편성표: 누르면 그 시간 방송으로 */
.schedule tr[data-start] { cursor: pointer; }
.schedule tr[data-start]:hover td, .schedule tr[data-start]:focus-visible td { background: rgba(255, 255, 255, 0.09); }
.schedule tr[data-start] td:last-child::after { content: '▶'; float: right; color: var(--muted); font-size: 0.8em; margin-left: 8px; }
.schedule tr.onair td:last-child::after { color: #fff; }

/* 버튼·칩 안 글자는 한 줄 (영어·한국어 사이에서 끊기지 않게) */
button, .chip, .quick a, .rerun, .ch-badge { white-space: nowrap; }
button .ko, h3 .ko, .ch-badge .ko, .quick .ko { white-space: nowrap; }
/* 위쪽 작은 버튼들(Hosted by AI·화면 고르기·앱 설치)은 한 줄로 */
.top-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.top-row > * { margin: 0 !important; }

/* 점검에서 찾은 것들 (2026-11-23 밤) */
/* 1) 채팅 닉네임 칸이 좁아 이름이 잘림 */
.chat-form { grid-template-columns: 190px 1fr auto; }
/* 2) 오늘의 단어: 한국어 / 읽는 법 / 영어 뜻을 줄마다 하나씩 (읽는 법이 중간에서 끊기지 않게) */
.vocab .r { display: block; margin-left: 0; font-size: 0.9rem; margin-top: 2px; }
/* 3) 코너·단어 두 칸: 짧은 칸이 길게 늘어나 빈 공간 생기지 않게, 긴 단어 목록은 칸 안에서 스크롤 */
.grid { align-items: start; }
.grid ul.vocab { max-height: 560px; overflow-y: auto; padding-right: 4px; }
/* 4) 너무 작은 안내 글자 → 최소 13px */
.note, .letter-form .note, .send-row .count, footer, footer .small, footer small { font-size: 0.8rem; }
#newsBox .note { opacity: 1; }
/* 5) 다시 듣기 고르기: "Date 날짜" 한 줄 */
.filters label { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.filters label select { flex: 1 0 100%; }
/* 6) 채널 버튼은 칸 안에서 줄바꿈 허용 (삐져나가지 않게) */
.channels button { white-space: normal; min-width: 0; }
/* 7) 수면 타이머 4개 한 줄 */
.sleep-btns { display: flex; flex-wrap: nowrap; gap: 8px; }
.sleep-btns button { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
/* 8) 초대 버튼 두 개 같은 크기 */
.invite-row button { flex: 1 1 0; justify-content: center; }
@media (max-width: 760px) {
  /* 채팅: 닉네임 한 줄 전체, 아래에 입력+보내기 */
  .chat-form { grid-template-columns: minmax(0, 1fr) auto; }
  .chat-form #chatNick { grid-column: 1 / -1; }
  .chat-form input { min-width: 0; }
  /* 바로 가기 3개 한 줄 */
  .quick { flex-wrap: nowrap; gap: 6px; margin: 8px 0 0; }
  .quick a { padding: 8px 10px; font-size: 0.82rem; }
  .invite-row input { flex-basis: 100%; }
  .sleep-btns button { font-size: 0.85rem; }
}
/* 9) 채팅 제목 옆 채널 이름: 작은 꼬리표로 */
.chat-ch { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); vertical-align: middle; white-space: nowrap; }
/* 10) 목록 안 한국어 이름은 중간에서 끊기지 않게 */
#chapters .ko, .schedule .ko, .apps .ko, .replay-list .ko, h3 .ko { white-space: nowrap; }
/* 11) 사연 동의 체크: 체크 상자 + 글 한 덩어리 (두 칸으로 갈라지지 않게) */
.consent { display: grid !important; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.consent .ko { display: inline; white-space: normal; }
/* 12) 휴대폰 편성표: 시간은 위에 작게, 프로그램 이름은 아래 한 줄 (좁은 칸에서 3줄로 끊기지 않게) */
@media (max-width: 760px) {
  .schedule, .schedule tbody { display: block; }
  .schedule tr { display: block; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.03); }
  .schedule tr.onair { background: linear-gradient(90deg, rgba(255, 95, 143, 0.22), rgba(123, 97, 255, 0.12)); }
  .schedule td { display: block; background: none !important; border-radius: 0 !important; width: auto !important; }
  .schedule td.time { padding: 10px 14px 0; font-size: 0.8rem; }
  .schedule td:last-child { padding: 2px 14px 10px; }
}
/* 편성표 ▶ 표시: 줄 오른쪽 가운데 */
.schedule tr[data-start] td:last-child { position: relative; padding-right: 34px; }
.schedule tr[data-start] td:last-child::after { float: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; }
@media (max-width: 760px) {
  .schedule tr[data-start] { position: relative; }
  .schedule tr[data-start] td:last-child { position: static; }
}
@media (max-width: 760px) {
  .channels button { padding: 12px 6px; font-size: 0.95rem; letter-spacing: -0.01em; }
  .channels button .ko { font-size: 0.8rem; }
}
@media (max-width: 360px) { .channels button { font-size: 0.88rem; } }

/* ON AIR NOW 는 혼자 한 줄 가운데, 듣는 사람·국기·연속일·시각은 그 아래 한 줄 (회장님 2026-11-23) */
.hero .onair-head { justify-content: center; font-size: 0.85rem; }
.hero .onair-sub { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 4px; margin-top: 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; width: 100%; }
.hero .onair-sub > * { white-space: nowrap; display: inline-flex; align-items: center; }
.hero .onair-sub > *:not([hidden]) ~ *:not([hidden])::before { content: '·'; margin: 0 8px; opacity: 0.7; }
.hero .onair-sub .listen-count, .hero .onair-sub .streak { background: none; border: 0; padding: 0; font-size: 0.78rem; color: var(--muted); font-weight: 600; border-radius: 0; }
.hero .onair-sub .clock { margin-left: 0; font-size: 0.78rem; }
.hero .onair-sub .from-countries { letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
/* 아랫줄은 점(·) 대신 띄어쓰기로 구분 → 줄이 바뀌어도 '·'로 시작하지 않음 */
.hero .onair-sub { column-gap: 16px; }
.hero .onair-sub > *::before { content: none !important; margin: 0 !important; }
@media (max-width: 400px) {
  .quick { gap: 4px; }
  .quick a { padding: 6px 8px; font-size: 0.76rem; gap: 4px; }
}
.hero .onair-sub > [hidden], .hero .onair-head > [hidden] { display: none !important; }
/* 코너·편성표 누르면 잠깐 뜨는 안내 */
#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: rgba(15, 12, 35, 0.94); color: #fff; font-weight: 700; font-size: 0.9rem; text-align: center; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.7); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 70; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast { width: max-content; }

/* 오늘의 퀴즈 + 채팅 게임 */
.quiz { text-align: center; border: 1px solid rgba(255, 196, 92, 0.35); background: linear-gradient(160deg, rgba(255, 176, 72, 0.10), rgba(255, 95, 143, 0.06)); }
.quiz h3 { justify-content: center; }
.quiz-q { font-size: 1.15rem; font-weight: 800; line-height: 1.45; margin: 6px 0 14px; }
.quiz-form { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.quiz-form[hidden] { display: none; }
.quiz-form input { flex: 1 1 auto; min-width: 0; min-height: 48px; font-size: 1rem; }
.quiz-form button { flex: none; min-height: 48px; padding: 0 20px; }
.quiz-msg { min-height: 1.2em; margin: 10px 0 0; font-weight: 700; }
.quiz-msg.ok { color: var(--ok); }
.quiz-msg.no { color: #ffb4c6; }
.quiz-note { color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; }
.quiz-board { margin: 14px auto 0; max-width: 360px; text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.quiz-board b { display: block; text-align: center; margin-bottom: 6px; }
.quiz-board ol { margin: 0; padding-left: 22px; }
.quiz-board li { display: list-item; padding: 2px 0; }
.quiz-board li span:first-child { font-weight: 700; }
.quiz-board li .n { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-board b .ko { white-space: nowrap; display: inline-block; }

/* 화면 언어 하나만 (lang.js): 영어 화면 = 한국어 안내 숨김, 한국어 화면 = 영어 안내 숨김 */
body.lang-en .ko { display: none !important; }
body.lang-ko .en { display: none !important; }
body.lang-ko .ko { color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; margin-left: 0; opacity: 1; }
body.lang-ko .channels button .ko { display: inline; }
body.lang-ko .hero .onair-head .label .ko { display: inline; }
body.lang-ko .onair h2 .ko { display: inline; font-size: inherit; margin: 0; }
body.lang-ko .chat-ch { font-size: 0.75rem; }

/* 오늘의 단어 쓰기 연습 */
.wp { margin: 4px 0 12px; text-align: center; }
.wp-start { width: 100%; min-height: 48px; }
.wp-box { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.wp-prog { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wp-en { margin: 6px 0 12px; font-size: 1.15rem; font-weight: 800; line-height: 1.4; }
.wp-form { display: flex; gap: 8px; }
.wp-form input { flex: 1 1 auto; min-width: 0; min-height: 48px; font-size: 1.05rem; }
.wp-form button { flex: none; min-height: 48px; padding: 0 18px; }
.wp-msg { min-height: 1.3em; margin: 10px 0 0; font-weight: 700; }
.wp-msg.ok { color: var(--ok); }
.wp-msg.no { color: #ffb4c6; }
.wp-ans { font-size: 1.2rem; color: #fff; margin: 0 4px; }
.wp-rom { color: var(--cyan); font-style: italic; font-weight: 500; }
.wp-next { margin-top: 10px; min-height: 44px; padding: 0 22px; }
.wp-note { color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; }
.wp[hidden], .wp-box[hidden], .wp-next[hidden], .wp-start[hidden], ul.vocab[hidden] { display: none !important; }

/* 내 닉네임이 방송에 나올 시각 */
.shout-banner { margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; text-align: center; font-weight: 700; line-height: 1.5; color: #fff; background: linear-gradient(135deg, rgba(255, 176, 72, 0.35), rgba(255, 95, 143, 0.35)); border: 1px solid rgba(255, 196, 92, 0.5); }
.shout-banner[hidden] { display: none; }

/* 채팅 신고·숨기기 */
.chat-list li { position: relative; }
.msg-more { margin-left: auto; min-height: 28px; min-width: 32px; padding: 0 8px; border-radius: 8px; background: transparent; border: 0; color: var(--muted); font-size: 1rem; line-height: 1; opacity: 0.7; }
.msg-more:hover, .msg-more:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.msg-menu { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; font-size: 0.82rem; color: var(--muted); }
.msg-menu button { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 0.82rem; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); }
.chat-list li.reported { opacity: 0.45; }

/* 잠잘 때 소리 (장면 소리) */
.ambient { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ambient .label { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.ambient-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ambient-btns button { min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); }
.ambient-btns button.on { background: linear-gradient(135deg, #3d5afe, #7b61ff); border-color: transparent; color: #fff; }
.ambient-vol { display: flex; align-items: center; gap: 8px; max-width: 360px; }
.ambient-vol input { flex: 1; accent-color: #8fb0ff; }
.ambient .label { align-self: flex-start; }
