/* Make a Beat page */
.beat-page select {
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 2px;
  padding: 8px 10px; color: var(--text); min-height: 38px;
}
.beat-page select:focus { outline: 1px solid var(--red); border-color: var(--red); }
.bm-status { margin: 0; color: var(--muted); font-size: 14px; min-height: 1.2em; }
.bm-status.is-error { color: #ff6b6b; }
.bm-status.is-ok { color: #6be38a; }

/* gate */
.bm-gate-section { padding: 48px 0; }
.bm-gate {
  border: 1px solid var(--line-2); background: var(--bg-2); padding: 28px;
  display: grid; gap: 22px; box-shadow: 0 0 0 1px rgba(204,29,34,0.12);
}
.bm-follow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bm-follow {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 12px 34px 12px 16px; background: #fff; color: #000; border-radius: 2px;
  font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px;
  transition: transform .15s, background .15s;
}
.bm-follow:hover { transform: translateY(-2px); background: #f0f0f0; }
.bm-follow .bm-check { position: absolute; right: 12px; opacity: 0; font-size: 16px; }
.bm-follow.is-done { background: var(--red); color: #fff; }
.bm-follow.is-done .bm-check { opacity: 1; }
.bm-gate-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.bm-gate-form .bm-status { grid-column: 1 / -1; }
.bm-unlocked-note {
  border: 1px solid var(--line-2); border-left: 3px solid var(--red); padding: 14px 18px; background: var(--bg-2);
}

/* shell + lock */
.bm-shell { position: relative; border: 1px solid var(--line-2); background: var(--bg-2); padding: 18px; }
.bm-lock {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: rgba(var(--bg-rgb),0.86); backdrop-filter: blur(3px);
}
.bm-lock p { max-width: 42ch; margin: 0; }
.bm-shell.is-unlocked .bm-lock { display: none; }

.bm-transport { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; margin-bottom: 14px; }
.bm-transport-2 { padding-top: 14px; border-top: 1px solid var(--line); }
.bm-play { min-width: 120px; min-height: 48px; font-size: 15px; }
.bm-play[aria-pressed="true"] { background: #fff; color: #000; }
.bm-ctl { display: grid; gap: 4px; min-width: 130px; }
.bm-ctl label { display: flex; justify-content: space-between; gap: 8px; }
.bm-ctl output { color: var(--text); }
.bm-ctl input[type=range] { padding: 0; border: 0; background: none; accent-color: var(--red); width: 100%; height: 28px; }

.bm-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 4px; }
.bm-grid { display: grid; gap: 6px; min-width: max-content; }
.bm-row { display: flex; align-items: stretch; gap: 3px; }
.bm-row-head {
  position: sticky; left: 0; z-index: 3; background: var(--bg-2);
  width: 150px; flex: 0 0 150px; display: grid; grid-template-columns: 1fr auto; gap: 3px 6px;
  padding: 4px 8px 4px 0; align-items: center;
  box-shadow: 8px 0 10px var(--bg-2);
  isolation: isolate;
}
.bm-row-name {
  appearance: none; -webkit-appearance: none; background: none; border: 0; color: inherit;
  font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px;
  text-align: left; cursor: pointer; padding: 0; min-width: 0; touch-action: manipulation;
}
.bm-row-name:hover, .bm-row-name:focus-visible { color: var(--hi); text-decoration: underline; text-underline-offset: 2px; }
.bm-mute {
  background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 2px; font-size: 11px; font-family: var(--font-cond);
  padding: 2px 7px; cursor: pointer; letter-spacing: 0.1em;
}
.bm-mute[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.bm-row-head input[type=range] { grid-column: 1 / -1; padding: 0; border: 0; background: none; accent-color: var(--red); height: 18px; }
.bm-row-head select { grid-column: 1 / -1; padding: 2px 6px; min-height: 26px; font-size: 12px; }
.bm-row.is-muted .bm-cell { opacity: 0.4; }
.bm-cell {
  width: 38px; flex: 0 0 38px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--bg-3); cursor: pointer; padding: 0; font-size: 10px; font-family: var(--font-cond);
  color: #fff; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.bm-cell.beat-start { margin-left: 6px; }
.bm-cell.downbeat { background: var(--bg-4); }
.bm-cell.on { background: #b3161b; border-color: #d0242a; }
.bm-cell.accent { background: var(--red-hot); border-color: #ff5a5f; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35); }
.bm-cell.note { background: #8e1317; border-color: var(--red); }
.bm-cell.playing { outline: 2px solid #fff; outline-offset: -2px; }
.bm-hint { color: var(--muted-2); font-size: 13px; margin: 10px 0 0; }

.bm-export { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* deal */
.bm-split { display: flex; margin: 28px 0; height: 84px; border-radius: 2px; overflow: hidden; border: 1px solid var(--line-2); }
.bm-split > div { display: flex; flex-direction: column; justify-content: center; padding: 0 18px; }
.bm-split strong { font-family: var(--font-display); font-size: 44px; line-height: 1; letter-spacing: 0.03em; }
.bm-split span { font-family: var(--font-cond); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
.bm-split-g { background: var(--red); color: #fff; }
.bm-split-you { background: #fff; color: #000; }
.bm-deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bm-deal-card { border: 1px solid var(--line-2); background: var(--bg-2); padding: 18px 20px; }
.bm-deal-card h3 { line-height: 1.2; font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 16px; margin-bottom: 8px; }
.bm-deal-card p { margin: 0; color: #d6d6d6; font-size: 15px; }
.bm-terms { margin-top: 28px; border-left: 3px solid var(--red); padding: 4px 0 4px 20px; max-width: 80ch; }
.bm-terms h3 { line-height: 1.2; font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 18px; margin-bottom: 8px; }
.bm-terms li { margin: 6px 0; color: var(--soft); }
.bm-legal-note { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* submit */
.bm-submit-form { display: grid; gap: 14px; max-width: 760px; margin-top: 24px; }
.bm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bm-agree {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; text-transform: none; letter-spacing: 0;
  font-family: var(--font-body); font-size: 14px; color: var(--soft); border: 1px solid var(--line-2); padding: 14px; background: var(--bg-2);
}
.bm-agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); padding: 0; }
.bm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-lg { padding: 16px 24px; font-size: 15px; }
.bm-fallback { max-width: 760px; margin-top: 24px; border: 1px solid var(--red); background: var(--bg-2); padding: 20px 22px; }
.bm-fallback h3 { line-height: 1.2; font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 18px; margin-bottom: 6px; }
.bm-fallback ol { padding-left: 20px; display: grid; gap: 12px; }
.bm-fallback li .btn { margin: 2px 6px 2px 0; }

@media (max-width: 860px) {
  .bm-gate { padding: 18px; }
  .bm-gate-form, .bm-form-row { grid-template-columns: 1fr; }
  .bm-shell { padding: 12px; }
  .bm-row-head { width: 108px; flex-basis: 108px; }
  .bm-row-name { font-size: 12px; }
  .bm-cell { width: 34px; flex-basis: 34px; }
  .bm-ctl { min-width: calc(50% - 10px); flex: 1 1 calc(50% - 10px); }
  .bm-play { flex: 1 1 100%; }
  .bm-split strong { font-size: 34px; }
}
.bm-botm-badge {
  display: inline-block; margin: 14px 0 0; padding: 6px 12px; background: var(--red); color: #fff;
  font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px;
}
.bm-hero-line { color: var(--hi) !important; font-weight: 500; border-left: 3px solid var(--red); padding-left: 12px; max-width: 62ch !important; }
.bm-picked { margin: 0 0 28px; border: 1px solid var(--red); background: linear-gradient(180deg, rgba(204,29,34,0.12), transparent 70%), var(--bg-2); padding: 22px 24px; }
.bm-picked h3 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); letter-spacing: 0.03em; margin-bottom: 14px; }
.bm-picked-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bm-picked-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; color: var(--soft); font-size: 15px; }
.bm-step-num { width: 36px; height: 36px; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 24px; border-radius: 2px; }
@media (max-width: 1000px) { .bm-picked-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .bm-picked-steps { grid-template-columns: 1fr; } .bm-picked { padding: 18px; } }

/* v2: sound menus, your own sounds */
.bm-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bm-row-head .bm-remove { grid-column: 1 / -1; justify-self: start; padding: 2px 8px; }
.bm-row-head .bm-remove:hover { background: var(--red); border-color: var(--red); color: #fff; }
.bm-row-user .bm-row-name { color: #ff8a8e; }
.bm-row-fx .bm-cell.note, .bm-row-user .bm-cell.on, .bm-row-user .bm-cell.accent { font-size: 9px; letter-spacing: 0.02em; }
.bm-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.bm-panel-head h3 { font-family: var(--font-cond); letter-spacing: 0.08em; text-transform: uppercase; font-size: 20px; margin: 0 0 6px; }
.bm-panel-head p { color: var(--muted); font-size: 14px; margin: 0 0 12px; max-width: 75ch; }
.bm-panel-head p strong { color: var(--text); }
.bm-rights {
  border-left: 3px solid var(--red); background: var(--bg-3); padding: 10px 14px; font-size: 13px; color: var(--muted); margin-bottom: 14px; max-width: 90ch;
}
.bm-rights strong { color: var(--text); }
.bm-upload-form { display: grid; gap: 12px; }
.bm-upload-form input[type=file] { width: 100%; padding: 8px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 2px; color: var(--text); }
.bm-upload-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

/* ---- booth palette aliases (site tokens → booth variables) ---- */
.panel[data-panel="maker"], .beat-page {
  --bg-2: var(--panel, #111);
  --bg-3: var(--panel2, #181818);
  --bg-4: #1a1a1a;
  --line-2: #2e2e2e;
  --font-cond: var(--body, system-ui, sans-serif);
  --font-display: var(--display, Impact, sans-serif);
  --font-body: var(--body, system-ui, sans-serif);
}
.panel[data-panel="maker"] .bm-shell {
  border-radius: 14px;
  border-color: var(--line);
  background: var(--panel);
  padding: 12px;
  margin-top: 10px;
}
.panel[data-panel="maker"] .bm-lock { display: none !important; }
.panel[data-panel="maker"] .bm-hint { color: var(--muted); font-size: 12px; margin: 8px 0 12px; }
.panel[data-panel="maker"] .bm-export { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 8px 0 14px; }
.panel[data-panel="maker"] .bm-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel2); }
.panel[data-panel="maker"] .bm-panel-head h3 { margin: 0 0 6px; font-size: 15px; }
.panel[data-panel="maker"] .bm-panel-head p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.panel[data-panel="maker"] .bm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel[data-panel="maker"] .bm-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 10px 0; }
.panel[data-panel="maker"] .bm-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel[data-panel="maker"] select {
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; color: var(--text); min-height: 38px;
}
.panel[data-panel="maker"] label { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .panel[data-panel="maker"] .bm-form-row { grid-template-columns: 1fr; }
  .nav.tabs button { padding: 8px 6px; font-size: 11px; }
}

/* Top-of-Maker upload shortcut (Nov 29 2026): opens #up-file so the upload is visible without scrolling. */
.panel[data-panel="maker"] label.bm-up-quick { display: block; width: 100%; text-align: center; margin: 0 0 10px; cursor: pointer; color: var(--ink); font-weight: 800; letter-spacing: .02em; }
