:root {
  --red: #ff2a1a;
  --fg: #f2f2f2;
  --dim: #c8c8c8;
  --mut: #9a9a9a;
  --line: #262626;
  --gutter: clamp(16px, 4vw, 56px);
  --anton: Anton, Impact, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #000; color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: #000; color: var(--fg); font-family: var(--mono); -webkit-text-size-adjust: 100%; }
button, select, input { font: inherit; color: inherit; border-radius: 0; }
button { background: #000; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .4; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
a { color: var(--fg); }
a:hover { color: var(--red); }
p { margin: 0; }
h2 { margin: 0; font: 400 28px/1.1 var(--anton); letter-spacing: .04em; }
strong { color: var(--fg); font-weight: 700; }
.red { color: var(--red); }

@media (min-width: 761px) { .mob { display: none !important; } }
@media (max-width: 760px) { .desk { display: none !important; } }

/* ---------- header ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); border-bottom: 2px solid var(--fg); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); min-height: 44px; }
.brand:hover { color: var(--fg); }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 2px rgba(255, 255, 255, .5); }
.brand-name { font: 400 30px/1 var(--anton); letter-spacing: .02em; white-space: nowrap; }
.top-nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 13px; letter-spacing: .14em; }
.top-nav a { text-decoration: none; padding: 13px 0; }
.btn-solid { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; background: var(--fg); color: #000; text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .14em; }
.btn-solid:hover { background: var(--red); color: #000; }
.btn-line { min-height: 44px; padding: 0 12px; border: 2px solid var(--fg); font-size: 11px; font-weight: 700; letter-spacing: .14em; white-space: nowrap; }

/* ---------- page grid ---------- */
.app { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 24px; padding: 0 var(--gutter) 72px; }
.app > * { grid-column: 1 / -1; min-width: 0; }
.app > section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
@media (min-width: 1041px) {
  #sample { grid-column: span 7; }
  #pads { grid-column: span 5; }
  #fx { grid-column: span 8; }
  #export { grid-column: span 4; }
}
.row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.meta { font-size: 12px; letter-spacing: .14em; color: var(--mut); }
.note { font-size: 12px; line-height: 1.6; letter-spacing: .06em; color: var(--mut); }
.field-label { font-size: 12px; letter-spacing: .18em; color: var(--mut); }

/* ---------- hero ---------- */
.app > .hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: clamp(40px, 6vw, 88px); }
.hero-copy { flex: 999 1 560px; min-width: 0; }
.eyebrow { margin-bottom: 20px; font-size: 13px; letter-spacing: .24em; color: var(--mut); }
h1 { margin: 0; font: 400 clamp(72px, 11vw, 168px)/.86 var(--anton); letter-spacing: -.01em; text-transform: uppercase; }
.lede { margin-top: 28px; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--dim); }
.badge { display: inline-block; max-width: 640px; margin-top: 24px; padding: 10px 14px; border: 2px solid var(--fg); font-size: 12px; line-height: 1.6; letter-spacing: .06em; color: var(--dim); }
.badge strong { text-transform: uppercase; letter-spacing: .16em; }
.hero-orb { flex: 1 1 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; }
.smoke { opacity: .6; animation: sway 5s ease-in-out infinite; }
.big-orb { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, #ff7a66 0%, #ff3b26 55%, #e01806 100%); box-shadow: 0 0 60px 20px rgba(255, 40, 20, .55), 0 0 200px 90px rgba(255, 20, 0, .25); animation: breathe 3s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateX(0) scaleY(1); } 50% { transform: translateX(3px) scaleY(1.06); } }
@keyframes breathe { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .smoke, .big-orb { animation: none; } html { scroll-behavior: auto; } }

/* ---------- 01 start ---------- */
.start-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.start-field { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.select-wrap { position: relative; display: block; min-width: 0; }
select { width: 100%; appearance: none; -webkit-appearance: none; background: #000; color: var(--fg); border: 2px solid var(--fg); cursor: pointer; text-overflow: ellipsis; }
.start-field select { height: 64px; padding: 0 60px 0 20px; font: 400 28px var(--anton); letter-spacing: .02em; }
.chev { position: absolute; right: 22px; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none; }
.tempo-wrap { display: flex; flex-direction: column; gap: 8px; }
.tempo-row { display: flex; gap: 8px; }
.tempo { height: 64px; display: flex; align-items: stretch; border: 2px solid var(--fg); }
.tempo button { width: 56px; font: 400 26px var(--anton); user-select: none; -webkit-user-select: none; }
.tempo button:first-child { border-right: 1px solid #333; }
.tempo button:last-child { border-left: 1px solid #333; }
.tempo button:hover { background: #151515; }
.tempo-val { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
#bpmNum { min-width: 56px; text-align: center; font: 400 34px var(--anton); }
.tempo-val.is-off #bpmNum { color: var(--red); }
.unit { font-size: 11px; letter-spacing: .18em; color: var(--mut); }
.reset { height: 64px; padding: 0 16px; border: 2px solid #555; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.reset:hover { border-color: var(--fg); }

/* ---------- pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 18px; border: 2px solid var(--fg); font-weight: 700; font-size: 12px; letter-spacing: .14em; }
.pill.is-on { background: var(--fg); color: #000; }

/* ---------- 02 sample ---------- */
.wavebox { flex: 1; min-height: 280px; border: 2px solid var(--fg); display: flex; flex-direction: column; }
.hint { padding: 14px 18px; font-size: 12px; font-weight: 700; letter-spacing: .12em; border-bottom: 1px solid var(--line); }
.wave { position: relative; flex: 1; min-height: 200px; margin: 0 18px 12px; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.slices { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); }
.slice { position: relative; background: transparent; border-left: 1px dashed #3a3a3a; cursor: crosshair; }
.slice:first-child { border-left-color: transparent; }
.slice:disabled { opacity: 1; cursor: progress; }
.slice:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.slice.is-sel { background: rgba(255, 42, 26, .1); }
.slice-tag { position: absolute; top: 2px; left: 3px; padding: 0 4px; font-size: 10px; font-weight: 700; line-height: 1.5; color: #000; background: var(--fg); }
.slice-tag:empty { display: none; }
.slice.is-sel .slice-tag { background: var(--red); }
.slice-num { position: absolute; bottom: 0; left: 4px; font-size: 10px; color: var(--mut); }
.slice.is-sel .slice-num { color: var(--red); }
.demo { font-size: 11px; letter-spacing: .1em; color: var(--red); }

.padctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); text-align: left; }
button.card:hover:not(:disabled) { border-color: var(--fg); }
button.card.is-on { background: var(--red); border-color: var(--red); color: #000; }
button.card.is-on .card-label { color: #000; }
.card-label { font-size: 11px; letter-spacing: .18em; color: var(--mut); }
.card-val { font: 400 40px/1 var(--anton); white-space: nowrap; }
.pitch-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pitch-row .card-val { font-size: 30px; line-height: 44px; }
.mini { width: 44px; height: 44px; flex: none; border: 1px solid #555; font: 400 22px var(--anton); }
.mini:hover:not(:disabled) { border-color: var(--fg); }

/* ---------- 03 pads ---------- */
.banks { display: flex; gap: 6px; }
.bank { width: 44px; height: 44px; border: 2px solid var(--fg); font: 400 18px var(--anton); }
.bank.is-on { background: var(--fg); color: #000; }
.pad-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pad { position: relative; height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 8px 10px; overflow: hidden; background: #050505; border: 1px solid #1f1f1f; color: var(--mut); user-select: none; -webkit-user-select: none; touch-action: none; }
.pad.is-sel { background: #0d0302; border-color: var(--red); color: var(--red); outline: 1px solid var(--red); }
.pad-num { position: absolute; top: 10px; left: 12px; font-size: 11px; letter-spacing: .12em; }
.pad-key { position: absolute; top: 8px; right: 8px; padding: 1px 6px; border: 1px solid #333; font-size: 11px; color: var(--mut); }
.orb { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px dashed #4a4a4a; transition: transform .09s ease-out; }
.pad.is-sel .orb { border-color: var(--red); }
.pad.is-loaded .orb { border: 0; background: radial-gradient(circle at 50% 46%, #fff 0%, #f4f4f4 55%, #d6d6d6 100%); box-shadow: 0 0 16px 2px rgba(255, 255, 255, .35); }
.pad.is-loaded.is-sel .orb { background: radial-gradient(circle, #ff7a66 0%, #ff3b26 55%, #e01806 100%); box-shadow: 0 0 28px 8px rgba(255, 40, 20, .6), 0 0 90px 36px rgba(255, 20, 0, .28); }
.pad.is-hit .orb { transform: scale(1.16); transition: none; }
.pad.is-loaded.is-hit .orb { box-shadow: 0 0 30px 10px rgba(255, 255, 255, .7); }
.pad.is-loaded.is-sel.is-hit .orb { box-shadow: 0 0 36px 14px rgba(255, 60, 30, .85), 0 0 110px 44px rgba(255, 20, 0, .4); }
.pad-sub { display: flex; max-width: 100%; font-size: 10px; letter-spacing: .08em; color: #7a7a7a; white-space: nowrap; }
.pad.is-loaded .pad-sub { color: var(--dim); }
.pad.is-sel .pad-sub { color: var(--red); }
.pad-song { overflow: hidden; text-overflow: ellipsis; }
.pad-slice { flex: none; white-space: pre; }

/* ---------- 04 sequence ---------- */
.play, .rec { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; }
.play { background: var(--fg); color: #000; }
.play.is-on { background: var(--red); }
.play .i-pause, .play.is-on .i-play { display: none; }
.play.is-on .i-pause { display: block; }
.rec { border: 2px solid var(--fg); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); }
.rec.is-on { background: var(--red); border-color: var(--red); }
.rec.is-on .rec-dot { background: #000; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.seq-box { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 2px solid var(--fg); overflow-x: auto; }
.seq-row { display: flex; align-items: center; gap: 10px; min-width: 620px; }
.seq-name { width: 44px; flex: none; font-size: 12px; letter-spacing: .1em; color: var(--mut); }
.seq-row.is-sel .seq-name { color: var(--red); }
.seq-steps { flex: 1; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; }
.step { height: 44px; border: 1px solid #2a2a2a; }
.step.beat { border-color: #555; }
.step:hover { border-color: var(--fg); }
.step.is-on { background: var(--fg); border-color: transparent; box-shadow: 0 0 12px rgba(255, 255, 255, .25); }
.seq-row.is-empty .step.is-on { background: #6a6a6a; box-shadow: none; }
.step.is-now { border-color: var(--red); box-shadow: 0 0 10px rgba(255, 42, 26, .45), inset 0 0 8px rgba(255, 42, 26, .25); }
.step.is-on.is-now { background: var(--red); box-shadow: 0 0 18px 2px rgba(255, 42, 26, .75); }

/* ---------- 05 fx ---------- */
#fx, .export { border: 2px solid var(--fg); padding: 20px; }
.knobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.knob { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line); cursor: ns-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.knob:hover { border-color: #555; }
.knob:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.knob svg { width: 64px; height: 64px; flex: none; }
.knob circle { fill: none; stroke-width: 6; }
.k-track { stroke: var(--line); }
.k-val { stroke: var(--fg); }
.knob.is-hot .k-val { stroke: var(--red); }
.knob { --glow: 0; }
.knob.is-up .k-val { filter: drop-shadow(0 0 calc(2px + var(--glow) * 5px) rgba(255, 255, 255, calc(.35 + var(--glow) * .45))); }
.knob.is-up.is-hot .k-val { filter: drop-shadow(0 0 calc(2px + var(--glow) * 6px) rgba(255, 42, 26, .9)); }
.knob.is-up .k-pct { text-shadow: 0 0 calc(var(--glow) * 12px) rgba(255, 255, 255, .55); }
.knob.is-up.is-hot .k-pct { text-shadow: 0 0 calc(var(--glow) * 12px) rgba(255, 42, 26, .7); }
.k-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.k-label { font-size: 11px; letter-spacing: .18em; color: var(--mut); white-space: nowrap; }
.k-pct { font: 400 20px var(--anton); }
.knob.is-hot .k-pct { color: var(--red); }
.knob input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }

/* hold effects */
.punch { display: flex; flex-direction: column; gap: 12px; }
.punch-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.punch-head .note { flex: 1 1 320px; }
.punch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.punch-btn { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; height: 84px; padding: 10px; border: 2px solid var(--fg); text-align: left; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.punch-btn:hover { background: #151515; }
.punch-btn.is-held { background: var(--red); border-color: var(--red); color: #000; box-shadow: 0 0 18px 2px rgba(255, 42, 26, .55); }
.punch-btn.is-held .pad-key { color: #000; border-color: #000; }
.punch-name { font: 400 20px/1 var(--anton); letter-spacing: .04em; white-space: nowrap; }
.punch-strip { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 1px; height: 4px; }
.punch-strip i { background: #2a2a2a; }
.punch-strip i.is-on { background: var(--fg); }
.punch-btn.is-held .punch-strip i { background: rgba(0, 0, 0, .25); }
.punch-btn.is-held .punch-strip i.is-on { background: #000; }

/* ---------- 06 export ---------- */
.app > .export { justify-content: space-between; }
.export-opts { display: flex; flex-direction: column; gap: 8px; }
.download { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; padding: 0 16px; background: var(--fg); color: #000; font: 400 28px var(--anton); letter-spacing: .04em; }
.download:hover:not(:disabled) { background: var(--red); }
.status { min-height: 18px; font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--red); overflow-wrap: anywhere; }
.terms { font-size: 12px; line-height: 1.6; color: var(--dim); }
.fine { font-size: 12px; line-height: 1.6; color: var(--mut); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 24px var(--gutter); border-top: 2px solid var(--fg); font-size: 12px; line-height: 1.6; letter-spacing: .08em; color: var(--mut); }
.foot strong { color: var(--mut); }

/* ---------- sheets (mobile dialogs) ---------- */
dialog.sheet { width: 100%; max-width: 560px; margin: auto auto 0; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); border: 0; border-top: 2px solid var(--fg); background: #000; color: var(--fg); }
dialog.sheet[open] { display: flex; flex-direction: column; gap: 14px; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .82); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--fg); }
.sheet .terms { font-size: 13px; }
.sheet .pill { flex: 1; padding: 0 6px; white-space: nowrap; }

/* ================= mobile: one screen, no scrolling ================= */
@media (max-width: 760px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { display: flex; flex-direction: column; gap: 10px; height: 100dvh; padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); -webkit-user-select: none; user-select: none; }

  .top { flex: none; flex-wrap: nowrap; gap: 10px; padding: 0 0 10px; }
  .brand { gap: 10px; }
  .brand-dot { width: 16px; height: 16px; }
  .brand-name { font-size: 26px; }

  .app { flex: 1; min-height: 0; gap: 10px; padding: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 44px 168px 44px minmax(0, 1fr) 56px; grid-template-areas: "start" "box" "tabs" "pads" "bar"; }
  .app > section { gap: 6px; }
  #start { grid-area: start; }
  .tabs { grid-area: tabs; }
  #pads { grid-area: pads; min-height: 0; }
  .bar { grid-area: bar; }
  .panel { grid-area: box; display: none !important; min-height: 0; padding: 10px; border: 2px solid var(--fg); overflow: hidden; }
  .panel.is-active { display: flex !important; }

  /* start + tempo */
  .start-row { flex-wrap: nowrap; align-items: stretch; gap: 8px; height: 44px; }
  .start-field { flex: 1 1 0; flex-direction: row; align-items: center; gap: 8px; padding-left: 10px; border: 2px solid var(--fg); }
  .field-label { font-size: 10px; letter-spacing: .14em; }
  .start-field .select-wrap { flex: 1; height: 100%; }
  .start-field select { height: 100%; padding: 0 26px 0 0; border: 0; background: transparent; font-size: 17px; }
  .chev { right: 8px; width: 14px; height: 14px; margin-top: -7px; }
  .tempo-row { gap: 6px; height: 100%; }
  .tempo { height: 100%; }
  .tempo button { width: 40px; font-size: 20px; }
  .tempo-val { flex-direction: column; justify-content: center; gap: 0; width: 46px; padding: 0; }
  #bpmNum { min-width: 0; font-size: 18px; line-height: 1; }
  .unit { font-size: 9px; letter-spacing: .14em; }
  .reset { width: 52px; height: 100%; padding: 0; font-size: 9px; line-height: 1.2; letter-spacing: .06em; border-color: var(--red); color: var(--red); }

  /* sample */
  .from { position: relative; flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding-left: 8px; border: 1px solid #555; }
  .from .select-wrap { flex: 1; height: 100%; }
  .from select { height: 100%; padding: 0 26px 0 0; border: 0; background: transparent; font-weight: 700; font-size: 12px; letter-spacing: .08em; }
  .wavebox { min-height: 0; border: 0; gap: 6px; }
  .hint { padding: 0; border: 0; font-size: 10px; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wave { min-height: 0; margin: 0; }
  .slice-tag { top: 0; left: 1px; padding: 0 1px; font-size: 8px; letter-spacing: -.04em; }
  .slice-num { display: none; }

  /* seq */
  .seq-label { font-size: 11px; letter-spacing: .16em; color: var(--mut); }
  .seq-box { flex: 1; min-height: 0; padding: 0; border: 0; overflow: visible; }
  .seq-row { display: none; min-width: 0; }
  .seq-row.is-sel { display: flex; flex: 1; align-items: stretch; }
  .seq-name { display: none; }
  .seq-steps { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .step { height: auto; }

  /* fx */
  .knobs { flex: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .knob { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 0 4px; border: 0; }
  .knob svg { width: 40px; height: 40px; }
  .knob circle { stroke-width: 8; }
  .k-text { align-items: flex-start; gap: 0; min-width: 0; }
  .k-label { font-size: 9px; letter-spacing: .06em; }
  .k-pct { font-size: 16px; }

  /* hold effects */
  #fx { padding: 10px; }
  #fx[data-view="punch"] .knobs, #fx[data-view="knobs"] .punch { display: none; }
  .punch { flex: 1; min-height: 0; }
  .punch-grid { flex: 1; min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .punch-btn { height: auto; min-height: 0; justify-content: center; gap: 4px; padding: 4px 6px; }
  .punch-name { font-size: 15px; letter-spacing: .02em; }
  .punch-clear { border: 1px solid #555; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--mut); }
  .punch-clear:not(:disabled) { border-color: var(--red); color: var(--red); }

  /* pad tab */
  #padtab { justify-content: space-between; gap: 8px; }
  .m-row { display: flex; align-items: center; gap: 8px; }
  .m-row .banks { flex: 1; }
  .m-row .bank { flex: 1; width: auto; height: 48px; }
  .m-padname { font: 400 30px/1 var(--anton); color: var(--red); min-width: 56px; text-align: right; }
  .m-pitch { flex: 1.4; display: flex; align-items: center; height: 56px; border: 2px solid var(--fg); font: 400 18px var(--anton); }
  .m-pitch span { flex: 1; text-align: center; white-space: nowrap; }
  .m-pitch button { width: 44px; height: 100%; font-size: 22px; }
  .m-pitch button:first-child { border-right: 1px solid #333; }
  .m-pitch button:last-child { border-left: 1px solid #333; }
  .m-btn { flex: 1; height: 56px; border: 2px solid var(--fg); font: 400 18px var(--anton); letter-spacing: .06em; }
  .m-btn.is-on { background: var(--red); border-color: var(--red); color: #000; }

  /* tabs */
  .tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .tab { min-height: 44px; border: 2px solid var(--fg); font: 400 16px var(--anton); letter-spacing: .04em; }
  .tab.is-on { background: var(--fg); color: #000; }

  /* pads */
  .pad-grid { flex: 1; min-height: 0; grid-template-rows: repeat(4, minmax(0, 1fr)); }
  .pad { height: auto; min-height: 0; gap: 6px; padding: 16px 4px 5px; }
  .pad-num { top: 5px; left: 7px; font-size: 10px; letter-spacing: .08em; }
  .orb { width: auto; height: 48%; max-height: 36px; aspect-ratio: 1; }
  .pad-sub { font-size: 9px; letter-spacing: .04em; }

  /* bottom bar */
  .bar { display: flex; align-items: stretch; gap: 8px; }
  .bar .play, .bar .rec { width: 56px; height: 56px; }
  .bar .download { flex: 1; min-height: 0; gap: 8px; font-size: 22px; }
  .sheet .download { min-height: 56px; font-size: 22px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .app { grid-template-rows: 44px 150px 44px minmax(0, 1fr) 52px; }
  .pad-sub { display: none; }
  .punch-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .punch-grid > :last-child { grid-column: span 2; }
  .punch-name { font-size: 13px; white-space: normal; }
  .pad { padding-top: 14px; }
  .orb { height: 56%; }
}
