/* ===== v138: 토스 스타일 정리 =====
   마지막에 읽히는 층. 기능·마크업 ID 는 그대로 두고 색·여백·모양만 한 벌로 맞춘다.
   원칙: 회색 바탕 위 흰 카드(선 없음), 큰 제목, 꽉 찬 버튼, 팝업은 화면 가운데(모바일은 아래에서 올라오는 시트). */

:root{
  --mm-bg:#f2f4f6; --mm-line:#e5e8eb; --mm-text:#191f28; --mm-muted:#6b7684;
  --mm-radius:20px; --mm-control-radius:12px; --mm-shadow:none;
  --t-sub:#4e5968; --t-faint:#8b95a1; --t-fill:#f2f4f6; --t-fill-2:#e5e8eb; --t-soft:#f9fafb;
  --t-red:#f04452; --t-green:#03a96b;
  --t-lift:0 8px 24px rgba(0,27,55,.08);
  --t-pop:0 24px 80px rgba(0,0,0,.22);
}

/* --- 페이지 머리띠 겹침: body 가 화면 높이로 고정돼 있으면 긴 목록에서 사이트 머리띠가 같이 밀려 올라가고
       연습실 머리띠만 그 아래에 남아 틈이 생긴다 → body 는 내용만큼 늘어나게 --- */
html,body{height:auto}
body[data-mm-ui=practice]{min-height:100vh;background:var(--mm-bg)}

/* ---------- 상단: 홈·악보 관리는 큰 제목(따라오지 않음), 하위 화면은 얇은 고정 바 ---------- */
body[data-mm-ui=practice] .screen:is(#screen-home,#screen-conductor)>.topbar{
  position:static;background:transparent;border-bottom:0;padding-top:40px;padding-bottom:4px;align-items:center;
}
body[data-mm-ui=practice] .screen:is(#screen-home,#screen-conductor) .choir-name{font-size:30px;font-weight:800;letter-spacing:-.03em;line-height:1.3}
body[data-mm-ui=practice] .screen:is(#screen-home,#screen-conductor) .user-name{font-size:15px;margin-top:6px;color:var(--t-sub)}
body[data-mm-ui=practice] .screen:is(#screen-env,#screen-setup,#screen-calib,#screen-result)>.topbar{
  position:sticky;top:var(--mm-header-height);z-index:20;padding-top:10px;padding-bottom:10px;
  background:rgba(242,244,246,.86);-webkit-backdrop-filter:saturate(180%) blur(14px);backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid transparent;
}
body[data-mm-ui=practice] .screen:is(#screen-env,#screen-setup,#screen-calib,#screen-result) .topbar-title{
  font-size:18px;font-weight:700;letter-spacing:-.02em;line-height:1.4;text-align:center;flex:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 12px;
}
body[data-mm-ui=practice] .screen:is(#screen-env,#screen-setup,#screen-calib,#screen-result)>.topbar>span:last-child{width:44px;flex:none}
body[data-mm-ui=practice] .screen:not(#screen-practice) .icon-btn{
  display:inline-grid;place-items:center;background:#fff;border:0;border-radius:var(--mm-control-radius);color:var(--mm-text);
}
body[data-mm-ui=practice] .screen:not(#screen-practice) .icon-btn:hover{background:var(--t-fill-2)}
body[data-mm-ui=practice] .screen:not(#screen-practice)>.topbar [data-back]{background:transparent}
body[data-mm-ui=practice] .screen:not(#screen-practice)>.topbar [data-back]:hover{background:rgba(0,0,0,.05)}
body[data-mm-ui=practice] .screen:not(#screen-practice)>.content{padding-top:24px;padding-bottom:56px}

/* ---------- 글자 ---------- */
body[data-mm-ui=practice] .screen:not(#screen-practice) .section-title{font-size:20px;font-weight:700;letter-spacing:-.02em;color:var(--mm-text);margin:36px 0 14px}
body[data-mm-ui=practice] .screen:not(#screen-practice) .section-title:first-child{margin-top:0}
body[data-mm-ui=practice] .screen:not(#screen-practice) .section-title .ic-title{display:none}
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.small-text,.rs-total,.notice-date){color:var(--t-faint);font-size:13px;line-height:1.6}
body[data-mm-ui=practice] .screen:not(#screen-practice) .empty{color:var(--t-faint);font-size:14px}
body[data-mm-ui=practice] :is(.song-list,.session-list)>.empty{
  grid-column:1/-1;padding:36px 20px;text-align:center;background:#fff;border-radius:var(--mm-radius);
}

/* ---------- 버튼 ---------- */
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:48px;padding:0 18px;border:0;border-radius:14px;
  font:600 15px/1.4 var(--mm-font);letter-spacing:-.01em;text-decoration:none;
  background:#fff;color:#333d4b;box-shadow:none;transition:background .15s,color .15s;
}
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn{background:var(--t-fill)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn:not(.primary):hover,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn:not(.primary):hover{background:var(--t-fill-2)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.outline{border:0;background:#fff}
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.outline{border:0;background:var(--t-fill)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.primary,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.primary,
body[data-mm-ui=practice] .screen#screen-setup .btn.primary{background:var(--mm-primary);color:#fff;border:0}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.primary:hover:not(:disabled),
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.primary:hover:not(:disabled){background:var(--mm-primary-hover)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.primary:disabled,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.primary:disabled{background:#c5cbf1;color:#fff}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn:disabled:not(.primary),
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn:disabled:not(.primary){color:#b0b8c1}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.small,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.small{min-height:40px;padding:0 14px;border-radius:12px;font-size:14px}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.big{min-height:56px;border-radius:16px;font-size:17px;font-weight:700;width:100%}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.ghost,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.ghost{background:transparent;color:var(--t-sub)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .btn.ghost:hover,
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .btn.ghost:hover{background:var(--t-fill)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .song-del,
body[data-mm-ui=practice] .screen:not(#screen-practice) .session-del{color:var(--t-red)}

/* 흰 카드 안의 보조 버튼은 회색으로(흰 바탕 위 흰 버튼이 사라지던 것) */
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.mm-whats-new,.mm-panel,.song-block,.calib-row,.ready-box,.range-slider,.notice-card,.invite-card,.sync-box,.result-detail,.session-card,.mode-card) .btn:not(.primary):not(.ghost){background:var(--t-fill)}
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.mm-whats-new,.mm-panel,.song-block,.calib-row,.ready-box,.range-slider,.notice-card,.invite-card,.sync-box,.result-detail,.session-card,.mode-card) .btn:not(.primary):not(.ghost):hover{background:var(--t-fill-2)}

/* ---------- 입력 ---------- */
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.rp-select,.notice-form input,.rename-input,.mm-cat-field select,.range-input input),
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea),
body[data-mm-ui=practice] #pass-input{
  min-height:48px;padding:0 14px;border:1px solid var(--mm-line);border-radius:12px;background:#fff;color:var(--mm-text);
  font:400 15px/1.5 var(--mm-font);transition:border-color .15s,box-shadow .15s;
}
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) textarea{padding:12px 14px;min-height:120px;resize:vertical}
body[data-mm-ui=practice] :is(.screen,.mm-dialog,.pg-card) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea):focus{
  outline:0;border-color:var(--mm-primary);box-shadow:0 0 0 3px rgba(94,106,210,.16);
}
body[data-mm-ui=practice] :is(#song-search,#admin-song-search){
  min-height:52px;padding:0 16px 0 46px;border:1px solid transparent;border-radius:14px;background:#fff;font-size:15px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:16px 50%;background-size:20px;
}
body[data-mm-ui=practice] :is(#song-search,#admin-song-search):focus{outline:0;border-color:var(--mm-primary);box-shadow:0 0 0 3px rgba(94,106,210,.16)}
body[data-mm-ui=practice] :is(#song-search,#admin-song-search)::placeholder{color:var(--t-faint)}

/* ---------- 칩 ---------- */
body[data-mm-ui=practice] :is(.mm-song-chip,.fb-cat){
  display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:38px;padding:0 14px;border:0;border-radius:999px;background:#fff;color:var(--t-sub);font:600 14px/1 var(--mm-font);
}
body[data-mm-ui=practice] :is(.mm-dialog,.pg-card) .fb-cat{background:var(--t-fill)}
body[data-mm-ui=practice] :is(.mm-song-chip,.fb-cat):hover{background:var(--t-fill-2)}
body[data-mm-ui=practice] :is(.mm-song-chip.on,.fb-cat.on){background:var(--mm-text);color:#fff}
body[data-mm-ui=practice] .mm-song-chip small{color:inherit;opacity:.6}
body[data-mm-ui=practice] .mm-chips{gap:8px}
body[data-mm-ui=practice] .mm-chips-sub{border-left:0;padding-left:0;margin-top:4px}
body[data-mm-ui=practice] .mm-chips-sub .mm-song-chip{min-height:34px;font-size:13px;background:transparent;box-shadow:inset 0 0 0 1px var(--t-fill-2)}
body[data-mm-ui=practice] .mm-chips-sub .mm-song-chip.on{background:var(--mm-primary-soft);color:var(--mm-primary-hover);box-shadow:inset 0 0 0 1px #cfd3f3}
body[data-mm-ui=practice] .screen:not(#screen-practice) .chip{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border:0;border-radius:999px;background:#fff;color:#333d4b;font:600 15px/1 var(--mm-font);
}
body[data-mm-ui=practice] .screen:not(#screen-practice) .chip:hover{background:var(--t-fill-2)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .chip.selected,
body[data-mm-ui=practice] .screen#screen-setup .chip.selected{background:var(--mm-primary);color:#fff}

/* ---------- 카드 ---------- */
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.notice-card,.song-card,.session-card,.range-slider,.ready-box,.calib-row,.mode-card,.song-block,.invite-card,.table-wrap,.score-card,.sync-box,.coach-row,.weak-card,.fb-item,.result-detail){
  background:#fff;border:1.5px solid transparent;border-radius:var(--mm-radius);box-shadow:none;
}
body[data-mm-ui=practice] .screen:not(#screen-practice) .notice-card.info{background:var(--mm-primary-soft);border-color:transparent;color:#3a4282}
body[data-mm-ui=practice] .screen:not(#screen-practice) .notice-card.warn{background:#fff6e5;border-color:transparent;color:#7a4b00}
body[data-mm-ui=practice] .screen:not(#screen-practice) :is(.song-card,.mode-card):hover{border-color:transparent;box-shadow:var(--t-lift)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .mode-card.selected{background:#fff;border-color:var(--mm-primary);box-shadow:0 0 0 3px rgba(94,106,210,.12)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .mode-card{padding:18px 20px;gap:14px}
body[data-mm-ui=practice] .screen:not(#screen-practice) .mode-name{font-size:16px;font-weight:700}
body[data-mm-ui=practice] .screen:not(#screen-practice) .mode-desc{font-size:14px;color:var(--mm-muted);margin-top:4px}
body[data-mm-ui=practice] .screen:not(#screen-practice) .mode-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--mm-primary-soft);flex:none}
body[data-mm-ui=practice] .screen:not(#screen-practice) .ic-mode{width:24px;height:24px;color:var(--mm-primary)}

/* ---------- 홈 ---------- */
body[data-mm-ui=practice] .screen#screen-home .mm-home-layout{grid-template-columns:minmax(0,1fr) 300px;gap:40px 24px;padding-top:28px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-section-head{margin-bottom:16px;align-items:flex-end}
body[data-mm-ui=practice] .screen#screen-home .mm-home-section-head .section-title{font-size:22px;margin-bottom:4px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-section-head p{color:var(--mm-muted);font-size:15px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-link{min-height:40px;padding:0 14px;border-radius:12px;background:#fff;color:var(--t-sub);font-size:14px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-link:hover{background:var(--t-fill-2);text-decoration:none}
body[data-mm-ui=practice] .mm-song-tools{gap:12px;margin:0 0 16px}
body[data-mm-ui=practice] .screen#screen-home .song-list{gap:12px}
body[data-mm-ui=practice] .screen#screen-home .song-card{display:flex;align-items:center;gap:16px;padding:22px 22px 22px 24px;min-height:0}
body[data-mm-ui=practice] .screen:not(#screen-practice) .song-card .song-name{font-size:17px;font-weight:700;color:var(--mm-text);letter-spacing:-.02em;line-height:1.45}
body[data-mm-ui=practice] .screen:not(#screen-practice) .song-card .song-meta{font-size:14px;color:var(--mm-muted);margin-top:4px;line-height:1.5}
body[data-mm-ui=practice] .screen#screen-home .song-card .mm-level-badge{display:inline-flex;margin-top:12px;padding:4px 10px;border-radius:999px;background:var(--t-fill);color:var(--t-sub);font-size:12.5px;font-weight:600}
body[data-mm-ui=practice] .screen#screen-home .song-card .go{min-height:40px;padding:0 14px;border-radius:12px;background:var(--mm-primary-soft);color:var(--mm-primary-hover);font-size:14px;font-weight:700}
body[data-mm-ui=practice] .screen#screen-home .song-card:hover .go{background:var(--mm-primary);color:#fff}
body[data-mm-ui=practice] .song-new-badge{padding:2px 8px;margin-right:8px;border-radius:999px;background:#ffeeee;color:var(--t-red);font-size:11px;font-weight:700;letter-spacing:0;vertical-align:2px}
body[data-mm-ui=practice] .song-card.is-new{border-color:transparent}
body[data-mm-ui=practice] .mm-whats-new{margin:0 0 16px;padding:20px 22px;border:0;border-radius:var(--mm-radius);background:#fff;color:var(--t-sub)}
body[data-mm-ui=practice] .mm-whats-new .mm-wn-head b{font-size:16px;color:var(--mm-text)}
body[data-mm-ui=practice] .mm-whats-new .mm-wn-v{background:var(--mm-primary-soft);color:var(--mm-primary-hover);font-weight:600}
body[data-mm-ui=practice] .mm-whats-new ul{font-size:14px;line-height:1.7;color:var(--t-sub);padding-left:18px}
body[data-mm-ui=practice] .screen#screen-home :is(.mm-home-notices,.mm-home-admin){padding:22px;border:0;border-radius:var(--mm-radius);background:#fff}
body[data-mm-ui=practice] .screen#screen-home .mm-home-sidebar{gap:12px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-sidebar .section-title{font-size:16px;margin:0 0 12px}
body[data-mm-ui=practice] .screen#screen-home #mm-credit-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px;border:0;border-radius:var(--mm-radius);background:#fff;box-shadow:none}
body[data-mm-ui=practice] .screen#screen-home #mm-credit-summary strong{font-size:16px;font-weight:700;color:var(--mm-text)}
body[data-mm-ui=practice] .screen#screen-home #mm-wallet-open{background:var(--t-fill);min-height:36px;padding:0 12px;font-size:13px;border-radius:10px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-admin .mm-tabs{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-admin .mm-tabs .btn{
  justify-content:space-between;min-height:52px;padding:0 14px 0 16px;background:transparent;border-radius:12px;font-size:15px;font-weight:600;color:#333d4b;
}
body[data-mm-ui=practice] .screen#screen-home .mm-home-admin .mm-tabs .btn::after{content:'›';font-size:20px;line-height:1;color:var(--t-faint)}
body[data-mm-ui=practice] .screen#screen-home .mm-home-admin .mm-tabs .btn:hover{background:var(--t-fill)}
body[data-mm-ui=practice] .screen#screen-home .mm-home-sidebar .notice-card{font-size:14px;color:var(--t-sub)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .session-card{padding:16px 20px;gap:12px;font-size:15px;color:var(--mm-text)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .session-card .small-text{font-size:13px}
body[data-mm-ui=practice] .screen:not(#screen-practice) .session-score{font-size:17px;font-weight:700;color:var(--mm-primary)}
body[data-mm-ui=practice] .screen:not(#screen-practice) .session-foot .btn{background:#fff}
body[data-mm-ui=practice] .screen#screen-home .mm-home-support{padding-top:24px;border-top:1px solid var(--t-fill-2);font-size:14px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-actions .btn{min-height:44px}
body[data-mm-ui=practice] .screen#screen-home .mm-home-actions .icon-btn{width:44px;height:44px}

/* ---------- 악보 관리(지휘자) — 할 일 단위로 흰 판에 묶는다 ---------- */
body[data-mm-ui=practice] .screen#screen-conductor>.content{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start;padding-top:28px}
.mm-panel{min-width:0;padding:26px 28px;border-radius:24px;background:#fff}
.mm-panel>.section-title:first-child{margin-top:0}
.mm-panel-lead{margin:-6px 0 18px;color:var(--mm-muted);font-size:14px;line-height:1.65}
.mm-conductor-side{display:flex;flex-direction:column;gap:16px;min-width:0}
.mm-panel-wide{grid-column:1/-1}
.mm-panel-notes{margin:0;padding-left:18px;display:grid;gap:6px}
.mm-panel-notes b{color:var(--mm-text)}
body[data-mm-ui=practice] .screen#screen-conductor .mm-panel :is(.song-block,.invite-card,.table-wrap,.fb-item){background:var(--t-soft);border-color:transparent}
body[data-mm-ui=practice] .screen#screen-conductor .mm-panel>.notice-card.info{background:var(--t-soft);color:var(--t-sub);font-size:14px;line-height:1.7;margin:0 0 18px;max-width:none}
body[data-mm-ui=practice] .screen#screen-conductor #conductor-song-list{display:flex;flex-direction:column;align-items:stretch;gap:8px}
body[data-mm-ui=practice] .screen#screen-conductor .song-block-head{padding:16px 18px;min-height:64px}
body[data-mm-ui=practice] .screen#screen-conductor .song-block-head .song-name{font-size:16px;font-weight:700;color:var(--mm-text)}
body[data-mm-ui=practice] .screen#screen-conductor .song-block-head .song-meta{font-size:13px;opacity:1;color:var(--mm-muted)}
body[data-mm-ui=practice] .screen#screen-conductor .sb-caret{color:var(--t-faint);opacity:1}
body[data-mm-ui=practice] .screen#screen-conductor .song-block-body{padding:4px 18px 18px}
body[data-mm-ui=practice] .screen#screen-conductor .song-block-body .mm-settings{background:#fff;border:0;box-shadow:none;border-radius:16px}
body[data-mm-ui=practice] .screen#screen-conductor .mm-upload-cat{margin:0 0 12px;padding:16px 18px;border-radius:16px;background:var(--t-soft)}
body[data-mm-ui=practice] .screen#screen-conductor .mm-upload-cat b{font-size:15px}
body[data-mm-ui=practice] .screen#screen-conductor .mm-upload-cat small{color:var(--t-faint);font-size:13px}
body[data-mm-ui=practice] .screen#screen-conductor .file-btn{
  display:flex;width:100%;min-height:72px;margin:0 0 20px;border:1.5px dashed #c5cbf1;border-radius:16px;
  background:#f7f8fe;color:var(--mm-primary-hover);font-size:16px;font-weight:700;cursor:pointer;
}
body[data-mm-ui=practice] .screen#screen-conductor .file-btn:hover{background:var(--mm-primary-soft);border-color:var(--mm-primary)}
body[data-mm-ui=practice] .screen#screen-conductor .mm-admin-tools{margin:0 0 14px}
body[data-mm-ui=practice] .screen#screen-conductor #admin-song-search{background-color:var(--t-soft)}
body[data-mm-ui=practice] .screen#screen-conductor .mm-panel .mm-song-chip{background:var(--t-fill)}
body[data-mm-ui=practice] .screen#screen-conductor .mm-panel .mm-song-chip.on{background:var(--mm-text)}
body[data-mm-ui=practice] .screen#screen-conductor .notice-form{display:flex;gap:8px}
body[data-mm-ui=practice] .screen#screen-conductor .notice-form input{flex:1;min-width:0}
body[data-mm-ui=practice] .screen#screen-conductor #conductor-notice-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
body[data-mm-ui=practice] .screen#screen-conductor #conductor-notice-list .notice-card{background:var(--t-soft);padding:14px 16px}
body[data-mm-ui=practice] .screen#screen-conductor .fb-admin{display:flex;flex-direction:column;align-items:stretch;gap:8px}
body[data-mm-ui=practice] .screen#screen-conductor .fb-admin>.notice-card{background:var(--t-soft);color:var(--t-sub);font-size:14px}
body[data-mm-ui=practice] .screen#screen-conductor .invite-card{padding:18px}
body[data-mm-ui=practice] .screen#screen-conductor .invite-link{display:inline-block;margin:6px 0;font-weight:600;word-break:break-all}
body[data-mm-ui=practice] .screen#screen-conductor .table-wrap{padding:6px 10px}
body[data-mm-ui=practice] .screen#screen-conductor .dash-table th{color:var(--t-faint);font-weight:600;font-size:13px}
body[data-mm-ui=practice] .screen#screen-conductor .fb-count{background:var(--t-red);color:#fff}

/* ---------- 연습 준비 ---------- */
body[data-mm-ui=practice] .screen#screen-setup .range-slider{padding:20px 22px}
body[data-mm-ui=practice] .screen#screen-setup .rs-head b{font-size:17px;color:var(--mm-primary-hover)}
body[data-mm-ui=practice] .screen#screen-setup .range-preset{display:flex;align-items:center;gap:12px;margin-top:12px}
body[data-mm-ui=practice] .screen#screen-setup .rp-label{flex:none;font-size:14px;font-weight:600;color:var(--t-sub)}
body[data-mm-ui=practice] .screen#screen-setup .range-preset .rp-select{flex:1;min-width:0}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings{margin-top:36px;padding-top:0;border-top:0}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings>summary{min-height:56px;padding:0 20px;border-radius:16px;background:#fff;font-size:16px;font-weight:700;color:var(--mm-text)}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings>summary::before{content:none}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings>summary::after{content:'';margin-left:auto;width:9px;height:9px;border-right:2px solid var(--t-faint);border-bottom:2px solid var(--t-faint);transform:rotate(45deg);transition:transform .15s}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings[open]>summary::after{transform:rotate(-135deg)}
body[data-mm-ui=practice] .screen#screen-setup .adv-settings[open]>summary{margin-bottom:8px}
body[data-mm-ui=practice] .screen#screen-setup .adv-hint{font-size:13px;color:var(--t-faint);font-weight:500}
body[data-mm-ui=practice] .screen#screen-setup .calib-row{margin-top:8px;padding:16px 18px;font-size:15px}
body[data-mm-ui=practice] .screen#screen-setup .calib-row b{font-weight:700}
body[data-mm-ui=practice] .screen#screen-setup .calib-status{font-size:13px;color:var(--mm-muted);margin-top:2px}
body[data-mm-ui=practice] .screen#screen-setup .calib-row .rp-select{min-height:44px;max-width:220px}
body[data-mm-ui=practice] .screen#screen-setup .ready-box{margin-top:24px;padding:20px 22px;background:#fff}
body[data-mm-ui=practice] .screen#screen-setup .ready-title{font-size:16px;font-weight:700;color:var(--mm-text);margin-bottom:8px}
body[data-mm-ui=practice] .screen#screen-setup .ready-list li{font-size:15px;padding:6px 0}
body[data-mm-ui=practice] .screen#screen-setup .ready-list span{color:var(--mm-muted)}
body[data-mm-ui=practice] .screen#screen-setup .ready-check{margin-top:12px;padding-top:14px;border-top:1px solid var(--t-fill);font-size:15px;font-weight:600}
body[data-mm-ui=practice] .screen#screen-setup .ready-check input{width:22px;height:22px;accent-color:var(--mm-primary)}
body[data-mm-ui=practice] .start-bar{padding:16px 0 calc(16px + env(safe-area-inset-bottom));background:linear-gradient(to top,var(--mm-bg) 70%,rgba(242,244,246,0))}
body[data-mm-ui=practice] .start-bar .btn.big{margin:0}
body[data-mm-ui=practice] .screen#screen-env .env-lead{font-size:20px;font-weight:700;color:var(--mm-text);line-height:1.5;margin-bottom:20px}
body[data-mm-ui=practice] .env-badge{background:#e6f8ef;color:var(--t-green)}

/* ---------- 결과 ---------- */
body[data-mm-ui=practice] .screen#screen-result .score-cards{gap:10px}
body[data-mm-ui=practice] .screen#screen-result .score-card{padding:20px 10px}
body[data-mm-ui=practice] .screen#screen-result .score-num{font-size:32px;font-weight:800;letter-spacing:-.03em}
body[data-mm-ui=practice] .screen#screen-result .score-card.total{background:var(--mm-primary);color:#fff}
body[data-mm-ui=practice] .screen#screen-result .result-actions{gap:8px;margin-top:12px;flex-wrap:wrap}
body[data-mm-ui=practice] .screen#screen-result .result-detail>summary{min-height:56px;padding:0 20px;font-size:16px;font-weight:700}

/* ---------- 팝업(대화상자): 화면 가운데 ----------
   전역 초기화(* {margin:0})가 <dialog> 의 기본 가운데 정렬(margin:auto)을 지워 왼쪽 위에 붙던 것 */
body[data-mm-ui=practice] dialog.mm-dialog{
  position:fixed;inset:0;margin:auto;box-sizing:border-box;
  width:min(1040px,calc(100vw - 48px));max-width:none;max-height:min(88vh,920px);
  padding:0 28px 28px;border:0;border-radius:24px;background:#fff;color:var(--mm-text);
  box-shadow:var(--t-pop);overflow:auto;overscroll-behavior:contain;font-family:var(--mm-font);
}
body[data-mm-ui=practice] dialog.mm-dialog[open]{animation:t-pop .2s cubic-bezier(.2,.8,.2,1)}
body[data-mm-ui=practice] dialog.mm-dialog::backdrop{background:rgba(0,0,0,.44);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
body[data-mm-ui=practice] dialog.mm-dialog.mm-profile{width:min(480px,calc(100vw - 32px))}
body[data-mm-ui=practice] dialog.mm-dialog.engine-dialog{width:min(1240px,calc(100vw - 48px));height:min(90vh,980px);max-height:min(90vh,980px)}
body[data-mm-ui=practice] .mm-dialog-head{
  position:sticky;top:0;z-index:5;margin:0 -28px 20px;padding:22px 28px 16px;
  background:rgba(255,255,255,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--t-fill);
}
body[data-mm-ui=practice] .mm-dialog-head h2{margin:0;font-size:22px;font-weight:700;letter-spacing:-.03em;line-height:1.4}
body[data-mm-ui=practice] .mm-dialog-head .btn{min-height:40px;padding:0 14px;font-size:14px}
body[data-mm-ui=practice] .mm-dialog :is(label,small){color:var(--t-sub)}
body[data-mm-ui=practice] .mm-dialog .small-text{color:var(--t-faint);font-size:13px}
body[data-mm-ui=practice] :is(.mm-settings,.mm-session,.mm-level-row){border:0;border-radius:18px;background:var(--t-soft);box-shadow:none}
body[data-mm-ui=practice] .mm-dialog .mm-membership{border:0;border-radius:18px;background:var(--mm-primary-soft);box-shadow:none}
body[data-mm-ui=practice] :is(.mm-student,.mm-credit-row,.mm-ledger>div){border-color:var(--t-fill)}
body[data-mm-ui=practice] .mm-profile-details{border:0;background:var(--t-soft);border-radius:18px}
body[data-mm-ui=practice] .mm-profile-details>div+div{border-top-color:var(--t-fill-2)}
/* 관리자 도구 줄: 기본 .btn 이 width:100% 라 가로 줄 안에서 창 밖으로 밀리던 것 → 폭은 글자대로, 좁으면 아랫줄로 */
body[data-mm-ui=practice] .mm-profile-admin{border:0;background:var(--mm-primary-soft);border-radius:18px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
body[data-mm-ui=practice] .mm-profile-admin h3{white-space:nowrap}
body[data-mm-ui=practice] .mm-profile-admin .btn{margin:0;width:auto;max-width:100%;flex:0 0 auto;min-width:140px}
body[data-mm-ui=practice] .mm-profile-actions .btn{width:100%}
body[data-mm-ui=practice] #mm-profile-logout{width:100%;color:var(--t-red)}
@keyframes t-pop{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
@keyframes t-sheet{from{transform:translateY(100%)}to{transform:none}}

/* ---------- 악보 변환기 ---------- */
body[data-mm-ui=practice] .engine-dialog .engine-tabs{margin:0 0 16px;padding:4px;border-radius:14px;background:var(--t-fill)}
body[data-mm-ui=practice] .engine-tabs [role=tab]{min-height:44px;border-radius:10px;font-size:15px;color:var(--mm-muted)}
body[data-mm-ui=practice] .engine-tabs [aria-selected=true]{background:#fff;color:var(--mm-text);box-shadow:0 1px 4px rgba(0,0,0,.08)}
body[data-mm-ui=practice] #engine-health{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;padding:6px 12px;border-radius:999px;background:var(--t-fill);color:var(--t-sub);font-size:13px;font-weight:600}
body[data-mm-ui=practice] #engine-health::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--t-faint)}
body[data-mm-ui=practice] .engine-dialog .engine-forms form{
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title title" "file file" "note action";
  align-items:center;gap:12px 16px;padding:22px 24px;border:0;border-radius:20px;background:var(--t-soft);box-shadow:none;
}
body[data-mm-ui=practice] .engine-dialog #engine-dataset{grid-template-areas:"title title" "file file" "id id" "note action"}
body[data-mm-ui=practice] .engine-dialog .engine-forms h3{grid-area:title;margin:0;font-size:17px;font-weight:700}
body[data-mm-ui=practice] .engine-dialog .engine-forms label:first-of-type{grid-area:file}
body[data-mm-ui=practice] .engine-dialog #engine-dataset label:nth-of-type(2){grid-area:id}
body[data-mm-ui=practice] .engine-dialog .engine-forms p{grid-area:note;margin:0;font-size:14px;color:var(--mm-muted)}
body[data-mm-ui=practice] .engine-dialog .engine-forms button{grid-area:action;align-self:center;justify-self:end;min-width:160px}
body[data-mm-ui=practice] .engine-dialog .engine-forms label{gap:8px;font-size:14px;font-weight:600;color:var(--t-sub)}
body[data-mm-ui=practice] .engine-dialog .engine-forms input[type=file]{
  width:100%;min-height:76px;padding:16px 18px;border:1.5px dashed #aab2ea;border-radius:16px;background:#fff;
  color:var(--t-sub);font:400 14px/1.5 var(--mm-font);cursor:pointer;transition:border-color .15s,background .15s;
}
body[data-mm-ui=practice] .engine-dialog .engine-forms input[type=file]:hover{border-color:var(--mm-primary);background:#fbfbff}
body[data-mm-ui=practice] .mm-dialog input[type=file]::file-selector-button{
  margin-right:14px;height:42px;padding:0 16px;border:0;border-radius:12px;background:var(--mm-primary);color:#fff;
  font:600 14px var(--mm-font);cursor:pointer;
}
body[data-mm-ui=practice] #engine-message{margin:12px 0 0;padding:12px 16px;border-radius:14px;background:var(--mm-primary-soft);color:var(--mm-primary-hover);font-size:14px;font-weight:600}
body[data-mm-ui=practice] .engine-dialog .engine-workspace{grid-template-columns:300px minmax(0,1fr);gap:16px;margin-top:16px}
body[data-mm-ui=practice] :is(.engine-history,.engine-result){padding:20px;border:0;border-radius:20px;background:var(--t-soft);box-shadow:none}
body[data-mm-ui=practice] .engine-history{position:sticky;top:84px;max-height:calc(min(90vh,980px) - 120px);overflow:auto}
body[data-mm-ui=practice] :is(.engine-history,.engine-result)>h3{margin:0 0 14px;font-size:14px;font-weight:700;color:var(--t-faint)}
body[data-mm-ui=practice] #engine-jobs{color:var(--t-faint);font-size:14px}
body[data-mm-ui=practice] .engine-job{margin:0 0 8px;border:1.5px solid transparent;border-radius:14px;background:#fff}
body[data-mm-ui=practice] .engine-job:hover{box-shadow:var(--t-lift)}
body[data-mm-ui=practice] .engine-job.selected{border-color:var(--mm-primary);background:#fff}
body[data-mm-ui=practice] .engine-job>button:first-child{padding:14px 16px;color:var(--mm-text)}
body[data-mm-ui=practice] .engine-job b{font-size:15px;font-weight:700}
body[data-mm-ui=practice] .engine-job small{margin-top:4px;font-size:13px;color:var(--mm-muted)}
body[data-mm-ui=practice] .engine-job .btn{margin-right:10px;min-height:34px;padding:0 12px;font-size:13px}
body[data-mm-ui=practice] #engine-detail>h3{font-size:20px;font-weight:700;letter-spacing:-.02em}
body[data-mm-ui=practice] #engine-detail>p{margin:6px 0 0;color:var(--t-sub);font-size:14px}
body[data-mm-ui=practice] #engine-detail .engine-actions{margin:16px 0}
body[data-mm-ui=practice] #engine-detail .engine-actions .btn{background:#fff;min-height:40px;font-size:14px}
body[data-mm-ui=practice] #engine-detail>.file-btn{width:auto;margin:0 0 16px;min-height:40px;background:#fff;font-size:14px}
body[data-mm-ui=practice] #engine-detail details{margin:10px 0;padding:12px 16px;border-radius:14px;background:#fff;font-size:14px}
body[data-mm-ui=practice] #engine-detail summary{cursor:pointer;font-weight:600}
body[data-mm-ui=practice] .engine-review{margin:16px 0;padding:16px 18px;border:0;border-radius:16px;background:var(--mm-primary-soft)}
body[data-mm-ui=practice] .engine-error{border-radius:14px;padding:12px 16px;background:#fff0f0;color:#c42b36}
body[data-mm-ui=practice] .engine-warnings{border-radius:12px}
body[data-mm-ui=practice] .engine-compare{gap:12px}
body[data-mm-ui=practice] .engine-compare section{padding:14px;border:0;border-radius:16px;background:#fff}
body[data-mm-ui=practice] .engine-compare h4{margin:0 0 8px;font-size:14px;color:var(--t-sub)}
body[data-mm-ui=practice] .engine-page{border:1px solid var(--t-fill);border-radius:8px}

/* ---------- 작은 확인 창(의견·등록·선택·비밀번호) ---------- */
body[data-mm-ui=practice] .pass-gate{background:rgba(0,0,0,.44);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);padding:24px}
body[data-mm-ui=practice] .pass-gate:not(.hidden) .pg-card{animation:t-pop .2s cubic-bezier(.2,.8,.2,1)}
body[data-mm-ui=practice] .pg-card{max-width:440px;max-height:calc(100dvh - 48px);overflow:auto;padding:28px 24px 20px;gap:12px;border:0;border-radius:24px;box-shadow:var(--t-pop);font-family:var(--mm-font)}
body[data-mm-ui=practice] .pg-card>b{font-size:20px;font-weight:700;letter-spacing:-.03em;line-height:1.4}
body[data-mm-ui=practice] .pg-fine{font-size:14px;line-height:1.65;color:var(--mm-muted);opacity:1}
body[data-mm-ui=practice] .pg-actions{margin-top:8px;gap:8px}
body[data-mm-ui=practice] .pg-actions .btn{min-height:52px;font-size:16px;border-radius:14px}
body[data-mm-ui=practice] .fb-context{border-radius:14px;padding:12px 14px;background:var(--t-soft)}
body[data-mm-ui=practice] .mm-reg-field b{font-size:14px;color:var(--t-sub)}
body[data-mm-ui=practice] .mm-cat-ask .mm-cat-field{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}

/* ---------- 로그아웃 확인 창: 작은 카드를 <dialog> 로 (top layer 라 프로필 창 위에도 뜸) ---------- */
body[data-mm-ui=practice] dialog.mm-confirm{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 48px));max-width:none;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible}
body[data-mm-ui=practice] dialog.mm-confirm::backdrop{background:rgba(0,0,0,.44);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
body[data-mm-ui=practice] dialog.mm-confirm .pg-card{width:100%;max-width:none;box-shadow:var(--t-pop)}
body[data-mm-ui=practice] dialog.mm-confirm[open] .pg-card{animation:t-pop .2s cubic-bezier(.2,.8,.2,1)}
body[data-mm-ui=practice] dialog.mm-confirm .pg-actions .btn.primary{background:var(--t-red)}
body[data-mm-ui=practice] dialog.mm-confirm .pg-actions .btn.primary:hover:not(:disabled){background:#d63a47}
body[data-mm-ui=practice] dialog.mm-confirm .pg-actions .btn.primary:disabled{background:#f6b4ba;color:#fff}

/* ---------- 알림 ---------- */
body[data-mm-ui=practice] .toast{padding:13px 20px;border-radius:14px;background:rgba(25,31,40,.94);font:600 14px/1.5 var(--mm-font);box-shadow:0 8px 24px rgba(0,0,0,.2)}

/* ---------- 연습 화면: 어두운 플레이어 틀을 한 톤으로 (페이지 넘김·마이크 줄이 밝게 따로 놀던 것) ---------- */
body[data-mm-ui=practice] .screen#screen-practice .mm-page-tools{background:var(--p-bar);border-top:1px solid var(--p-line);color:#d1d6db;gap:6px;padding:6px 12px}
body[data-mm-ui=practice] .screen#screen-practice .mm-page-tools :is(button,select){min-height:34px;border:0;border-radius:10px;background:#2f3741;color:#f2f4f6;font:600 13px/1 var(--mm-font);padding:0 12px}
body[data-mm-ui=practice] .screen#screen-practice .mm-page-tools :is(button,select):hover{background:#3a4350}
body[data-mm-ui=practice] .screen#screen-practice .mm-page-tools label{display:inline-flex;align-items:center;gap:6px;color:#d1d6db}
body[data-mm-ui=practice] .screen#screen-practice #mm-page-label{min-width:88px;text-align:center;font-variant-numeric:tabular-nums;color:#fff}
body[data-mm-ui=practice] .screen#screen-practice .mm-mic{background:var(--p-bar);border-top:1px solid var(--p-line);color:var(--p-dim);font-size:12.5px}
body[data-mm-ui=practice] .screen#screen-practice .mm-mic label{display:inline-flex;align-items:center;gap:6px;color:#d1d6db}
body[data-mm-ui=practice] .screen#screen-practice .mm-mic[data-state=live]{color:#4fd18b}
body[data-mm-ui=practice] .screen#screen-practice :is(.mm-page-tools,.mm-mic) input[type=checkbox]{width:16px;height:16px;accent-color:var(--p-key)}

/* ---------- 좁은 화면 ---------- */
@media(max-width:1000px){
  body[data-mm-ui=practice] .screen#screen-conductor>.content{grid-template-columns:minmax(0,1fr)}
  .mm-panel-wide{grid-column:auto}
}
@media(max-width:860px){
  body[data-mm-ui=practice] .screen#screen-home .mm-home-layout{grid-template-columns:minmax(0,1fr);gap:32px}
}
@media(max-width:760px){
  body[data-mm-ui=practice] .engine-dialog .engine-workspace{grid-template-columns:minmax(0,1fr)}
  body[data-mm-ui=practice] .engine-history{position:static;max-height:260px}
  body[data-mm-ui=practice] .engine-compare{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:600px){
  body[data-mm-ui=practice] .screen:is(#screen-home,#screen-conductor)>.topbar{padding-top:28px}
  body[data-mm-ui=practice] .screen:is(#screen-home,#screen-conductor) .choir-name{font-size:26px}
  body[data-mm-ui=practice] .screen:not(#screen-practice) .section-title{font-size:19px;margin-top:28px}
  body[data-mm-ui=practice] .screen#screen-home .song-card{padding:18px 16px 18px 20px;gap:12px}
  body[data-mm-ui=practice] .screen#screen-home .song-card .go{padding:0 12px;font-size:13px}
  body[data-mm-ui=practice] .screen#screen-home .mm-home-section-head{align-items:center}
  .mm-panel{padding:22px 18px;border-radius:20px}
  /* 팝업은 아래에서 올라오는 시트로 */
  body[data-mm-ui=practice] dialog.mm-dialog,
  body[data-mm-ui=practice] dialog.mm-dialog.mm-profile,
  body[data-mm-ui=practice] dialog.mm-dialog.engine-dialog{
    width:100%;height:auto;max-height:92dvh;margin:auto 0 0;padding:0 20px calc(20px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;
  }
  body[data-mm-ui=practice] dialog.mm-dialog[open]{animation:t-sheet .26s cubic-bezier(.2,.8,.2,1)}
  body[data-mm-ui=practice] .mm-dialog-head{margin:0 -20px 16px;padding:16px 20px 12px}
  body[data-mm-ui=practice] .mm-dialog-head::before{content:'';position:absolute;top:7px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:4px;background:var(--t-fill-2)}
  body[data-mm-ui=practice] .mm-dialog-head h2{font-size:20px}
  body[data-mm-ui=practice] .engine-dialog .engine-forms form,
  body[data-mm-ui=practice] .engine-dialog #engine-dataset{grid-template-columns:minmax(0,1fr);grid-template-areas:"title" "file" "id" "note" "action";padding:18px}
  body[data-mm-ui=practice] .engine-dialog .engine-forms button{justify-self:stretch;width:100%}
  body[data-mm-ui=practice] .pass-gate{align-items:flex-end;padding:0}
  body[data-mm-ui=practice] .pg-card{max-width:none;max-height:92dvh;border-radius:24px 24px 0 0;padding:28px 20px calc(16px + env(safe-area-inset-bottom))}
  body[data-mm-ui=practice] .pass-gate:not(.hidden) .pg-card{animation:t-sheet .26s cubic-bezier(.2,.8,.2,1)}
  body[data-mm-ui=practice] dialog.mm-confirm{width:100%;margin:auto 0 0;padding:0 0 env(safe-area-inset-bottom)}
  body[data-mm-ui=practice] dialog.mm-confirm[open] .pg-card{animation:t-sheet .26s cubic-bezier(.2,.8,.2,1)}
  body[data-mm-ui=practice] .screen#screen-setup .calib-row .rp-select{max-width:170px}
}
@media(prefers-reduced-motion:reduce){
  body[data-mm-ui=practice] :is(dialog.mm-dialog[open],.pass-gate:not(.hidden) .pg-card,dialog.mm-confirm[open] .pg-card){animation:none}
}

/* ---------- 로그인 오류 화면 ---------- */
/* '다시 시도'가 .btn 기본 width:100% 로 화면 폭 전체로 늘어나던 것, 실패 사유가 숨겨진 폼 안에만 있던 것 */
body[data-mm-ui=practice] #screen-login #mm-auth-loading-detail{max-width:320px;margin:4px 0 0;color:var(--t-faint);font-size:13px;line-height:1.6;word-break:keep-all}
body[data-mm-ui=practice] #screen-login #mm-auth-retry{width:auto;min-width:160px;max-width:100%;flex:0 0 auto}
/* ---------- 실시간 연습: 사이트 머리띠를 걷고 연습실 내부 UI만 ---------- */
/* 휴대폰에서 머리띠가 137px 를 차지해 악보가 잘 안 보였다. 나가기는 연습 화면 왼쪽 위 X 버튼. */
body[data-mm-ui=practice][data-mm-screen=screen-practice]{--mm-header-height:0px}
body[data-mm-ui=practice][data-mm-screen=screen-practice] .mm-site-header{display:none}
