/* 밤바다 위에 방송이 켜진 나라가 호박색으로 빛난다 — 색은 채널 수를 뜻한다 */
:root {
  --sea: #0f2135; --land: #1f3854; --edge: #2d4a6b; --panel: #12283f;
  --s1: #7d6230; --s2: #c9902f; --s3: #ffc94d;
  --ink: #f3efe6; --mute: #93a4b8; --on: #ff5a4f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; background: var(--sea); color: var(--ink);
  font: 500 15px/1.5 "Pretendard Variable", Pretendard, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--s3); outline-offset: 2px; }

#stage { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 45%, #1b3654 0%, var(--sea) 62%, #09131f 100%); }
#map { position: absolute; inset: 0; }
/* 가까이 당기면 글자 밑으로 땅이 들어온다 — 위쪽에 바다색을 깔아 읽히게 한다 */
#stage::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 130px; background: linear-gradient(var(--sea) 20%, transparent); pointer-events: none; }
#brand { position: absolute; z-index: 2; top: 22px; left: 26px; pointer-events: none; }
#brand h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
#brand p { margin: 2px 0 0; color: var(--mute); font-size: 14px; }
#legend { position: absolute; z-index: 2; left: 26px; bottom: 20px; margin: 0; padding: 6px 12px; border-radius: 8px; background: var(--panel); display: flex; gap: 14px; font-size: 12px; color: var(--ink); }
#legend div { display: flex; align-items: center; gap: 6px; }
#legend dt { width: 12px; height: 12px; border-radius: 3px; }
#legend dd { margin: 0; }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); }
#tip { position: absolute; z-index: 3; pointer-events: none; padding: 4px 9px; border-radius: 6px; background: var(--ink); color: var(--sea); font-size: 13px; font-weight: 700; white-space: nowrap; transform: translate(12px, 12px); }
.dot { width: 14px; height: 14px; padding: 0; border: 2px solid var(--sea); border-radius: 50%; background: var(--s2); cursor: pointer; }
.dot.on { background: var(--ink); }
.dot::after { content: ""; position: absolute; inset: -9px; }  /* 누르는 칸 32px */
.dot.maplibregl-marker-covered, body.playing #map { visibility: hidden; }  /* 안 보이는 것은 Tab 도 지나가지 않는다 */

#screen { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; background: #000; }
#screen[hidden] { display: none; }
#frame { position: relative; flex: 1; min-height: 0; background: #000; }
#v { display: block; width: 100%; height: 100%; background: #000; }
#v[hidden], #yt[hidden] { display: none; }
#grab { display: none; }
#yt, #yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* 자막은 직접 그린다 — 브라우저마다 모양이 다르지 않게 · 원문과 번역을 함께 보이게 */
#cc { position: absolute; left: 5%; right: 5%; bottom: 5%; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; text-align: center; font-size: clamp(16px, 2.3vw, 30px); font-weight: 700; line-height: 1.35; }
#cc span { padding: 2px 10px; border-radius: 6px; background: rgba(0, 0, 0, .74); color: #fff; }
#cc .src { font-size: .72em; font-weight: 500; color: #d7dde5; }
#cc .info { font-size: 15px; font-weight: 500; background: rgba(15, 33, 53, .9); color: var(--ink); }
#wait { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 10px 18px; border-radius: 10px; background: rgba(15, 33, 53, .88); font-weight: 700; text-align: center; width: max-content; max-width: 90%; }
#wait[hidden], #wait-acts[hidden], #toast[hidden] { display: none; }
#wait-msg { margin: 0; }
#wait-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
#wait-acts button { min-height: 40px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; font-weight: 500; cursor: pointer; }
#wait-acts #wait-retry { border-color: var(--s3); color: var(--s3); font-weight: 700; }
/* 잠깐 뜨는 알림 — 공유 결과 · 자막 안내. 화면 위쪽(자막은 아래쪽) */
#toast { position: absolute; z-index: 1; left: 50%; top: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 120px); margin: 0; padding: 8px 14px; border-radius: 10px; background: rgba(15, 33, 53, .92); font-size: 14px; text-align: center; }
#toast input { display: block; width: min(100%, 320px); margin: 6px auto 0; padding: 6px 8px; border: 1px solid var(--edge); border-radius: 6px; background: var(--sea); font-size: 16px; }
#ctl { display: flex; align-items: center; gap: 12px; }  /* 소리·공유·작게·전체 화면 — 좁은 화면에서 줄이 바뀌어도 한 덩어리로 */
#sound { display: flex; align-items: center; gap: 8px; }
#vol { width: 90px; accent-color: var(--s3); }
#close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 33, 53, .8); cursor: pointer; }
#mute, #full, #dual, #grow, #share { min-height: 36px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; }
#mute[aria-pressed=true] { border-color: var(--ink); }  /* 소리 없이 시작한다 — 테두리만 밝게(채우면 「켜짐」으로 읽힌다 · 2026-11-10) */
#dual[aria-pressed=true] { border-color: var(--s3); color: var(--s3); }
#dual[hidden], #bar #grow { display: none; }

/* 작은 화면 — 방송을 켜 둔 채 지구본과 목록을 본다. 자막은 끈다(작아서 안 읽히고 AI 용량만 쓴다) */
body.mini #screen { inset: auto 20px 20px auto; width: min(340px, 46%); border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
body.mini #frame { flex: none; aspect-ratio: 16 / 9; cursor: pointer; }
body.mini #cc, body.mini #note, body.mini #toast, body.mini #wait-acts, body.mini #tracks, body.mini #dual, body.mini #full, body.mini #back, body.mini #share { display: none; }
body.mini #bar #grow { display: inline-grid; }
body.mini #bar { padding: 8px 10px; gap: 6px; flex-wrap: nowrap; }
body.mini #vol { width: 64px; }
body.mini #state { min-width: 0; }
body.mini #close { top: 6px; right: 6px; width: 30px; height: 30px; }
body.mini #legend { display: none; }
#screen:fullscreen #back, #screen:fullscreen #share { display: none; }
/* 전체 화면 — 영상이 화면 전부, 조작 줄은 그 위에 얹히고 3초 뒤 숨는다(tv.js · 2026-11-08 사용자). 누르거나 마우스를 움직이면 다시 나온다 */
#screen:fullscreen #frame { flex: 1; aspect-ratio: auto; }
#screen:fullscreen #bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: linear-gradient(transparent, rgba(9, 19, 31, .88) 45%); transition: opacity .25s; }
#screen:fullscreen #close { transition: opacity .25s; }
#screen:fullscreen.idle #bar, #screen:fullscreen.idle #close { opacity: 0; pointer-events: none; }
#screen:fullscreen.idle { cursor: none; }
#screen:fullscreen:not(.idle) #cc { bottom: calc(var(--bar-h, 60px) + 12px); }
#v::cue { font: 600 1em/1.4 "Pretendard Variable", sans-serif; background: rgba(0, 0, 0, .72); }
#bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: var(--panel); }
#state { flex: 1; min-width: 8em; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--on); vertical-align: 1px; }
#back { min-height: 36px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; }
/* 그림 버튼 — 네모 한 칸. 켜짐·꺼짐 두 그림은 aria-pressed 로 바꾼다 */
#bar .ic { display: inline-grid; place-items: center; width: 40px; min-height: 36px; padding: 0; }
.ic .a, .ic .b { display: none; line-height: 0; }
.ic[aria-pressed=false] .a, .ic[aria-pressed=true] .b { display: block; }
/* 자막 — 스위치 하나(켜지면 채운다)와 언어 띠(셋 중 하나 · 꺼져 있어도 고른 언어를 흐리게 보인다). 2026-11-12 사용자 「on/off 와 선택이 헷갈린다」
   — 예전엔 같은 모양 단추 다섯이 한 줄이었다 */
#subs, #tracks { display: flex; align-items: center; gap: 8px; }
#tracks .sw { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; font-weight: 700; cursor: pointer; }
#tracks .sw.go { border-color: var(--s3); color: var(--s3); }  /* 꺼져 있을 때 — 누를 곳 */
#tracks .sw[aria-pressed=true] { background: var(--s3); border-color: var(--s3); color: var(--sea); }
.seg { display: flex; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-left: 1px solid var(--edge); background: transparent; color: var(--mute); cursor: pointer; }
.seg button:first-child { border-left: 0; }
.seg button:focus-visible { outline-offset: -2px; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--sea); font-weight: 700; }
.seg.off button[aria-pressed=true] { background: rgba(255, 255, 255, .1); color: var(--ink); }
#dual:disabled { opacity: .4; cursor: default; }
#note { margin: 0; padding: 0 14px 10px; background: var(--panel); color: var(--mute); font-size: 12px; }

#panel { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--edge); }
#grip { display: none; }
/* 공지 띠 — 누르면 내용이 펼쳐진다 · × 로 닫으면 이 기기에는 다시 안 뜬다(다시 알리기 전까지) */
/* 라디오 재생 줄(2026-11-19) — 지도 아래쪽에 떠 있다(좁은 화면은 판 바로 위 · 작은 창처럼) */
#rbar { position: absolute; z-index: 5; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 12px; background: var(--panel); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
#rbar[hidden] { display: none; }
#rbar .ic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; }
#rbar #r-play { border-color: var(--s3); color: var(--s3); }
#r-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
#r-name, #r-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#r-meta { color: var(--mute); font-size: 13px; }
#r-vol { flex: none; width: 90px; accent-color: var(--s3); }
body.radio-on #legend { bottom: 86px; }
#list .th.r { color: var(--s3); }
#notice { display: grid; grid-template-columns: 1fr auto; background: var(--s2); color: var(--sea); }
#notice[hidden] { display: none; }
#notice.important { background: var(--on); color: #fff; }
#notice button { border: 0; background: transparent; color: inherit; font-weight: 700; cursor: pointer; }
#notice-open { padding: 10px 16px; text-align: left; } #notice-x { width: 44px; font-size: 18px; }
#notice-body { grid-column: 1 / -1; margin: 0; padding: 0 16px 12px; white-space: pre-wrap; font-size: 14px; }
#notice-body[hidden] { display: none; }
#foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; padding: 8px 20px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--edge); font-size: 13px; }
#dwy { margin-left: auto; line-height: 0; opacity: .85; } #dwy img { width: 96px; height: auto; }
#foot nav { flex: 1 1 100%; margin-top: 2px; font-size: 12px; line-height: 1.9; color: var(--mute); } #foot .ft { white-space: nowrap; }
#foot a { color: var(--mute); text-decoration: none; } #foot a:hover { color: var(--ink); } #foot b[aria-current] { color: var(--ink); font-weight: inherit; }
#foot button { padding: 4px 0; border: 0; background: transparent; color: var(--mute); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#fb { width: min(440px, 92vw); padding: 20px; border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); color: var(--ink); }
#fb::backdrop { background: rgba(5, 12, 20, .6); }
#fb h2 { margin: 0 0 12px; font-size: 20px; }
#fb label { display: block; margin: 10px 0; font-size: 13px; color: var(--mute); }
#fb select, #fb textarea, #fb input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--sea); font-size: 15px; }
#fb textarea { min-height: 110px; resize: vertical; }
#fb-ch { margin: 0; font-size: 14px; } #fb-ch[hidden] { display: none; }
#fb-msg { min-height: 1.5em; margin: 6px 0; font-size: 14px; color: var(--s3); }
#fb .acts { display: flex; justify-content: flex-end; gap: 8px; }
#fb .acts button { min-height: 38px; padding: 0 16px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; }
#fb-send { background: var(--s3) !important; border-color: var(--s3) !important; color: var(--sea); font-weight: 700; }
/* 머리줄 두 줄(2026-11-19 라디오 2단계) — 첫 줄: TV|라디오 · 언어 · 주사위 / 둘째 줄: ← 나라 이름(이름이 머리줄 폭을 다 쓴다) */
#head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 8px; padding: 16px 20px 12px; }
#where { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; } #where > div { min-width: 0; }
#modes { justify-self: start; display: flex; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; }
#modes button { min-height: 36px; padding: 0 16px; border: 0; border-left: 1px solid var(--edge); background: transparent; color: var(--mute); font-weight: 700; cursor: pointer; }
#modes button:first-child { border-left: 0; }
#modes button[aria-pressed=true] { background: var(--ink); color: var(--sea); }
#modes button:focus-visible { outline-offset: -2px; }
#head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }  /* 긴 나라 이름이 두 줄이 될 때 한 글자만 떨어지지 않게 */
#sub { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 2px 0 0; color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; min-height: 1.5em; } #sub span { white-space: nowrap; }
#world { width: 40px; height: 40px; flex: none; border: 1px solid var(--edge); border-radius: 8px; background: transparent; font-size: 18px; cursor: pointer; }
#lucky { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; }
/* 언어 고르기 — 그림 단추 모양 위에 투명한 select(2026-11-17 hub 요청 0048). 글자 16px: 아이폰이 고를 때 화면을 키우지 않게 */
#lang { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--edge); border-radius: 8px; }
#lang select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; }
#lang:focus-within { outline: 2px solid var(--s3); outline-offset: 2px; }
#world[hidden] { display: none; }
#find { margin: 0 20px 10px; height: 42px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 8px; background: var(--sea); }
#find::placeholder { color: var(--mute); }
#list { flex: 1; min-height: 0; margin: 0; padding: 0 12px 12px; list-style: none; overflow-y: auto; }
#list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
#list button:hover { background: rgba(255, 255, 255, .06); }
#list button[aria-current=true] { background: rgba(255, 201, 77, .14); }
#list button[aria-current=true] .name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--on); }
#list .th { flex: none; display: grid; place-items: center; width: 64px; height: 36px; border-radius: 5px; overflow: hidden; background: var(--sea); color: var(--mute); font-weight: 700; }
#list .th img { width: 100%; height: 100%; object-fit: cover; }
#list .flag { flex: none; width: 1.6em; font-size: 18px; text-align: center; }
#list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list .n { flex: none; color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; }
#list .cc { flex: none; padding: 1px 7px; border: 1px solid var(--s2); border-radius: 5px; color: var(--s3); font-size: 12px; }
#list .empty { padding: 18px 8px; color: var(--mute); }
#list .ch { display: flex; align-items: center; } #list .ch > button:first-child { flex: 1; min-width: 0; }
#list .star { flex: none; justify-content: center; width: 40px; padding: 0; color: var(--mute); opacity: .5; }
#list .star:hover, #list .star[aria-pressed=true] { opacity: 1; } #list .star[aria-pressed=true] { color: var(--s3); } #list .star[aria-pressed=true] path { fill: currentColor; }
#list .now { flex: none; display: inline-flex; align-items: center; gap: 3px; color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
#list .group { padding: 16px 8px 6px; color: var(--mute); font-size: 13px; font-weight: 700; }
/* 채널 종류 — 자막 지원 · 일반 · YouTube. 누르면 그 종류만 보인다 */
#kinds { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 20px 8px; }
#kinds[hidden] { display: none; }
#kinds button { min-height: 32px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 999px; background: transparent; font-size: 13px; cursor: pointer; }
#kinds button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--sea); font-weight: 700; }

@media (max-width: 899px) {
  body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }  /* 지도가 화면 전부 — 목록은 그 위의 판(아래) */
  body.playing { grid-template-rows: auto minmax(0, 1fr); }
  body.playing #stage { aspect-ratio: auto; }
  body.playing #screen { position: relative; }
  body.playing #frame { flex: none; aspect-ratio: 16 / 9; }
  #vol { display: none; }  /* 휴대폰은 기기 버튼으로 소리를 조절한다 */
  /* 누르는 칸 44px(2026-11-10 UI 검토 — 36~40px 이었다). 보이는 크기를 못 키우는 것은 ::after 로 칸만 넓힌다 */
  #bar .ic, #tracks .sw, #dual { min-height: 44px; } #bar .ic { width: 44px; } .seg button { min-height: 42px; padding: 0 8px; } #tracks .sw { padding: 0 8px; } #dual { padding: 0 8px; } #subs, #tracks { gap: 6px; }  /* 자막 줄이 한 줄에 — 일본어(「日本語」)·영어(「Subtitles」·「+ Original」) 화면은 글자가 넓어 375 폭에서 「+ 원문」이 다음 줄로 넘어갔다(2026-11-17) */
  #close { width: 44px; height: 44px; } #world, #lucky, #lang { width: 44px; height: 44px; } #modes button { min-height: 44px; }
  #rbar { left: 10px; right: 10px; bottom: calc(var(--sheet-h, 50dvh) + 10px); gap: 8px; } #rbar .ic { width: 44px; height: 44px; } #r-vol { display: none; }
  body.mini #mute { position: relative; }  /* #close 는 이미 absolute — relative 로 덮으면 영상 밖으로 밀려 사라진다(2026-11-10 회귀) */
  body.mini #mute::after, body.mini #close::after { content: ""; position: absolute; inset: -8px; }
  #foot button { padding: 12px 0; }
  /* 작게 보기 — here 처럼 지도 위 작은 창만(2026-11-07 사용자 「지도가 거의 다 가려져」 — 이름·크게 보기 줄까지 있어 지도의 절반을 덮었다):
     화면을 누르면 커진다 · 소리 단추와 끄기는 화면 위에 작게 */
  body.mini #screen { inset: auto 10px calc(var(--sheet-h, 50dvh) + 10px) auto; width: 168px; border-radius: 10px; }  /* 판 바로 위 */
  body.mini #bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; gap: 6px; border: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); pointer-events: none; }
  body.mini #bar #grow { display: none; } body.mini #ctl { order: -1; pointer-events: auto; }
  body.mini #state { font-size: 11px; font-weight: 600; color: #fff; } body.mini #state::before { display: none; }  /* 무슨 채널인지는 작은 창에도 */
  body.mini #mute { width: 28px; height: 28px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 33, 53, .8); color: var(--ink); }
  body.mini #mute svg { width: 16px; height: 16px; }
  body.mini #close { top: 5px; right: 5px; width: 28px; height: 28px; } body.mini #close svg { width: 16px; height: 16px; }
  body.mini #wait { padding: 4px 8px; font-size: 11px; }
  body.mini #yt { pointer-events: none; }  /* YouTube 화면도 누르면 커지게 — 안 그러면 누름이 퍼가기 플레이어로 간다 */
  /* 좁은 화면: 단추는 늘 첫 줄 오른쪽 그 자리(채널마다 자리가 바뀌면 안 된다 — 2026-11-07 사용자 「버튼이 밀려 다음 줄로 넘어가는데 괜찮을까」).
     이름은 남는 폭에서 두 줄까지 접힌다(한 줄로 자르면 「🇭🇳 RSV Hond…」가 돼 무슨 채널인지 알 수 없었다) · 그 아래 줄에 자막 */
  body.playing #bar { flex-wrap: wrap; } body.playing #ctl { order: 1; gap: 8px; }
  body.playing #state { flex: 1 1 0; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.3; }
  body.playing #subs { order: 2; flex-basis: 100%; flex-wrap: wrap; }
  body.playing #map, body.playing #brand, body.playing #legend { display: none; }
  /* 전체 화면 — 화면을 가로로 돌리고(tv.js) 영상이 남는 자리를 다 쓴다(2026-11-07 사용자 — 세로인 채 16:9 칸만 차지하고 아래가 검게 비었다).
     가로에서는 조작 줄을 한 줄로 */
  body.playing #screen:fullscreen #frame { flex: 1; aspect-ratio: auto; }
  /* 영상 끌기(tv.js) — 위로 전체 화면 · 아래로 작게. 놓으면 부드럽게 제자리로, 전체 화면은 살짝 커지며 들어온다 */
  body.playing #frame { touch-action: none; transition: transform .18s ease; }
  body.playing #grab:not([hidden]) { display: block; position: absolute; inset: 22% 0; touch-action: none; }  /* YouTube 화면 가운데 띠 — 끌기를 받는다 */
  @media (prefers-reduced-motion: no-preference) { #screen:fullscreen { animation: fs-in .24s ease; } }
  #screen:fullscreen #note { display: none; }
  @media (orientation: landscape) {
    #screen:fullscreen #bar { flex-wrap: nowrap; padding: 6px 14px; }
    body.playing #screen:fullscreen #subs { order: 0; flex-basis: auto; flex-wrap: nowrap; }
    body.playing #screen:fullscreen #state { font-size: inherit; }
  }
  #panel { border-left: 0; border-top: 1px solid var(--edge); }
  #brand { top: 14px; left: 16px; } #brand h1 { font-size: 21px; } #brand p { font-size: 13px; }
  #legend { left: 16px; bottom: calc(var(--sheet-h, 50dvh) + 10px); gap: 10px; } body:has(#panel[data-sheet="full"]) #legend { display: none; }
  #head { padding: 14px 16px 10px; } #find { margin: 0 16px 8px; } #kinds { margin: 0 16px 4px; padding: 0 0 4px; } #kinds button { min-height: 40px; } #list { padding: 0 8px 8px; }
  /* 아래 판 — here 처럼 세 높이(2026-11-07 사용자 「히어처럼 리스트가 바닥까지 갔다 커졌다 하면」 · 「알아서」): 바닥(이름 한 줄) · 중간 · 전체.
     손잡이·이름 줄을 끌거나 누른다(tv.js). 크게 보는 동안(body.playing)은 판이 아니다 — 위에 영상, 아래에 목록 그대로.
     (2026-11-06 「리스트가 너무 적게 보여」 때는 지도를 26vh 로 줄였다 — 이것으로 바꿨다)
     판 안은 통째로 구른다: 종류 칩은 한 줄로 밀어 보고 · 꼬리말은 목록 끝 · 손잡이와 이름 줄만 붙어 있다 */
  body:not(.playing) #panel { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; height: 50dvh; border-top: 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); transition: height .2s ease; overscroll-behavior: contain; }
  body:not(.playing) #panel[data-sheet="peek"] { height: auto; }
  body:not(.playing) #panel[data-sheet="full"] { height: calc(100dvh - 56px); }
  body.mini #panel[data-sheet="full"] { height: calc(100dvh - 170px); }  /* 작은 창이 설 자리를 남긴다 */
  body.radio-on #panel[data-sheet="full"] { height: calc(100dvh - 140px); }  /* 라디오 재생 줄이 설 자리 */
  body.radio-on #legend { bottom: calc(var(--sheet-h, 50dvh) + 84px); }
  body:not(.playing) #panel[data-sheet="peek"] > :not(#grip, #head) { display: none; }
  body:not(.playing) #panel[data-sheet="peek"] #head { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  body:not(.playing) #panel.dragging { overflow: hidden; transition: none; }
  body:not(.playing) #grip { position: sticky; top: 0; z-index: 2; display: grid; place-items: center; width: 100%; min-height: 30px; padding: 0; border: 0; border-radius: 16px 16px 0 0;
    background: var(--panel); touch-action: none; cursor: grab; }  /* 누르는 칸 30px 이상 */
  #grip::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--edge); }
  body:not(.playing) #head { top: 30px; padding-top: 2px; touch-action: none; }
  #panel { overflow-y: auto; } #panel > * { flex-shrink: 0; } #list { flex: none; overflow: visible; }
  #head { position: sticky; top: 0; z-index: 1; padding: 10px 16px 8px; background: var(--panel); }
  #kinds { flex-wrap: nowrap; flex: none; overflow-x: auto; scrollbar-width: none; } #kinds::-webkit-scrollbar { display: none; } #kinds button { flex: none; }
  #foot { margin-top: auto; }
}
@keyframes fs-in { from { transform: scale(.9); opacity: .4; } }
