/* 우리성가대 — 뮤직홈과 같은 중립 색·글꼴·버튼. 승인 시안(시안/choir-music-home.html)의 토큰을 따른다. */
:root {
  color-scheme: light dark;
  --bg: #fbfbfa; --side: #f1f1ef; --panel: #fff; --fg: #1b1b1b; --muted: #6e6e6b;
  --line: rgba(0,0,0,.1); --hover: rgba(0,0,0,.045); --selected: rgba(0,0,0,.075);
  --blue: #2f6fde; --blue-bg: #eaf0fb; --green: #1f8a43; --green-bg: #edf6ef; --orange: #aa6508; --orange-bg: #fbf2e5;
  --red: #d23b2f; --red-bg: #fbeceb; --play: #e53935; --radius: 9px;
  --k-dark: #12151c; --k-muted: #9296a1; --k-soprano: #60caff; --k-alto: #ff8dbc; --k-tenor: #c4b5fd; --k-bass: #75dfc1;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* 악보 쪽 바깥 바탕: 앱 필기·읽기 판(PencilKit, 항상 밝은 화면 #ededf0)과 같은 한 색. 어두운 화면에서도 바꾸지 않아 쪽 넘김·확대 때 웹/앱 판이 교대해도 검정↔연회색으로 깜빡이지 않는다(2026-10-20 실물 제보·시뮬레이터 프레임 실측). */
  --score-surround: #ededf0; --score-gap: #d9d9de;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --side: #191919; --panel: #1c1c1c; --fg: #ececea; --muted: #a0a09c;
    --line: rgba(255,255,255,.11); --hover: rgba(255,255,255,.05); --selected: rgba(255,255,255,.09);
    --blue: #72a2f2; --blue-bg: #203047; --green: #5cc47f; --green-bg: #20352a; --orange: #f0a14a; --orange-bg: #3b2d1d; --red: #ff7b72; --red-bg: #3a1f1d;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); }
body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: transparent; padding: 0; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, summary:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: var(--blue); }
.icon { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 버튼 */
.action { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 11px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; white-space: nowrap; background: var(--panel); }
.action:hover:not(:disabled) { background: var(--hover); }
.action.primary { background: var(--fg); color: var(--bg); border-color: transparent; }
.action.primary:hover:not(:disabled) { background: var(--fg); opacity: .88; }
.action.blue { color: var(--blue); background: var(--blue-bg); border-color: transparent; }
.action.danger { color: var(--red); }
.action.small { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.icon-action { height: 36px; width: 36px; border-radius: 8px; display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-action:hover:not(:disabled) { background: var(--hover); }
@media (pointer: coarse) {
  .icon-action, .play-button, .action, .tool, .view-switch button { min-height: 44px; }
  .icon-action, .play-button, .view-switch button { min-width: 44px; }
  /* .action.small(0,2,0)과 연습 상태 칩도 터치에서는 44px을 보장한다 */
  .action.small, .pc .pc-chip { min-height: 44px; }
}

/* 로그인 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; padding: 26px 22px; box-shadow: 0 12px 36px rgba(0,0,0,.06); }
.login-card h1 { display: flex; gap: 8px; align-items: center; font-size: 21px; margin: 0 0 6px; letter-spacing: -.03em; }
.login-card form { margin-top: 14px; }
.login-google { margin-top: 22px; display: grid; gap: 8px; }
.login-google-button { width: 100%; min-height: 48px; font-size: 15px; gap: 10px; }
.google-mark { width: 20px; height: 20px; flex-shrink: 0; background: #fff; border-radius: 50%; padding: 2px; }
.login-note { font-size: 13px; line-height: 1.45; word-break: keep-all; }
.login-more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.login-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; }
.login-more summary::-webkit-details-marker { display: none; }
.login-more summary::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.login-more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
/* 앱 업데이트 안내: 앱 안 일정·자료실·로그인 화면 위쪽 띠. 연습·악보 화면에서는 띄우지 않는다. */
#app-update { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.06); padding: var(--sa-top, 0px) max(12px, var(--sa-right, 0px)) 0 max(12px, var(--sa-left, 0px)); }
.app-update-inner { max-width: 760px; margin: 0 auto; min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.app-update-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; word-break: keep-all; }
#app-update .action.small { min-height: 40px; padding: 4px 12px; font-size: 13px; }
body.app-update-on { padding-top: var(--update-h, 52px); }
body.app-update-on .app-head { top: var(--update-h, 52px); padding-top: 10px; }
body:has(.practice) #app-update { display: none; }
body.app-update-on:has(.practice) { padding-top: 0; }
body.app-update-on .login { min-height: calc(100vh - var(--update-h, 52px)); }
.notice { padding: 12px; border-radius: var(--radius); background: var(--side); font-size: 13px; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; }
.notice.warn { background: var(--orange-bg); color: var(--orange); }
.notice.error { background: var(--red-bg); color: var(--red); }
.notice.ok { background: var(--green-bg); color: var(--green); }
.notice code { font-size: 12px; }

/* 앱 틀 */
.app-head { min-height: 60px; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; gap: 8px; align-items: center; font-size: 18px; font-weight: 700; letter-spacing: -.03em; min-height: 40px; }
.brand .icon { width: 21px; height: 21px; }
.profile { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; min-height: 40px; border-radius: 9px; padding: 0 4px; }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: var(--fg); background: var(--selected); font-weight: 600; font-size: 13px; }
.app-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: calc(100vh - 61px); }
.app-aside { padding: 18px 14px; background: var(--side); border-right: 1px solid var(--line); min-width: 0; }
.workspace { min-width: 0; padding-bottom: 40px; }
.nav-entry { width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; border-radius: var(--radius); text-align: left; }
.nav-entry:hover { background: var(--hover); }
.nav-entry.active { background: var(--selected); font-weight: 600; }
.aside-label { color: var(--muted); font-size: 12px; padding: 18px 10px 8px; }
.aside-tracks { margin-top: 17px; border-top: 1px solid var(--line); padding-top: 4px; }
.aside-track { display: flex; align-items: center; gap: 7px; width: 100%; padding: 9px; text-align: left; border-radius: var(--radius); font-size: 13px; min-height: 38px; }
.aside-track:hover { background: var(--hover); }
.aside-track .track-role { min-width: 37px; color: var(--muted); font-size: 11px; }
.aside-track .track-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small-month { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin: 24px 2px 8px; font-size: 13px; font-weight: 600; }
.small-month [data-month-label] { white-space: nowrap; min-width: 0; }
.small-month .month-nav { flex-shrink: 0; gap: 0; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar .weekday { color: var(--muted); text-align: center; font-size: 11px; padding: 5px 0; }
.day { aspect-ratio: 1; min-height: 28px; position: relative; border-radius: 8px; font-size: 12px; display: grid; place-items: center; }
.day:hover { background: var(--hover); }
.day.today { font-weight: 700; color: var(--blue); }
.day.has-event::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); bottom: 3px; }
.day.selected { background: var(--fg); color: var(--bg); font-weight: 600; }
.day.selected::after { background: var(--bg); }
.month-nav { display: flex; gap: 2px; }
.month-nav button { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
.month-nav button:hover { background: var(--hover); }

.content-head { padding: 25px 28px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.content-head h2 { font-size: 24px; letter-spacing: -.04em; line-height: 1.2; margin: 0 0 7px; font-weight: 700; }
.content-head .title-edit { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.schedule-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 28px 18px; }
.schedule-actions .clear-menu { margin-left: auto; }
.song-list { list-style: none; margin: 0; padding: 0 28px; }
.song-row { display: flex; align-items: center; gap: 10px; min-height: 74px; border-top: 1px solid var(--line); }
.song-main { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; min-height: 72px; text-align: left; border-radius: 8px; padding: 8px 3px; }
.song-main:hover { background: var(--hover); }
.song-cover { width: 41px; height: 43px; border-radius: 7px; background: var(--side); color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
.song-text { min-width: 0; flex: 1; display: block; }
.song-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.song-meta { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.song-meta .role { color: var(--fg); }
.st-ready { color: var(--green); }
.st-needs_review, .st-missing { color: var(--orange); }
.st-processing { color: var(--blue); }
.st-failed { color: var(--red); }
.row-next { color: var(--muted); flex-shrink: 0; }
.inline-status { margin: 22px 28px; padding: 12px; border-radius: var(--radius); display: flex; gap: 10px; align-items: center; background: var(--side); font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 60px 20px 90px; }
.empty .empty-icon { color: var(--muted); margin-bottom: 12px; }
.empty .empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { margin: 0 0 8px; font-size: 18px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }

/* 휴대폰 일정 */
.week-area { padding: 12px 20px 0; display: none; }
.month-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.month-title > button { display: flex; align-items: center; gap: 7px; font-weight: 600; min-height: 38px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week-day { padding: 7px 0; border-radius: 12px; display: grid; justify-items: center; gap: 4px; font-size: 16px; min-height: 62px; }
.week-day span { font-size: 11px; color: var(--muted); }
.week-day.selected { background: var(--fg); color: var(--bg); }
.week-day.selected span { color: var(--bg); }
.week-day b { width: 4px; height: 4px; background: transparent; border-radius: 50%; }
.week-day.has-event b { background: var(--blue); }
.week-day.selected b { background: var(--bg); }
.mobile-calendar { margin: 5px 0 12px; }
.mobile-calendar .day { font-size: 14px; }
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 12px calc(8px + var(--safe-bottom)); }
.bottom-nav button { flex: 1; min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 11px; border-radius: 9px; }
.bottom-nav button.active { color: var(--fg); font-weight: 600; }

/* 자료실 */
.library-search { display: flex; align-items: center; gap: 8px; margin: 0 28px 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; background: var(--panel); color: var(--muted); }
.library-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font-size: 14px; color: var(--fg); }
.tabs { display: inline-flex; gap: 3px; border-radius: 8px; padding: 3px; background: var(--side); }
.tabs button { min-height: 30px; padding: 4px 10px; border-radius: 6px; font-size: 12px; color: var(--muted); }
.tabs button.active { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.detail { padding: 0 28px 30px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 15px; }
.version-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; }
.version-row:first-of-type { border-top: 0; }
.version-row .grow { flex: 1; min-width: 160px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; border-radius: 6px; padding: 2px 7px; background: var(--side); color: var(--muted); white-space: nowrap; }
.badge.st-ready { background: var(--green-bg); color: var(--green); }
.badge.st-needs_review { background: var(--orange-bg); color: var(--orange); }
.badge.st-processing { background: var(--blue-bg); color: var(--blue); }
.job-row .badge.st-failed { background: var(--red-bg); color: var(--red); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.warn-list { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--orange); }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; }
.compare figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* 대화상자·알림 */
.dialog-layer { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.32); padding: 60px 16px 20px; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; }
.dialog { width: 100%; max-width: 480px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 12px 35px rgba(0,0,0,.16); }
.dialog.wide { max-width: 760px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.dialog h3 { font-size: 19px; letter-spacing: -.02em; margin: 0; }
.dialog-choice { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }
.dialog-choice .action { flex: 1; padding: 7px; font-size: 12px; }
.dialog-choice .action.active { color: var(--blue); background: var(--blue-bg); border-color: transparent; }
.field { display: grid; gap: 6px; font-size: 12px; margin-bottom: 13px; }
.field input, .field textarea, .field select, .input { background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: var(--radius); width: 100%; min-width: 0; font-size: 14px; }
.field textarea { resize: vertical; min-height: 120px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 10px 0; }
.dialog-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.upload-target { padding: 20px 15px; border: 1px dashed var(--line); border-radius: 11px; display: grid; justify-items: center; gap: 10px; margin: 12px 0; color: var(--muted); text-align: center; }
.upload-target.drag { border-color: var(--blue); background: var(--blue-bg); }
.progress { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; width: 100%; }
.progress > i { display: block; height: 100%; background: var(--blue); width: 0; transition: width .2s; }
.match-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 10px; text-align: left; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--panel); }
.match-option:hover { background: var(--hover); }
.match-option strong { display: block; font-size: 14px; margin-bottom: 3px; }
.match-option span { color: var(--muted); font-size: 12px; }
.match-option > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
/* 줄마다 격자: 날짜 칸은 iOS 날짜 입력(16px 글자) 전체가 보이는 폭, 칸끼리 겹치지 않게 간격을 둔다 */
.preview-table, .preview-table tbody { display: block; }
.preview-table tr { display: grid; grid-template-columns: 184px 104px 76px minmax(0, 1fr) 44px; column-gap: 6px; align-items: center; border-bottom: 1px solid var(--line); padding: 5px 0; }
.preview-table td { padding: 0; border-bottom: 0; min-width: 0; }
.preview-table select, .preview-table input { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; padding: 6px; background: var(--bg); font-size: 13px; }
/* iOS 날짜 입력은 기본 모양일 때 칸 폭보다 넓게 그려져 옆 칸을 덮는다: 기본 모양을 끄고 칸 폭 안에서 그린다(누르면 날짜 선택기는 그대로) */
.preview-table input[type=date] { -webkit-appearance: none; appearance: none; min-height: 40px; text-align: left; }
.preview-table input[type=date]::-webkit-date-and-time-value { text-align: left; }
.preview-table .del-col { display: flex; justify-content: center; }
.preview-table tr.uncertain { background: var(--orange-bg); }
/* 좁은 화면: 날짜·순서를 한 줄, 번호·제목을 다음 줄로(곡 미정·제목이 가려지지 않게) */
@media (max-width: 600px) {
  .preview-table tr { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 40px; grid-template-areas: "date date role del" "num title title title"; row-gap: 4px; padding: 4px 0; }
  .preview-table .date-col { grid-area: date; }
  .preview-table .role-col { grid-area: role; }
  .preview-table .num { grid-area: num; }
  .preview-table .title-col { grid-area: title; }
  .preview-table .del-col { grid-area: del; }
}
@media (max-width: 360px) {
  .preview-table tr { grid-template-columns: 90px minmax(0, 1fr) 40px; grid-template-areas: "date date del" "role num num" "title title title"; }
}
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(80px + var(--safe-bottom)); z-index: 50; margin: auto; max-width: 520px; padding: 12px 14px; border-radius: 11px; background: var(--fg); color: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.toast button { color: inherit; font-weight: 600; padding: 6px; }
/* 앱 필기 판(웹 위의 네이티브 보기)이 악보 영역을 덮는 동안 아래 알림은 판에 가려 보이지 않는다(아이폰 시뮬레이터 실측). 그동안은 화면 위쪽에 띄우고, 글자는 아래 조작 터치를 막지 않는다. */
body:has(.score-viewport.native-ink) .toast { top: calc(var(--sa-top, 0px) + 8px); bottom: auto; pointer-events: none; }
body:has(.score-viewport.native-ink) .toast button { pointer-events: auto; }
.menu-list { display: grid; gap: 2px; }

/* 연습 화면: 사이드바 없이 전체 폭 */
.practice { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.player { position: sticky; top: 0; z-index: 12; background: var(--bg); }
.player-main { display: flex; align-items: center; gap: 10px; padding: 12px 20px 4px; min-width: 0; }
.player-title { min-width: 0; flex: 1; }
.player-title strong { display: block; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-controls { display: flex; gap: 3px; align-items: center; }
.play-button { min-width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.play-button:hover:not(:disabled) { background: var(--hover); }
.play-button.main { background: var(--fg); color: var(--bg); }
.mode-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 5px 20px 8px; }
.view-switch { display: inline-flex; align-items: center; gap: 3px; border-radius: 8px; padding: 3px; background: var(--side); }
.view-switch button { min-height: 30px; padding: 4px 10px; border-radius: 6px; font-size: 12px; color: var(--muted); }
.view-switch button.active { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.control-select { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.control-select select { min-width: 0; border: 1px solid transparent; border-radius: 7px; padding: 6px 3px; font-size: 12px; color: var(--fg); background: var(--side); min-height: 31px; }
.listening-controls { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.instrument-note { font-size: 11px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.instrument-note.fallback { color: var(--orange); }
/* 얇은 재생선: 보이는 선은 2px, 실제 터치 영역은 28px */
.seek-wrap { position: relative; height: 28px; margin-bottom: -14px; z-index: 2; touch-action: none; }
.seek-wrap::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.seek { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; --pct: 0%; }
.seek::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--play) var(--pct), transparent var(--pct)); }
.seek::-moz-range-track { height: 2px; background: transparent; }
.seek::-moz-range-progress { height: 2px; background: var(--play); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--play); margin-top: -5px; }
.seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--play); }
.seek:disabled { cursor: default; }
.practice-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.practice-message { padding: 40px 20px; max-width: 560px; margin: 0 auto; text-align: center; }

/* 가사 무대 (AllForYou식) */
.k-stage { --voices: #fff; container-type: inline-size; background: var(--k-dark); color: #f7f8fb; padding: 22px 32px 20px; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.k-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; min-height: 64px; flex-wrap: wrap; }
.k-label { display: block; color: #a5a9b3; font-size: 12px; margin-bottom: 5px; }
.k-who { display: flex; gap: 8px; align-items: center; font-size: 21px; font-weight: 800; letter-spacing: -.025em; flex-wrap: wrap; }
.k-who .sep { color: #646c7a; font-size: 13px; }
.k-cue { text-align: right; }
.k-cue .k-who { justify-content: flex-end; }
.k-count { color: #fff; font-size: 30px; line-height: 1; font-weight: 900; -webkit-text-stroke: 1.6px var(--k-color, #fff); paint-order: stroke fill; margin-left: 3px; }
.k-rows { display: flex; flex-direction: column; justify-content: center; gap: 20px; flex: 1; padding: 14px 0; min-height: 300px; }
.k-slot { display: flex; align-items: center; gap: 16px; min-height: 120px; position: relative; }
.k-slot.upcoming { opacity: .62; }
.k-names { display: flex; flex-direction: column; justify-content: center; width: 86px; flex-shrink: 0; gap: 4px; }
.k-name { padding: 3px 0 3px 8px; border-left: 3px solid var(--voice-color); color: var(--voice-color); font-size: 13px; font-weight: 800; white-space: nowrap; }
.k-rest { color: #7c828f; font-size: 15px; font-weight: 700; }
.k-words { display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap; row-gap: 8px; flex: 1; min-width: 0; font-size: clamp(25px, 7.5cqw, 60px); font-weight: 900; line-height: 1.13; letter-spacing: -.035em; }
.k-rows.rows-3 .k-words { font-size: clamp(23px, 6.5cqw, 50px); }
.k-rows.rows-4 .k-words { font-size: clamp(21px, 5.6cqw, 44px); }
.k-rows.rows-3 .k-slot, .k-rows.rows-4 .k-slot { min-height: 90px; }
.k-rows.rows-4 { gap: 12px; }
.k-word { display: inline-flex; flex-direction: column; align-items: center; position: relative; min-width: .9em; }
.k-word.word-end { margin-right: .3em; }
.k-notes { display: flex; gap: 2px; align-items: flex-end; justify-content: center; margin-bottom: 8px; min-height: 22px; }
.k-tone { position: relative; font-size: 14px; line-height: 1.1; font-weight: 800; letter-spacing: 0; min-width: 1.5em; min-height: 26px; padding: 2px 3px; text-align: center; color: var(--k-muted); border-radius: 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end; touch-action: manipulation; }
.k-tone:hover { background: rgba(255,255,255,.06); }
.k-tone .acc { font-size: .8em; }
.k-tone.inferred { text-decoration: underline dotted; }
.k-tone .t-fill { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--tone-color); width: 0; border-radius: 1px; }
.k-tone.pressed { background: rgba(255,255,255,.14); }
.k-glyphs { display: flex; flex-direction: column; align-items: center; }
.k-glyph { display: inline-block; position: relative; white-space: nowrap; min-height: 1.1em; }
.k-base { display: block; white-space: nowrap; color: var(--k-muted); -webkit-text-stroke: 1.2px #05060a; paint-order: stroke fill; }
.k-fill { position: absolute; left: 0; top: 0; overflow: hidden; height: 100%; white-space: nowrap; width: 0; }
.k-painted { display: block; color: transparent; background: var(--voices); background-clip: text; -webkit-background-clip: text; }
.k-melisma { display: block; height: .1em; min-width: .7em; margin-top: .55em; background: #4a505c; border-radius: 2px; }
.k-glyph.variant { font-size: .62em; opacity: .9; }
.k-glyph.variant .k-part-tag { font-size: 10px; margin-right: 2px; vertical-align: super; }
.k-here { position: absolute; right: 0; top: 0; color: #a5a9b3; font-size: 11px; display: inline-flex; gap: 4px; align-items: center; min-height: 32px; padding: 0 8px; border-radius: 7px; background: #1d222c; }
.k-here:hover { color: #fff; }
.k-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid #2b303b; padding-top: 12px; color: #a5a9b3; font-size: 11px; }
.k-octaves { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.k-octaves span { display: flex; align-items: center; gap: 5px; }
.k-octaves b { display: inline-block; width: 6px; height: 6px; border-radius: 2px; }
.k-hint { color: #c9ccd3; min-height: 1.4em; }
/* 전체 가사 스크롤 */
.k-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 40px; min-height: 300px; overscroll-behavior: contain; }
.k-block { border-top: 1px solid #262b35; padding: 16px 0 14px; position: relative; }
.k-block.current { background: linear-gradient(90deg, rgba(96,202,255,.06), transparent 70%); }
.k-block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #8c919c; font-size: 11px; margin-bottom: 8px; }
.k-block .k-slot { min-height: 0; padding: 6px 0; }
.k-block .k-words { font-size: clamp(19px, 4.4cqw, 34px); justify-content: flex-start; }
.k-block .k-names { width: 74px; }
.k-follow { position: sticky; bottom: 10px; margin: 0 auto; display: flex; width: fit-content; gap: 6px; align-items: center; background: #2c3340; color: #fff; border-radius: 18px; padding: 8px 14px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* 악보 보기 */
.score-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 16px 16px 12px; gap: 10px; }
.score-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin: 0 auto; }
.score-viewport { position: relative; flex: 1; min-height: 360px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: var(--score-surround); border-radius: 6px; width: 100%; margin: 0 auto; }
.score-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.score-sheet canvas, .score-sheet .svg-page, .score-sheet img { display: block; width: 100%; height: 100%; }
.score-sheet .svg-page svg { width: 100%; height: 100%; display: block; }
.score-overlay { position: absolute; inset: 0; pointer-events: none; }
.score-viewport.native-ink { outline: none; }
.note-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; width: 100%; margin: 0 auto; font-size: 13px; color: var(--fg); }
.ink-tools { margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 7px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 3px; width: fit-content; max-width: 100%; }
.ink-tools .tool { min-width: 34px; min-height: 36px; padding: 5px 7px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; }
.ink-tools .tool:hover:not(:disabled) { background: var(--hover); }
.ink-tools .tool.active { color: var(--blue); background: var(--blue-bg); }
.ink-divider { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.sheet-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); width: 100%; margin: 0 auto; }
.sheet-pagination > span { display: flex; gap: 6px; align-items: center; }
.page-nav { display: flex; align-items: center; gap: 4px; }

/* 반응형 */
@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 195px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app-layout { display: block; }
  .app-aside { display: none; }
  .week-area { display: block; }
  .bottom-nav { display: flex; }
  .workspace { padding-bottom: calc(90px + var(--safe-bottom)); }
  .content-head { padding: 18px 20px 14px; }
  .content-head h2 { font-size: 21px; }
  .schedule-actions { padding: 0 20px 14px; }
  .song-list { padding: 0 20px; }
  .inline-status { margin: 16px 20px; }
  .library-search { margin: 0 20px 18px; }
  .detail { padding: 0 20px 30px; }
  .app-head { padding: 8px 16px; min-height: 54px; }
  .listening-controls { margin-left: 0; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 6px; }
  .k-stage { padding: 14px 15px 16px; }
  .k-names { width: 54px; }
  .k-name { font-size: 11px; padding-left: 5px; }
  .k-slot { gap: 8px; }
  .k-who { font-size: 15px; gap: 5px; }
  .k-count { font-size: 26px; }
  .k-tone { font-size: 12px; min-height: 30px; }
  .k-block .k-names { width: 50px; }
  .score-wrap { padding: 10px 0 10px; }
  .score-viewport { border-radius: 0; min-height: 300px; }
  .ink-tools .tool span { display: none; }
  .sheet-pagination, .score-heading { padding: 0 12px; }
}
@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .player-main { padding: 9px 12px 3px; gap: 4px; }
  .player-title strong { font-size: 14px; }
  .mode-controls { padding: 4px 12px 8px; gap: 7px; }
  .player-controls .skip { display: none; }
  .k-words { font-size: clamp(22px, 8.5cqw, 40px); }
  .k-rows.rows-4 .k-words { font-size: clamp(18px, 6.6cqw, 30px); }
  .k-here span { display: none; }
  .dialog { padding: 16px; }
  .dialog-layer { padding: 50px 10px 18px; }
}
@media (max-width: 340px) {
  .control-select > span { display: none; }
  .view-switch button { padding: 4px 7px; }
}

/* ---- 휴대폰·아이패드(터치) 우선 다듬기 ---- */
:root { --sa-top: env(safe-area-inset-top, 0px); --sa-left: env(safe-area-inset-left, 0px); --sa-right: env(safe-area-inset-right, 0px); }
button, a, select, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.app-head { padding-top: calc(10px + var(--sa-top)); padding-left: max(20px, var(--sa-left)); padding-right: max(20px, var(--sa-right)); }
.player { padding-top: var(--sa-top); }
.player-main, .mode-controls { padding-left: max(20px, var(--sa-left)); padding-right: max(20px, var(--sa-right)); }
.k-stage { padding-left: max(32px, var(--sa-left)); padding-right: max(32px, var(--sa-right)); padding-bottom: calc(20px + var(--safe-bottom)); }
.score-wrap { padding-bottom: calc(12px + var(--safe-bottom)); padding-left: max(16px, var(--sa-left)); padding-right: max(16px, var(--sa-right)); }
.practice { overscroll-behavior: none; }
.dialog-layer { padding-top: calc(60px + var(--sa-top)); }
/* iOS는 16px보다 작은 입력 글자에 초점이 가면 화면을 확대한다 */
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea, .field input, .field select, .field textarea, .input, .preview-table input, .preview-table select, .control-select select, .library-search input { font-size: 16px; }
}
@media (pointer: coarse) {
  .control-select select { min-height: 44px; }
  .brand, .profile { min-height: 44px; }
  .k-here { min-height: 44px; padding: 0 12px; }
  .tabs button { min-height: 44px; }
  .k-tone { min-width: 34px; min-height: 40px; }
  .k-tone::after { content: ""; position: absolute; inset: -6px -2px; }
  .day { min-height: 40px; }
  .week-day { min-height: 64px; }
  .aside-track, .nav-entry { min-height: 44px; }
  .month-nav button { width: 44px; height: 44px; }
  .month-title > button { min-height: 44px; }
  .small-month .month-nav button { width: 38px; } /* 좁은 사이드바: 높이 44로 터치 영역 유지, 폭만 줄여 월 제목이 한 줄 */
  .k-follow { min-height: 44px; }
  .page-nav .icon-action { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .k-stage { padding-left: max(15px, var(--sa-left)); padding-right: max(15px, var(--sa-right)); }
  .player-main, .mode-controls { padding-left: max(12px, var(--sa-left)); padding-right: max(12px, var(--sa-right)); }
  .score-wrap { padding-left: var(--sa-left); padding-right: var(--sa-right); }
}
/* 휴대폰 가로: 조작부를 줄이고 가사를 크게 */
@media (max-height: 520px) and (orientation: landscape) {
  .app-head { min-height: 48px; padding-top: calc(4px + var(--sa-top)); padding-bottom: 4px; }
  .player-main { padding-top: 6px; padding-bottom: 2px; }
  .mode-controls { padding-top: 2px; padding-bottom: 4px; }
  .listening-controls { width: auto; border-top: 0; padding-top: 0; margin-left: auto; }
  .k-stage { padding-top: 10px; }
  .k-top { min-height: 0; }
  .k-rows { min-height: 0; gap: 8px; padding: 6px 0; }
  .k-slot, .k-rows.rows-3 .k-slot, .k-rows.rows-4 .k-slot { min-height: 0; }
  .k-words { font-size: clamp(20px, 4.2cqw, 38px); }
  .k-rows.rows-4 .k-words { font-size: clamp(16px, 3.3cqw, 28px); }
  .k-footer { border-top: 0; padding-top: 0; } .k-footer > .k-hint, .k-footer > .k-octaves { display: none; } /* 가로: 안내·범례는 숨기고 작은 이동 아이콘만 */
  .k-scroll { min-height: 0; } /* 가로: 목록이 화면 높이를 넘겨 아래 아이콘을 밀어내지 않게 */
  .bottom-nav { padding-top: 2px; }
  .bottom-nav button { min-height: 44px; }
  .score-viewport { min-height: 220px; }
}
@media (pointer: coarse) {
  .play-button, .icon-action { min-width: 44px; min-height: 44px; }
  .view-switch button { min-height: 44px; }
  .k-here { min-width: 44px; justify-content: center; }
}
/* 좁은 휴대폰: 파트 이름을 가사 위로 올려 가사 폭을 넓힌다 */
@media (max-width: 480px) {
  .k-slot { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 2px; }
  .k-names { flex-direction: row; width: auto; min-height: 44px; align-items: center; padding-right: 52px; flex-wrap: wrap; }
  .k-block .k-names { width: auto; }
  .k-words { justify-content: flex-start; }
  .k-rows { gap: 14px; }
  .k-rows.rows-3 .k-slot, .k-rows.rows-4 .k-slot { min-height: 0; }
  .k-rows.rows-4 { gap: 6px; }
  .k-rows.rows-4 .k-words, .k-rows.rows-3 .k-words { font-size: clamp(20px, 7cqw, 30px); }
  .k-tone { min-width: 30px; }
  .k-tone::after { inset: -6px 0; }
}
@media (max-width: 480px) {
  .k-names { justify-content: flex-start; }
  .player { position: static; }
  .listening-controls { gap: 6px; }
  .instrument-note { font-size: 11px; flex: 1; min-width: 0; }
}

/* 지운 곡 되돌리기 · 최근 선곡표 분석 · AI 인식 기록 (2026-10-15 G05/G06) */
.day-notice { margin: 0 28px 16px; }
.day-notice span { flex: 1; }
.removal-list { display: grid; gap: 10px; }
.removal-batch { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.removal-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.removal-head .grow { flex: 1; min-width: 0; }
.removal-items { margin: 8px 0 0; padding-left: 20px; font-size: 13px; display: grid; gap: 3px; }
.removal-items .role { color: var(--muted); font-size: 12px; margin-right: 4px; }
.removal-state { font-size: 12px; }
.recent-imports { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.recent-imports h4, .omr-section h4 { margin: 0 0 6px; font-size: 13px; }
.omr-section { margin-top: 14px; }
.job-list { list-style: none; margin: 0; padding: 0; }
.job-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.job-row:first-child { border-top: 0; }
.job-row .grow { flex: 1; min-width: 180px; }
.job-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.job-title > span:last-child { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.job-error { font-size: 12px; margin-top: 3px; }
.job-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.job-row .badge.st-failed { background: var(--red-bg); color: var(--red); }
.job-actions a.action { text-decoration: none; color: inherit; }
/* 인터넷 찾아보기 후보: 종류별 조작(A03) */
.cand-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cand-status { font-size: 12px; margin-top: 6px; overflow-wrap: anywhere; }
/* 원본 PDF + 연습 자료 줄: 한 줄 높이, 이름은 줄여 보임. 비교 켬은 확인 완료 버튼과 다른 모양(점선 테두리) */
.companion-note { flex-wrap: nowrap; align-items: center; padding: 4px max(20px, var(--sa-right)) 4px max(20px, var(--sa-left)); }
.companion-note > svg { flex: none; }
.companion-text { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; white-space: nowrap; }
.companion-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.companion-text .badge { flex: none; font-size: 12px; }
.companion-extra { flex: none; color: var(--orange); }
.companion-actions { display: inline-flex; gap: 6px; flex: none; margin-left: auto; }
/* 안내 줄 버튼도 기본 터치 영역 44pt(매뉴얼) — 안내 줄은 버튼 높이만큼만 높아진다 */
.companion-actions .action { min-height: 44px; }
/* 상단 선택칸: 긴 이름은 폭 안에서 줄여 보이고(목록에서는 전체 이름) 조작부가 두 줄을 넘지 않게 */
.control-select select[data-companion] { max-width: 300px; text-overflow: ellipsis; }
.control-select select[data-source] { max-width: 220px; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .control-select select[data-companion] { max-width: 290px; }
  .control-select select[data-source] { max-width: 170px; }
  /* 좁으면 이름만 줄인다: 상태 표·가사가 빈 마디·지도 사용 불가 이유는 그대로 보인다 */
  .companion-prefix { display: none; }
}
.compare-toggle { border-style: dashed; }
.compare-toggle.active { border-style: solid; border-color: var(--orange); color: var(--orange); background: var(--orange-bg); }
.map-status { color: var(--muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.map-status:empty { display: none; }

/* 앱이 애플 기본 도구판(PKToolPicker)을 붙이면 웹의 펜·형광펜·지우개·실행 취소는 도구판과 겹치므로 숨긴다(이동·확대·손가락 설정은 유지). */
.native-picker .ink-tools [data-tool]:not([data-tool="hand"]), .native-picker .ink-tools [data-undo], .native-picker .ink-tools [data-redo] { display: none; }
/* 도구판을 쓰는 앱의 일반 보기(이동·음 확인)에서는 하단 웹 도구 줄 전체를 숨긴다. 필기 중에는 남은 조작을 보인다. */
.native-picker:not(.ink-editing) .ink-tools { display: none; }
/* 앱 도구판이 가리는 아래쪽만큼 하단 조작을 올린다(가림 높이는 앱이 알려 준다). */
.score-wrap.ink-obscured { padding-bottom: calc(12px + var(--ink-obscured, 0px)); }
/* 필기 상태(원형 충돌 고르기·고칠 수 없는 쪽 이유): 필기 근처에 작게, 버튼은 44pt */
.ink-state { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--fg); }
.ink-state[hidden] { display: none; }
/* 악보 머리·필기 상태·하단(쪽 넘김·필기 포함 PDF) 조작은 터치 44pt(.action.small의 30px보다 우선) */
.score-heading .action, .ink-state .action, .sheet-pagination .action { min-height: 44px; }
.sheet-pagination .icon-action { min-width: 44px; min-height: 44px; }
/* 지난 필기: 왼쪽 목록(보관 사본·서버 기록), 오른쪽 지금 필기와 나란히 비교. 좁으면 위아래 */
.ink-history { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 14px; align-items: start; }
.ink-history-list { display: grid; gap: 6px; max-height: 60dvh; overflow: auto; }
.ink-history-list h4 { margin: 6px 0 0; font-size: 13px; }
.ink-history-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ink-history-list p { margin: 0; font-size: 12px; }
.ink-history-item { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; text-align: left; }
.ink-history-item[aria-pressed="true"] { border-color: var(--fg); background: var(--hover); }
.ink-history-item small { color: var(--muted, #666); font-size: 11px; }
.ink-history-confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.ink-history-confirm .action { min-height: 44px; }
.dialog-footer [data-restore], .dialog-footer [data-delete] { min-height: 44px; }
@media (max-width: 640px) { .ink-history { grid-template-columns: 1fr; } .ink-history-list { max-height: 30dvh; } }

/* 굿뉴스에서 가져오기 · 다른 악보 등록하기 (docs/goodnews-import.md) */
.gn-song { margin-bottom: 10px; }
.gn-book { margin-bottom: 12px; }
.gn-book button { min-height: 40px; min-width: 110px; font-size: 13px; }
.gn-number { display: flex; gap: 8px; align-items: flex-end; }
.gn-number .field { flex: 1; max-width: 220px; margin-bottom: 0; }
.gn-number .action { min-height: 44px; }
.gn-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 14px; min-height: 120px; }
.gn-card .notice { margin: 10px 0; }
.gn-source { display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 8px; }
.link-button { color: var(--blue); display: inline-flex; align-items: center; gap: 4px; font-size: 13px; min-height: 44px; padding: 0 4px; }
.link-button svg { width: 14px; height: 14px; }
.gn-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 4px 0 8px; }
.gn-title h4 { font-size: 20px; margin: 2px 0 0; letter-spacing: -.02em; }
.gn-badge { font-size: 12px; padding: 4px 9px; border-radius: 7px; background: var(--side); color: var(--muted); white-space: nowrap; }
.gn-badge.warn { background: var(--orange-bg); color: var(--orange); }
.gn-rows { border-top: 1px solid var(--line); margin-top: 6px; }
.gn-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.gn-row strong { display: block; font-size: 14px; }
.gn-row span { font-size: 12px; color: var(--muted); }
.gn-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--side); display: grid; place-items: center; color: var(--muted); }
.gn-state { font-size: 12px; white-space: nowrap; }
.gn-row .action, .gn-files .icon-action { min-height: 44px; min-width: 44px; }
.gn-row .gn-state.ok { color: var(--green); }
.gn-row .gn-state.warn { color: var(--orange); }
.gn-row .gn-state.off { color: var(--muted); }
.gn-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.gn-foot .action { min-height: 44px; }
.gn-foot .action.primary { margin-left: auto; padding: 8px 16px; font-size: 14px; }
.gn-loading, .gn-empty { display: grid; justify-items: center; gap: 8px; padding: 22px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.gn-empty strong { color: var(--fg); font-size: 16px; }
.gn-status { margin-top: 8px; min-height: 18px; font-size: 12px; }
.gn-detail { font-size: 12px; opacity: .85; }
.gn-choice .match-option { cursor: pointer; min-height: 56px; }
.gn-files { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.gn-files li { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 4px 4px 4px 10px; font-size: 13px; }
.gn-files li span { flex: 1; overflow-wrap: anywhere; }
.gn-picked .action { min-height: 44px; }
.gn-note { font-size: 13px; }

/* 가사 맨 위로·현재 위치로(같은 아래쪽 자리), 마디로 이동의 잠깐 표시 */
.k-float { position: sticky; bottom: 10px; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.k-float .k-follow { position: static; margin: 0; pointer-events: auto; min-height: 44px; }
.k-float .k-follow[hidden] { display: none; }
@keyframes k-flash { from { background: rgba(47,111,222,.28); } to { background: transparent; } }
.k-flash { animation: k-flash 1.5s ease-out; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .k-flash { animation: none; background: rgba(47,111,222,.18); } }

/* 왼쪽 가장자리에서 밀어 이전 화면으로(edge-back.js). 띠는 뒤로 갈 곳이 있을 때만 보인다(투명). */
.edge-back-strip { position: fixed; left: 0; top: 0; bottom: 0; width: 16px; z-index: 35; touch-action: none; background: transparent; }
.edge-back-strip[hidden], .edge-back-mark[hidden] { display: none; }
.edge-back-mark { position: fixed; left: 0; top: 0; z-index: 36; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; pointer-events: none;
  background: var(--panel, #fff); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.16); transition: background-color .12s, color .12s; }
.edge-back-mark.ready { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .edge-back-mark { transition: none; } }

/* 명시 저장의 확인 표시(save-feedback.js): 저장됨·기기에 보관·실패를 색과 글로 구분 */
[data-save-feedback="saved"] { background: var(--green-bg) !important; color: var(--green) !important; font-weight: 600; }
[data-save-feedback="pending"] { background: var(--orange-bg) !important; color: var(--orange) !important; }
[data-save-feedback="failed"] { background: var(--red-bg) !important; color: var(--red) !important; }

/* 전 화면 드래그 금지(2026-10-20 사용자: “전페이지에 드래그는 다 금지”): 글자 선택·이미지 끌기·길게 누르기 메뉴를 막는다.
   입력창·글 상자·편집 영역은 커서·선택·붙여넣기를 그대로 쓴다. 스크롤·확대·쪽 넘김·필기는 터치 동작이라 영향 없음. */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable]:not([contenteditable="false"]), input *, textarea *, [contenteditable]:not([contenteditable="false"]) * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg, canvas, a { -webkit-user-drag: none; }
/* 길게 누르는 계이름(소리 내는 중) */
.k-tone.holding { background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px var(--tone-color, #fff); }

/* 가사 '맨 위로'·'현재 위치로': 가사 위에 떠 있지 않고 아래 상태 줄 오른쪽의 작은 아이콘(보이는 20px·누르는 44px, 2026-10-20 사용자) */
.k-jump { display: flex; gap: 2px; margin-left: auto; }
.k-icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 22px; color: #c9ccd3; background: transparent; }
.k-icon-btn[hidden] { display: none; }
.k-icon-btn .icon { width: 20px; height: 20px; }
.k-icon-btn:active { background: rgba(255,255,255,.12); }

/* 이전 음 · 현재 음 다시 · 다음 음(2026-10-20): 가사 아래 44px 한 줄, 계이름을 누른 뒤에만 잠깐(가사 위에 덮지 않음) */
.k-stepper { display: flex; gap: 6px; flex: none; height: 44px; margin: 4px 0 2px; }
.k-stepper[hidden] { display: none; }
.k-stepper button { flex: 1; min-width: 44px; min-height: 44px; border-radius: 10px; background: #272e39; color: #f2f3f5; font-size: 16px; font-weight: 800; letter-spacing: 0; touch-action: manipulation; }
.k-stepper .k-step-current { flex: 1.25; background: #35405a; }
.k-stepper button:disabled { opacity: .35; }
.k-stepper button:active:not(:disabled) { background: #46526e; }
.k-tone.stepped { background: rgba(255,255,255,.22); }
