/* SpecEnvoy Maker — beat editor UI (rides studio.css palette) */
.mk-wrap { max-width: 1100px; }
.mk-hero { padding: 8px 0 2px; }
.mk-hero .club-title { font-size: clamp(30px, 7vw, 52px); }

/* transport bar */
.mk-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin: 14px 0 16px; border: 1px solid var(--cl-line); border-radius: 16px;
  background: rgba(16,14,38,.86); backdrop-filter: blur(10px); }
.mk-play { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 16px; background: var(--cl-grad); box-shadow: 0 6px 18px -8px var(--cl-a); }
.mk-play:hover { transform: scale(1.05); }
.mk-ctl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--cl-mut); }
.mk-ctl input[type=range] { width: 96px; accent-color: var(--cl-b); }
.mk-ctl span { color: var(--cl-ink); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.mk-act { font-size: 12.5px; color: var(--cl-ink); background: #ffffff10; border: 1px solid var(--cl-line); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: .15s; }
.mk-act:hover { background: #ffffff1e; border-color: #ffffff30; }

/* sections + grids */
.mk-board { display: flex; flex-direction: column; gap: 16px; margin-bottom: 120px; }
.mk-sec { border: 1px solid var(--cl-line); border-radius: 16px; background: linear-gradient(180deg, #16112e88, #12102a88); padding: 12px 14px; }
.mk-sec-h { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #c9b3ff; margin-bottom: 10px; }
.mk-voices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mk-vp { font-size: 11.5px; color: var(--cl-mut); background: var(--cl-card); border: 1px solid var(--cl-line); border-radius: 999px; padding: 4px 11px; cursor: pointer; transition: .15s; }
.mk-vp:hover { color: var(--cl-ink); } .mk-vp.on { color: #fff; background: var(--cl-grad); border-color: transparent; font-weight: 700; }

.mk-grid { display: flex; flex-direction: column; gap: 5px; overflow-x: auto; }
.mk-row { display: flex; align-items: center; gap: 8px; }
.mk-rl { flex: 0 0 auto; width: 52px; font-size: 11.5px; color: var(--cl-mut); text-align: right; }
.mk-cells { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; flex: 1 1 auto; min-width: 480px; }
.mk-cell { aspect-ratio: 1 / 1; min-height: 22px; border: 1px solid #ffffff14; border-radius: 6px; background: #ffffff08; cursor: pointer; padding: 0; transition: background .12s, box-shadow .12s, transform .08s; }
.mk-cell.beat { background: #ffffff12; }
.mk-cell:hover { border-color: #ffffff33; }
.mk-cell.on { background: var(--cl-grad); border-color: transparent; box-shadow: 0 3px 10px -4px var(--cl-a); }
.mk-cell.cur { box-shadow: inset 0 0 0 2px #ffffffaa; }
.mk-cell.on.cur { box-shadow: inset 0 0 0 2px #fff, 0 3px 12px -3px var(--cl-b); transform: scale(1.04); }
@media (max-width: 620px) { .mk-rl { width: 40px; } .mk-cells { min-width: 420px; } }
/* seeded-from-a-track banner */
.mk-seed { margin: 12px 0 0; padding: 10px 15px; border-radius: 14px; font-size: 13px; color: #e7e1ff;
  background: linear-gradient(92deg, #7c5cff22, #ff5cc822); border: 1px solid #7c5cff40; }
.mk-seed b { color: #fff; }
/* load-a-classic picker (styled to match the dark theme, not the native control) */
.mk-load { flex: 0 1 auto; max-width: 230px; appearance: none; -webkit-appearance: none; font-size: 12.5px; font-weight: 600; color: #f3f0ff;
  background: #7c5cff26 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23c9b3ff' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 13px center;
  border: 1px solid #7c5cff66; border-radius: 999px; padding: 8px 30px 8px 14px; cursor: pointer; text-overflow: ellipsis; }
.mk-load:hover { border-color: #ff5cc8aa; }
.mk-load option, .mk-load optgroup { color: #12102a; background: #fff; }
.mk-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* pattern-length (bars) control */
.mk-len { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--cl-mut); }
.mk-len-l { margin-right: 3px; }
.mk-lenb { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--cl-line); background: #ffffff10; color: var(--cl-ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.mk-lenb:hover { border-color: #ffffff33; }
.mk-lenb.on { background: var(--cl-grad); border-color: transparent; color: #fff; }
/* bar divider in the step grid */
.mk-cell.barstart { margin-left: 9px; position: relative; }
.mk-cell.barstart::before { content: ""; position: absolute; left: -6px; top: -1px; bottom: -1px; width: 2px; border-radius: 2px; background: #ffffff2e; }

/* onboarding: empty-state coach card (top of the board while the grid is empty) */
.mk-coach { display: flex; align-items: center; gap: 14px; padding: 15px 18px; margin-bottom: 4px;
  border: 1px solid var(--cl-line); border-radius: 16px;
  background: linear-gradient(180deg, #1d1743cc, #141031cc);
  box-shadow: 0 12px 34px -20px var(--cl-a); }
.mk-coach-emoji { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.mk-coach-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-coach-tx b { color: var(--cl-ink); font-size: 15px; }
.mk-coach-tx span { color: var(--cl-mut); font-size: 13px; line-height: 1.5; }
.mk-coach-tx span b { color: var(--cl-ink); font-weight: 600; font-size: inherit; }
.mk-coach-go { flex: 0 0 auto; margin-left: auto; align-self: center; border: 0; cursor: pointer;
  color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  padding: 11px 17px; border-radius: 999px; background: var(--cl-grad);
  box-shadow: 0 6px 18px -8px var(--cl-a); transition: transform .12s, filter .12s; }
.mk-coach-go:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (max-width: 560px) { .mk-coach { flex-wrap: wrap; } .mk-coach-go { margin-left: 0; width: 100%; } }

/* attention pulse on the "★ Load a classic…" selector while the grid is empty */
.mk-load.mk-hi { border-color: var(--cl-b); animation: mkHi 1.9s ease-in-out infinite; }
@keyframes mkHi { 0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cl-b) 22%, transparent), 0 0 16px 1px var(--cl-b); } }
@media (prefers-reduced-motion: reduce) { .mk-load.mk-hi { animation: none; } }

/* ===================== v2 ===================== */
/* no double-tap-zoom on controls — the accent gesture IS a quick second tap */
.mk-cell, .mk-play, .mk-rec, .mk-act, .mk-vp, .mk-lenb, .mk-patb, .mk-chip, .mk-chadd, .mk-song, .mk-ms, .mk-coach-go { touch-action: manipulation; }

/* accented cells (tap twice) — hotter, ringed */
.mk-cell.acc { background: linear-gradient(135deg, #ff5cc8, #ff8a5c); box-shadow: 0 0 0 1.5px #ffb86bcc, 0 3px 12px -3px #ff8a5c; }
.mk-cell.acc.cur { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px #ffb86bcc, 0 3px 14px -3px #ff8a5c; transform: scale(1.06); }

/* record + count-in toggles */
.mk-rec { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--cl-line); background: #ffffff10; color: #ff5c7a; font-size: 15px; cursor: pointer; transition: .15s; }
.mk-rec.on { background: #ff2d55; color: #fff; border-color: transparent; box-shadow: 0 0 10px 1px #ff2d5588; animation: mkRec 1.4s ease-in-out infinite; }
@keyframes mkRec { 0%, 100% { box-shadow: 0 0 6px 0 #ff2d5566; } 50% { box-shadow: 0 0 14px 3px #ff2d55aa; } }
@media (prefers-reduced-motion: reduce) { .mk-rec.on { animation: none; } }
.mk-act.on { background: var(--cl-grad); border-color: transparent; color: #fff; font-weight: 700; }
.mk-ctl.off { opacity: .38; }

/* row 2: musical controls (patterns / chain / meter / key / kit) — not sticky */
.mk-bar2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 14px; margin: -6px 0 16px;
  border: 1px solid var(--cl-line); border-radius: 16px; background: #12102a99; }
.mk-pats { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--cl-mut); }
.mk-patb { position: relative; width: 32px; height: 30px; border-radius: 9px; border: 1px solid var(--cl-line); background: #ffffff10; color: var(--cl-ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.mk-patb:hover { border-color: #ffffff33; }
.mk-patb.on { background: var(--cl-grad); border-color: transparent; color: #fff; }
.mk-patb .mk-dot { display: none; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: #ffd76a; }
.mk-patb.has .mk-dot { display: block; }
.mk-dup { width: 30px; font-weight: 400; }
.mk-chain { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mk-song { border: 1px solid var(--cl-line); border-radius: 999px; background: #ffffff10; color: var(--cl-mut); font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.mk-song.on { background: var(--cl-grad); border-color: transparent; color: #fff; }
.mk-chips { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.mk-chip { border: 1px solid #7c5cff55; border-radius: 7px; background: #7c5cff22; color: #e7e1ff; font-size: 11.5px; font-weight: 700; width: 24px; height: 24px; cursor: pointer; }
.mk-chip:hover { border-color: #ff5cc8aa; }
.mk-chip.cur { background: var(--cl-grad); border-color: transparent; color: #fff; box-shadow: 0 0 8px 0 var(--cl-a); }
.mk-chadd { border: 1px dashed #ffffff2a; border-radius: 7px; background: none; color: var(--cl-mut); font-size: 11px; width: 26px; height: 24px; cursor: pointer; }
.mk-chadd:hover { color: var(--cl-ink); border-color: #ffffff55; }
/* meter / key / scale / kit selects */
.mk-select { appearance: none; -webkit-appearance: none; font-size: 12.5px; font-weight: 600; color: var(--cl-ink);
  background: #ffffff10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23c9b3ff' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--cl-line); border-radius: 999px; padding: 6px 24px 6px 11px; cursor: pointer; }
.mk-select:hover { border-color: #ffffff33; }
.mk-select option, .mk-select optgroup { color: #12102a; background: #fff; }

/* mixer: one channel strip per lane */
.mk-mixer { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding-top: 4px; }
.mk-mch { display: flex; flex-direction: column; gap: 5px; padding: 8px 9px; border: 1px solid var(--cl-line); border-radius: 12px; background: #ffffff08; }
.mk-mch.muted { opacity: .45; }
.mk-mch-n { font-size: 11px; font-weight: 700; color: var(--cl-mut); letter-spacing: .03em; }
.mk-mch input[type=range] { width: 100%; accent-color: var(--cl-b); }
.mk-mch-b { display: flex; gap: 5px; }
.mk-ms { flex: 1; border: 1px solid var(--cl-line); border-radius: 7px; background: #ffffff0c; color: var(--cl-mut); font-size: 10.5px; font-weight: 700; padding: 3px 0; cursor: pointer; }
.mk-ms.on { background: #ff5c7a; border-color: transparent; color: #fff; }
.mk-ms.mk-solo.on { background: #ffd76a; color: #12102a; }

/* keyboard hint — pointless on touch screens */
.mk-kbhint { flex-basis: 100%; font-size: 11.5px; color: var(--cl-mut); opacity: .8; }
@media (hover: none) { .mk-kbhint { display: none; } }

/* copied-link toast */
.mk-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); z-index: 60; max-width: 90vw;
  padding: 11px 18px; border-radius: 999px; font-size: 13px; color: #fff; background: #1d1743f2; border: 1px solid #7c5cff66;
  box-shadow: 0 14px 40px -14px #000; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.mk-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 620px) {
  .mk-bar { padding: 9px 10px; gap: 8px; }
  .mk-bar2 { padding: 9px 10px; gap: 8px; }
  .mk-play { width: 40px; height: 40px; }
  .mk-ctl input[type=range] { width: 74px; }
}
