/* Jam Looper — тёмная студия: тёплый графит, янтарь, красная запись */

:root {
  --bg: #131110;
  --panel: #1b1817;
  --panel2: #242020;
  --line: #2f2a28;
  --text: #ede7dd;
  --dim: #9a9188;
  --amber: #f2a93b;
  --amber-dim: #8a6224;
  --red: #e5484d;
  --green: #63d68c;
  --radius: 12px;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter Tight', system-ui, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

button { font-family: inherit; cursor: pointer; color: inherit; }
input, select { font-family: inherit; color: inherit; }
.hidden { display: none !important; }

.view { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Кнопки ---------- */
.btn-primary {
  background: var(--amber);
  color: #1a1408;
  border: none;
  border-radius: 999px;
  padding: .8rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 0 24px rgba(242, 169, 59, .18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 36px rgba(242,169,59,.35); }
.btn-primary:disabled { opacity: .5; transform: none; }
.btn-block { width: 100%; }

.btn-outline {
  background: none; border: 1px solid var(--amber-dim); color: var(--amber);
  border-radius: 999px; padding: .45rem 1.1rem; font-weight: 500;
}
.btn-outline:hover { border-color: var(--amber); box-shadow: 0 0 14px rgba(242,169,59,.2); }
.btn-small { padding: .4rem .9rem; font-size: .85rem; }

.btn-ghost {
  background: none; border: none; color: var(--dim);
  padding: .4rem .6rem; border-radius: 8px; font-size: 1.05rem;
}
.btn-ghost:hover { background: var(--panel2); color: var(--text); }

.btn-chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: .45rem 1rem; font-size: .85rem; font-weight: 500;
  max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-chip:hover { border-color: var(--amber-dim); color: var(--amber); }

.btn-link {
  background: none; border: none; color: var(--dim);
  text-decoration: underline; text-underline-offset: 3px;
  padding: .5rem; font-size: .9rem;
}
.btn-link:hover { color: var(--amber); }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.dim { color: var(--dim); }

/* ---------- Вордмарк ---------- */
.wordmark {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  letter-spacing: .05em;
  font-size: 1rem;
}
.wordmark span { color: var(--amber); font-weight: 500; }
.wordmark-lg { font-size: 1.9rem; }

/* ---------- Экран 1: вход ---------- */
.view-auth {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 25%, #1e1a17 0%, var(--bg) 70%);
  padding: 2rem 1.2rem;
}
.auth-card { width: 100%; max-width: 24rem; text-align: center; }
.auth-tagline { color: var(--dim); margin: .9rem 0 2rem; line-height: 1.5; }

.auth-tabs {
  display: flex; gap: .3rem; padding: .3rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; margin-bottom: 1.2rem;
}
.auth-tab {
  flex: 1; background: none; border: none; color: var(--dim);
  padding: .6rem; border-radius: 999px; font-weight: 500;
}
.auth-tab.active { background: var(--panel2); color: var(--amber); }

.auth-form { display: flex; flex-direction: column; gap: .7rem; }
.auth-form input {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: .85rem 1rem; font-size: 1rem; width: 100%;
}
.auth-form input:focus { outline: none; border-color: var(--amber-dim); }
.auth-msg { color: var(--red); font-size: .88rem; min-height: 1.2em; }
.auth-note { color: var(--dim); font-size: .78rem; opacity: .7; margin-top: .2rem; }

/* ---------- Верхняя панель ---------- */
.topbar {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 1.2rem;
  padding-top: calc(.7rem + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.topbar-right { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.jam-title {
  background: none; border: none; font-size: 1rem; font-weight: 600;
  padding: .3rem .5rem; border-radius: 8px;
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jam-title:hover { background: var(--panel2); }
#back-btn { font-size: 1.6rem; line-height: 1; padding: .2rem .6rem; }

/* ---------- Экран 2: проекты ---------- */
.projects { flex: 1; padding: 1.6rem 1.2rem 3rem; max-width: 60rem; width: 100%; margin: 0 auto; }
.projects-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap;
}
.projects-head h1 { font-family: 'Unbounded', sans-serif; font-size: 1.5rem; font-weight: 500; }

.projects-list { display: flex; flex-direction: column; gap: .6rem; }

.pcard {
  display: flex; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.pcard:hover { border-color: var(--amber-dim); transform: translateY(-1px); }
.pcard-open {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
  background: none; border: none; text-align: left;
  padding: 1rem 1.1rem;
}
.pcard-name {
  font-weight: 600; font-size: 1rem;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcard-meta { color: var(--dim); font-size: .8rem; font-family: 'JetBrains Mono', monospace; }
.pcard-actions { display: flex; gap: .3rem; padding-right: .8rem; }

.projects-empty { text-align: center; padding: 3.5rem 1rem; }
.projects-empty p { margin-bottom: .5rem; }
.sync-msg { color: var(--amber); font-size: .82rem; margin-top: 1.2rem; min-height: 1.2em; }

/* ---------- Страница публичной ссылки ---------- */
.listen { flex: 1; padding: 2.5rem 1.2rem 3rem; max-width: 42rem; width: 100%; margin: 0 auto; text-align: center; }
.listen-state { color: var(--dim); padding: 3rem 1rem; }
.listen h1 { font-family: 'Unbounded', sans-serif; font-size: 1.6rem; font-weight: 500; margin-bottom: .4rem; }
#jam-meta { font-family: 'JetBrains Mono', monospace; font-size: .8rem; margin-bottom: 2rem; }

.listen-play {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--amber); color: #1a1408;
  border: none; border-radius: 999px;
  padding: 1rem 2.2rem; font-size: 1.05rem; font-weight: 600;
  box-shadow: 0 0 30px rgba(242,169,59,.25);
  transition: transform .15s;
}
.listen-play:hover { transform: scale(1.03); }
.listen-play svg { width: 22px; height: 22px; fill: #1a1408; }
.listen-play .icon-stop { display: none; }
body.playing .listen-play .icon-play { display: none; }
body.playing .listen-play .icon-stop { display: block; }

.listen-tracks { display: flex; flex-direction: column; gap: .5rem; margin: 2.2rem 0 1.5rem; text-align: left; }
.listen-track {
  display: flex; align-items: center; gap: .8rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem 1rem;
}
.listen-track-name { flex: 1; font-size: .88rem; }
.listen-note { font-size: .8rem; }
a.wordmark, a.btn-chip { text-decoration: none; }

/* ---------- Настройки (шторка) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 6, 6, .6);
  backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
}
.sheet {
  width: min(26rem, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: slide-in .22s ease;
}
@keyframes slide-in { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-family: 'Unbounded', sans-serif; font-size: 1.05rem; font-weight: 500; }
.sheet-body { flex: 1; overflow-y: auto; padding: 1.2rem; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }

.sheet-section { margin-bottom: 1.8rem; }
.sheet-section h3 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--dim); margin-bottom: .8rem;
}
.sheet-section label { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; font-size: .9rem; }
.sheet-section small { color: var(--dim); font-size: .78rem; line-height: 1.4; opacity: .8; }
.sheet-section select {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .6rem; width: 100%;
}
.sheet-section input[type=range] { accent-color: var(--amber); width: 100%; }
.acc-email { font-family: 'JetBrains Mono', monospace; font-size: .9rem; margin-bottom: .7rem; }
#acc-out p { margin-bottom: .7rem; font-size: .88rem; line-height: 1.4; }

/* ---------- Транспорт ---------- */
.transport {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, box-shadow .2s;
}
.play-btn svg { width: 28px; height: 28px; fill: var(--text); }
.play-btn .icon-stop { display: none; }
body.playing .play-btn { border-color: var(--green); box-shadow: 0 0 20px rgba(99,214,140,.25); }
body.playing .play-btn .icon-play { display: none; }
body.playing .play-btn .icon-stop { display: block; fill: var(--green); }

.pos-ring {
  width: 64px; height: 64px; border-radius: 50%;
  background: conic-gradient(var(--amber) 0deg, var(--panel2) 0deg);
  display: flex; align-items: center; justify-content: center;
}
.pos-ring-inner {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .95rem; font-weight: 600;
}

.t-group { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.t-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.t-master input { width: 110px; accent-color: var(--amber); }

.bpm-box { display: flex; align-items: center; gap: .1rem; }
.bpm-box input {
  width: 4.2rem; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .4rem .2rem;
  font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; font-weight: 600;
}
.bpm-box input:disabled { opacity: .55; }
.bpm-box input::-webkit-inner-spin-button { display: none; }

#timesig {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .6rem; font-family: 'JetBrains Mono', monospace;
}
#timesig:disabled { opacity: .55; }

.toggle {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: .4rem .9rem; color: var(--dim);
}
.toggle.on { border-color: var(--amber-dim); color: var(--amber); }

.t-hint { color: var(--dim); font-size: .85rem; margin-left: auto; max-width: 18rem; text-align: right; }

/* ---------- Дорожки ---------- */
.tracks { flex: 1; padding: .8rem 1.2rem 2rem; display: flex; flex-direction: column; gap: .6rem; }

.track {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.track.recording { border-color: var(--red); box-shadow: 0 0 18px rgba(229,72,77,.15); }
.track.armed { border-color: var(--red); border-style: dashed; }

.track-main { display: flex; align-items: center; gap: .9rem; padding: .6rem .9rem; }

.rec-btn {
  position: relative; width: 52px; height: 52px; flex: none;
  background: none; border: none;
}
.rec-btn .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-bg { stroke: var(--line); }
.ring-fg {
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
}
.track.recording .ring-fg { stroke: var(--red); }
.rec-dot {
  position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  background: #4c4441;
  transition: background .15s, transform .15s;
}
.track.ready .rec-dot { background: var(--amber); }
.track.armed .rec-dot, .track.recording .rec-dot { background: var(--red); }
.track.recording .rec-dot { animation: pulse 1s infinite; }
.rec-btn:hover .rec-dot { transform: scale(1.15); }
@keyframes pulse { 50% { transform: scale(1.25); opacity: .7; } }

.track-body { flex: 1; min-width: 0; }
.track-head { display: flex; gap: .7rem; align-items: baseline; margin-bottom: .3rem; }
.track-name { font-weight: 600; font-size: .85rem; }
.track-bars, .track-status { font-size: .75rem; color: var(--dim); font-family: 'JetBrains Mono', monospace; }
.track-status.rec { color: var(--red); }

.wave-box { position: relative; height: 44px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.wave { width: 100%; height: 100%; display: block; }
.playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--amber);
  opacity: 0; left: 0;
  box-shadow: 0 0 8px var(--amber);
}

.track-ctrls { display: flex; align-items: center; gap: .35rem; flex: none; }
.vol { width: 90px; accent-color: var(--amber); }

.mini {
  width: 30px; height: 30px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 7px;
  font-size: .75rem; font-weight: 600; color: var(--dim);
  display: flex; align-items: center; justify-content: center;
}
.mini:hover { color: var(--text); }
.mini.active { color: var(--amber); border-color: var(--amber-dim); }
.mute.active { color: var(--red); border-color: var(--red); }
.solo.active { color: var(--green); border-color: var(--green); }

/* ---------- Обрезка ---------- */
.trim-toggle.trimmed { color: var(--amber); border-color: var(--amber-dim); }

/* Ручки прямо на волне */
/* overflow: visible — иначе ручку на самом краю обрезает и она не ловит нажатие */
.track.trimming .wave-box { cursor: ew-resize; overflow: visible; }
.trim-handle {
  position: absolute; top: 0; bottom: 0;
  width: 22px; margin-left: -11px;
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; touch-action: none; z-index: 2;
}
.trim-handle .grip {
  width: 3px; height: 100%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(242,169,59,.7);
  position: relative;
}
.trim-handle .grip::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 13px; height: 22px; margin: -11px 0 0 -6.5px;
  background: var(--amber);
  border-radius: 3px;
}
.trim-handle:hover .grip::after, .trim-handle:active .grip::after { background: #ffd07f; }
.trim-h-end .grip::after { border-radius: 3px; }

.trim-drawer {
  border-top: 1px solid var(--line);
  padding: .8rem 1rem 1rem 4.5rem;
}
.trim-row { display: flex; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.trim-row label {
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .72rem; color: var(--dim);
  text-transform: uppercase; letter-spacing: .1em;
}
.trim-row select {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .6rem; min-width: 5rem; color: var(--text);
}
.trim-readout { display: flex; flex-direction: column; gap: .2rem; padding-bottom: .2rem; }
.trim-len { font-weight: 600; font-size: .9rem; }
.trim-range { color: var(--dim); font-size: .75rem; font-family: 'JetBrains Mono', monospace; }
.trim-nudge { flex: 1; min-width: 15rem; text-transform: none; letter-spacing: 0; }
.nudge-ctrls { display: flex; align-items: center; gap: .5rem; }
.nudge-ctrls input { flex: 1; accent-color: var(--amber); min-width: 0; }
.trim-hint { display: block; margin-top: .7rem; color: var(--dim); font-size: .75rem; opacity: .75; }

/* ---------- Барабаны ---------- */
.track.is-drums .rec-dot { background: var(--green); }
.track.is-drums .ring-fg { stroke: var(--green); }

.drum-drawer {
  border-top: 1px solid var(--line);
  padding: .8rem 1rem 1rem 4.5rem;
}
.drum-head {
  display: flex; align-items: flex-end; gap: 1rem;
  margin-bottom: .8rem; flex-wrap: wrap;
}
.drum-head label { display: flex; flex-direction: column; gap: .3rem; font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.drum-preset {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  padding: .45rem .6rem; min-width: 9rem; color: var(--text);
}

.drum-grid { display: flex; flex-direction: column; gap: .25rem; overflow-x: auto; }
.drum-row { display: flex; align-items: center; gap: .6rem; }
.drum-label {
  width: 5.2rem; flex: none;
  font-size: .75rem; color: var(--dim);
  text-align: right;
}
.drum-steps {
  display: grid;
  grid-template-columns: repeat(var(--steps, 16), minmax(16px, 1fr));
  gap: 3px; flex: 1; min-width: 0;
}
.drum-cell {
  height: 24px; min-width: 16px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  transition: background .1s, border-color .1s;
}
.drum-cell.beat { border-color: #40382f; }
.drum-cell.bar { border-left: 2px solid var(--amber-dim); }
.drum-cell:hover { border-color: var(--amber-dim); }
.drum-cell.on { background: rgba(242,169,59,.75); border-color: var(--amber); }
.drum-cell.on.accent { background: var(--amber); box-shadow: inset 0 0 0 2px #fff3; }
.drum-cell.on.ghost { background: rgba(242,169,59,.3); border-color: var(--amber-dim); }
.drum-cell.cur { box-shadow: 0 0 0 2px rgba(99, 214, 140, .6); }
.drum-cell.on.cur { background: #ffd07f; }

.drum-swing-label { text-transform: none !important; letter-spacing: 0 !important; min-width: 9rem; }
.drum-swing { accent-color: var(--amber); width: 100%; }
.drum-hint { display: block; margin-top: .6rem; color: var(--dim); font-size: .73rem; opacity: .75; }
.calib { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.calib small { color: var(--dim); font-size: .78rem; line-height: 1.4; }
#calib-msg { min-height: 2.4em; }

.fx-drawer {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .8rem;
  padding: .8rem 1rem 1rem 4.5rem;
  border-top: 1px solid var(--line);
}
.fx-unit { display: flex; align-items: center; gap: .6rem; }
.fx-unit button {
  min-width: 4.6rem;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 7px;
  padding: .3rem .5rem; font-size: .75rem; color: var(--dim);
}
.fx-unit button.on { color: var(--amber); border-color: var(--amber-dim); }
.fx-unit input { flex: 1; accent-color: var(--amber); min-width: 0; }

/* ---------- Статус-бар ---------- */
.statusbar {
  display: flex; gap: 1rem; padding: .5rem 1.2rem;
  padding-bottom: calc(.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: .75rem;
  font-family: 'JetBrains Mono', monospace;
}
.spacer { flex: 1; }

/* ---------- Touch: крупнее цели ---------- */
@media (pointer: coarse) {
  .trim-handle { width: 34px; margin-left: -17px; }
  .trim-handle .grip::after { width: 16px; height: 28px; margin: -14px 0 0 -8px; }
  .mini { width: 40px; height: 40px; font-size: .85rem; }
  .toggle { padding: .55rem 1rem; }
  .btn-ghost { padding: .55rem .75rem; font-size: 1.15rem; }
  input[type=range] { height: 28px; }
  input[type=range]::-webkit-slider-thumb { width: 22px; height: 22px; }
  .fx-unit button { padding: .55rem .6rem; min-width: 5rem; }
  .pcard-open { padding: 1.1rem; }
}

/* ---------- Планшет ---------- */
@media (max-width: 1100px) {
  .transport { gap: 1rem; }
  .t-hint { max-width: 13rem; font-size: .78rem; }
  .vol { width: 76px; }
  .track-main { gap: .7rem; }
  .fx-drawer { padding-left: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drum-drawer, .trim-drawer { padding-left: 1rem; }
}

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  :root { font-size: 15px; }

  .topbar { padding: .6rem .8rem; padding-top: calc(.6rem + env(safe-area-inset-top)); }
  .projects { padding: 1.2rem .8rem 3rem; }
  .projects-head h1 { font-size: 1.3rem; }
  .projects-head { gap: .8rem; }
  .projects-head .btn-primary { flex: 1; min-width: 10rem; }

  .transport {
    gap: .8rem; padding: .8rem;
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .transport::-webkit-scrollbar { display: none; }
  .play-btn, .pos-ring { flex: none; }
  .play-btn { width: 72px; height: 72px; }
  .t-group { flex: none; }
  .t-hint { display: none; }

  .tracks { padding: .6rem .6rem 2rem; }
  .track-main { flex-wrap: wrap; gap: .6rem; padding: .6rem; }
  .rec-btn { width: 58px; height: 58px; }
  .track-body { flex: 1 1 0; min-width: 55%; }
  .track-ctrls { width: 100%; justify-content: flex-end; gap: .5rem; }
  .vol { flex: 1; width: auto; }
  .wave-box { height: 40px; }
  .track.trimming .wave-box { height: 56px; }
  .trim-readout { width: 100%; }

  .fx-drawer { grid-template-columns: 1fr; padding: .7rem .8rem .9rem; }

  .drum-drawer, .trim-drawer { padding: .7rem .8rem .9rem; }
  .trim-row { gap: .8rem; }
  .trim-nudge { min-width: 100%; }
  .drum-label { width: 4.2rem; font-size: .68rem; }
  .drum-cell { height: 30px; min-width: 14px; }
  .drum-steps { gap: 2px; }

  .sheet { width: 100%; }
  .kbd-hint { display: none; }
  .jam-title { max-width: 38vw; }
}

@media (max-width: 380px) {
  .play-btn, .pos-ring { width: 60px; height: 60px; }
  .pos-ring-inner { width: 48px; height: 48px; font-size: .85rem; }
  .btn-chip { max-width: 7rem; }
}
