/* DearOpus — 어두운 공연장: 먹색 바탕 · 상아색 글 · 금색 포인트. 모바일이 기준, 넓은 화면에서는 작품 페이지만 두 단. */
:root {
  --bg: #12100e; --panel: #1b1815; --panel2: #25211c; --line: rgba(255, 244, 222, .1); --line2: rgba(255, 244, 222, .18);
  --ink: #f4ecdf; --ink2: #cdc2b0; --muted: #8f8676;
  --gold: #d3aa5c; --gold2: #ecd096; --goldSoft: rgba(211, 170, 92, .14); --goldInk: #1a1408;
  --red: #e0705e; --green: #7fc79a;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Apple SD Gothic Neo', Georgia, serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
  --tabs: 58px; --r: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; }
body { font: 15px/1.55 var(--sans); color: var(--ink); background: var(--bg); min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: var(--ink); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.shell { max-width: 640px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
.shell.wide { max-width: 1280px; }
.main { padding: calc(14px + env(safe-area-inset-top)) 16px 28px; display: flex; flex-direction: column; gap: 18px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center; background: rgba(18, 16, 14, .92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs a { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
.tabs a.on { color: var(--gold2); }

/* ── 글 ── */
.logo { font: 600 30px/1 var(--serif); letter-spacing: .01em; }
.logo i { font-style: italic; color: var(--gold2); }
.logo sup { font: 600 9.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: 6px; vertical-align: 12px; }
.kicker { font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.h { font: 600 23px/1.15 var(--serif); letter-spacing: .005em; }
.muted { color: var(--ink2); }
.tiny { font-size: 12px; color: var(--muted); line-height: 1.5; }
.err, .warn { color: var(--red); font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.link { color: var(--gold2); font-weight: 600; font-size: 13.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 15px; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-cta { background: var(--gold); color: var(--goldInk); }
.btn-cta:hover { background: var(--gold2); }
.btn-ghost { border: 1px solid var(--line2); color: var(--ink); }
.btn-danger { background: var(--red); color: #210a06; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 650 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; background: var(--goldSoft); color: var(--gold2); white-space: nowrap; }
.chip.plain { background: rgba(255, 255, 255, .07); color: var(--ink2); }
.spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loading { display: grid; place-items: center; padding: 70px 0; }
.empty { text-align: center; color: var(--ink2); padding: 34px 12px; border: 1px dashed var(--line2); border-radius: var(--r); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 300; max-width: min(420px, calc(100vw - 32px));
  background: var(--ink); color: #17130d; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 입장 암호 · 연령 · 시트 ── */
.dw-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 60% at 50% 0%, #2a2218, var(--bg) 70%); }
.gate-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.gate-card .logo { font-size: 46px; margin-bottom: 4px; }
.gate-card p { color: var(--ink2); }
.gate-card input, .sheet input[type=text], .sheet textarea, .field { width: 100%; background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; outline: none; }
.gate-card input:focus, .sheet textarea:focus, .field:focus { border-color: var(--gold); }
.overlay, .modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
.sheet { position: relative; width: min(480px, 100%); max-height: 92dvh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: fadeUp .25s ease both; }
.sheet h2 { font: 600 26px/1.15 var(--serif); padding-right: 34px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; color: var(--ink2); }
@media (min-width: 700px) { .overlay, .modal { align-items: center; } .sheet { border-radius: 24px; border-bottom: 1px solid var(--line); } }
.gbtn { min-height: 44px; display: grid; place-items: center; gap: 8px; }
.keep { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); justify-content: center; }
.keep input { accent-color: var(--gold); width: 17px; height: 17px; }
.pf-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; min-height: 150px; justify-content: center; background: var(--panel2); border-radius: var(--r); }
.pf-card b { font: 600 24px var(--serif); }
.uav { display: inline-block; border-radius: 50%; overflow: hidden; background: #2d2822; box-shadow: 0 0 0 2px var(--ring, var(--gold)); flex: none; }
.uav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ring0 { --ring: #d3aa5c; } .ring1 { --ring: #e0705e; } .ring2 { --ring: #7fc79a; } .ring3 { --ring: #7db3e8; } .ring4 { --ring: #b79be8; } .ring5 { --ring: #e89bc0; } .ring6 { --ring: #9ad6d0; } .ring7 { --ring: #c9bfae; }
.fb-stars { display: flex; gap: 6px; justify-content: center; }
.fb-stars button { font-size: 30px; color: var(--line2); line-height: 1; }
.fb-stars button.on { color: var(--gold); }

/* ── Home ── */
.home-top { display: flex; align-items: center; justify-content: space-between; }
.lead { font: 500 27px/1.2 var(--serif); letter-spacing: .005em; }
.lead em { font-style: italic; color: var(--gold2); }
.search { display: flex; gap: 8px; background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; padding: 5px 5px 5px 16px; align-items: center; }
.search:focus-within { border-color: var(--gold); }
.search svg { color: var(--muted); width: 19px; height: 19px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 9px 0; font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search button { min-height: 40px; }
.tries { display: flex; flex-wrap: wrap; gap: 6px; }
.tries button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.tries button:hover { border-color: var(--line2); color: var(--ink); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: -6px; }
.sec-head .h { flex: none; }
.sec-head .tiny { text-align: right; }

.feat { position: relative; display: block; border-radius: 22px; overflow: hidden; min-height: 300px; background: #0c0a08; border: 1px solid var(--line); isolation: isolate; }
.feat-bg { position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center; filter: blur(26px) saturate(.9) brightness(.6); transform: scale(1.5); }   /* 앨범 그림의 글자가 우리 글과 겹치지 않게 색만 남긴다 */
.feat::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 10, 8, .25) 0%, rgba(12, 10, 8, .55) 45%, rgba(12, 10, 8, .96) 100%); }
.feat-in { display: flex; flex-direction: column; gap: 8px; padding: 18px; min-height: 300px; justify-content: flex-end; }
.feat h2 { font: 600 33px/1.05 var(--serif); }
.feat .mv { font: italic 500 19px var(--serif); color: var(--gold2); }
.feat p { color: var(--ink2); font-size: 14.5px; max-width: 46ch; }
.faces { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12.5px; color: var(--ink2); }
.faces span::before { content: '♪ '; color: var(--gold); }
.feat .btn { align-self: flex-start; margin-top: 6px; }
.feat .btn svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }

.wcard { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.wcard:hover { border-color: var(--line2); }
.wthumb { width: 76px; height: 76px; border-radius: 12px; background: #0c0a08 center/cover; flex: none; filter: saturate(.8); }
.wcard h3 { font: 600 19px/1.15 var(--serif); }
.wcard .by { font-size: 12.5px; color: var(--ink2); }
.wcard .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wlist { display: flex; flex-direction: column; gap: 8px; }
.lookup { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.lookup .btn { align-self: flex-start; }
.waiting { display: flex; align-items: center; gap: 12px; color: var(--ink2); }

/* ── 작품 페이지 ── */
.back { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; color: var(--ink2); font-size: 13.5px; margin-left: -6px; padding: 4px 6px; }
.work-head { display: flex; flex-direction: column; gap: 5px; }
.work-head h1 { font: 600 31px/1.06 var(--serif); }
.work-head .mv { font: italic 500 19px var(--serif); color: var(--gold2); }
.work-head .facts { font-size: 13px; color: var(--ink2); }
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pillbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; color: var(--ink2); }
.pillbtn svg { width: 16px; height: 16px; }
.pillbtn.on { border-color: var(--gold); color: var(--gold2); background: var(--goldSoft); }
.pillbtn.on svg { fill: currentColor; }

.work-grid { display: flex; flex-direction: column; gap: 18px; }
.stage { display: flex; flex-direction: column; gap: 12px; }
/* 무대: 메인은 크게(16:9), 나머지는 그 아래 줄에 200×200 (YouTube 플레이어의 최소 크기). 타일은 DOM 에서 옮기지 않는다 — main 인 타일만 위 자리로 띄운다 */
.wall { position: relative; padding-top: calc(56.25% + 12px); display: flex; flex-direction: column; gap: 12px; }   /* 위에서부터: 메인(띄운 타일) → .mid(재생 · 악보 줄 · 지금 구간) → .strip(작은 화면들) */
.mid { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* 머리(제목): 처음엔 보이고, 보는 중에는 걷혀서 메인 화면이 맨 위로 온다 */
.head-wrap { display: flex; flex-direction: column; gap: 14px; max-height: 420px; overflow: hidden; transition: max-height .7s ease, opacity .5s ease, margin .7s ease; }
.watching .head-wrap { max-height: 0; opacity: 0; margin-bottom: -18px; pointer-events: none; }
.watching .perf-wrap:not(.open) { display: none; }
.perf-wrap { display: flex; flex-direction: column; gap: 12px; }
.strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; padding-bottom: 2px; }
.tile { flex: none; width: 200px; height: 200px; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); position: relative; }
.tile iframe, .tile > div:first-child { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tile.main { position: absolute; left: 0; top: 0; width: 100%; height: auto; padding: 0; display: block; aspect-ratio: 16 / 9; border-radius: 18px; border-color: var(--line2); }
.tile.down { display: none; }
.tile-hit { position: absolute; inset: 0; z-index: 2; cursor: pointer; }   /* 작은 화면은 통째로 "이 연주로" 버튼 */
.tile.main .tile-hit { display: none; }                                    /* 메인은 YouTube 조작을 그대로 쓴다 */
.tile-name { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 9px 7px; font: 600 12.5px var(--sans); color: #fff; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .8)); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.main .tile-name { display: none; }
.tile:not(.main):hover { border-color: var(--gold); }
.frame-cover { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; display: grid; place-items: center; background: #000 center/cover; z-index: 3; cursor: pointer; overflow: hidden; }
.frame-cover::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.bigplay { position: relative; width: 74px; height: 74px; border-radius: 50%; background: var(--gold); color: var(--goldInk); display: grid; place-items: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.bigplay svg { width: 30px; height: 30px; fill: currentColor; stroke: none; margin-left: 4px; }

.now { display: flex; align-items: center; gap: 12px; }
.playbtn { width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--goldInk); display: grid; place-items: center; flex: none; }
.playbtn svg { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.now-txt { min-width: 0; flex: 1; text-align: left; }
.now .pillbtn { flex: none; font-size: 12px; }
.now-who { font: 600 20px/1.15 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-time { font-size: 12.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }

/* 악보 위치 줄: 가로축은 시간이 아니라 마디 — 어느 연주에서나 같은 자리 */
.score { display: flex; flex-direction: column; gap: 7px; }
.score-bar { position: relative; height: 34px; border-radius: 10px; background: var(--panel2); cursor: pointer; touch-action: none; overflow: hidden; }
.score-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(211, 170, 92, .2), rgba(211, 170, 92, .42)); border-right: 2px solid var(--gold2); }
.score-seg { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(255, 244, 222, .16); }
.score-seg:first-of-type { border-left: 0; }
.score-seg b { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font: 600 10px var(--sans); color: var(--muted); letter-spacing: .04em; pointer-events: none; }
.score-cap { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.sync { display: inline-flex; align-items: center; gap: 5px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.sync.approx i { background: var(--gold); }
.where { padding: 13px 14px; border-radius: var(--r); background: linear-gradient(180deg, var(--goldSoft), rgba(211, 170, 92, .04)); border: 1px solid rgba(211, 170, 92, .22); }
.where b { display: block; font: 600 19px/1.2 var(--serif); margin: 2px 0 4px; }
.where p { font-size: 14px; color: var(--ink2); }
.secs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-inline: 16px; }
.secs::-webkit-scrollbar { display: none; }
.secs button { flex: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.secs button.on { border-color: var(--gold); color: var(--gold2); background: var(--goldSoft); }
.secs button small { color: var(--muted); margin-right: 5px; font-variant-numeric: tabular-nums; }

/* 연주들 (무대) */
.perfs { display: flex; flex-direction: column; gap: 8px; }
.perf { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 9px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); text-align: left; width: 100%; position: relative; }
.perf:hover { border-color: var(--line2); }
.perf.on { border-color: var(--gold); background: linear-gradient(90deg, var(--goldSoft), var(--panel) 70%); }
.perf.down { opacity: .45; }
.perf-th { width: 64px; height: 64px; border-radius: 11px; background: #0c0a08 center/cover; position: relative; overflow: hidden; }
.perf.on .perf-th::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.eq { position: absolute; inset: 0; z-index: 1; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 20px; }
.perf.on .eq { display: flex; }
.eq i { width: 4px; height: 8px; background: var(--gold2); border-radius: 2px; }
.playing .perf.on .eq i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .25s !important; } .eq i:nth-child(3) { animation-delay: .5s !important; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 22px; } }
.perf-name { font: 600 19px/1.15 var(--serif); }
.perf-meta { font-size: 12px; color: var(--muted); }
.perf-point { font-size: 13px; color: var(--ink2); margin-top: 3px; line-height: 1.45; }
.perf-acts { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.icobtn { min-width: 40px; height: 36px; padding: 0 6px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.icobtn svg { width: 18px; height: 18px; }
.icobtn:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.icobtn.on { color: var(--gold2); } .icobtn.on svg { fill: currentColor; }
.icobtn.heart.on { color: var(--red); }
.hint { font-size: 12.5px; color: var(--muted); }

/* 탭: Guide · Community */
.seg { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.seg button { padding: 10px 2px 11px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.seg button.on { color: var(--ink); border-bottom-color: var(--gold); }
.pane { display: flex; flex-direction: column; gap: 16px; }
.art h3 { font: 600 22px/1.2 var(--serif); margin-bottom: 7px; }
.art p { color: var(--ink2); margin-bottom: 10px; line-height: 1.68; }
.art p:last-child { margin-bottom: 0; }
.composer-card { padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.composer-card h3 { font: 600 22px/1.2 var(--serif); }
.composer-card .yrs { font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.composer-card p { color: var(--ink2); line-height: 1.68; }
.askbox { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.askbox h3 { font: 600 22px/1.2 var(--serif); }
.asks { display: flex; flex-wrap: wrap; gap: 6px; }
.asks button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; color: var(--ink2); text-align: left; }
.asks button:hover { color: var(--ink); border-color: var(--gold); }
.askform { display: flex; gap: 8px; }
.askform input { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line2); border-radius: 999px; padding: 11px 15px; outline: 0; font-size: 16px; }
.askform input:focus { border-color: var(--gold); }
.qa { display: flex; flex-direction: column; gap: 10px; }
.q { align-self: flex-end; max-width: 88%; background: var(--goldSoft); color: var(--gold2); padding: 9px 13px; border-radius: 16px 16px 4px 16px; font-size: 14px; }
.a { align-self: flex-start; max-width: 94%; background: var(--panel2); padding: 11px 14px; border-radius: 16px 16px 16px 4px; color: var(--ink); font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; animation: fadeUp .25s ease both; }
.a.wait { display: flex; gap: 10px; align-items: center; color: var(--ink2); }
.langsw { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; font-size: 12px; }
.langsw button { padding: 5px 10px; color: var(--muted); }
.langsw button.on { background: var(--goldSoft); color: var(--gold2); }

.poll { display: flex; flex-direction: column; gap: 8px; }
.poll-row { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 13px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; text-align: left; width: 100%; }
.poll-row i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--goldSoft); z-index: 0; transition: width .4s ease; }
.poll-row span, .poll-row b { position: relative; z-index: 1; }
.poll-row b { font-variant-numeric: tabular-nums; color: var(--ink2); font-weight: 600; font-size: 13.5px; }
.poll-row.on { border-color: var(--gold); }
.poll-row.on span::after { content: ' ♥'; color: var(--red); }
.noteform { display: flex; flex-direction: column; gap: 8px; }
.noteform textarea { width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px; outline: 0; resize: none; font-size: 16px; }
.noteform textarea:focus { border-color: var(--gold); }
.note { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .who { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.note .who b { color: var(--ink2); font-weight: 600; }
.note .who em { font-style: normal; color: var(--gold); }
.note p { margin-top: 3px; }
.note .x { margin-left: auto; font-size: 12px; color: var(--muted); }

/* 동기화 맞추기 (관리자) */
.cal { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px dashed var(--gold); }
.cal h3 { font: 600 21px/1.2 var(--serif); }
.cal-row { display: grid; grid-template-columns: 1fr 78px auto auto; gap: 6px; align-items: center; font-size: 13px; }
.cal-row small { color: var(--muted); display: block; }
.cal-row input { width: 100%; background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 8px; outline: 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.cal-row input.bad { border-color: var(--red); }
.cal-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Me · Guide ── */
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.me-card b { font: 600 24px/1.1 var(--serif); display: block; }
.menu { display: flex; flex-direction: column; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.menu button, .menu a { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.menu > :last-child { border-bottom: 0; }
.menu .danger { color: var(--red); }
.sisters { display: flex; flex-direction: column; gap: 10px; }
.sisters-title { font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sister { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.sister img { width: 46px; height: 46px; border-radius: 22%; flex: none; background: rgba(255, 255, 255, .06); }
.sister b { display: block; font-weight: 650; }
.sister span { font-size: 13px; color: var(--ink2); }
.guide { display: flex; flex-direction: column; gap: 18px; }
.guide h1 { font: 600 34px/1.05 var(--serif); }
.guide h2 { font: 600 23px/1.2 var(--serif); margin-bottom: 6px; }
.guide p, .guide li { color: var(--ink2); line-height: 1.68; }
.guide ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps3 { display: grid; gap: 10px; }
.steps3 div { padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.steps3 b { font: 600 20px var(--serif); display: block; margin-bottom: 3px; }
.steps3 i { font: italic 600 30px/1 var(--serif); color: var(--gold); display: block; margin-bottom: 6px; }

/* ── 설치 팝업 (install.js, 시리즈 공통) ── */
.dwi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; display: flex; justify-content: center; padding: 0 12px calc(var(--tabs) + 12px + env(safe-area-inset-bottom)); pointer-events: none; animation: fadeUp .4s ease both; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: var(--panel2); color: var(--ink); border: 1px solid var(--line2); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 12px; }
.dwi-head { display: flex; gap: 12px; align-items: flex-start; }
.dwi-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.dwi-head b { display: block; font-weight: 700; font-size: 16px; }
.dwi-head p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 9px 14px; border-radius: 999px; font-size: 13px; }
.dwi-main { background: var(--gold); color: var(--goldInk); font-weight: 650; }
.dwi-ghost { border: 1px solid var(--line2); color: var(--ink2); }
.dwi-more { font-size: 13.5px; color: var(--ink); }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; list-style: decimal; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: var(--bg); color: #6fa8ff; }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }

.score-row { display: flex; align-items: center; gap: 8px; }
.score-row .score-bar { flex: 1; min-width: 0; }
.playmini { display: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--goldInk); place-items: center; flex: none; }
.playmini svg { fill: currentColor; stroke: none; width: 15px; height: 15px; }
.where .who { display: none; }
.watching .tabs { display: none; }
.shell.watching { padding-bottom: 0; }

/* ── 좁은 화면(폰): 메인 영상은 화면 폭을 다 쓰고, 나머지 연주는 그 아래 2×2 격자.
   보는 중에는 메인 · 악보 줄 · 해설 두 줄 · 나머지 넷이 스크롤 없이 한 화면에 들어오게 줄인다 (2026-10-11 사용자 결정).
   격자 한 칸은 약 185×139 — YouTube 플레이어 권장 최소(200×200)보다 작다는 걸 알고 정한 것이다. ── */
@media (max-width: 700px) {
  .wall { margin-inline: -16px; padding-top: calc(56.25vw + 10px); gap: 10px; }   /* 메인이 화면 폭을 다 쓴다 — 높이는 폭의 9/16 */
  .tile.main, .frame-cover { border-radius: 0; border-inline: 0; }
  .mid { padding-inline: 16px; }
  .strip { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; overflow: visible; padding: 0 2px; }
  .tile { width: auto; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; }
  .tile.main { aspect-ratio: 16 / 9; }
  .tile-name { font-size: 11.500px; padding: 14px 7px 5px; }
  .watching #app { padding-top: env(safe-area-inset-top); padding-bottom: 12px; }
  .watching .now, .watching .score-cap, .watching .secs { display: none; }
  .watching .playmini { display: grid; }
  .watching .mid { gap: 8px; }
  .watching .wall { gap: 8px; padding-top: calc(56.25vw + 8px); }
  .watching .where { padding: 8px 11px; border-radius: 12px; }
  .watching .where .who { display: inline; }
  .watching .where .kicker { font-size: 10px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .watching .where b { font-size: 17px; margin: 1px 0 2px; }
  .watching .where p { font-size: 13px; line-height: 1.4; }
  .watching #where:not(.open) .where p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .watching .score-bar { height: 30px; }
  .watching .pane > .seg, .watching .pane > #pane { margin-top: 6px; }
}

/* ── 넓은 화면: 작품 페이지는 두 단 (왼쪽 무대는 붙어 있고 오른쪽이 흐른다) ── */
@media (min-width: 980px) {
  .shell.wide .main { padding-inline: 28px; }
  .work-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 30px; align-items: start; }
  .stage { position: sticky; top: 18px; }
  .work-head h1 { font-size: 40px; }
  .secs { margin: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
}
/* 아주 넓은 화면: 작은 화면 넷(200px × 4)이 옆으로 넘기지 않고 한 줄에 다 보이게 무대를 넓힌다 */
@media (min-width: 1260px) { .work-grid { grid-template-columns: 824px minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
