/* Audio Gain — 見た目。クラス名はすべて ag- で始める（サイト全体のCSSと衝突させない） */
.ag-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; flex-direction: column; height: calc(100vh - 80px); margin-top: 40px; margin-bottom: 40px; min-height: 520px;
  background: var(--bg); color: var(--tx); font-size: 12px; 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;
}
.ag-app * { box-sizing: border-box; }
.ag-app [hidden] { display: none !important; }
.ag-app button, .ag-app input, .ag-app select { font-family: inherit; font-size: 12px; }
.ag-app.over::after { content: 'ここにドロップして追加（フォルダもOK）'; 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; }
.ag-head { padding: 12px 16px; background: linear-gradient(180deg, #101a27, var(--panel)); border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 12px; }
.ag-title { color: var(--acc); font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.ag-sub { color: var(--dim); font-size: 11px; flex: 1; }
.ag-f1 { color: var(--dim); font-size: 11px; cursor: pointer; }
.ag-f1:hover { color: var(--acc); }
.ag-body { flex: 1; display: flex; min-height: 0; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-side { width: 292px; min-width: 292px; background: var(--panel); border-left: 1px solid var(--line); padding: 12px 14px; overflow-y: auto; }

/* ボタン・入力 */
.ag-btn { display: inline-flex; align-items: center; justify-content: 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; }
.ag-btn:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); background: #15212f; }
.ag-btn:disabled { opacity: .35; cursor: not-allowed; }
.ag-btn.primary { background: linear-gradient(180deg, #3ddcff, #1fb6e0); border-color: #3ddcff; color: #06222c; font-weight: 700; padding: 10px 12px; font-size: 13px; width: 100%; }
.ag-btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #7be8ff, #3ddcff); color: #021820; }
.ag-btn.sm { padding: 3px 8px; font-size: 11px; }
.ag-btn.chip.on { border-color: var(--acc); color: var(--acc); background: rgba(61,220,255,.12); }
.ag-in { background: #080c12; border: 1px solid var(--line2); color: #e1eaf3; padding: 5px 8px; border-radius: 5px; width: 100%; }
.ag-in:focus { outline: none; border-color: var(--acc); }
.ag-in:disabled { opacity: .45; }
.ag-stitle { color: var(--acc2); font-size: 11px; letter-spacing: 1.2px; margin: 0 0 8px; font-weight: 600; }
.ag-sec { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.ag-f { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.ag-f > label { width: 100px; flex: none; color: var(--dim); line-height: 1.3; }
.ag-f .unit { color: var(--dim); flex: none; width: 36px; }
.ag-chips { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0 2px; }
.ag-chk { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; color: #aab6c5; cursor: pointer; line-height: 1.5; }
.ag-chk input { accent-color: var(--acc); margin-top: 2px; }
.ag-note { color: var(--dim); line-height: 1.7; font-size: 11px; margin: 4px 0; }
.ag-radio { display: flex; flex-direction: column; gap: 4px; }
.ag-radio label { display: flex; gap: 7px; align-items: center; cursor: pointer; color: #b9c6d4; }
.ag-radio label.off { opacity: .4; pointer-events: none; }
.ag-radio input { accent-color: var(--acc); }

/* 一覧 */
.ag-drop { margin: 12px; padding: 12px; border: 2px dashed var(--line2); border-radius: 8px; text-align: center; color: var(--dim); cursor: pointer; transition: all .2s; background: rgba(255,255,255,.015); }
.ag-drop:hover { border-color: var(--acc); color: #b6c6d6; background: rgba(61,220,255,.05); }
.ag-drop.big { flex: 1; margin: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; font-size: 12px; line-height: 1.8; }
.ag-drop.big b { color: #9fb0c3; font-size: 17px; font-weight: 600; }
.ag-drop .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; background: radial-gradient(circle, rgba(61,220,255,.12), transparent 70%); }
.ag-listbar { display: flex; align-items: center; gap: 10px; padding: 0 12px 8px; color: var(--dim); font-size: 11px; flex-wrap: wrap; }
.ag-listbar .grow { flex: 1; }
.ag-listbar label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.ag-listbar input { accent-color: var(--acc); }
.ag-list { flex: 1; overflow-y: auto; padding: 0 12px 12px; min-height: 0; }
.ag-row, .ag-th { display: grid; grid-template-columns: minmax(150px, 1fr) 84px 72px 76px 92px minmax(130px, 1.1fr) 62px; gap: 8px; align-items: center; padding: 7px 10px; }
.ag-th { color: var(--dim); font-size: 10.5px; letter-spacing: .5px; position: sticky; top: 0; background: var(--bg); z-index: 2; border-bottom: 1px solid var(--line); }
.ag-row { border: 1px solid var(--line); border-radius: 7px; background: var(--panel2); margin-top: 5px; }
.ag-row.err { border-color: rgba(255,93,115,.5); }
.ag-row.done { border-color: rgba(124,240,182,.4); }
.ag-row .nm { min-width: 0; }
.ag-row .nm b { display: block; font-weight: 500; color: #e3ecf5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row .nm i { display: block; font-style: normal; color: var(--dim); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-row .num { font-variant-numeric: tabular-nums; text-align: right; color: #dbe5ef; }
.ag-row .num small { color: var(--dim); font-size: 10px; margin-left: 3px; }
.ag-row .up { color: var(--acc2); } .ag-row .down { color: var(--amber); }
.ag-row .st { font-size: 11px; color: var(--dim); line-height: 1.5; min-width: 0; word-break: break-all; }
.ag-row .st.warn { color: var(--amber); } .ag-row .st.bad { color: #ffb0ba; } .ag-row .st.good { color: var(--acc2); }
.ag-row .ops { display: flex; gap: 4px; justify-content: flex-end; }
.ag-row .ops .ag-btn { padding: 2px 7px; }
.ag-mini { height: 4px; background: #080c12; border-radius: 2px; overflow: hidden; margin-top: 4px; }
.ag-mini i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); }
.ag-bar { height: 8px; background: #080c12; border: 1px solid var(--line2); border-radius: 5px; overflow: hidden; margin: 10px 0 6px; }
.ag-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ddcff, #7cf0b6); transition: width .15s; }
.ag-msg { min-height: 30px; font-size: 11px; color: var(--dim); line-height: 1.6; }
.ag-msg.err { color: #ffb0ba; } .ag-msg.ok { color: var(--acc2); }
.ag-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; }

/* ダイアログ・通知 */
.ag-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); }
.ag-modal { background: #0e151f; border: 1px solid #2a384b; border-radius: 10px; width: min(880px, 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; }
.ag-modal * { box-sizing: border-box; }
.ag-modal > .hd { padding: 14px 18px; border-bottom: 1px solid #1c2735; color: #3ddcff; font-size: 15px; font-weight: 600; display: flex; align-items: center; }
.ag-modal > .hd .x { margin-left: auto; cursor: pointer; color: #6b7a8e; font-size: 20px; line-height: 1; }
.ag-modal > .bd { padding: 16px 18px; overflow-y: auto; }
.ag-modal > .ft { padding: 12px 18px; border-top: 1px solid #1c2735; display: flex; justify-content: flex-end; }
.ag-help .q { width: 100%; padding: 9px 12px; background: #080c12; border: 1px solid #2a384b; border-radius: 6px; color: #e1eaf3; margin-bottom: 8px; font-size: 12px; }
.ag-help .q:focus { outline: none; border-color: #3ddcff; }
.ag-help h3 { color: #7cf0b6; font-size: 12px; letter-spacing: 1.2px; margin: 18px 0 6px; font-weight: 600; }
.ag-help .qa { padding: 8px 0; border-bottom: 1px solid #172230; line-height: 1.8; }
.ag-help .qa b { display: block; color: #e6eef7; font-weight: 600; }
.ag-help .qa span { color: #a2b0c1; }
.ag-help .hide { display: none; }
.ag-help .keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.ag-help .keys > div { display: flex; gap: 10px; align-items: baseline; }
.ag-help .keys .ag-kbd { flex: none; min-width: 70px; text-align: center; }
.ag-help .keys .d { color: #a2b0c1; }
.ag-toast { position: fixed; bottom: 60px; 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; }
.ag-toast.err { border-color: #ff5d73; color: #ffb7c0; }
@media (max-width: 900px) { .ag-body { flex-direction: column; } .ag-side { width: auto; min-width: 0; border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; } .ag-row, .ag-th { grid-template-columns: minmax(110px, 1fr) 70px 60px 64px 76px 100px 56px; font-size: 11px; } }
