/* 모바일 바텀시트(M1-T15): 둥근 위 모서리 시트, 아이콘 타일, 분할 컨트롤, 그룹 목록(인스펙터). mobile.css의 토큰을 쓴다. */
.m-sheet-backdrop { position: absolute; inset: 0 0 var(--m-tabs-h) 0; background: rgba(0, 0, 0, 0.5); z-index: 10; }
.m-sheet { position: absolute; left: 0; right: 0; bottom: var(--m-tabs-h); z-index: 11; max-height: 62%; display: flex; flex-direction: column;
  background: #232327; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.55); }
.m-sheet-grab { align-self: center; width: 56px; height: 24px; touch-action: none; }
.m-sheet-grab::after { content: ''; display: block; width: 40px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--m-fill-hi); }
.m-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px var(--m-edge); }
.m-sheet-title { margin: 0; font-size: 1.25em; font-weight: 800; letter-spacing: -0.01em; }
.m-sheet-close { width: 44px; height: 44px; padding: 0 !important; border-radius: 50% !important; background: var(--m-fill-hi); }
.m-sheet-body { overflow-y: auto; padding: 4px var(--m-edge) 24px; -webkit-overflow-scrolling: touch; min-height: 232px; }
.m-sheet-body > div { display: grid; gap: var(--m-gap); align-content: start; }
.m-edit-hint, .m-export-label { margin: 0; color: var(--text-secondary); font-size: 0.875em; }
.m-export-label { font-weight: 700; letter-spacing: 0.02em; }
.m-sheet-body button { width: 100%; }

/* 편집 타일: 아이콘 위, 글자 아래 */
.m-edit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-sheet-body .m-edit-grid button, .m-sheet-body .m-edit-action { width: auto; }
.m-edit-action { flex-direction: column; gap: 6px !important; min-height: 76px !important; padding: 10px 6px !important; background: var(--m-fill) !important; font-size: 0.8125em; text-align: center; }
.m-edit-grid:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
.m-edit-action .m-icon { width: 28px; height: 28px; color: var(--text-primary); }
.m-edit-action[data-action="edit-delete"] .m-icon { color: #ff6b6b; }
.m-edit-action .m-label { overflow-wrap: anywhere; }
.m-fx-speeds { display: flex; padding: 3px; gap: 2px; border-radius: 14px; background: var(--m-fill); grid-template-columns: none; }
.m-fx-speeds button { flex: 1; width: auto; min-height: 44px; background: transparent !important; border-radius: 11px; font-weight: 700; }
.m-fx-speeds button:active:not(:disabled) { background: var(--m-fill-hi) !important; }
.m-fx-fades { grid-template-columns: 1fr 1fr; }
.m-fx-fades button { font-size: 0.8125em; flex-direction: column; }
.m-edit-grid.m-fx-fades button { min-height: 56px !important; flex-direction: row; }

/* 큰 단추 */
.m-export-sizes { display: flex; padding: 3px; gap: 2px; border-radius: 14px; background: var(--m-fill); margin: 0; }
.m-export-size { flex: 1; width: auto; min-height: 44px; background: transparent !important; border-radius: 11px; font-weight: 700; }
.m-export-size[aria-pressed="true"] { background: var(--accent-fill) !important; color: #fff; }
.m-export-summary { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.m-export-start { min-height: 54px !important; font-size: 1.0625em; }
.m-export-keep { text-align: center; }

/* 그룹 목록: 데스크톱 인스펙터(음량·페이드·속도·글자)를 터치용 한 덩이로 묶는다 */
.m-audio-controls, .m-text-controls { display: grid; gap: 0; margin: 0; padding: 0; background: var(--m-fill); border-radius: 16px; overflow: hidden; }
.m-audio-controls:empty, .m-text-controls:empty { display: none; }
.m-audio-controls .audio-inspector-fade, .m-audio-controls .speed-controls, .m-text-controls .text-inspector { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
.m-sheet-body label, .m-sheet-body .audio-inspector-volume { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--m-hair); }
.m-sheet-body .audio-inspector-volume { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 2.5em; }
.m-sheet-body label:last-child, .m-sheet-body .audio-inspector-fade > label:last-child { border-bottom: 0; }
.m-sheet-body .audio-inspector-mute, .m-sheet-body label:has(> input[type="checkbox"]) { display: flex; justify-content: space-between; flex-direction: row-reverse; gap: 12px; }
.m-sheet-body input:not([type="checkbox"]), .m-sheet-body select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--text-primary); text-align: right; }
.m-sheet-body textarea { box-sizing: border-box; width: 100%; min-height: 88px; padding: 10px 12px; border: 1px solid var(--m-hair); border-radius: 12px; background: var(--pane-bg-alt); color: var(--text-primary); resize: none; text-align: left; }
.m-text-controls label:has(> textarea) { grid-template-columns: 1fr; padding: 12px 16px; gap: 8px; }
.m-sheet-body input[type="checkbox"] { width: 28px; height: 28px; min-height: 0; accent-color: var(--accent-fill); }
.m-sheet-body .inspector-button { width: auto; min-height: 44px; margin: 8px 16px; }
.m-sheet-body legend { display: none; }
.m-shell input, .m-shell textarea, .m-shell select { font-size: max(16px, 1em); }
