/* Audio Cutter — 見た目。クラス名はすべて ac- で始める（サイト全体のCSSと衝突させない） */
.ac-app {
  --bg: #090d14; --panel: #0e141d; --panel2: #121a26; --line: #1c2735; --line2: #2a384b;
  --tx: #ced9e5; --dim: #7a8798; --acc: #3ddcff; --acc2: #7cf0b6; --red: #ff5d73; --amber: #ffc861;
  display: flex; height: calc(100vh - 80px); margin-top: 40px; margin-bottom: 40px; min-height: 540px;
  background: var(--bg); color: var(--tx); font-size: 12px; user-select: none; overflow: hidden; position: relative;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  border: 1px solid var(--line); border-radius: 8px;
}
.ac-app * { box-sizing: border-box; }
.ac-app button, .ac-app input, .ac-app select, .ac-app textarea { font-family: inherit; font-size: 12px; }
.ac-app.over::after { content: 'ここにドロップして読み込み'; position: absolute; inset: 6px; border: 2px dashed var(--acc); border-radius: 8px; background: rgba(61,220,255,.08); display: flex; align-items: center; justify-content: center; color: var(--acc); font-size: 18px; z-index: 50; pointer-events: none; }

/* パネル */
.ac-left { width: 250px; min-width: 250px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.ac-right { width: 300px; min-width: 300px; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.ac-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-header { padding: 12px 14px; background: linear-gradient(180deg, #101a27, var(--panel)); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ac-title { color: var(--acc); font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.ac-sub { color: var(--dim); font-size: 10.5px; }
.ac-section { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ac-stitle { color: var(--acc2); font-size: 11px; letter-spacing: 1.2px; margin-bottom: 8px; font-weight: 600; }
.ac-hint { color: var(--dim); font-size: 11px; line-height: 1.7; }
.ac-hint kbd, .ac-kbd { background: #1a2433; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; color: #e3ecf5; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.ac-chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #aab6c5; cursor: pointer; line-height: 1.4; }
.ac-chk input { accent-color: var(--acc); }

/* ボタン */
.ac-btn { display: inline-flex; align-items: center; gap: 6px; background: #131c29; border: 1px solid var(--line2); color: #c9d5e2; padding: 6px 10px; cursor: pointer; border-radius: 6px; transition: all .15s; white-space: nowrap; }
.ac-btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); background: #15212f; }
.ac-btn:disabled { opacity: .32; cursor: not-allowed; }
.ac-btn.on { border-color: var(--acc); color: var(--acc); background: rgba(61,220,255,.12); }
.ac-btn.primary { background: linear-gradient(180deg, #3ddcff, #1fb6e0); border-color: #3ddcff; color: #06222c; font-weight: 700; }
.ac-btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #7be8ff, #3ddcff); color: #021820; }
.ac-btn.danger:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: rgba(255,93,115,.1); }
.ac-btn.sm { padding: 4px 8px; font-size: 11px; }
.ac-btn.round { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.ac-btn.round.big { width: 44px; height: 44px; background: linear-gradient(180deg, #3ddcff, #1fb6e0); border-color: #3ddcff; color: #06222c; }
.ac-btn.round.big:hover:not(:disabled) { background: linear-gradient(180deg, #7be8ff, #3ddcff); color: #021820; }
.ac-btn.round.big.on { background: linear-gradient(180deg, #ffc861, #f0a52e); border-color: #ffc861; color: #2a1a00; }
.ac-btn.round.toggle { width: 30px; height: 30px; }
.ico { display: inline-flex; align-items: center; justify-content: center; }
.ico svg { display: block; }
.ac-sep { width: 1px; align-self: stretch; background: var(--line2); margin: 0 4px; }

/* 素材 */
.ac-drop { border: 2px dashed var(--line2); border-radius: 8px; padding: 18px 8px; text-align: center; color: var(--dim); cursor: pointer; line-height: 1.8; transition: all .2s; background: rgba(255,255,255,.015); }
.ac-drop:hover { border-color: var(--acc); color: #b6c6d6; background: rgba(61,220,255,.05); }
.ac-bin { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; max-height: 34vh; overflow-y: auto; }
.ac-media { display: flex; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; align-items: center; background: var(--panel2); cursor: pointer; }
.ac-media:hover { border-color: rgba(61,220,255,.5); }
.ac-media.unused { opacity: .6; }
.ac-media img, .ac-media .ph { width: 38px; height: 38px; object-fit: cover; background: #05080d; border-radius: 4px; flex: none; display: flex; align-items: center; justify-content: center; color: #4a586a; font-size: 16px; }
.ac-media .nm { flex: 1; min-width: 0; }
.ac-media .nm b { display: block; font-weight: 500; color: #dfe8f1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-media .nm i { color: var(--dim); font-style: normal; font-size: 10px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-media .add { flex: none; padding: 3px 5px; }
.ac-tagbox .body { display: flex; gap: 10px; }
.ac-tagbox img, .ac-tagbox .ph { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: none; background: #05080d; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: #4a586a; font-size: 9px; text-align: center; }
.ac-tagbox .meta { min-width: 0; flex: 1; font-size: 11px; }
.ac-tagbox .r { display: flex; gap: 6px; line-height: 1.6; }
.ac-tagbox .r span { color: var(--dim); flex: none; width: 52px; }
.ac-tagbox .r b { font-weight: 500; color: #dbe5ef; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ツールバー・トランスポート */
.ac-toolbar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; row-gap: 6px; }
.ac-toolbar .grow { flex: 1; }
.ac-f1 { color: var(--dim); font-size: 11px; margin-right: 8px; cursor: pointer; }
.ac-f1:hover { color: var(--acc); }
.ac-transport { display: flex; align-items: center; padding: 8px 12px; background: var(--panel); border-top: 1px solid var(--line); gap: 12px; }
.ac-transport .lft, .ac-transport .rgt { flex: 1; display: flex; align-items: center; gap: 8px; }
.ac-transport .rgt { justify-content: flex-end; color: var(--dim); }
.ac-transport .mid { display: flex; align-items: center; gap: 10px; }
.ac-time { font-family: ui-monospace, Consolas, monospace; font-size: 20px; color: var(--acc); min-width: 210px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.ac-time .tot { color: #52617a; font-size: 13px; }
.ac-meter { width: 90px; height: 6px; background: #0a0f17; border: 1px solid var(--line2); border-radius: 3px; overflow: hidden; }
.ac-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc2), var(--amber) 75%, var(--red)); }
.ac-range { accent-color: var(--acc); }
.ac-status { padding: 4px 12px; font-size: 11px; color: var(--dim); background: #0b1119; border-top: 1px solid var(--line); min-height: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 波形 */
.ac-wave { flex: 1; min-height: 190px; position: relative; background: #0a0e15; overflow: hidden; }
.ac-scroller { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-color: #2a384b #0b1119; scrollbar-width: thin; }
.ac-stage { position: sticky; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
.ac-stage canvas { position: absolute; left: 0; top: 0; display: block; }
.ac-spacer { position: absolute; left: 0; top: 0; height: 1px; width: 1px; pointer-events: none; }
.ac-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #5c6b7e; font-size: 12px; text-align: center; padding: 20px; }
.ac-empty b { color: #9fb0c3; font-size: 17px; font-weight: 600; }
.ac-empty .ring { width: 64px; height: 64px; border: 2px solid #26405a; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--acc); font-size: 28px; margin-bottom: 6px; background: radial-gradient(circle, rgba(61,220,255,.12), transparent 70%); }
.ac-empty .ac-btn { margin-top: 8px; padding: 8px 18px; font-size: 13px; }

/* 右ペイン */
.ac-tabs { display: flex; border-bottom: 1px solid var(--line); background: #0b1119; }
.ac-tab { flex: 1; text-align: center; padding: 10px 0; color: var(--dim); cursor: pointer; border-bottom: 2px solid transparent; }
.ac-tab:hover { color: #b7c6d6; }
.ac-tab.on { color: var(--acc); border-bottom-color: var(--acc); }
.ac-pane { display: none; padding: 12px 14px; overflow-y: auto; flex: 1; }
.ac-pane.on { display: block; }
.ac-note { color: var(--dim); line-height: 1.7; margin: 4px 0 8px; white-space: pre-line; }
.ac-note.sm { font-size: 11px; }
.ac-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.ac-box[hidden], .ac-pane [hidden] { display: none !important; }
.ac-clipname { font-size: 13px; color: #e6eef7; font-weight: 600; word-break: break-all; margin-bottom: 4px; }
.ac-f { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.ac-f > label { width: 96px; flex: none; color: var(--dim); }
.ac-f .ac-in, .ac-f .ac-range { flex: 1; min-width: 0; }
.ac-f .ac-in + .ac-in { flex: none; width: 64px; }
.ac-in { background: #080c12; border: 1px solid var(--line2); color: #e1eaf3; padding: 5px 8px; border-radius: 5px; width: 100%; user-select: text; }
.ac-in:focus { outline: none; border-color: var(--acc); }
.ac-in:disabled { opacity: .45; }
.ac-in.mono { font-family: ui-monospace, Consolas, monospace; }
.ac-row { display: flex; gap: 6px; margin-top: 10px; }
.ac-row.wrap { flex-wrap: wrap; }
.ac-sum { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); font-size: 13px; line-height: 1.8; }
.ac-sum .sm { color: var(--dim); font-size: 11px; }

/* ダイアログ・メニュー・通知 */
.ac-modal-bg { position: fixed; inset: 0; background: rgba(2,5,9,.76); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.ac-modal { background: #0e151f; border: 1px solid var(--line2, #2a384b); border-radius: 10px; width: min(500px, 100%); max-height: 88vh; display: flex; flex-direction: column; color: #ced9e5; font-size: 12px; box-shadow: 0 16px 60px #000; font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; }
.ac-modal.wide { width: min(880px, 100%); }
.ac-modal * { box-sizing: border-box; }
.ac-modal button, .ac-modal input, .ac-modal select { font-family: inherit; font-size: 12px; }
.ac-modal > .hd { padding: 14px 18px; border-bottom: 1px solid #1c2735; color: #3ddcff; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ac-modal > .hd .x { margin-left: auto; cursor: pointer; color: #6b7a8e; font-size: 20px; line-height: 1; }
.ac-modal > .bd { padding: 16px 18px; overflow-y: auto; user-select: text; }
.ac-modal > .ft { padding: 12px 18px; border-top: 1px solid #1c2735; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.ac-modal .ac-f > label { width: 110px; }
.ac-modal .ac-chk { margin: 10px 0; }
.ac-exp .ac-note { white-space: pre-line; }
.ac-namef { display: flex; align-items: center; gap: 4px; flex: 1; }
.ac-namef .ac-in { flex: 1 !important; width: auto !important; }
.ac-ext { color: var(--dim, #7a8798); font-family: ui-monospace, Consolas, monospace; }
.ac-warn { color: #ffb0ba; background: rgba(255,93,115,.1); border: 1px solid rgba(255,93,115,.4); padding: 8px 10px; border-radius: 6px; line-height: 1.6; margin-top: 8px; }
.ac-warn:empty { display: none; }
.ac-ok { color: #7cf0b6; font-size: 14px; font-weight: 600; word-break: break-all; margin-bottom: 4px; }
.ac-bar { height: 10px; background: #080c12; border: 1px solid #2a384b; border-radius: 6px; overflow: hidden; margin: 12px 0 8px; }
.ac-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ddcff, #7cf0b6); transition: width .15s; }
.ac-menu { position: fixed; z-index: 9500; background: #121a26; border: 1px solid #2a384b; border-radius: 8px; padding: 5px 0; min-width: 230px; box-shadow: 0 10px 34px #000; font-family: system-ui, "Yu Gothic UI", sans-serif; font-size: 12px; }
.ac-menu div { padding: 6px 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 22px; color: #ced9e5; }
.ac-menu div:hover { background: rgba(61,220,255,.14); color: #3ddcff; }
.ac-menu div span { color: #6b7a8e; }
.ac-menu hr { border: 0; border-top: 1px solid #243246; margin: 4px 0; }
.ac-menu .off { opacity: .35; pointer-events: none; }
.ac-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #121a26; border: 1px solid rgba(61,220,255,.6); color: #e1eaf3; padding: 9px 18px; border-radius: 8px; z-index: 9800; max-width: 80vw; box-shadow: 0 6px 26px #000; font-size: 12px; font-family: system-ui, "Yu Gothic UI", sans-serif; }
.ac-toast.err { border-color: #ff5d73; color: #ffb7c0; }

/* ヘルプ */
.ac-help .q { width: 100%; padding: 9px 12px; background: #080c12; border: 1px solid #2a384b; border-radius: 6px; color: #e1eaf3; margin-bottom: 8px; }
.ac-help .q:focus { outline: none; border-color: #3ddcff; }
.ac-help h3 { color: #7cf0b6; font-size: 12px; letter-spacing: 1.2px; margin: 18px 0 6px; font-weight: 600; }
.ac-help .qa { padding: 8px 0; border-bottom: 1px solid #172230; line-height: 1.8; }
.ac-help .qa b { display: block; color: #e6eef7; font-weight: 600; }
.ac-help .qa span { color: #a2b0c1; }
.ac-help .hide { display: none; }
.ac-help .keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.ac-help .keys > div { display: flex; gap: 10px; align-items: baseline; }
.ac-help .keys .ac-kbd { flex: none; min-width: 84px; text-align: center; }
.ac-help .keys .d { color: #a2b0c1; }
@media (max-width: 1100px) { .ac-left { width: 200px; min-width: 200px; } .ac-right { width: 250px; min-width: 250px; } .ac-time { min-width: 170px; font-size: 17px; } }
