/* 피아노 보면대 화면 스타일 (index.html 에서 옮김). 색은 :root 변수, 어두운 화면은 prefers-color-scheme. */
:root {
  --bg:#eef0f4; --surface:#fff; --text:#1b1e26; --muted:#6b7280; --line:#e2e5ec;
  --accent:#5b5bf0; --accent-soft:#ececff; --lh:#d9731a; --ok:#16a870; --bad:#e5484d;
  --shadow:0 1px 2px #1b1e260d, 0 8px 28px #1b1e2614;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0f1115; --surface:#1a1d24; --text:#eceef3; --muted:#9097a5; --line:#2a2e38;
          --lh:#ffa257; --accent:#8b8bff; --accent-soft:#24264a; --ok:#3ddc97; --bad:#ff6b70;
          --shadow:0 1px 2px #0006, 0 8px 28px #0008; }
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; height:100%; }
body { background:var(--bg); color:var(--text); font:15px/1.4 system-ui,"Pretendard","Malgun Gothic",sans-serif; }
button,select { font:inherit; color:inherit; }
.btn svg, .picker svg { width:20px; height:20px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* 상단 바 */
.top { position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:10px; padding:10px 16px;
       padding-top:max(10px,env(safe-area-inset-top)); background:var(--bg); }   /* 흐림 효과(backdrop-filter)는 악보가 움직일 때마다 다시 계산돼서 태블릿이 버벅인다 */
.brand { display:flex; align-items:center; gap:8px; font-weight:700; letter-spacing:-.02em; }
.brand i { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--accent); color:#fff; font-style:normal; font-size:17px; }
.picker { position:relative; margin-left:8px; flex:1; min-width:0; max-width:340px; }
.picker select { appearance:none; width:100%; padding:9px 34px 9px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font-weight:600; text-overflow:ellipsis; cursor:pointer; }
.picker svg { position:absolute; right:10px; top:50%; width:16px; height:16px; margin-top:-8px; pointer-events:none; color:var(--muted); }
.picker.time { flex:0 0 auto; width:104px; margin-left:0; }
.picker.time select { padding-right:30px; }
.picker.time.warn select { border-color:var(--accent); color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent); }
.spacer { flex:1; }
.btn { display:inline-flex; align-items:center; gap:7px; padding:9px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; font-weight:600; transition:.15s; }
.btn:hover { border-color:var(--accent); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.icon { padding:9px; }
.btn:disabled { opacity:.5; cursor:wait; }
.btn[hidden] { display:none; }

/* 악보 */
main { padding-top:8px; max-width:1280px; margin:0 auto; }
#score.nobar img[id^="cursorImg"] { opacity:0 !important; }   /* 초록 세로 바 숨기기 */
#score { min-height:200px; }

/* 하단 조작 바 */
.dock { position:fixed; left:50%; bottom:max(14px,env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:10;
        width:min(760px,calc(100% - 24px)); background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); overflow:hidden; transition:border-color .2s; }
.dock.bad { border-color:var(--bad); animation:shake .3s; }
.dock.done { border-color:var(--ok); }
@keyframes shake { 25%{transform:translateX(calc(-50% - 5px))} 75%{transform:translateX(calc(-50% + 5px))} }
.bar { height:4px; background:var(--line); }
.bar b { display:block; height:100%; width:0; background:var(--accent); transition:width .35s; }
.row { display:flex; align-items:center; gap:12px; padding:12px 14px; }
.next { flex:1; min-width:0; display:flex; align-items:center; gap:10px; }
.next small { color:var(--muted); font-size:12px; white-space:nowrap; }
.chips { display:flex; flex-wrap:wrap; gap:6px; align-items:stretch; }
/* 코드 카드: 흰 바탕 + 손 색 테두리 · 이름표 · 큰 코드명 · 구성음 알약 */
.card { --c:var(--accent); position:relative; display:flex; flex-direction:row; align-items:stretch; gap:0;
        min-width:0; padding:0; border-radius:16px; background:var(--surface);
        border:1.5px solid color-mix(in srgb,var(--c) 38%,var(--line)); box-shadow:0 2px 8px color-mix(in srgb,var(--c) 14%,transparent);
        transition:border-color .2s, background .2s, box-shadow .2s; overflow:hidden; }
.card.solo::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--c); transition:background .2s; }
.card.L { --c:var(--lh); }
.card .who { padding:1px 8px; border-radius:999px; font-size:11px; font-weight:700; color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); }
.card .chord { display:grid; place-items:center; min-width:60px; padding:0 14px; background:var(--c); color:#fff; font-size:30px; font-weight:800; line-height:1; letter-spacing:-.03em; white-space:nowrap; transition:background .2s; }
.card .side { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; padding:10px 14px 10px 12px; }
.card.solo .side { padding-left:18px; }
.card .who { white-space:nowrap; }
.card .notes { display:flex; gap:4px; }
.card .notes b { padding:1px 8px; border-radius:8px; font-size:12.5px; font-weight:700; color:var(--c); background:color-mix(in srgb,var(--c) 11%,transparent); transition:.15s; }
.card .notes b.got { color:#fff; background:var(--ok); }
/* 두 카드 공통 규격: 같은 폭·높이, 알약 글자 크기·여백 동일 */
.card { flex:1 1 0; min-width:170px; min-height:72px; }
.card .who { font-size:12px; }
.card .notes b { padding:3px 11px; border-radius:10px; font-size:16px; }
.card.full { --c:var(--ok); background:color-mix(in srgb,var(--ok) 9%,var(--surface)); box-shadow:0 2px 10px color-mix(in srgb,var(--ok) 25%,transparent); }
.chip { padding:4px 11px; border-radius:999px; background:var(--accent-soft); color:var(--accent); font-weight:700; font-size:18px; }
.chip.wrong { background:var(--bad); color:#fff; }
.done .chip, .chip.finish { background:var(--ok); color:#fff; }
.modes { display:flex; gap:6px; }
.mode { white-space:nowrap; display:inline-flex; align-items:center; gap:7px; padding:8px 12px; border-radius:12px; border:1px solid var(--line); background:transparent; cursor:pointer; font-weight:600; font-size:14px; }
.mode i { width:8px; height:8px; border-radius:50%; background:var(--muted); opacity:.5; }
.mode.on { border-color:var(--ok); }
.mode[hidden] { display:none; }   /* display:inline-flex 가 hidden 속성을 이기지 않게 (연주회 속도·녹음 버튼) */
#btnMic[data-noise="1"]::after { content:"· 소음"; color:var(--bad); }
#btnMic.on i { transform:scale(calc(1 + var(--lv,0) * 1.1)); transition:transform .08s; }   /* 새 방식: 소리가 크면 불빛이 커진다 */
.mode.on i { background:var(--ok); opacity:1; box-shadow:0 0 0 4px color-mix(in srgb,var(--ok) 25%,transparent); }
.seg { display:flex; padding:3px; gap:2px; border-radius:12px; background:var(--bg); }
.seg[hidden] { display:none; }
.seg button { padding:7px 12px; border:0; border-radius:9px; background:transparent; color:var(--muted); font-weight:600; font-size:14px; cursor:pointer; white-space:nowrap; }
.seg button.on { background:var(--surface); color:var(--accent); box-shadow:0 1px 3px #0002; }
@media (pointer:coarse) { .seg button { min-height:40px; } }
.hint { padding:0 16px 11px; font-size:12px; color:var(--muted); }

/* ── 악보 용지 + 인쇄된 악보 같은 헤더 ── */
.paper { position:relative; background:#fff; color:#111; border-radius:18px; box-shadow:var(--shadow); padding:14px 10px 12px; }
.sheet-head { font-family:"Times New Roman","Noto Serif KR","Batang",serif; padding:6px 8px 4px; }
#shTitle { margin:0; text-align:center; font-size:clamp(24px,5.2vw,42px); line-height:1.1; font-weight:700; letter-spacing:-.01em; overflow-wrap:anywhere; }
.sh-sub { margin-top:2px; text-align:center; font-weight:700; font-style:italic; font-size:clamp(13px,2.3vw,20px); line-height:1.25; }
.sh-sub > div:first-child:not(:last-child) { font-size:.78em; }          /* 첫 줄(from the motion picture)은 작게 */
.sh-credit { margin-top:6px; text-align:right; font-size:clamp(13px,2.1vw,18px); line-height:1.3; }
.sh-credit:empty, .sh-sub:empty, #shTitle:empty { display:none; }
.shedit { position:absolute; top:10px; right:12px; z-index:2; display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border:1px solid #0002; border-radius:999px; background:#fff; color:#667; font:600 13px system-ui,"Malgun Gothic",sans-serif; cursor:pointer; opacity:.85; }
.shedit:hover { color:var(--accent); border-color:var(--accent); opacity:1; }
.shedit svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:640px) { .paper { padding:12px 4px 10px; border-radius:14px; } .shedit { top:8px; right:8px; padding:4px 9px; } .sheet-head { padding-top:24px; } }                     /* 버튼과 제목이 겹치지 않게 */

/* 악보 정보 창 */
#infoDlg { width:min(460px, calc(100% - 28px)); padding:0; border:0; border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 24px 70px #0006; }
#infoDlg::backdrop { background:#0008; backdrop-filter:blur(3px); }
#infoForm { display:flex; flex-direction:column; gap:12px; padding:22px 22px 18px; }
#infoForm h2 { margin:0; font-size:19px; letter-spacing:-.01em; }
.dlg-sub { margin:-6px 0 0; font-size:13px; color:var(--muted); }
.dlg-sub.warn { color:var(--accent); font-weight:600; }
.fld { display:flex; flex-direction:column; gap:5px; font-size:12px; font-weight:700; color:var(--muted); }
.fld textarea { resize:vertical; min-height:58px; }
.fld input, .fld select, .fld textarea { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:11px; background:var(--bg); color:var(--text); font:inherit; font-size:15px; font-weight:500; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline:2px solid var(--accent); outline-offset:1px; border-color:transparent; }
.fld.need select { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent); }
.dlg-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.bpm { display:flex; align-items:center; gap:8px; } .bpm select { flex:1.4; } .bpm input { flex:1; } .bpm span { font-weight:700; color:var(--muted); }
.dlg-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:4px; }
@media (max-width:420px) { .dlg-grid { grid-template-columns:1fr; } }

/* ── 악보 선택 버튼 · 내 악보 목록/검색 창 ── */
.picker-btn { display:flex; align-items:center; gap:8px; margin-left:8px; flex:1; min-width:0; max-width:340px; padding:9px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font:inherit; font-weight:600; color:var(--text); text-align:left; cursor:pointer; }
.picker-btn svg { width:18px; height:18px; flex:none; stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; color:var(--muted); }
.picker-btn span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-btn:hover { border-color:var(--accent); }
@media (pointer:coarse) { .picker-btn { min-height:46px; } }
@media (max-width:640px) { .picker-btn { margin-left:0; max-width:none; min-width:110px; padding:9px 10px; } .picker-btn > svg:first-child { display:none; } }
#libDlg { width:min(580px,calc(100% - 24px)); max-height:min(82vh,740px); padding:0; border:0; border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 24px 70px #0006; }
#libDlg[open] { display:flex; }
#libDlg::backdrop { background:#0008; backdrop-filter:blur(3px); }
.lib-box { display:flex; flex-direction:column; gap:10px; width:100%; min-height:0; padding:18px 18px 14px; }
.lib-head { display:flex; align-items:center; justify-content:space-between; }
.lib-head h2 { margin:0; font-size:19px; letter-spacing:-.01em; }
.lib-search { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.lib-search:focus-within { outline:2px solid var(--accent); outline-offset:1px; }
.lib-search svg { width:18px; height:18px; flex:none; stroke:var(--muted); fill:none; stroke-width:1.9; stroke-linecap:round; }
.lib-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:inherit; font:inherit; font-size:16px; }
.lib-count { font-size:12px; color:var(--muted); }
.lib-list { list-style:none; margin:0; padding:0 2px 2px 0; overflow:auto; display:flex; flex-direction:column; gap:6px; min-height:110px; }
.lib-list li { display:flex; align-items:center; gap:6px; }
.lib-item { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:1px; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.lib-item b { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.lib-item small { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
.lib-item:hover { border-color:var(--accent); }
.lib-item.cur { border-color:var(--accent); background:var(--accent-soft); }
.lib-date { font-size:11px; color:var(--muted); white-space:nowrap; }
.lib-del { border:0; background:transparent; font-size:16px; cursor:pointer; padding:8px; opacity:.5; }
.lib-del:hover { opacity:1; }
li.lib-empty { justify-content:center; padding:28px 0; color:var(--muted); }
.lib-restore { white-space:nowrap; padding:8px 12px; }
.lib-search[hidden] { display:none; }
.lib-ver { align-self:flex-end; color:var(--muted); font-size:11px; }
#libTrash.on { border-color:var(--accent); color:var(--accent); }

/* ── 전체화면 · 조작 바 접기 ── */
.dock-handle { display:flex; align-items:center; justify-content:center; width:100%; height:18px; padding:0; border:0; background:transparent; color:var(--muted); cursor:pointer; }
.dock-handle svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.dock-handle:hover { color:var(--accent); }
.dock-show, .fs-exit { position:fixed; z-index:11; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--surface); color:var(--text); box-shadow:var(--shadow); cursor:pointer; font:600 13px system-ui,"Malgun Gothic",sans-serif; }
.dock-show { left:50%; transform:translateX(-50%); bottom:max(10px,env(safe-area-inset-bottom)); padding:7px 16px 7px 12px; border-radius:999px; opacity:.88; }
.dock-show svg, .fs-exit svg { width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.fs-exit { top:max(10px,env(safe-area-inset-top)); right:max(10px,env(safe-area-inset-right)); width:40px; height:40px; justify-content:center; border-radius:50%; opacity:.5; transition:opacity .2s; }
.fs-exit:hover, .fs-exit:active { opacity:1; }
.dock-show[hidden], .fs-exit[hidden] { display:none; }
body.dock-off main { padding-bottom:64px; }                 /* 조작 바를 접으면 악보가 화면 끝까지 */
body.fs .top { display:none; }                              /* 전체화면: 위쪽 바도 숨겨 악보만 */
body.fs main { padding-top:6px; }
@media (pointer:coarse) { .dock-handle { height:26px; } .fs-exit { width:46px; height:46px; } }

/* ── 음표 수정 도구 ── */
.dock[hidden] { display:none; }
#score.editing { cursor:crosshair; }
#score.nobar.editing img[id^="cursorImg"] { opacity:1 !important; }   /* 수정 중에는 위치 표시줄을 항상 보여준다 */
.ed-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:10px 14px 4px; }
.ed-pos { min-width:64px; text-align:center; font-weight:700; }
.ed-chips { display:flex; flex-wrap:wrap; gap:6px; flex:1 1 220px; }
.ed-chip { --c:var(--accent); display:flex; flex-direction:column; align-items:center; gap:0; padding:3px 12px 4px; border:1.5px solid var(--line); border-radius:12px; background:var(--surface); color:var(--c); cursor:pointer; line-height:1.25; }
.ed-chip.L { --c:var(--lh); }
.ed-chip small { font-size:11px; font-weight:700; opacity:.85; } .ed-chip b { font-size:16px; }
.ed-chip.on { border-color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 18%,transparent); }
.ed-chip.rest b { color:var(--muted); font-weight:600; }
.ed-tools { display:flex; flex-wrap:wrap; gap:8px; padding:6px 14px 6px; align-items:center; }
.tg { display:flex; align-items:center; gap:4px; padding:3px 4px; border-radius:12px; background:var(--bg); }
.tl { padding:0 4px 0 6px; font-size:11px; font-weight:700; color:var(--muted); white-space:nowrap; }
.mini { padding:7px 11px; border:1px solid var(--line); border-radius:9px; background:var(--surface); font-weight:700; font-size:14px; cursor:pointer; white-space:nowrap; }
.mini:hover { border-color:var(--accent); }
.mini.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.mini.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.mini.danger { color:var(--bad); }
.mini:disabled { opacity:.4; cursor:default; }
@media (pointer:coarse) { .mini { min-height:42px; min-width:42px; } }
.ed-hint { padding:0 14px 10px; font-size:12px; color:var(--muted); }
@media (max-width:640px) { .ed-hint { display:none; } .ed-tools { padding-bottom:10px; } .tl { display:none; } }

/* 토스트 · 로딩 */
.toast { position:fixed; left:50%; bottom:calc(max(14px,env(safe-area-inset-bottom)) + 100px); transform:translate(-50%,12px); padding:9px 16px; border-radius:999px; background:var(--text); color:var(--bg); font-size:14px; opacity:0; pointer-events:none; transition:.25s; z-index:20; max-width:90%; text-align:center; }
.toast.show { opacity:1; transform:translate(-50%,0); }
.busy { position:fixed; inset:0; z-index:30; display:none; place-items:center; background:#0009; backdrop-filter:blur(4px); }
.busy.show { display:grid; }
.busy div { background:var(--surface); padding:28px 34px; border-radius:20px; text-align:center; box-shadow:var(--shadow); }
.spin { width:34px; height:34px; margin:0 auto 14px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg) } }
.busy p { margin:4px 0; } .busy .sub { color:var(--muted); font-size:13px; }

/* ── 조작 바 레이아웃: 윗줄 = 다음에 칠 카드 두 장(같은 폭), 아랫줄 = 손 선택 · 입력 방식 · 처음부터 ── */
.row { flex-wrap:wrap; row-gap:10px; }
.next { flex:1 1 100%; }
.chips { width:100%; flex-wrap:nowrap; gap:10px; }
.card { min-width:0; }
.card .notes b { white-space:nowrap; }
.card .notes { flex-wrap:wrap; }
.row > .btn.icon { margin-left:auto; }
.next small { align-self:center; }

/* ── 반응형: 폰 / 태블릿 / PC ── */
main { padding-bottom:calc(var(--dock-h,150px) + 36px); padding-left:max(16px,env(safe-area-inset-left)); padding-right:max(16px,env(safe-area-inset-right)); }
.hint { display:none; }                               /* 키보드 시험 안내는 마우스 환경에서만 */
@media (hover:hover) and (pointer:fine) { .hint { display:block; } }

/* 터치 기기: 손가락으로 누르기 쉽게 */
@media (pointer:coarse) {
  .btn, .mode { min-height:46px; }
  .btn.icon { min-width:46px; justify-content:center; }
  .picker select { min-height:46px; }
}

/* 폰 세로 */
@media (max-width:640px) {
  .brand span, .btn .lbl { display:none; }
  .top { padding-inline:12px; gap:8px; } .picker { margin-left:0; max-width:none; min-width:110px; }
  .brand { display:none; }                                   /* 좁은 폭에서는 악보 이름·박자에 자리를 양보 */
  .picker.time { min-width:0; width:84px; } .picker.time select { padding:9px 24px 9px 10px; } .picker select { padding-left:10px; }
  main { padding-inline:10px; } #score { border-radius:14px; padding:8px 2px; }
  .chips { width:100%; flex-wrap:nowrap; } .card { flex:1 1 0; }
  .card .chord { font-size:24px; min-width:46px; padding:0 9px; } .card .side { padding:8px 8px 8px 9px; } .card.solo .side { padding-left:14px; }
  .card { min-width:0; min-height:64px; } .card .notes b { font-size:14px; padding:2px 8px; } .card .notes { gap:3px; flex-wrap:wrap; }
  .row { flex-wrap:wrap; } .next { flex-basis:100%; } .seg { flex:1 1 100%; } .seg button { flex:1; } .modes { flex:1; } .mode { flex:1; justify-content:center; }
  .toast { bottom:calc(var(--dock-h,150px) + 24px); }
}

/* 태블릿 */
@media (min-width:641px) and (max-width:1100px) {
  body { font-size:16px; }
  .top { padding:12px 24px; } main { padding-inline:24px; }
  .dock { width:min(860px,calc(100% - 48px)); border-radius:26px; }
  .row { padding:14px 20px; gap:16px; }
  .chip { font-size:22px; padding:6px 14px; }
  .mode { padding:10px 16px; font-size:15px; }
}

/* PC */
@media (min-width:1101px) {
  .top { padding:14px 32px; } .dock { width:min(860px,calc(100% - 64px)); }
  .chip { font-size:20px; }
}

/* 가로로 눕힌 폰·낮은 창: 조작 바를 한 줄로 납작하게 */
@media (max-height:520px) and (orientation:landscape) and (min-width:640px) {
  .top { padding-block:6px; } .brand span { display:none; }
  .dock { width:min(720px,calc(100% - 24px)); bottom:max(8px,env(safe-area-inset-bottom)); }
  .row { flex-wrap:nowrap; padding:8px 12px; gap:8px; } .next { flex-basis:auto; }
  .chip { font-size:15px; padding:2px 9px; } .next small { display:none; }
  .mode { padding:6px 10px; } .hint { display:none !important; }
  .toast { bottom:calc(var(--dock-h,70px) + 14px); }
  .next { flex:1 1 auto; } .chips { width:auto; } .card { flex:0 1 auto; min-height:52px; } .card .chord { font-size:20px; min-width:38px; }
  .card .side { padding:5px 8px 5px 8px; gap:3px; } .row > .btn.icon { margin-left:0; }
}

/* ── 계정 (로그인·가입·내 정보) ── */
#authDlg { width:min(420px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:0; border:0; border-radius:20px; background:var(--surface); color:var(--text); box-shadow:0 24px 70px #0006; }
#authDlg::backdrop { background:#0008; }
.acct-box { display:flex; flex-direction:column; gap:12px; padding:20px 20px 16px; }
.acct-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.acct-head h2 { margin:0; font-size:19px; letter-spacing:-.01em; }
.acct-reason { margin:-4px 0 0; color:var(--muted); font-size:14px; }
.acct-social { display:flex; flex-direction:column; gap:8px; }
.btn.social { justify-content:center; text-decoration:none; }
.btn.social.kakao { background:#FEE500; color:#191600; border-color:#FEE500; }
.btn.social.naver { background:#03C75A; color:#fff; border-color:#03C75A; }
.btn.social.google { background:#fff; color:#1f1f1f; border-color:#dadce0; }
.acct-or { text-align:center; color:var(--muted); font-size:12px; }
.agree { display:flex; gap:8px; align-items:flex-start; font-size:14px; line-height:1.4; }
.agree input { margin-top:2px; width:18px; height:18px; flex:none; accent-color:var(--accent); }
.agree a, .acct-links a, .acct-line a { color:var(--accent); }
.acct-err { margin:0; color:var(--bad); font-size:13px; font-weight:600; }
.acct-err[hidden] { display:none; }
.btn.wide { justify-content:center; width:100%; }
.btn.danger { color:var(--bad); }
.acct-links { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:13px; }
.acct-row { display:flex; gap:8px; }
.acct-row .btn { flex:1; justify-content:center; }
.acct-line { margin:-4px 0 0; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.acct-pw summary { cursor:pointer; color:var(--accent); font-size:14px; }
.acct-pw .fld { margin-top:8px; }
#btnAccount.on { border-color:var(--accent); color:var(--accent); }
#btnAccount .lbl { max-width:8em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* 좁은 화면: 머리글이 넘치지 않게 (폰은 글자 없이 아이콘만 — .btn .lbl 이 640px 이하에서 숨는다) */
@media (max-width:640px) { .picker-btn { min-width:72px; } }
@media (max-width:420px) { #btnFs { display:none; } .top { gap:6px; padding-inline:8px; } .picker-btn { min-width:56px; } .picker.time { width:68px; } }

/* 공용 목록: 내가 올린 악보 표시 · 신고 · 보기 고르기 / 악보 정보 창의 권리 확인 */
.lib-mine { margin-left:6px; padding:0 6px; border-radius:6px; font-size:11px; font-weight:700; color:var(--accent); background:var(--accent-soft); vertical-align:middle; }
.lib-hidden { margin-left:6px; padding:0 6px; border-radius:6px; font-size:11px; font-weight:700; color:#fff; background:var(--bad); vertical-align:middle; }
.lib-report { border:0; background:transparent; font-size:15px; cursor:pointer; padding:8px; opacity:.45; }
.lib-report:hover { opacity:1; }
.lib-filter { display:flex; gap:6px; }
.lib-filter button { padding:5px 12px; border:1px solid var(--line); border-radius:999px; background:transparent; font-size:13px; font-weight:600; cursor:pointer; color:var(--muted); }
.lib-filter button.on { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.rights { display:flex; gap:8px; align-items:flex-start; font-size:13px; line-height:1.45; color:var(--text); }
.rights input { margin-top:2px; width:18px; height:18px; flex:none; accent-color:var(--accent); }
.rights[hidden] { display:none; }
