[hidden] { display: none !important; }
:root {
  --bg: #f6f3ee; --card: #fff; --ink: #1d1b18; --muted: #6f6a62; --line: #e3ded5;
  --accent: #2f6fde; --loop: #f08a24; --cut: #6b4fd8; --play: #e0372b;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
header, main, footer { max-width: 920px; margin: 0 auto; padding: 0 14px; }
header { padding-top: 18px; }
h1 { margin: 0 0 4px; font-size: 26px; }
h2 { margin: 0 0 10px; font-size: 18px; }
h3 { margin: 16px 0 6px; font-size: 15px; }
.sub { margin: 0 0 14px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.big { font-size: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; }
.row.tight { gap: 8px; }
.spacer { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
button, .button, select, input[type=number] {
  font: inherit; font-size: 15px; border: 1px solid #cfc8bc; background: #fbfaf7; color: var(--ink);
  border-radius: 8px; padding: 8px 12px; min-height: 40px; }
button, .button { cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .button:hover { background: #f1ede6; }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #2660c4; }
input[type=number] { width: 7.2em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
input.num { width: 6.5em; }
input:disabled { background: #f0ede8; color: var(--muted); }
.filebtn { position: relative; display: inline-flex; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filebtn span { background: var(--accent); color: #fff; border-radius: 8px; padding: 10px 16px; font-weight: 600; }
#open { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wavewrap { position: relative; margin-top: 10px; border-radius: 8px; overflow: hidden; background: #fbfaf7; border: 1px solid var(--line); }
.wavewrap canvas { display: block; width: 100%; touch-action: none; }
#wave { height: 190px; }
#overview { height: 44px; }
#rwave { height: 90px; }
.overview { margin-top: 6px; }
.pt { display: grid; grid-template-columns: 7.5em auto 1fr; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pt:first-child { border-top: 0; }
.pt .name { font-weight: 600; }
.pt .name i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.pt .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pt .btns button { padding: 6px 10px; min-height: 36px; }
.pt.off { opacity: .5; }
textarea { width: 100%; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fbfaf7; resize: vertical; }
details summary { cursor: pointer; color: var(--accent); margin-top: 6px; }
footer { padding-bottom: 30px; }
@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .pt { grid-template-columns: 1fr auto; }
  .pt .btns { grid-column: 1 / -1; }
  #wave { height: 170px; }
}
