@import url('/assets/css/utils.css');

:root{
  --bg: #ffffff;
  --panel: #f8fafc;
  --panel-edge: #e2e8f0;
  --step-off: #f1f5f9;
  --step-off-root: #e2e8f0;
  --teal: #2563eb;
  --teal-dim: #1d4ed8;
  --amber: #3b82f6;
  --text: #000000;
  --text-dim: #475569;
  --danger: #dc2626;
}
*{box-sizing:border-box;}

.device{ width:100%; max-width:720px; margin: 0 auto; padding: 20px 0; }
.brand{ display:flex; align-items:baseline; gap:10px; margin-bottom:6px; flex-wrap:wrap; }
.brand h1{ font-family:'JetBrains Mono', monospace; font-size:20px; font-weight:700; letter-spacing:0.5px; margin:0; color: var(--text); display:inline; }
.brand h2{ font-family:'Inter', sans-serif; font-size:14px; font-weight:500; color:var(--text-dim); margin:0; display:inline; text-transform:none; letter-spacing:normal; }
.brand .dot{ width:8px;height:8px;border-radius:50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); flex-shrink:0; }
.sub{ color:var(--text-dim); font-size:13px; margin:0 0 24px; line-height:1.6; }

.panel{
  background: var(--panel); border:1px solid var(--panel-edge); border-radius:10px;
  padding:18px; margin-bottom:16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.panel h2{
  font-family:'JetBrains Mono', monospace; font-size:11px; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--text-dim); margin:0 0 16px; font-weight:600;
}

.transport{ display:flex; align-items:center; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.play-btn{
  flex-shrink:0; width:52px; height:52px; border-radius:50%;
  border:1px solid var(--teal-dim); background: var(--teal);
  color: #ffffff; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition: all 0.15s ease; box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.play-btn:hover{ background: var(--teal-dim); }
.play-btn.playing{ background: var(--danger); border-color: var(--danger); color: #ffffff; }
.play-btn svg{ width:18px; height:18px; }
.tempo-block{ display:flex; align-items:center; gap:8px; }
.tempo-label{ font-size:12px; color:var(--text-dim); font-weight:500; }
.tempo-num{ font-family:'JetBrains Mono', monospace; font-size:22px; font-weight:700; color:var(--teal); min-width:64px; text-align:center; }
input[type=range].hslider{
  -webkit-appearance:none; width:110px; height:6px !important;
  background: #cbd5e1; border-radius:3px; outline:none;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
input[type=range].hslider::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
  border-radius: 3px;
  border: none;
  padding: 0 !important;
}
input[type=range].hslider::-webkit-slider-thumb{
  -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  background: var(--teal); border: 2px solid #ffffff; cursor:pointer;
  box-shadow: 0 0 6px rgba(37,99,235,0.5); margin-top:-6px;
}
input[type=range].hslider::-moz-range-thumb{
  width:18px; height:18px; border-radius:50%; background: var(--teal); border: 2px solid #ffffff; cursor:pointer;
  box-shadow: 0 0 6px rgba(37,99,235,0.5);
}
.util-btns{ display:flex; gap:8px; margin-left:auto; }
.util-btn{
  padding:9px 12px; border-radius:7px; border:1px solid #cbd5e1;
  background: #ffffff; color: var(--teal); font-family:'JetBrains Mono', monospace;
  font-size:11px; font-weight:600; letter-spacing:0.5px; cursor:pointer; transition: all 0.15s ease;
}
.util-btn:hover{ background: #eff6ff; border-color: var(--teal); }

.field-row{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap:12px; margin-bottom:16px; }
.field label{ display:block; font-size:12px; color:var(--text-dim); margin-bottom:6px; font-weight: 500; }
select{
  width:100%; background: #ffffff; border:1px solid #cbd5e1;
  border-radius:7px; color:var(--text); font-family:'JetBrains Mono', monospace;
  font-size:13px; padding:9px 8px; outline:none; cursor:pointer; font-weight:600;
}
select:focus{ border-color: var(--teal); }
.vol-row{ display:flex; align-items:center; gap:10px; }
.vol-row label{ font-size:12px; color:var(--text-dim); min-width:56px; font-weight: 500; }

.grid-wrap{ overflow-x:auto; }
.roll-row{ display:flex; align-items:center; gap:8px; margin-bottom:3px; }
.roll-row:last-child{ margin-bottom:0; }
.note-label{
  width:44px; flex-shrink:0; font-family:'JetBrains Mono', monospace; font-size:11px;
  color:var(--text-dim); text-align:right; font-weight: 500;
  cursor: pointer; user-select: none; border-radius: 4px; padding: 2px 4px;
  transition: all 0.15s ease;
}
.note-label:hover{ background: #eff6ff; color: var(--teal); }
.note-label:active{ transform: scale(0.95); }
.roll-row.root .note-label{ color: var(--teal); font-weight:700; }
.steps{ display:flex; gap:3px; }
.step-group{ display:flex; gap:3px; margin-right:7px; }
.step-group:last-child{ margin-right:0; }
.step{
  width:24px; height:20px; border-radius:4px; border:1px solid var(--panel-edge);
  background: var(--step-off); cursor:pointer; padding:0; transition: all 0.05s ease;
  flex-shrink:0;
}
.roll-row.root .step{ background: var(--step-off-root); }
.step.playhead{ border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.step.active{ background: var(--teal); border-color: var(--teal); box-shadow: 0 0 6px rgba(37,99,235,0.5); }
.roll-row.root .step.active{ background: var(--amber); border-color: var(--amber); box-shadow: 0 0 6px rgba(59,130,246,0.5); }
.step.active.firing{ filter: brightness(1.2); }

.footer-note{ font-size:11px; color:var(--text-dim); text-align:center; margin-top:24px; line-height:1.7; }

@media (max-width:480px){
  .step{ width:18px; height:16px; }
  .note-label{ width:32px; font-size:9px; }
  .steps{ gap:2px; }
  .step-group{ gap:2px; margin-right:5px; }
  .field-row{ grid-template-columns: 1fr 1fr; }
  .field-row .field:last-child{ grid-column: span 2; }
  .tempo-block{ order:3; width:100%; margin-top:8px; }
  .util-btns{ margin-left:0; }
}
