/* ── Reset & base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #root { height: 100%; overflow: hidden; }
body { background: #0A0A0C; color: #F0EDE6; font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }

/* ── Utility classes (from pipedal) ── */
.mono { font-family: 'JetBrains Mono', monospace; }

/* Badge system */
.badge { display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; }
.badge-amber { background: rgba(232,160,48,.2); color: #E8A030; }
.badge-green { background: rgba(58,184,122,.2); color: #3AB87A; }
.badge-blue { background: rgba(58,123,168,.2); color: #3A7BA8; }
.badge-red { background: rgba(200,64,64,.2); color: #C84040; }

/* Button system */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid #2A2A32; background: #1C1C22; color: #F0EDE6;
  transition: all .12s; touch-action: manipulation; }
.btn:active { transform: scale(.96); }
.btn-sm { padding: 5px 10px; font-size: 10px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { border-color: #C84040; background: rgba(200,64,64,.15); color: #C84040; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 5px; border: 1px solid #2A2A32;
  background: #1C1C22; cursor: pointer; transition: all .12s; touch-action: manipulation; }
.btn-icon:active { transform: scale(.92); }

/* Slide panel (bottom drawer) */
.slide-panel { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center; }
.slide-panel-inner { background: #0A0A0C; max-width: 440px; width: 100%; max-height: 85vh;
  border-radius: 16px 16px 0 0; overflow: hidden; display: flex; flex-direction: column; }
.slide-panel-handle { width: 36px; height: 4px; border-radius: 2px; background: #2A2A32;
  margin: 8px auto; flex-shrink: 0; }

/* Screen layout */
.screen-header { padding: 12px 14px 8px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid #2A2A32; flex-shrink: 0; }
.screen-title { font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #8888A0; }
.screen-body { flex: 1; overflow-y: auto; padding: 12px; display: flex;
  flex-direction: column; gap: 12px; }

/* Snapshot grid */
.snap-grid { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.snap-slot { min-width: 60px; flex-shrink: 0; border-radius: 8px;
  border: 1.5px solid #2A2A32; background: #1C1C22; cursor: pointer;
  text-align: center; padding: 8px 4px; transition: all .12s;
  touch-action: manipulation; position: relative; }
.snap-slot:active { transform: scale(.95); }
.snap-num { font-size: 16px; font-weight: 700; color: #8888A0; }
.snap-name { font-size: 9px; color: #F0EDE6; margin-top: 2px; word-break: break-all; line-height: 1.3; }
.snap-empty { font-size: 9px; color: #444458; margin-top: 2px; font-style: italic; }
.snap-save-indicator { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px;
  border-radius: 50%; background: #3AB87A; box-shadow: 0 0 4px #3AB87A; }
.snap-name-input { width: 100%; background: #0A0A0C; border: 1px solid #2A2A32;
  border-radius: 3px; padding: 2px 4px; font-size: 9px; color: #F0EDE6;
  text-align: center; outline: none; margin-top: 2px; }

/* Preset rows */
.preset-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; transition: background .12s;
  border: 1px solid transparent; }
.preset-row:active, .preset-row.active { background: rgba(232,160,48,.08); border-color: rgba(232,160,48,.25); }

/* Transport buttons (looper) */
.transport-btn { width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 16px; cursor: pointer;
  border: 2px solid #2A2A32; background: #1C1C22; transition: all .12s; }
.transport-btn:active { transform: scale(.92); }
.transport-btn.rec { border-color: #C84040; background: rgba(200,64,64,.15); }
.transport-btn.play { border-color: #3AB87A; background: rgba(58,184,122,.15); }

/* Switch toggle */
.switch { width: 40px; height: 22px; border-radius: 11px; background: #2A2A32;
  cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.switch.on { background: #3AB87A; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px;
  height: 18px; border-radius: 50%; background: white; transition: transform .15s; }
.switch.on::after { transform: translateX(18px); }

/* Search bar */
.search-bar { display: flex; background: #1C1C22; border-radius: 7px;
  border: 1px solid #2A2A32; padding: 8px 12px; gap: 8px; align-items: center; }
.search-bar input { background: none; border: none; outline: none; color: #F0EDE6;
  font-size: 13px; flex: 1; }
.search-bar input::placeholder { color: #444458; }

/* File drop zone */
.file-drop { border: 2px dashed #2A2A32; border-radius: 8px; padding: 20px;
  text-align: center; cursor: pointer; transition: all .15s; font-size: 13px; color: #444458; }
.file-drop:hover, .file-drop.dragover { border-color: #E8A030; color: #E8A030; }

/* Loader */
.loader { width: 20px; height: 20px; border: 2px solid #2A2A32;
  border-top-color: #E8A030; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Settings list */
.setting-row { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #2A2A32; }
.setting-label { font-size: 13px; color: #F0EDE6; }
.setting-desc { font-size: 11px; color: #444458; margin-top: 2px; }

/* Section label */
.section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: #444458; font-weight: 600; margin-bottom: 10px; }

/* NAM chip */
.nam-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: rgba(58,123,168,.15); border: 1px solid rgba(58,123,168,.35);
  border-radius: 5px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #3A7BA8; }

/* Bypass LED */
.bypass-led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.led-on { background: #3AB87A; box-shadow: 0 0 8px #3AB87A; }
.led-off { background: #444458; }
