/* 소리 라이브러리 화면(M1-T16): 편집 화면 위를 덮는 전체 높이 화면. mobile.css의 토큰을 쓴다. */
.m-lib { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--pane-bg-alt); }
.m-lib-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 4px var(--m-edge); }
.m-lib-title { margin: 0; font-size: 1.5em; font-weight: 800; letter-spacing: -0.01em; }
.m-lib-close { width: 44px; height: 44px; padding: 0 !important; border-radius: 50% !important; }
.m-lib-kinds { display: flex; margin: 8px var(--m-edge) 0; padding: 3px; gap: 2px; border-radius: 14px; background: var(--m-fill); }
.m-lib-kind { flex: 1; min-width: 0 !important; background: transparent !important; border-radius: 11px !important; font-weight: 700; padding: 0 6px !important; }
.m-lib-kind[aria-pressed="true"] { background: var(--accent-fill) !important; color: #fff; }
.m-lib-search { box-sizing: border-box; margin: 12px var(--m-edge) 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--m-fill-hi); color: var(--text-primary); width: calc(100% - 2 * var(--m-edge)); -webkit-appearance: none; appearance: none; }
.m-lib-search::placeholder { color: var(--text-secondary); }
.m-lib-chips { display: flex; gap: 8px; margin-top: 12px; padding: 0 var(--m-edge) 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: none; }
.m-lib-chips::-webkit-scrollbar { display: none; }
.m-lib-chip { flex: none; min-height: 36px !important; min-width: 0 !important; padding: 0 14px !important; border-radius: 18px !important; font-size: 0.875em; background: var(--m-fill) !important; white-space: nowrap; }
.m-lib-chip[aria-pressed="true"] { background: var(--selection) !important; color: #1a1a1a; }
.m-lib-list { list-style: none; margin: 8px 0 0; padding: 0 var(--m-edge) calc(24px + env(safe-area-inset-bottom)); flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; gap: 8px; align-content: start; }
.m-lib-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--m-fill); }
.m-lib-row[data-state="playing"] { box-shadow: inset 0 0 0 2px var(--accent-fill); }
.m-lib-play { width: 48px; height: 48px; padding: 0 !important; border-radius: 50% !important; background: var(--m-fill-hi) !important; }
.m-lib-row[data-state="playing"] .m-lib-play, .m-lib-row[data-state="loading"] .m-lib-play { background: var(--accent-fill) !important; color: #fff; }
.m-lib-glyph-stop { display: none; }
.m-lib-row[data-state="playing"] .m-lib-glyph-play { display: none; }
.m-lib-row[data-state="playing"] .m-lib-glyph-stop { display: block; }
.m-lib-row[data-state="loading"] .m-lib-play { opacity: 0.6; }
.m-lib-text { display: grid; gap: 2px; min-width: 0; }
.m-lib-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-lib-meta { font-size: 0.8125em; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-lib-credit { font-size: 0.6875em; color: var(--text-secondary); opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-lib-add { min-height: 44px; padding: 0 16px !important; border-radius: 22px !important; }
.m-lib-row[data-added="true"] .m-lib-add { background: var(--m-fill-hi) !important; }
.m-lib-status { margin: 24px var(--m-edge); text-align: center; color: var(--text-secondary); }
