/* GrooveMap Notate — sub-app stylesheet (Notion-inspired pass, 2026-08-24).
 * ISOLATION: this file must not import anything from the shared css directory.
 *
 * Design language cribbed deliberately from Notion: warm-neutral page,
 * borderless controls that surface on hover, one restrained blue accent,
 * segmented controls for exclusive choices, soft 3-layer popover shadow,
 * small radii. Music-duration buttons are inline SVG (see nt-palette.js) —
 * never Unicode music glyphs, which system fonts render as tofu. */
/* Tokens = GrooveMap production values (public/css/main.css :root, copied —
 * not linked — per D5). Notion-style STRUCTURE (segmented controls,
 * borderless hover buttons, panel shadows) stays; the SKIN is GrooveMap:
 * white app, slate text, orange accent, Outfit+Pretendard. */
:root {
    --nt-page: #f8f9fa;                    /* GM --bg-secondary */
    --nt-card: #ffffff;                    /* GM --bg-card */
    --nt-text: #0f172a;                    /* GM --text-primary */
    --nt-dim: #475569;                     /* GM --text-secondary */
    --nt-muted: #94a3b8;                   /* GM --text-muted */
    --nt-border: rgba(0, 0, 0, .12);       /* GM --border-strong */
    --nt-divider: rgba(0, 0, 0, .06);      /* GM --border-color */
    --nt-hover: rgba(15, 23, 42, .05);
    --nt-press: rgba(15, 23, 42, .09);
    --nt-seg-bg: #f1f3f5;                  /* GM --bg-tertiary */
    --nt-accent: #f97316;                  /* GM --accent-primary */
    --nt-accent-bg: rgba(249, 115, 22, .12); /* GM --accent-glow-ish */
    --nt-danger: #ef4444;                  /* GM --error */
    --nt-shadow-pop: 0 1px 3px rgba(0, 0, 0, .05), 0 10px 30px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04);
    /* 9/4 refinement tokens */
    --nt-border-soft: rgba(15, 23, 42, .08);
    --nt-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --nt-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .06);
    --nt-shadow-md: 0 2px 4px rgba(15, 23, 42, .05), 0 14px 36px rgba(15, 23, 42, .10);
    --nt-shadow-lg: 0 28px 70px rgba(15, 23, 42, .24), 0 2px 8px rgba(15, 23, 42, .08);
    --nt-font: 'Outfit', 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    --nt-ring: 0 0 0 3px rgba(249, 115, 22, .24);
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* 9/1 함정 봉인의 전역판: 컴포넌트 display 규칙(.nt-chip inline-flex 등)이
   [hidden] UA 기본을 덮는 사고 재발 방지 — hidden 속성은 항상 이긴다. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
    background: var(--nt-page);
    color: var(--nt-text);
    font-family: var(--nt-font); /* GM stack + Noto Sans KR (한글 폴백, 9/4) */
    padding: calc(10px + var(--sat)) 14px calc(14px + var(--sab));
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    word-break: keep-all; /* 한글 어절 단위 줄바꿈 */
}
::selection { background: rgba(249, 115, 22, .22); }
/* 키보드 포커스만 링 표시 (마우스/터치는 조용히) */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [role="button"]:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid rgba(249, 115, 22, .6); outline-offset: 2px;
}

/* ── header ──────────────────────────────────────────── */
/* ── 앱바 (8/24 재도장): 엣지-투-엣지 화이트 바 = 문서 정체성 층 ── */
.nt-appbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin: calc(-10px - var(--sat)) -14px 12px;
    padding: calc(8px + var(--sat)) max(16px, calc((100vw - 1232px) / 2)) 8px;
    background: var(--nt-card);
    border-bottom: 1px solid var(--nt-border-soft);
    min-height: 54px;
}
.nt-title-wrap {
    display: inline-flex; align-items: center; gap: 4px;
    flex: 1 1 180px; min-width: 140px; max-width: 340px;
}
.nt-title-pen { color: var(--nt-dim); opacity: 0; transition: opacity .12s; flex: none; }
.nt-title-wrap:hover .nt-title-pen { opacity: .8; }
/* 저장 상태 = 점 인디케이터 필 */
.nt-save-state {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--nt-dim);
    background: var(--nt-seg-bg); border-radius: 999px;
    padding: 5px 11px; white-space: nowrap;
}
.nt-save-state:empty { display: none; }
.nt-save-state::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: #22c55e; flex: none;
}
.nt-save-state.nt-save-cta::before { background: var(--nt-accent); }

/* ── 통합 툴바: 팔레트+재생+표시 설정이 한 카드에, 클러스터 구분선 ── */
#nt-toolbar {
    max-width: 1200px; margin: 0 auto 12px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    background: var(--nt-card);
    border: 1px solid var(--nt-border-soft); border-radius: 14px;
    padding: 8px 12px;
    box-shadow: var(--nt-shadow-xs);
}
.nt-tb-sep { width: 1px; align-self: stretch; margin: 4px 0; background: var(--nt-divider); flex: none; }
.nt-tb-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 재생 = 프라이머리 (GM: primary=다크 슬레이트) */
.nt-chip.nt-play {
    background: var(--nt-text); color: #fff; border-color: transparent;
    padding-left: 14px; padding-right: 15px; gap: 7px;
}
.nt-chip.nt-play:hover { background: #1e293b; color: #fff; }
/* 좁은 폭: 툴바는 랩 산란 대신 가로 스크롤. 모든 자식이 고유 폭을
   유지해야(flex:none·내부 nowrap) 수축·겹침 없이 스크롤이 된다. */
@media (max-width: 720px) {
    #nt-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    #nt-toolbar::-webkit-scrollbar { display: none; }
    #nt-toolbar > * { flex: none; }
    #nt-toolbar #nt-palette, .nt-tb-cluster, #nt-toolbar .nt-pal-group { flex-wrap: nowrap; }
    .nt-appbar .nt-logo-by { display: none; }
}
/* 폰(≤600): 팔레트(≈531px)만으로도 툴바가 넘쳐 재생 클러스터가 화면 밖으로
   밀린다. 재생을 툴바 맨 앞으로 당겨(order) 폰에서도 [재생]이 첫 화면에
   바로 보이게 — 그리기 팔레트는 가로 스크롤로 닿는다(펜=태블릿이 주 무대라
   태블릿은 이미 전 컨트롤이 보임). 장식용 구분선은 이 폭에서 숨긴다. */
@media (max-width: 600px) {
    .nt-tb-cluster[aria-label="재생"] { order: -1; }
    #nt-toolbar .nt-tb-sep { display: none; }
    /* 9/17 오너("BPM 조절 기능이 있어야 할 것 같은데"): 재생 클러스터를 앞으로
       당겨도 BPM은 그 안에서 메트·음원·믹스(4버튼) 뒤라 x≈500 — 폰 화면(360px)
       밖이었다. 가로로 밀어야만 닿으니 사실상 없는 기능. 재생 바로 옆으로 당겨
       첫 화면에 같이 보이게 한다(믹스가 오른쪽에 반쯤 걸려 스크롤 여지를 알린다).
       랩 산란 대신 가로 스크롤이라는 원 설계는 그대로 둔다. */
    .nt-tb-cluster[aria-label="재생"] > #nt-play { order: 1; }
    .nt-tb-cluster[aria-label="재생"] > .nt-hdr-sel { order: 2; }
    .nt-tb-cluster[aria-label="재생"] > #nt-met { order: 3; }
    .nt-tb-cluster[aria-label="재생"] > #nt-audio-btn { order: 4; }
    .nt-tb-cluster[aria-label="재생"] > #nt-mix { order: 5; }
}
/* ── Notate logo (8/24): orange gradient mark + Outfit wordmark ── */
.nt-brand {
    display: inline-flex; align-items: center; gap: 9px;
    color: var(--nt-text); text-decoration: none;
    padding: 3px 8px 3px 3px; border-radius: 10px;
}
.nt-brand:hover { background: var(--nt-hover); }
.nt-logo { flex: none; display: block; filter: drop-shadow(0 2px 4px rgba(234, 88, 12, .25)); }
.nt-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.nt-logo-word {
    font-family: Outfit, Pretendard, sans-serif;
    font-size: 17px; font-weight: 700; letter-spacing: -.02em;
}
.nt-logo-by {
    font-family: Outfit, Pretendard, sans-serif;
    font-size: 9.5px; font-weight: 600; letter-spacing: .02em;
    color: var(--nt-dim);
}
.nt-spacer { flex: 1; }

/* ── 계정 게이트 모달 (비회원 저장/인쇄) ─────────────── */
#nt-gate, #nt-login-modal {
    position: fixed; inset: 0; z-index: 9800; display: none;
    align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .40); padding: 16px;
    -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
#nt-gate.show, #nt-login-modal.show { display: flex; }
@keyframes nt-pop {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}
.nt-gate-card {
    background: var(--nt-card); border-radius: 22px;
    box-shadow: var(--nt-shadow-lg);
    max-width: 400px; width: 100%; padding: 32px 28px 22px;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    text-align: center;
    animation: nt-pop .22s cubic-bezier(.2, .8, .2, 1);
}
.nt-gate-logo { filter: drop-shadow(0 4px 10px rgba(234, 88, 12, .30)); }
.nt-gate-card h2 { font-size: 20px; font-weight: 700; margin: 6px 0 0; letter-spacing: -.022em; line-height: 1.3; }
.nt-gate-sub { font-size: 14px; color: var(--nt-dim); line-height: 1.65; margin: 0 0 6px; max-width: 330px; }
.nt-gate-sub b { color: var(--nt-accent); font-weight: 700; }
.nt-gate-primary {
    width: 100%; min-height: 48px; border: none; border-radius: 13px;
    background: linear-gradient(180deg, #1e293b, #0f172a); color: #fff;
    font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
    letter-spacing: -.01em;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
    transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.nt-gate-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(15, 23, 42, .24); filter: brightness(1.08); }
.nt-gate-primary:active { transform: translateY(0); }
.nt-gate-done { width: 100%; justify-content: center; min-height: 44px; border-radius: 13px; font-weight: 600; }
.nt-gate-row { display: flex; gap: 22px; margin-top: 4px; }
.nt-gate-link {
    border: none; background: none; padding: 6px 2px;
    font-size: 13px; color: var(--nt-dim); font-family: inherit; cursor: pointer;
    border-radius: 8px;
}
.nt-gate-link:hover { color: var(--nt-accent); }

/* ── 곡 결제 게이트 (owner 9/1) — 계정 게이트와 같은 옷(.nt-gate-* 재사용) ── */
#nt-buy, #nt-scan-notice {
    position: fixed; inset: 0; z-index: 9800; display: none;
    align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .40); padding: 16px;
    -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
#nt-buy.show, #nt-scan-notice.show { display: flex; }
#nt-scan-notice .nt-scan-ic { width: 44px; height: 44px; border-radius: 12px; }

/* ── 저장 상태 CTA (비회원/한도) ─────────────────────── */
.nt-save-state.nt-save-cta {
    color: var(--nt-accent); cursor: pointer; font-weight: 600;
    text-decoration: underline dotted; text-underline-offset: 3px;
}

/* ── 내 문서 패널 ────────────────────────────────────── */
#nt-docs-pop { width: min(380px, calc(100vw - 16px)); }
.nt-docs-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; padding: 4px 6px 8px; font-size: 15px;
    border-bottom: 1px solid var(--nt-divider); margin-bottom: 4px;
}
.nt-docs-quota { font-size: 12px; color: var(--nt-dim); }
.nt-docs-list { max-height: 320px; overflow-y: auto; font-size: 13px; color: var(--nt-dim); }
.nt-docs-row { display: flex; align-items: stretch; gap: 4px; }
.nt-docs-row.cur .nt-docs-title { color: var(--nt-accent); }
.nt-docs-open {
    flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between;
    gap: 10px; border: none; background: none; cursor: pointer;
    padding: 10px 10px; border-radius: 10px; font-family: inherit; text-align: left;
}
.nt-docs-open:hover { background: var(--nt-hover); }
.nt-docs-title {
    font-size: 13.5px; font-weight: 600; color: var(--nt-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nt-docs-when { flex: none; font-size: 11.5px; color: var(--nt-dim); }
.nt-docs-del {
    flex: none; border: none; background: none; cursor: pointer;
    font-size: 12px; color: var(--nt-dim); font-family: inherit;
    padding: 0 8px; border-radius: 8px;
}
.nt-docs-del:hover { color: var(--nt-danger); background: rgba(239, 68, 68, .08); }
.nt-view-label { font-size: 13px; color: var(--nt-dim); }
/* label+select travel as ONE unit when the header wraps */
.nt-hdr-sel { display: inline-flex; align-items: center; gap: 6px; flex: none; }
/* GM-styled dropdown (owner 8/24: 브라우저 기본 셀렉트 탈피) — white card,
   custom chevron (CSP img-src data: 허용 확인済), used by 보표/폰트 both */
.nt-view-select {
    appearance: none; -webkit-appearance: none;
    font-size: 13.5px; font-weight: 600; font-family: inherit;
    padding: 6px 28px 6px 12px; border-radius: 8px;
    background-color: var(--nt-card); color: var(--nt-text);
    border: 1px solid var(--nt-border); min-height: 38px;
    cursor: pointer;
    box-shadow: rgba(15, 15, 15, .03) 0 1px 2px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.nt-view-select:hover { border-color: var(--nt-accent); background-color: var(--nt-hover); }
.nt-view-select:focus { outline: 2px solid var(--nt-accent-bg); outline-offset: 1px; border-color: var(--nt-accent); }
/* score zoom segment (owner 8/26) — [−][100%][+], GM card tone */
.nt-zoom-seg {
    gap: 0; border: 1px solid var(--nt-border); border-radius: 8px;
    background: var(--nt-card); overflow: hidden;
    box-shadow: rgba(15, 15, 15, .03) 0 1px 2px;
}
.nt-zoom-btn, .nt-zoom-val {
    border: none; background: none; cursor: pointer; font-family: inherit;
    min-height: 36px; color: var(--nt-text);
}
.nt-zoom-btn { font-size: 17px; font-weight: 600; width: 34px; line-height: 1; }
.nt-zoom-btn:hover:not(:disabled), .nt-zoom-val:hover { background: var(--nt-hover); }
.nt-zoom-btn:disabled { color: var(--nt-dim); opacity: .45; cursor: default; }
.nt-zoom-val {
    font-size: 12.5px; font-weight: 600; min-width: 48px; padding: 0 4px;
    border-left: 1px solid var(--nt-divider); border-right: 1px solid var(--nt-divider);
    color: var(--nt-dim);
}
/* (save-state pill styles live in the appbar block above) */

/* ── palette ─────────────────────────────────────────── */
#nt-palette {
    display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
    touch-action: manipulation; min-width: 0;
}
.nt-pal-group { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.nt-pal-group + .nt-pal-group { position: relative; }

/* Buttons follow the PRODUCT's own patterns, measured from main.css:
 * - free-standing controls = .btn-secondary (white card, 1px border,
 *   xs shadow, orange-tint hover)
 * - exclusive choices = .input-tabs well (tertiary bg, 6px padding,
 *   lg radius) with the .input-tab.active treatment on selection:
 *   white card + ORANGE text + md shadow + orange gradient underline. */
.nt-chip {
    position: relative;
    min-height: 38px; min-width: 38px; padding: 7px 13px;
    border-radius: 11px; border: 1px solid var(--nt-border-soft);
    background: var(--nt-card); color: var(--nt-text);
    font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
    letter-spacing: -.01em;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    box-shadow: var(--nt-shadow-xs);
    white-space: nowrap; /* a button label must never wrap inside itself */
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nt-chip:hover { background: rgba(249, 115, 22, .06); border-color: rgba(249, 115, 22, .55); color: var(--nt-accent); }
.nt-chip:active { background: rgba(249, 115, 22, .14); }
.nt-chip.on {
    background: var(--nt-card); border-color: var(--nt-accent);
    color: var(--nt-accent);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -1px rgba(0, 0, 0, .04);
}
.nt-chip.on::after {
    content: '';
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 3px; border-radius: 999px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.nt-chip-ic { padding: 7px 9px; }
.nt-ic { width: 19px; height: 19px; display: block; }

/* Segmented control — the product's .input-tabs well */
.nt-seg {
    background: var(--nt-seg-bg); border-radius: 14px; padding: 4px; gap: 4px;
    border: none; box-shadow: none;
    flex-wrap: nowrap; /* a segmented group moves as one unit, never splits */
}
.nt-seg .nt-chip {
    border: none; background: transparent; box-shadow: none;
    border-radius: 10px; min-height: 34px; color: var(--nt-dim);
}
.nt-seg .nt-chip:hover { background: rgba(249, 115, 22, .07); color: var(--nt-accent); }
.nt-seg .nt-chip.on {
    background: var(--nt-card); color: var(--nt-accent); font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -1px rgba(0, 0, 0, .04);
}
.nt-seg .nt-chip.on::after { bottom: 3px; }

/* Comfortable touch targets on tablets/phones */
@media (pointer: coarse) {
    .nt-chip { min-height: 42px; min-width: 42px; }
    .nt-seg .nt-chip { min-height: 38px; }
    .nt-ic { width: 21px; height: 21px; }
}

/* ── score card ──────────────────────────────────────── */
#nt-main { max-width: 1200px; margin: 0 auto; }
#nt-score {
    background: var(--nt-card);
    border: 1px solid var(--nt-divider);
    border-radius: 8px;
    box-shadow: rgba(15, 15, 15, .03) 0 1px 2px;
    padding: 14px 8px 18px;
    overflow-x: hidden;
    /* Finger vertical scroll stays native; pen taps are ours. Full
       touch-action:none + custom pan/zoom waits for the real-device
       milestone (M2.5) — touch-action applies to pen too, so drag
       gestures are deferred until measured on hardware. */
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.nt-row { margin-bottom: 6px; }
.nt-row svg { display: block; }

/* Overlay text drawn by nt-engine (product idiom: raw SVG text).
   --nt-inv (set per row SVG by the engine) inverse-compensates the display
   scale: the SVG shrinks (production zoom parity) but the labels keep their
   designed on-screen size. */
text.nt-chord {
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(15px * var(--nt-inv, 1)); font-weight: 700; fill: #111;
}
text.nt-section {
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(13px * var(--nt-inv, 1)); font-weight: 700; font-style: italic; fill: #111;
}
text.nt-lyric {
    font-family: Pretendard, 'Apple SD Gothic Neo', sans-serif;
    font-size: calc(13px * var(--nt-inv, 1)); fill: #222;
}
/* pattern annotations from lens edits: cresc./decresc., →Ride swap marks */
text.nt-annot {
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(11px * var(--nt-inv, 1)); font-style: italic; fill: #475569;
}
/* 점프 표기 (D.C./D.S./Fine/To Coda…) — 다른 마킹보다 또렷하게 (owner 8/24) */
text.nt-jump {
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(14.5px * var(--nt-inv, 1)); font-weight: 700; font-style: italic; fill: #111;
}
text.nt-segno-s {
    font-family: Georgia, "Times New Roman", serif;
    font-size: calc(17px * var(--nt-inv, 1)); font-weight: 700; font-style: italic; fill: #111;
}
/* 메모 (자유 주석) */
text.nt-memo {
    font-family: Pretendard, 'Apple SD Gothic Neo', sans-serif;
    font-size: calc(12px * var(--nt-inv, 1)); fill: #b45309;
}
/* 메모 v2 (9/4): 드래그 핸들 그룹 — touch-action:none이 pan-y 표면에서 2D 드래그를 살린다 */
.nt-memo-g { cursor: grab; touch-action: none; }
.nt-memo-g.nt-memo-drag { cursor: grabbing; opacity: .75; }
.nt-memo-g rect.nt-memo-hit { fill: transparent; pointer-events: all; }
.nt-memo-g:hover rect.nt-memo-hit { fill: rgba(180, 83, 9, .08); }
@media print { .nt-memo-g rect.nt-memo-hit { display: none; } }

/* ── long-press popover ──────────────────────────────── */
.nt-popover {
    position: fixed; z-index: 50; display: flex; gap: 2px;
    background: var(--nt-card);
    border-radius: 12px; padding: 5px;
    box-shadow: var(--nt-shadow-md); border: 1px solid var(--nt-border-soft);
}
.nt-popover button {
    min-height: 38px; padding: 6px 12px; border-radius: 8px;
    border: none; background: transparent;
    color: var(--nt-text); font-size: 14px; font-family: inherit; cursor: pointer;
}
.nt-popover button:hover { background: rgba(249, 115, 22, .08); color: var(--nt-accent); }

/* ── band editor panels (chord / lyric / bar mark) ───── */
.nt-panel {
    /* above the beat-lens sheet (#bl-sheet z 9600, notate-lens.css) —
       the lens' 박자·송폼·도돌이 button opens this panel, and at z 60 it
       rendered BEHIND the sheet (owner-reported). Below bl-popover 9660. */
    position: fixed; z-index: 9650;
    background: var(--nt-card);
    border-radius: 14px; padding: 12px;
    box-shadow: var(--nt-shadow-md); border: 1px solid var(--nt-border-soft);
    display: flex; flex-direction: column; gap: 8px;
    max-width: min(420px, calc(100vw - 16px));
}
.nt-panel-row { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.nt-panel-row.nt-seg { align-self: flex-start; }
.nt-chip-sm { min-height: 32px; min-width: 34px; padding: 4px 8px; font-size: 13px; }
.nt-panel-io { gap: 8px; }
.nt-panel-label { font-size: 13px; color: var(--nt-dim); }
.nt-panel-select {
    font-size: 14px; padding: 6px 8px; border-radius: 6px;
    border: 1px solid var(--nt-border); background: transparent;
    color: var(--nt-text); min-height: 36px;
}
.nt-panel-input {
    flex: 1; min-width: 110px; min-height: 38px;
    font-size: 15px; font-family: inherit;
    padding: 6px 12px; border-radius: 10px;
    border: 1px solid var(--nt-border-soft); background: var(--nt-card);
    color: var(--nt-text); transition: border-color .15s, box-shadow .15s;
}
.nt-panel-input:focus { outline: none; border-color: var(--nt-accent); box-shadow: var(--nt-ring); }
/* 가사 흘려넣기 (8/25): one-line paste box + live distribution preview */
.nt-panel-textarea {
    flex: 1; min-width: 280px; min-height: 56px;
    font-size: 15px; font-family: inherit; line-height: 1.45;
    padding: 6px 10px; border-radius: 6px;
    border: 1px solid var(--nt-border); background: transparent;
    color: var(--nt-text); resize: none;
}
.nt-panel-textarea:focus { outline: none; border-color: var(--nt-accent); box-shadow: var(--nt-ring); }
.nt-panel-textarea, .nt-panel-select { border-radius: 10px; border-color: var(--nt-border-soft); background: var(--nt-card); }
.nt-panel-hint { font-size: 12px; color: var(--nt-dim); max-width: 320px; }
.nt-flow-info { color: var(--nt-text); font-weight: 600; }
.nt-chip-primary:disabled { opacity: .4; cursor: default; }
.nt-chip-primary:disabled:hover { background: var(--nt-text); }
.nt-panel-actions { justify-content: flex-end; gap: 4px; }
/* GM's .btn-primary is dark-slate with white text (orange is the ACCENT,
 * not the fill) — mirror that so 확인 buttons read native. */
.nt-chip-primary { background: var(--nt-text); color: #fff; font-weight: 600; }
.nt-chip-primary:hover { background: #1e293b; }
.nt-chip-danger { color: var(--nt-danger); }
.nt-chip-danger:hover { background: rgba(239, 68, 68, .08); }

/* ── title + print ───────────────────────────────────── */
.nt-title-input {
    min-height: 36px; min-width: 140px; max-width: 260px;
    font-size: 15px; font-weight: 600; font-family: inherit;
    padding: 4px 8px; border-radius: 6px;
    border: 1px solid transparent; background: transparent;
    color: var(--nt-text);
}
.nt-title-input:hover { background: var(--nt-hover); }
.nt-title-input:focus { outline: none; border-color: var(--nt-border); background: var(--nt-card); }
.nt-panel-title { font-size: 14px; }
#nt-print-title {
    display: none;
    font-size: 22px; font-weight: 700; text-align: center;
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
}
/* 브라우저 인쇄 머리글/바닥글(문서 제목·URL·날짜·쪽번호) 제거 (owner
   8/25): 여백이 0이면 브라우저가 찍을 자리가 없다(크롬·사파리 공통 관례).
   종이 여백은 아래 #nt-main 패딩(좌우=매 쪽·상하=첫/끝 쪽)과 .nt-row
   상단 패딩(margin과 달리 쪽 나뉨 뒤에도 살아남는다)으로 복원한다. */
@page { margin: 0; }
@page nt-drumsheet { size: A4 portrait; margin: 0; }
@media print {
    .nt-shell-head, #nt-toolbar, .nt-popover, .nt-panel, #nt-gate, #nt-login-modal, .nt-sel-band { display: none !important; }
    body { background: #fff; padding: 0; }
    #nt-main { max-width: none; padding: 8mm 9mm 10mm; }
    #nt-score {
        border: none; box-shadow: none; border-radius: 0; padding: 0;
    }
    #nt-print-title { display: block; }
    /* Printing with the lens open: hide its runway spacer (nt-lens syncPad)
       or the pad prints as a blank tail page. */
    #nt-lens-pad { display: none !important; }
    /* viewBox is set at render time, so max-width SCALES the systems to the
       paper width instead of clipping them. */
    .nt-row svg { max-width: 100%; height: auto; }
    .nt-row { break-inside: avoid; padding-top: 4mm; }
    /* DrumSheet uses a paper layout rather than shrinking the editor SVGs.
       Override inline SVG dimensions and the later screen card decoration. */
    body.nt-drumsheet { page: nt-drumsheet; height: auto; margin: 0; }
    body.nt-drumsheet #nt-main { width: 100%; margin: 0; padding: 0; }
    body.nt-drumsheet #nt-score {
        width: 100%; overflow: visible; border: none; border-radius: 0;
        box-shadow: none; padding: 0;
    }
    body.nt-drumsheet #nt-print-title {
        font-size: 18pt; line-height: 1.2; margin: 0 0 2mm; break-after: avoid;
    }
    body.nt-drumsheet .nt-row { margin: 0; padding: 0; break-inside: avoid; }
    body.nt-drumsheet .nt-row svg { width: 100% !important; height: auto !important; }
}

/* ── print size (DRUMSHEET_EXTRAS, 2026-11-07) ────────────
   body.nt-paper: between "print" and the end of the print the score sits at paper width, under the opaque dialog
   or the browser's own print screen. What the print draws is then what the preview measures. */
@media screen {
    body.nt-paper #nt-main { overflow: hidden; }  /* a phone must not zoom out to fit a page wider than itself */
    body.nt-paper #nt-score {
        width: 196mm; max-width: none; box-sizing: border-box; padding: 0; border: none;
        box-shadow: none; border-radius: 0; overflow: visible;
    }
    body.nt-paper .nt-row { margin: 0; padding: 0; }
    body.nt-paper .nt-row svg { width: 100% !important; height: auto !important; }
    body.nt-paper #nt-print-title { display: block; width: 196mm; font-size: 18pt; line-height: 1.2; margin: 0 0 2mm; }
}
/* On paper: 7 mm each side on every page, 8 mm above the first (app.js layoutPaperPages gives the later pages theirs) */
@media print {
    body.nt-drumsheet.nt-paper #nt-main { padding: 8mm 7mm 0; box-sizing: border-box; }
}
.nt-pd {
    position: fixed; inset: 0; z-index: 9800; display: flex; flex-direction: column;
    background: #e2e6ec; color: var(--nt-text);
}
.nt-pd-bar {
    flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
    background: var(--nt-card); border-bottom: 1px solid var(--nt-divider);
}
.nt-pd-title { font-size: 15px; font-weight: 700; }
.nt-pd-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nt-pd-label { font-size: 13px; color: var(--nt-dim); margin-right: 4px; }
.nt-pd-size {
    min-height: 38px; min-width: 52px; padding: 4px 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--nt-border); background: transparent; color: var(--nt-text);
    font-size: 14px; font-family: inherit;
}
.nt-pd-size:hover { background: rgba(15, 23, 42, .05); }
.nt-pd-size.on { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; font-weight: 600; }
.nt-pd-info { flex: 1 1 200px; min-width: 0; font-size: 13px; color: var(--nt-dim); }
.nt-pd-actions { display: flex; gap: 6px; margin-left: auto; }
#nt-pd-print { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; font-weight: 600; }
.nt-pd-pages {
    flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px;
}
.nt-pd-page { flex: none; position: relative; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .18); }
.nt-pd-inner { transform-origin: 0 0; color: #000; box-sizing: border-box; padding: 0 7mm; }
.nt-pd-inner .nt-row { margin: 0; padding: 0; }
.nt-pd-inner .nt-row svg { display: block; width: 100% !important; height: auto !important; }
.nt-pd-title-print {
    font-size: 18pt; line-height: 1.2; margin: 0 0 2mm; font-weight: 700; text-align: center;
    font-family: Georgia, "Times New Roman", serif;
}
@media print { #nt-print-dialog, #nt-keys-sheet { display: none !important; } }

/* ── the ? sheet (DRUMSHEET_EXTRAS) ──────────────────────── */
.nt-ks {
    position: fixed; inset: 0; z-index: 9800; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(15, 23, 42, .45);
}
.nt-ks-card {
    width: min(720px, 100%); max-height: 100%; overflow: auto; background: var(--nt-card); color: var(--nt-text);
    border-radius: 14px; padding: 16px 18px; box-shadow: var(--nt-shadow-md);
}
.nt-ks-card:focus { outline: none; }
.nt-ks-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nt-ks-title { font-size: 16px; font-weight: 700; }
.nt-ks-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 22px; }
.nt-ks-group h3 { font-size: 13px; font-weight: 700; margin: 0 0 6px; }
.nt-ks-group h3 small { font-weight: 400; color: var(--nt-dim); margin-left: 4px; }
.nt-ks-grid { grid-column: 1 / -1; }
.nt-ks-grid .nt-ks-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 18px; }
.nt-ks-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.nt-ks-k { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.nt-ks-k i { font-style: normal; color: var(--nt-dim); margin: 0 2px; }
.nt-ks-k kbd {
    min-width: 22px; padding: 1px 6px; text-align: center; border-radius: 5px; font: 12px ui-monospace, monospace;
    background: var(--nt-bg, #f1f5f9); border: 1px solid var(--nt-border); border-bottom-width: 2px;
}

/* ── playback ────────────────────────────────────────── */
.nt-bpm-input {
    width: 64px; min-height: 36px; font-size: 14px; font-family: inherit;
    padding: 4px 8px; border-radius: 6px;
    border: 1px solid var(--nt-border); background: transparent; color: var(--nt-text);
}
#nt-score { position: relative; }
/* 형광펜 색 스와치 (마크 패널 + 선택 플로팅 바 공용) */
.nt-hl-chip {
    width: 26px; height: 26px; border-radius: 8px; flex: none;
    border: 1.5px solid rgba(15, 23, 42, .12); cursor: pointer; padding: 0;
}
.nt-hl-chip:hover { transform: scale(1.08); }
.nt-hl-chip.on { border-color: var(--nt-text); box-shadow: 0 0 0 2px rgba(15, 23, 42, .15); }
#nt-hl-bar {
    position: fixed; z-index: 9500; display: none;
    align-items: center; gap: 6px;
    background: var(--nt-card); border: 1px solid var(--nt-divider);
    border-radius: 10px; padding: 5px 7px;
    box-shadow: var(--nt-shadow-pop, 0 8px 24px rgba(0, 0, 0, .16));
}
#nt-hl-bar .nt-hl-off {
    border: none; background: none; cursor: pointer; font-family: inherit;
    font-size: 12px; color: var(--nt-dim); padding: 4px 6px; border-radius: 6px;
}
#nt-hl-bar .nt-hl-off:hover { color: var(--nt-danger); background: rgba(239, 68, 68, .08); }
@media print { #nt-hl-bar { display: none !important; } }

/* 연습 음원 — 하단 재생바 (8/26 2차: 도크→전폭 바). z=9380: 렌즈
   시트(9600) 아래 — 드럼 편집 중엔 렌즈가 우선, 소리는 계속. */
#nt-audio-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9380;
    display: flex; align-items: center; gap: 10px;
    background: var(--nt-card); border-top: 1px solid var(--nt-divider);
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .10);
    padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
#nt-audio-body {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0;
}
#nt-audio-body iframe { border-radius: 8px; flex: none; }
#nt-audio-body audio { flex: 1; min-width: 0; height: 40px; }
.nt-audio-hint { font-size: 12px; color: var(--nt-dim); white-space: nowrap; }
.nt-audio-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
#nt-audio-body .nt-panel-input { min-width: 0; flex: 1; min-height: 36px; font-size: 13px; }
.nt-audio-side { display: flex; gap: 6px; flex: none; }
@media print { #nt-audio-bar, #nt-audio-pad { display: none !important; } }

/* 미니 재생바 (DRUMSHEET_EXTRAS, 2026-11-08): playing while the toolbar's play button is out of view (a phone follows the
   cursor down the page). Over the practice-audio bar (9380), under the lens sheet (9600). */
#nt-mini-play {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 9390;
    bottom: calc(14px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 6px; padding: 6px;
    background: var(--nt-text); border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
}
#nt-mini-play[hidden] { display: none; }
#nt-mini-play button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
    border: none; border-radius: 999px; background: transparent; color: #fff;
    font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
#nt-mini-play .nt-mini-stop { background: #fff; color: var(--nt-text); }
#nt-mini-play .nt-mini-met.on, #nt-mini-play .nt-mini-drum.on { background: rgba(255, 255, 255, .16); }
@media (max-width: 370px) { #nt-mini-play button { padding: 0 10px; font-size: 13px; gap: 4px; } }
/* the drum sound's chip sits with the metronome's on a phone's scrolled toolbar */
@media (max-width: 600px) { .nt-tb-cluster[aria-label="재생"] > #nt-drum-snd { order: 3; } }
@media print { #nt-mini-play { display: none !important; } }

/* 선택 플로팅 바의 [마디 삭제] (8/26) */
.nt-sel-del { color: var(--nt-danger, #ef4444); font-weight: 600; }
.nt-sel-del:hover { background: rgba(239, 68, 68, .08); }

/* PDF-OMR 가져오기 진행 모달 (8/25) */
#nt-omr-modal {
    position: fixed; inset: 0; z-index: 9700;
    background: rgba(15, 23, 42, .45);
    display: flex; align-items: center; justify-content: center;
}
.nt-omr-card {
    background: var(--nt-card); border-radius: 14px;
    padding: 22px 24px; width: min(420px, 90vw);
    box-shadow: var(--nt-shadow-pop, 0 12px 32px rgba(0, 0, 0, .22));
    display: flex; flex-direction: column; gap: 10px;
}
.nt-omr-card h2 { margin: 0; font-size: 17px; }
#nt-omr-status { margin: 0; font-size: 14px; font-weight: 600; }
.nt-omr-track {
    height: 8px; border-radius: 4px; background: var(--nt-divider, #e5e7eb);
    overflow: hidden;
}
#nt-omr-fill {
    height: 100%; width: 0; border-radius: 4px;
    background: var(--nt-accent, #f97316);
    transition: width .4s ease;
}
.nt-omr-hint { margin: 0; font-size: 12px; color: var(--nt-dim); line-height: 1.5; }
.nt-omr-actions { display: flex; justify-content: flex-end; }
@media print { #nt-omr-modal { display: none !important; } }

/* 이음줄(슬러) 호선 (8/26) — SVG 내용이라 인쇄에도 그대로 */
.nt-slur { fill: none; stroke: #111827; stroke-width: 1.6; }

/* 형광펜 스윕 프리뷰 (8/25 펜 시스템): 드래그 중 선택 색 반투명 밴드 */
.nt-hl-prev {
    position: absolute; z-index: 4; pointer-events: none;
    opacity: .28; border-radius: 6px;
}
@media print { .nt-hl-prev { display: none !important; } }
/* drag-selected bar range (Ctrl+C/V 대상) — blue, distinct from the lens orange */
.nt-sel-band {
    position: absolute; z-index: 4; pointer-events: none;
    background: rgba(35, 131, 226, .08);
    border: 1.5px solid rgba(35, 131, 226, .45);
    border-radius: 6px;
}
@media print { .nt-sel-band { display: none !important; } }
/* lens bar highlight (production bl-band parity, GM orange) */
#nt-lens-band {
    position: absolute; z-index: 4; pointer-events: none;
    background: rgba(249, 115, 22, .07);
    border: 1.5px solid rgba(249, 115, 22, .45);
    border-radius: 6px;
}
@media print { #nt-lens-band { display: none !important; } }
#nt-cursor {
    display: none; position: absolute; z-index: 5;
    width: 2px; background: var(--nt-accent);
    pointer-events: none; border-radius: 1px;
    box-shadow: 0 0 4px rgba(35, 131, 226, .5);
}
@media print { #nt-cursor { display: none !important; } }

/* ── drum bar lens: the sheet itself is the PRODUCTION beat-lens design —
   all sheet styles live in notate-lens.css (beat-lens.css copy, bl-*).
   Only the notate-native score-side helpers stay here: the bar highlight
   band (#nt-lens-band, above) and the runway pad (#nt-lens-pad). ── */

/* ── Notate 홈/진입면 (owner 9/1) ──────────────────────────────────────
   전면 오버레이 — 게이트 모달(9800)·OMR 모달(9900) 아래, 에디터 위.
   [hidden]은 명시 규칙 필수: 아래 display:flex가 UA 기본을 이긴다. */
#nt-home {
    position: fixed; inset: 0; z-index: 9500;
    display: flex; align-items: flex-start; justify-content: center;
    overflow-y: auto;
    background:
        radial-gradient(900px 420px at 50% -140px, rgba(249, 115, 22, .10), transparent 70%),
        var(--nt-page);
    padding: calc(40px + var(--sat)) 20px calc(48px + var(--sab));
}
#nt-home[hidden] { display: none; }
.nt-home-inner {
    width: 100%; max-width: 640px;
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 22px;
    margin: auto 0; /* 세로 여유 시 중앙, 넘치면 스크롤 */
    animation: nt-pop .3s cubic-bezier(.2, .8, .2, 1);
}
.nt-home-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.nt-home-brand svg { filter: drop-shadow(0 3px 7px rgba(234, 88, 12, .28)); }
.nt-home-wordmark {
    font-family: var(--nt-font);
    font-size: 20px; font-weight: 700; letter-spacing: -.02em;
}
.nt-home-wordmark em {
    font-style: normal; font-weight: 600; font-size: 11px;
    color: var(--nt-dim); margin-left: 5px; letter-spacing: .02em;
}
.nt-home-h1 {
    font-size: clamp(30px, 5.6vw, 44px); font-weight: 700;
    letter-spacing: -.035em; line-height: 1.15;
}
.nt-home-sub { font-size: 15.5px; color: var(--nt-dim); line-height: 1.7; max-width: 540px; }
.nt-home-sub b { color: var(--nt-text); font-weight: 700; }
.nt-home-drop {
    width: 100%; max-width: 560px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 36px 28px;
    background: var(--nt-card);
    border: 1.5px dashed rgba(249, 115, 22, .45); border-radius: 22px;
    color: var(--nt-text); cursor: pointer;
    box-shadow: var(--nt-shadow-sm);
    transition: border-color .15s, box-shadow .15s, transform .12s;
}
.nt-home-drop svg {
    width: 54px; height: 54px; padding: 13px; border-radius: 16px;
    background: var(--nt-accent-bg); color: var(--nt-accent);
    margin-bottom: 2px;
}
.nt-home-drop b { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.nt-home-drop span { font-size: 13px; color: var(--nt-muted); line-height: 1.5; }
.nt-home-drop:hover, .nt-home-drop:focus-visible {
    border-color: var(--nt-accent);
    box-shadow: 0 10px 30px rgba(234, 88, 12, .14);
    transform: translateY(-1px);
    outline: none;
}
.nt-home-drop.nt-drag {
    border-color: var(--nt-accent); border-style: solid;
    background: var(--nt-accent-bg); transform: scale(1.01);
}
/* DrumSheet 홈의 대형 CTA (드롭존 대체 — 9/2) */
.nt-home-start {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 18px 36px; border: none; border-radius: 18px; cursor: pointer;
    background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff;
    font-family: inherit; font-size: 17.5px; font-weight: 700; letter-spacing: -.01em;
    box-shadow: 0 10px 26px rgba(234, 88, 12, .30);
    transition: transform .1s, box-shadow .15s;
}
.nt-home-start:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(234, 88, 12, .38); }
.nt-home-start:active { transform: translateY(0); }
.nt-home-price {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    width: 100%; max-width: 560px; padding: 12px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .72); border: 1px solid var(--nt-border-soft);
    font-size: 13.5px; color: var(--nt-dim); line-height: 1.6;
}
.nt-home-price::before {
    content: ''; flex: none; width: 8px; height: 8px; margin-top: 7px;
    border-radius: 50%; background: linear-gradient(135deg, #fb923c, #ea580c);
}
.nt-home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nt-home-actions .nt-chip { padding: 10px 18px; font-size: 14px; border-radius: 12px; }
/* .nt-chip의 display:inline-flex가 [hidden] UA 기본을 덮는다 — 명시 봉인
   (i18n defer 교훈과 같은 계열: 한 번 그린 표시 상태를 신뢰하지 말 것) */
.nt-home-actions .nt-chip[hidden] { display: none; }
.nt-home-drum { font-size: 13px; color: var(--nt-muted); line-height: 1.6; }
.nt-home-drum a { color: var(--nt-accent); font-weight: 600; text-decoration: none; }
.nt-home-drum a:hover { text-decoration: underline; }
@media print { #nt-home { display: none !important; } }

/* ── 계정 (owner 9/4): 앱바 로그인/계정 칩 + 자체 로그인 모달(OAuth 같은 탭 왕복) ── */
.nt-account { padding-left: 7px; gap: 8px; }
.nt-account-avatar {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff;
    font-size: 12px; font-weight: 700; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.nt-account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .nt-appbar .nt-account-name { display: none; } .nt-appbar .nt-account { padding-right: 7px; } }
/* 홈(전면 오버레이) 우상단 계정 스트립 — 앱바가 가려지므로 여기서도 진입 */
.nt-home-auth {
    position: absolute; top: calc(12px + var(--sat)); right: 14px;
    display: flex; align-items: center; gap: 8px; z-index: 1;
}
@media (max-width: 480px) { .nt-home-auth { top: calc(8px + var(--sat)); right: 8px; } }
.nt-oauth-btn {
    width: 100%; min-height: 44px; border-radius: 10px; cursor: pointer;
    font-family: inherit; font-size: 14.5px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: 1px solid var(--nt-divider); background: #fff; color: var(--nt-text);
    transition: background .15s ease, border-color .15s ease;
}
.nt-oauth-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.nt-oauth-btn.nt-oauth-kakao { background: #FEE500; border-color: #FEE500; color: #191919; }
.nt-oauth-btn.nt-oauth-kakao:hover { background: #f5dc00; border-color: #f5dc00; }
.nt-oauth-btn svg { flex: none; }
.nt-auth-terms {
    display: flex; align-items: flex-start; gap: 8px; text-align: left;
    font-size: 12.5px; color: var(--nt-dim); line-height: 1.5; margin-top: 2px;
}
.nt-auth-terms input { margin-top: 3px; accent-color: var(--nt-accent); flex: none; }
.nt-auth-terms a { color: var(--nt-accent); font-weight: 600; text-decoration: none; }
.nt-auth-terms a:hover { text-decoration: underline; }
.nt-auth-err { font-size: 12.5px; color: #ef4444; margin: 0; }
.nt-account-pop { min-width: 220px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.nt-account-pop .nt-account-mail { font-size: 12.5px; color: var(--nt-dim); padding: 4px 6px 8px; word-break: break-all; border-bottom: 1px solid var(--nt-divider); }
.nt-account-pop .nt-chip { width: 100%; justify-content: flex-start; }
.nt-account-pop a.nt-chip { text-decoration: none; }

/* ── 9/4 디자인 다듬기: OAuth 버튼·홈 계정 스트립·토스트·점수 카드 ── */
.nt-oauth-btn { border-radius: 13px; min-height: 48px; font-size: 15px; box-shadow: var(--nt-shadow-xs); transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.nt-oauth-btn:hover { transform: translateY(-1px); box-shadow: var(--nt-shadow-sm); }
.nt-oauth-btn:active { transform: translateY(0); }
.nt-auth-terms { font-size: 13px; margin-top: 4px; }
.nt-home-auth .nt-chip {
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-radius: 12px; box-shadow: var(--nt-shadow-sm);
}
#nt-score { border-radius: 18px; box-shadow: var(--nt-shadow-sm), 0 0 0 1px var(--nt-border-soft); }
/* 토스트: 렌즈(notate-lens.css) 기본값을 세련된 다크 필로 덮는다 — body 선택자로 특이도 확보 */
body #bl-toast {
    background: rgba(15, 23, 42, .94); color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px;
    padding: 11px 16px; font-size: 13.5px; font-weight: 600; line-height: 1.5;
    max-width: min(560px, calc(100vw - 32px)); text-align: center;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .28);
    font-family: var(--nt-font); bottom: calc(22px + var(--sab));
    transform: translateX(-50%) translateY(6px);
    transition: opacity .2s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
}
body #bl-toast.bl-show { transform: translateX(-50%) translateY(0); }

/* ── 9/4 픽토그램 카드 (오너: 글 줄이고 픽토그램으로) ── */
.nt-home-sub { max-width: 520px; }
.nt-home-feats {
    list-style: none; width: 100%; max-width: 560px;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.nt-feat {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 10px 14px; text-align: center;
    background: rgba(255, 255, 255, .8); border: 1px solid var(--nt-border-soft);
    border-radius: 18px; box-shadow: var(--nt-shadow-xs);
}
.nt-feat-ic {
    width: 42px; height: 42px; border-radius: 13px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--nt-accent-bg); color: var(--nt-accent);
}
.nt-feat-ic svg { width: 21px; height: 21px; }
.nt-feat strong { font-size: 14px; font-weight: 700; letter-spacing: -.015em; margin-top: 2px; }
.nt-feat span { font-size: 12.5px; color: var(--nt-dim); line-height: 1.4; }
.nt-home-note { font-size: 13px; color: var(--nt-dim); display: inline-flex; align-items: center; gap: 7px; }
.nt-note-ic { display: inline-flex; color: var(--nt-accent); }
.nt-note-ic svg { width: 16px; height: 16px; }
.nt-home-actions .nt-chip svg { flex: none; }
@media (max-width: 480px) {
    .nt-home-feats { gap: 6px; }
    .nt-feat { padding: 12px 6px 10px; border-radius: 14px; gap: 5px; }
    .nt-feat-ic { width: 36px; height: 36px; border-radius: 11px; }
    .nt-feat-ic svg { width: 18px; height: 18px; }
    .nt-feat strong { font-size: 12.5px; }
    .nt-feat span { font-size: 11px; }
}
/* 모달 안 미니 픽토그램 열 + 가격 배지 */
.nt-gate-feats { list-style: none; display: flex; gap: 8px; width: 100%; margin: 0 0 4px; }
.nt-gate-feats li {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 12px 6px 10px; border-radius: 14px;
    background: #f8fafc; border: 1px solid var(--nt-border-soft);
    font-size: 12.5px; font-weight: 600; color: var(--nt-text); text-align: center; line-height: 1.3;
    letter-spacing: -.01em;
}
.nt-gate-feats .nt-feat-ic { width: 36px; height: 36px; border-radius: 11px; }
.nt-gate-feats .nt-feat-ic svg { width: 18px; height: 18px; }
.nt-price-badge {
    display: inline-flex; align-items: center; gap: 0; padding: 8px 15px; border-radius: 999px;
    background: var(--nt-accent-bg); color: #9a3412; font-size: 13.5px; font-weight: 600;
}
.nt-price-badge b { color: var(--nt-accent); font-weight: 800; }
.nt-omr-hint br { display: none; }


/* ── 필기 도구 (9/6, DESIGN_2026-09-06_NOTATE_INK §5.9) ─────────────
   잉크 오버레이는 행 SVG 밖(#nt-score 직속)이라 인쇄/PDF에 새지 않는다.
   색은 토큰으로만 — 다크 테마가 생기면 토큰만 재정의. */
:root { --nt-ink: #2563eb; --nt-ink-kept: #64748b; --nt-ink-ok: #22c55e; --nt-ink-warn: #f59e0b; }
#nt-score.nt-inking { cursor: crosshair; }
#nt-score.nt-inking.nt-ink-manual { touch-action: none; }           /* B안 (?inkscroll=manual) */
#nt-ink { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: visible; width: 100%; height: 100%; }
#nt-ink path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nt-ink-live, .nt-ink-pending { stroke: var(--nt-ink); stroke-opacity: .9; stroke-width: 2; }
.nt-ink-kept { stroke: var(--nt-ink-kept); stroke-opacity: .55; stroke-width: 1.6; }
.nt-ink-scrub { stroke: var(--nt-danger); stroke-opacity: .8; }
.nt-ink-done { opacity: 0; transition: opacity .25s ease; }
.nt-ink-band {
    position: absolute; z-index: 4; pointer-events: none;
    border: 1.5px dashed rgba(37, 99, 235, .45); border-radius: 6px;
    background: rgba(37, 99, 235, .04); transition: border-color .7s linear;
}
.nt-ink-band.nt-ink-ok { border-color: var(--nt-ink-ok); border-style: solid; }
.nt-ink-badge, .nt-ink-pill {
    position: absolute; z-index: 7; pointer-events: auto;
    min-width: 28px; min-height: 28px; border-radius: 14px; border: 0;
    font: inherit; cursor: pointer;
}
.nt-ink-badge { background: var(--nt-ink-warn); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); color: #fff; font-weight: 700; font-size: 14px; }
.nt-ink-badge::after { content: '?'; }
.nt-ink-pill {
    background: var(--nt-card); border: 1px solid var(--nt-divider); padding: 0 10px;
    font-size: 12px; color: var(--nt-dim); box-shadow: var(--nt-shadow-xs);
}
.nt-ink-pill-convert { color: var(--nt-ink); border-color: rgba(37, 99, 235, .4); font-weight: 600; }
/* 첫 진입 힌트: 칩 카드 톤, 픽토그램(인라인 SVG) + 2줄 */
.nt-ink-hint {
    position: fixed; left: 50%; bottom: calc(76px + var(--sab, 0px)); transform: translateX(-50%);
    z-index: 9400; display: flex; align-items: center; gap: 12px;
    max-width: min(560px, calc(100vw - 24px)); padding: 12px 14px;
    background: var(--nt-card); border: 1px solid var(--nt-border-soft); border-radius: 16px;
    box-shadow: var(--nt-shadow-md); animation: nt-pop .22s cubic-bezier(.2, .8, .2, 1);
}
.nt-ink-hint .nt-feat-ic { width: 38px; height: 38px; border-radius: 12px; }
.nt-ink-hint .nt-feat-ic svg { width: 20px; height: 20px; }
.nt-ink-hint-txt { flex: 1; min-width: 0; }
.nt-ink-hint-txt p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--nt-text); }
.nt-ink-hint-txt p + p { color: var(--nt-dim); }
#nt-pal-ink { gap: 4px; }
#nt-ink-diag {
    position: fixed; right: 8px; bottom: calc(8px + var(--sab, 0px)); z-index: 9900;
    font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace; color: #f8fafc;
    background: rgba(15, 23, 42, .85); padding: 6px 8px; border-radius: 8px;
    max-width: min(360px, calc(100vw - 16px)); pointer-events: none; white-space: pre-wrap;
}
@media (prefers-reduced-motion: reduce) { .nt-ink-done, .nt-ink-band, .nt-ink-hint { transition: none; animation: none; } }
@media print { #nt-ink, .nt-ink-band, .nt-ink-badge, .nt-ink-pill, #nt-pal-ink, .nt-ink-hint, #nt-ink-diag { display: none !important; } }

/* 2026-09-23 iPhone Safari zooms the page when a focused field is under 16px and this viewport
   keeps pinch zoom (no maximum-scale on purpose). iOS-only (-webkit-touch-callout) and phone
   widths only, so iPad layouts are untouched. Covers nt-title, nt-bpm, view/panel selects, the
   YouTube address field and the lens popover inputs. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 600px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size: 16px !important; }
  }
}
/* Native browser print follows the same document entitlement as the button. */
@media print {
    body.nt-print-blocked > * { display: none !important; }
    body.nt-print-blocked::before {
        content: '로그인 후 이용 가능한 문서를 열어 인쇄해주세요.';
        display: block;
        padding: 2rem;
    }
}

/* ── METRONOME_PLUS / PRACTICE_LOG (2026-11-09, app.js NT._installKit): the metronome settings popover, tap tempo,
   the live tempo, the beat flash. The practice log panel brings its own scoped styles (vendor/practice-log.js). */
.nt-met-set { min-width: 30px; padding: 7px 6px; margin-left: -4px; }
.nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nt-tap { margin-left: 4px; font-weight: 700; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.nt-tap:active { background: var(--nt-accent); color: #fff; border-color: var(--nt-accent); }
.nt-bpm-live { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--nt-accent); white-space: nowrap; }
.nt-bpm-live:empty { display: none; }
#nt-met-pop {
    position: absolute; left: 50%; transform: translateX(-50%); z-index: 9500;
    width: min(420px, calc(100vw - 16px)); max-height: 72vh; overflow-y: auto; box-sizing: border-box;
    background: var(--nt-card); color: var(--nt-text); border: 1px solid var(--nt-border); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18); padding: 12px 14px 14px; font-size: 13px;
}
#nt-met-pop[hidden] { display: none; }
.nt-kit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.nt-kit-head b { font-size: 15px; }
.nt-kit-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.nt-kit-row > label:first-child { min-width: 70px; color: var(--nt-dim); font-weight: 600; }
.nt-kit-row select, .nt-kit-row input[type=number] { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--nt-border); background: var(--nt-card); color: var(--nt-text); }
.nt-kit-row input[type=number] { width: 72px; }
.nt-kit-row input[type=range] { width: 140px; accent-color: var(--nt-accent); }
.nt-kit-val { color: var(--nt-dim); font-size: 12px; }
.nt-kit-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.nt-kit-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--nt-text); }
.nt-kit-check input { accent-color: var(--nt-accent); width: 16px; height: 16px; }
.nt-kit-sec { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--nt-divider); font-size: 12px; font-weight: 700; color: var(--nt-muted); }
.nt-kit-in { padding-left: 22px; }
.nt-kit-hint { font-size: 12px; color: var(--nt-muted); margin-top: 4px; line-height: 1.45; }
.nt-kit-dots { gap: 5px; }
.nt-kit-dot { width: 44px; height: 46px; border-radius: 9px; border: 1px solid var(--nt-border); background: var(--nt-card); color: var(--nt-text); cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; font: inherit; }
.nt-kit-dot b { font-size: 14px; line-height: 1; }
.nt-kit-dot span { font-size: 11px; line-height: 1; }
.nt-kit-dot.lv3 { background: var(--nt-accent); border-color: var(--nt-accent); color: #fff; }
.nt-kit-dot.lv2 { background: #fff1e6; border-color: rgba(249, 115, 22, .55); }
.nt-kit-dot.lv1 { background: #fff; border-color: rgba(249, 115, 22, .35); color: var(--nt-dim); }
.nt-kit-dot.lv0 { border-style: dashed; color: var(--nt-muted); }
#nt-metro-flash { position: fixed; inset: 0; pointer-events: none; z-index: 9990; box-shadow: inset 0 0 0 0 rgba(249, 115, 22, 0); transition: box-shadow .12s ease-out; }
#nt-metro-flash.on { box-shadow: inset 0 0 0 6px rgba(37, 99, 235, .55); transition: none; }
#nt-metro-flash.on.acc { box-shadow: inset 0 0 0 10px rgba(249, 115, 22, .8); }
/* a phone's scrolled toolbar orders the play cluster (9/17): the settings chevron stays with the metronome, the log with the audio */
@media (max-width: 600px) {
    .nt-tb-cluster[aria-label="재생"] > #nt-met-set { order: 3; }
    .nt-tb-cluster[aria-label="재생"] > #nt-log-btn { order: 4; }
}
@media print { #nt-met-pop, #nt-metro-flash, .nt-met-set, .nt-tap, .nt-bpm-live, #nt-log-btn, .gmpl-ov { display: none !important; } }
