/* 스타일 만들기 화면(style_maker.js · 4-L 2026-11-01 — 곡 지도 한 화면 + 고른 것 하나의 서랍) — 편집기 위를 통째로 덮는 화면(유저 결정 ①).
   상자·단추·글은 스타일러 것(.arr-box · .arr-btn · .arr-input · .arr-select · .arr-note …)을 그대로 쓰고, 여기는 화면 틀 · 곡 지도 · 서랍 · 찍기 칸만.
   글자 대비(웹 접근성 2.2 · 1.4.3) = 4.5 : 1 이상 · 단추·그림 테두리(1.4.11) = 3 : 1 이상 · 누르는 곳(2.5.8) = 24×24 이상 */
.sm-screen {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  flex-direction: column;
  background: var(--bg-1);
  color: var(--ink-0);
  font-size: var(--fs-label);
  overflow: hidden;              /* 안쪽(.sm-body)만 내림 — 틀이 밀려 맨 위 줄이 잘리지 않게 */
}
.sm-screen.open { display: flex; }
.sm-head, .sm-msgbar { flex-shrink: 0; }
html.sm-open body { overflow: hidden; }
/* 스타일러 '새 기능' 말풍선(arranger_panel.css .arr-new-tip · 같은 z-index 900)은 가려진 도구 줄 단추를 가리킨다 — 이 화면 위로 뜨면 찍기 칸을 덮는다 */
html.sm-open .arr-new-tip { display: none; }
/* 사이트 이동 패널(nav_panel.css #nav-panel)도 — 이 화면 안에서 다른 페이지로 가면 저장 안 한 스타일을 묻지 않고 잃는다(닫기 = 화면 안에서 묻기) */
html.sm-open #nav-panel { display: none; }
.sm-screen .arr-btn { min-height: 28px; min-width: 28px; }
/* 입력·고르기 칸 = 테두리 3 : 1(1.4.11 — 글 칸은 칸임이 보여야) · 높이 28(2.5.8 누르는 곳 24 이상) · 주황 단추 글 = 어두운 색(밝은 테마에서 흰 글 2.6 : 1 이었다) */
.sm-screen .arr-input, .sm-screen .arr-select, .sm-screen textarea { border: 1px solid #767e8e; min-height: 28px; box-sizing: border-box; }
/* 주황 단추(.arr-go = 바탕 --accent) — 어두운 테마 #f3a25b 위 = 어두운 글 · 밝은 테마 #8a4510 위 = 흰 글(그대로면 2.6 : 1) */
[data-theme="light"] .sm-screen .arr-go { color: #fff; }
.sm-screen .sm-tick { min-height: 24px; }
.sm-screen .sm-tick input[type=checkbox] { width: 18px; height: 18px; }
.sm-screen .arr-btn:disabled { opacity: .45; cursor: default; }
.sm-ico { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sm-ico .f { fill: currentColor; stroke: none; }
.sm-ico .t { fill: currentColor; stroke: none; font: 800 12px/1 system-ui, sans-serif; text-anchor: middle; }
.sm-grow { flex: 1; }

/* 맨 위 한 줄 — 이름 ▾ · ↶ ↷ · ▶/■ ▾ · ⚠ · 저장 · × */
.sm-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sm-head .sm-title { font-weight: 700; font-size: 1.05em; }
.sm-head .sm-name { width: 13em; font-weight: 700; }
.sm-head .sm-set-btn.on, .sm-head .sm-file-btn.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sm-head .sm-undo, .sm-head .sm-redo { font-size: 16px; padding: 2px 9px; }
.sm-head .sm-map-play { min-width: 7.5em; font-weight: 700; }
.sm-head .sm-map-play.on { background: var(--ink-0); color: var(--bg-1); border-color: var(--ink-0); }
.sm-head .sm-play-set.on, .sm-head .sm-check-btn.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sm-head .sm-check-btn { min-width: 3.4em; font-weight: 700; }
.sm-head .sm-check-btn.ok { background: #d9f2df; color: #155c2c; border-color: #2c7444; }
.sm-head .sm-check-btn.warn { background: #fff3c4; color: #6b4300; border-color: #b77814; }
.sm-head .sm-check-btn.bad { background: #ffd9d4; color: #8b1c13; border-color: #c0392b; }
.sm-head .arr-close { font-size: 1.3em; }
.sm-msgbar { min-height: 0; padding: 0 var(--space-3); }
.sm-msgbar.ok, .sm-msgbar.arr-error, .sm-msgbar.warn { padding: var(--space-2) var(--space-3); }
.sm-msgbar.ok { color: var(--ink-0); background: var(--bg-2); }
.sm-msgbar.warn { background: var(--bg-2); color: var(--ink-0); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.sm-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-3); }
.sm-body > * { flex-shrink: 0; }
.sm-h { margin: 0 0 var(--space-1); font-size: 1em; }
.sm-btns { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); align-items: center; }
.sm-tick { display: inline-flex; align-items: center; gap: 4px; margin-right: var(--space-2); white-space: nowrap; }
.sm-empty { color: var(--ink-1, var(--ink-0)); padding: 6px 2px; }

/* 출발 화면 — 장르 카드 = 이름 + 악기 그림 줄 + ▶ + 시작 */
.sm-start-h { font-size: 1.15em; }
.sm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-2); margin: var(--space-2) 0; }
.sm-card { border: 1px solid var(--line); border-radius: 10px; padding: var(--space-3); background: var(--bg-2); display: flex; flex-direction: column; gap: var(--space-2); }
.sm-card-title { font-weight: 800; font-size: 1.1em; }
.sm-card-icons { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.sm-card-ico { width: 30px; height: 30px; }
.sm-card-blank { font-size: 26px; color: var(--ink-1, var(--ink-0)); }
.sm-card .sm-btns { margin-top: auto; }
.sm-mine { display: flex; flex-direction: column; gap: var(--space-2); }
.sm-mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.sm-mine-item { display: flex; align-items: center; gap: var(--space-2); }
.sm-mine-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-mine .sm-open-file { align-self: flex-start; }

/* 곡 지도 — 가로 = 시험 곡 구간 · 한 칸 띄고 특별한 때 · 세로 = 연주자(악기 그림) · 칸 = 리듬 그림.
   그리드 칸은 .arr-btn 이라 .sm-map 을 앞에 붙여 이긴다(.arr-btn:hover 가 구간 색을 덮지 않게) */
.sm-map-screen { display: flex; flex-direction: column; gap: var(--space-3); }
.sm-map-card { border: 1px solid var(--line); border-radius: 10px; padding: var(--space-3); background: var(--bg-2); display: flex; flex-direction: column; gap: var(--space-2); }
.sm-map-wrap { position: relative; overflow-x: auto; }
.sm-map { display: grid; gap: 4px; min-width: 860px; }
.sm-map .sm-map-sec { border: 0; border-radius: 6px 6px 0 0; padding: 6px 6px 5px; color: #fff;   /* 4-O 옆 여백 8→6: 4마디 칸(58px)에 영어 'chorus'(43px)가 한 단어로 들어가게(전엔 42px 자리라 Pre-choru/s) */ display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-width: 0; }
.sm-map .sm-map-sec[data-type='intro'], .sm-map-dot[data-type='intro'] { background: #3a68a8; }
.sm-map .sm-map-sec[data-type='verse'], .sm-map-dot[data-type='verse'] { background: #2c7444; }
.sm-map .sm-map-sec[data-type='prechorus'], .sm-map-dot[data-type='prechorus'] { background: #1f6f6a; }
.sm-map .sm-map-sec[data-type='chorus'], .sm-map-dot[data-type='chorus'] { background: #a8520f; }
.sm-map .sm-map-sec[data-type='chorus_final'], .sm-map-dot[data-type='chorus_final'] { background: #a5352a; }
.sm-map .sm-map-sec[data-type='bridge'], .sm-map-dot[data-type='bridge'] { background: #6e4a99; }
.sm-map .sm-map-sec[data-type='end'], .sm-map-dot[data-type='end'] { background: #4b5363; }
.sm-map .sm-map-sec.dim { filter: saturate(.55) brightness(.85); }
.sm-map .sm-map-sec.sel { box-shadow: inset 0 0 0 3px #fff; }
.sm-map-sn { font-weight: 700; font-size: 13px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }          /* 좁은 칸은 두 줄로(잘리지 않게) */
.sm-map-sb { font-size: 11.5px; max-width: 100%; overflow-wrap: anywhere; }
.sm-map-sfoot { display: flex; align-items: center; gap: 4px; min-height: 14px; flex-wrap: wrap; }
.sm-map-lv { display: flex; gap: 3px; }
.sm-map-lv i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9); display: block; }
.sm-map-lv i.on { background: #fff; }
.sm-map-bk { width: 14px; height: 14px; stroke-width: 2.2; }
.sm-map-habits { display: inline-flex; gap: 2px; flex: none; }
.sm-map .sm-map-cell .sm-cell-warn { position: absolute; bottom: 2px; right: 3px; }
.sm-map-gap { min-width: 0; }
.sm-warn-mark { font-size: 12px; line-height: 1; padding: 1px 3px; border-radius: 4px; background: #fff3c4; color: #6b4300; }
.sm-warn-mark.error { background: #ffd9d4; color: #8b1c13; }
.sm-map .sm-map-sph { border: 1px solid #6b7486; border-radius: 6px 6px 0 0; background: var(--bg-1); color: var(--ink-0); padding: 5px 6px; display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px; text-align: left; min-width: 0; }
.sm-map .sm-map-sph.sel { box-shadow: inset 0 0 0 2px var(--accent); border-color: var(--accent); }
.sm-map-spico { width: 18px; height: 18px; }
.sm-map-spn { font-size: 12.5px; font-weight: 700; max-width: 100%; overflow-wrap: anywhere; }
.sm-map .sm-map-spadd { border: 1px dashed #6b7486; border-radius: 6px; font-size: 18px; font-weight: 700; padding: 0; }
.sm-map .sm-map-spadd.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.sm-map .sm-map-pl { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; display: flex; align-items: center; gap: 8px; text-align: left; min-width: 0; }
.sm-map .sm-map-pl:hover, .sm-map .sm-map-cell:hover { border-color: var(--accent); }
.sm-map .sm-map-pl.sel { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sm-map-plico { width: 26px; height: 26px; }
.sm-map-pnbox { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-map-pn { font-weight: 700; overflow-wrap: anywhere; }          /* 연주자 이름·상태 = 두 줄로(잘리지 않게) */
.sm-map-pi { color: var(--ink-1, var(--ink-0)); font-size: 12px; overflow-wrap: anywhere; }
.sm-map .sm-map-cell { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; min-height: 58px; padding: 5px; display: grid; align-content: center; position: relative; text-align: left; min-width: 0; }
.sm-map .sm-map-cell.rest { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(128, 136, 152, .16) 6px 12px), var(--bg-1); color: var(--ink-0); place-items: center; font-size: 12px; }
.sm-map .sm-map-cell.none, .sm-map .sm-map-cell.follow { color: var(--ink-1, var(--ink-0)); place-items: center; }
.sm-map .sm-map-cell.inhr .sm-pic { opacity: .55; }
.sm-map .sm-map-cell.own::before { content: ""; position: absolute; top: 0; left: 0; border-top: 12px solid #a585e0; border-right: 12px solid transparent; border-top-left-radius: 5px; }
.sm-map .sm-map-cell.mix { box-shadow: 3px 3px 0 -1px var(--bg-1), 3px 3px 0 0 #6b7486; }
.sm-map .sm-map-cell.sel { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sm-map .sm-map-cell.with { border: 2px dashed var(--accent); }
.sm-map-restt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* 띠 = 그림 아래 글 한두 줄(4-M — 조건을 글로 쓰니 길어짐 · 그림을 덮지 않고 칸이 늘어남) */
.sm-map-badge { justify-self: start; margin-top: 3px; max-width: 100%; font-size: 10.5px; line-height: 1.25; border-radius: 4px; padding: 1px 2px;
  background: var(--bg-3, #e3e6ec); color: var(--ink-0); word-break: keep-all; overflow-wrap: anywhere; }
.sm-map .sm-map-cell.rest .sm-map-badge, .sm-map .sm-map-cell.follow .sm-map-badge { justify-self: center; }
.sm-pic { display: block; width: 100%; height: 26px; }
.sm-pic .h { fill: var(--ink-0); }
.sm-pic .g { fill: var(--line); }
.sm-pic .b { fill: var(--ink-1, var(--ink-0)); }
.sm-map-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; display: none; }
.sm-map-add { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.sm-map-add .sm-map-addbtn.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sm-inst-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-inst-opt { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; min-width: 64px; }
.sm-inst-ico { width: 28px; height: 28px; }

/* 서랍(고른 것 하나) — 머리 = 대상 그림 + 이름 · [기본 | 세부] */
.sm-map-drawer { display: flex; flex-direction: column; gap: var(--space-2); }
.sm-map-hint { align-items: center; }
.sm-hint-ico { font-size: 22px; color: var(--ink-1, var(--ink-0)); }
.sm-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-map-dh { margin: 0; font-size: 1.08em; }
.sm-dh-ico { width: 22px; height: 22px; }
.sm-map-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.sm-dtabs { display: inline-flex; margin-left: auto; border: 1px solid #6b7486; border-radius: 999px; overflow: hidden; }
.sm-dtabs .sm-chip { border: 0; border-radius: 0; }
.sm-chip { border-radius: 999px; padding: 3px 12px; }
.sm-chip.on { background: var(--ink-0); color: var(--bg-1); border-color: var(--ink-0); }
.sm-dr-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.sm-map-when { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.sm-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 3px 4px; border-radius: 6px; }
.sm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sm-switch-knob { width: 36px; height: 22px; border-radius: 999px; background: #767e8e; position: relative; flex: none; }
.sm-switch-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.sm-switch.on .sm-switch-knob { background: #23733c; }
.sm-switch.on .sm-switch-knob::after { left: 17px; }
.sm-switch input:focus-visible + .sm-switch-knob { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-switch-t { font-weight: 600; }
.sm-map-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.sm-map-cands .sm-map-cand { display: grid; gap: 4px; padding: 7px; border-radius: 8px; border: 1px solid #767e8e; background: var(--bg-1); text-align: left; min-width: 0; cursor: pointer; position: relative; }
.sm-map-cands .sm-map-cand:hover, .sm-map-cands .sm-map-cand:focus-visible { border-color: var(--accent); outline: none; }
.sm-map-cands .sm-map-cand.static { cursor: default; }
.sm-map-cands .sm-map-cand.static:hover { border-color: #767e8e; }
.sm-map-cands .sm-map-cand.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sm-map-cands .sm-map-cand.linked { border-left: 4px solid #2f6db3; }
.sm-map-cands .sm-map-cand.copied { border-left: 4px solid #6b7486; }
.sm-map-cand .sm-pic { height: 30px; }
.sm-map-cn { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 54px; }
.sm-map-cl { font-size: 11.5px; color: var(--ink-1, var(--ink-0)); }
.sm-cacts { position: absolute; top: 4px; right: 4px; display: flex; gap: 3px; }
.sm-cacts .arr-btn { padding: 0 6px; min-height: 24px; min-width: 24px; font-size: 12px; }
/* 모음 창 카드 = 단추가 여럿이라 이름 아래 한 줄(이름을 가리지 않게) */
.sm-lib-grid .sm-cacts { position: static; justify-content: flex-end; }
.sm-lib-grid .sm-map-cn { padding-right: 0; }
.sm-dots { display: flex; gap: 4px; }
.sm-dots .sm-dot { width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%; position: relative; background: transparent; border: 0; color: var(--ink-0); }
.sm-dots .sm-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid currentColor; }
.sm-dots .sm-dot.on::after { background: currentColor; }
.sm-actcard { place-items: center; align-content: center; min-height: 66px; font-weight: 700; border-style: dashed !important; }
.sm-actcard.on { border-style: solid !important; }
.sm-actcard-t { font-size: 13px; }
.sm-fromsong { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: var(--space-2); border: 1px dashed #767e8e; border-radius: 8px; }
.sm-steps { display: inline-flex; align-items: flex-end; gap: 6px; }
.sm-steps .sm-stepbtn { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 64px; min-height: 64px; padding: 6px 8px; }
.sm-stepbar { width: 22px; border-radius: 3px 3px 0 0; background: #767e8e; display: block; }
.sm-steps .sm-stepbtn.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sm-steps .sm-stepbtn.on .sm-stepbar { background: var(--accent); }
.sm-stept { font-size: 12.5px; font-weight: 600; }
.sm-steps.off { opacity: .45; }
.sm-moves { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.sm-move { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); }
.sm-move-ico { width: 18px; height: 18px; }
.sm-move-who { font-size: 12px; color: var(--ink-1, var(--ink-0)); }
.sm-detail { display: flex; flex-direction: column; gap: var(--space-2); }
.sm-blk { border-top: 1px solid var(--line); padding-top: var(--space-2); display: flex; flex-direction: column; gap: var(--space-1); }
.sm-blk-h { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.sm-blk-edit { display: flex; flex-direction: column; gap: var(--space-1); }
.sm-blk-when, .sm-blk-players, .sm-blk-steps { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); align-items: center; }
.sm-blk-json, .sm-row-when { width: 100%; min-height: 4em; font-family: monospace; }
.sm-entries { display: flex; flex-direction: column; gap: var(--space-1); }
.sm-ce-state { font-weight: 600; }
.sm-entry { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; border-top: 1px solid var(--line); padding-top: var(--space-1); }
.sm-ent-when { width: 16em; font-family: monospace; }
.sm-cands { display: flex; flex-wrap: wrap; gap: var(--space-1); align-items: center; margin-top: var(--space-1); }
.sm-row-types { gap: 0 var(--space-2); }
/* 연주자 서랍 — 로직 세션 플레이어 모양(큰 악기 그림 + 이름 · 큰 조절 몇 개) */
.sm-pl-head { align-items: center; }
.sm-pl-big { width: 54px; height: 54px; padding: 6px; border-radius: 50%; background: var(--bg-1); border: 1px solid #767e8e; }
.sm-pl-namebox { display: flex; flex-direction: column; gap: 4px; }
.sm-pl-namebox .sm-pl-labelin { font-weight: 700; font-size: 1.05em; width: 14em; }
.sm-pl-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-start; }
.sm-reg { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
.sm-keys { width: 100%; max-width: 420px; height: 36px; display: block; }
.sm-keys .wk { fill: #fff; stroke: #6b7486; stroke-width: .8; }
.sm-keys .wk.in { fill: #3f84d6; }
.sm-keys .bk { fill: #2b2f38; }
.sm-keys .bk.in { fill: #0f2f57; }
.sm-reg-sl { position: relative; height: 26px; max-width: 420px; }
.sm-reg-sl input { position: absolute; left: 0; right: 0; top: 0; width: 100%; margin: 0; pointer-events: none; background: transparent; height: 26px; }
.sm-reg-sl input::-webkit-slider-thumb { pointer-events: auto; }
.sm-reg-sl input::-moz-range-thumb { pointer-events: auto; }
.sm-reg-t { font-weight: 700; }
.sm-picchoice { display: flex; flex-direction: column; gap: 4px; }
.sm-picrow { display: flex; gap: 6px; }
.sm-picrow .sm-picbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; padding: 6px 8px; min-width: 70px; }
.sm-picico { width: 36px; height: 26px; }
.sm-picnm { font-size: 12px; font-weight: 600; }
.sm-map-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); }
.sm-map-toggle .sm-map-sw { width: 40px; height: 24px; min-height: 24px; border-radius: 999px; background: #767e8e; position: relative; flex: none; border: 0; padding: 0; }
.sm-map-toggle .sm-map-sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.sm-map-toggle .sm-map-sw.on { background: #23733c; }
.sm-map-toggle .sm-map-sw.on::after { left: 20px; }
.sm-map-tt { font-weight: 600; }
.sm-map-mini { display: block; width: 92px; height: 40px; flex: none; }
.sm-map-mini .mel { stroke: #a8520f; stroke-width: 2; fill: none; }
.sm-map-mini .band { fill: #4b5363; opacity: .5; }
.sm-tones { gap: var(--space-2) var(--space-3); }
.sm-deco { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.sm-deco-kit { width: 64px; height: 64px; }
.sm-deco-col { display: flex; flex-direction: column; gap: var(--space-1); }
.sm-deco-ico { width: 20px; height: 20px; margin-right: 4px; }
.sm-spgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
.sm-spgrid .sm-addsp { display: flex; align-items: center; gap: 8px; padding: 8px 10px; text-align: left; }
.sm-spgrid-ico { width: 22px; height: 22px; }
.sm-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-2) var(--space-3); }
.sm-tempo input { width: 4.5em; }
.sm-info-aboutrow textarea { width: 100%; min-height: 3.5em; }
@media (prefers-reduced-motion: reduce) { .sm-switch-knob::after, .sm-map-toggle .sm-map-sw::after { transition: none; } }

/* 작은 칸(듣기 설정 · 검사 목록) — 맨 위 줄 오른쪽 아래에 뜸 */
.sm-pop { position: absolute; top: 52px; right: 16px; z-index: 6; background: var(--bg-1); border: 1px solid #6b7486; border-radius: 10px; padding: var(--space-3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: var(--space-2); width: min(440px, calc(100% - 32px)); max-height: 70vh; overflow: auto; }
.sm-pop-file { width: auto; min-width: 220px; }
.sm-pop-file .arr-btn { text-align: left; }
.sm-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sm-check-list .sm-check-go { width: 100%; text-align: left; white-space: normal; }
.sm-check-error .sm-check-go { background: #ffd9d4; color: #8b1c13; }
.sm-check-warn .sm-check-go { background: #fff3c4; color: #6b4300; }
.sm-check-ok { background: #d9f2df; color: #155c2c; font-weight: 700; padding: 6px 10px; border-radius: 6px; }
.sm-prog-read.arr-error { color: var(--err, #c0392b); }

/* 모음 창 — 스케일러 둘러보기(왼쪽 분류 → 카드 → ▶) */
.sm-lib-modal { position: absolute; inset: 0; z-index: 8; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 24px 16px; }
.sm-lib-card0 { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: var(--space-3); width: min(1200px, 100%); display: flex; flex-direction: column; gap: var(--space-2); }
.sm-lib-where { color: var(--ink-1, var(--ink-0)); font-size: 12.5px; }
.sm-lib-body { display: grid; grid-template-columns: minmax(180px, 220px) 1fr; gap: var(--space-3); }
.sm-lib-side { display: flex; flex-direction: column; gap: var(--space-2); }
.sm-lib-grp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sm-lib-grp .arr-label { width: 100%; }
.sm-lib-main { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
@media (max-width: 720px) { .sm-lib-body { grid-template-columns: 1fr; } }

/* 조각 찍기(style_maker_grid.js) */
.smg-modal { position: absolute; inset: 0; z-index: 10; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 24px 16px; }
.smg-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: var(--space-3); width: min(1100px, 100%); display: flex; flex-direction: column; gap: var(--space-2); }
.smg-headrow { display: flex; align-items: center; gap: 8px; }
.smg-ico { width: 24px; height: 24px; }
.smg-title { font-weight: 700; flex: 1; }
.smg-meta, .smg-tools, .smg-sel { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.smg-morebtn.on, .smg-tools .smg-cbase.on { background: var(--ink-0); color: var(--bg-1); }
.smg-meta .smg-more[hidden] { display: none !important; }
.smg-body { overflow-x: auto; }
.smg-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); user-select: none; }
.smg-grid > div { background: var(--bg-1); min-height: var(--smg-row, 24px); }
.smg-corner, .smg-head { font-size: 11px; color: var(--ink-1, var(--ink-0)); text-align: center; }
.smg-head.beat { color: var(--ink-0); font-weight: 600; }
.smg-label { font-size: 12px; padding: 2px 6px; white-space: nowrap; display: flex; align-items: center; }
.smg-cell { cursor: pointer; position: relative; }
.smg-cell.beat { box-shadow: inset 1px 0 0 var(--ink-1, var(--ink-0)); }
.smg-cell:hover { background: var(--bg-2); }
.smg-cell.on { background: var(--accent); }
.smg-cell.on.tail { opacity: .6; }
.smg-cell.accent { box-shadow: inset 0 0 0 2px var(--ink-0); }
.smg-cell.sel { outline: 2px solid #b77814; outline-offset: -2px; }
/* 여러 마디 조각 — 마디 머리 줄 · 마디 경계 굵은 선 */
.smg-barhead { font-size: 11px; font-weight: 600; color: var(--ink-1, var(--ink-0)); padding-left: 4px; display: flex; align-items: center; }
.smg-cell.bar, .smg-head.bar, .smg-barhead.bar { box-shadow: inset 2px 0 0 var(--ink-0); }
.smg-off { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.smg-vel { width: 9em; }
.smg-msg.arr-error { color: var(--err, #c0392b); }
.smg-msg.warn { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; color: var(--ink-0); }   /* 닫을 때 묻기(저장 / 저장 안 하고 닫기 / 계속 찍기) */
.smg-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); }

/* 4-M 곡 듣기 때 지금 소리 나는 칸 — 고른 칸(주황 안쪽 테두리)과 헷갈리지 않게 하늘색 바깥 빛(노랑은 주황과 비슷해 보였음) · 밝은 테마 = 짙은 하늘색(바탕과 3 : 1 이상) */
.sm-screen { --sm-now: #38bdf8; }
[data-theme="light"] .sm-screen { --sm-now: #0369a1; }
.sm-map .sm-map-sec.sm-now, .sm-map .sm-map-sph.sm-now { box-shadow: 0 0 0 3px var(--sm-now), 0 0 12px 2px var(--sm-now); position: relative; z-index: 1; }
.sm-map .sm-map-cell.sm-now { box-shadow: 0 0 0 2px var(--sm-now); }
.sm-map .sm-map-cell.sel.sm-now { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 2px var(--sm-now); }
/* 4-M 겹치면 — 문장 + 칩(✓ = 겹치는 마디를 이 칸대로) · 구간 칩 한 줄 */
.sm-cf { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sm-cf-h { font-weight: 700; }
.sm-cf-note { font-size: 12px; color: var(--ink-1, var(--ink-0)); }
.sm-cf-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sm-cf-when { min-width: 0; overflow-wrap: anywhere; }
.sm-cf-arrow { color: var(--ink-1, var(--ink-0)); }
.sm-screen .sm-cf-chip { border-radius: 999px; padding: 3px 12px; min-height: 28px; }
.sm-screen .sm-cf-chip.on { background: var(--ink-0); color: var(--bg-1); border-color: var(--ink-0); font-weight: 700; }
.sm-ent-whentext { font-size: 12px; color: var(--ink-1, var(--ink-0)); }
/* 4-N 그림 뜻(지도 아래 한 줄 — 지금 지도에 있는 그림만) · 서랍 설명 한 줄 · 필인 한 줄 */
.sm-map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--ink-1, var(--ink-0)); }
.sm-lg-h { font-weight: 700; color: var(--ink-0); }
.sm-lg-item { display: inline-flex; align-items: center; gap: 4px; }
.sm-lg-own { width: 0; height: 0; border-top: 12px solid #a585e0; border-right: 12px solid transparent; }
.sm-dsub { font-size: 12.5px; color: var(--ink-1, var(--ink-0)); }
.sm-fill-line { align-items: center; gap: 10px; }
