:root {
  --ink: #13161c;
  --muted: #8f98a8;
  --muted-2: #b3bac5;
  --line: #e5e8ed;
  --panel: #f7f8fa;
  --panel-2: #f2f4f6;
  --orange: #ff9e12;
  --warm: #fff8e8;
  --green: #20c460;
  --shadow: 0 24px 60px rgba(33, 39, 49, .08);
  --radius-lg: 22px;
  --radius-md: 14px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #fff; }
html.dark-mode { background: #11151a; }
body { margin: 0; background: #fff; color: var(--ink); }
.lms-beatlab-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; margin: 0 0 24px; padding: 20px 22px; color: #f7f8fb; background: linear-gradient(135deg,#2b3546,#202734); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; box-shadow: 0 22px 65px rgba(0,0,0,.24); }
.lms-beatlab-panel > div:first-child { min-width: 0; }
.lms-beatlab-panel span, .lms-beatlab-panel strong, .lms-beatlab-panel small, .lms-beatlab-panel em { display: block; }
.lms-beatlab-panel span { color: #b9c7e6; font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.lms-beatlab-panel strong { margin: 5px 0 1px; font-size: 1rem; }
.lms-beatlab-panel small { color: #dde3ee; }
.lms-beatlab-panel p { max-width: 780px; margin: 9px 0; color: #bac2d0; font-size: .8rem; line-height: 1.5; }
.lms-beatlab-panel em { color: #9ea9bb; font-size: .7rem; font-style: normal; }
.lms-beatlab-actions { display: grid; gap: 9px; min-width: 210px; }
.lms-beatlab-panel.is-sent { border-color: #61cba8; }
.lms-beatlab-panel.has-error { border-color: #e98a8a; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (max-width: 760px) {
  .lms-beatlab-panel { grid-template-columns: 1fr; padding: 17px; }
  .lms-beatlab-actions { grid-template-columns: 1fr 1fr; min-width: 0; }
}

.site-shell { width: min(100% - 48px, 1576px); margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #fff; background: #111; border-radius: 9px; padding: 9px 15px; font-size: 13px; font-weight: 800; letter-spacing: -.02em; box-shadow: 0 5px 15px rgba(0, 0, 0, .09); }
.back-link span { color: #a5e7b4; font-size: 18px; line-height: 0; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.main-topbar { justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: #88919e; font: 10px/1.1 "DM Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.status-dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #20c460; box-shadow: 0 0 0 4px rgba(32, 196, 96, .12); }
.admin-link { color: #8b94a1; font-size: 12px; font-weight: 700; transition: color .18s ease; }
.admin-link:hover, .app-footer a:hover { color: var(--ink); }
.ios-audio-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 11px 14px 11px 16px; border: 1px solid #f0bd68; border-radius: 12px; background: #302719; color: #ffd28a; font-size: 12px; line-height: 1.45; }
.ios-audio-notice.is-hidden { display: none; }
.ios-audio-notice-copy { display: flex; align-items: center; gap: 10px; }
.ios-audio-notice-copy strong { color: #fff0cf; }
.ios-audio-notice-icon { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #ff9e12; color: #241b0e; font-size: 16px; font-weight: 900; }
.ios-audio-notice-close { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #73562e; border-radius: 50%; background: transparent; color: #ffd28a; font-size: 20px; line-height: 1; }
.ios-audio-notice-close:hover { background: #4a3820; color: #fff3d7; }

.app-shell { padding: 18px 0 36px; }
.app-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 0 0 28px; }
.eyebrow, .section-kicker { color: #abb2bd; font: 10px/1.2 "DM Mono", ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, p { margin: 0; }
.app-header h1 { margin-top: 9px; font-size: clamp(2.25rem, 4vw, 3.7rem); line-height: .95; letter-spacing: -.075em; }
.app-header h1 small { margin-left: 7px; color: #b1b8c3; font-size: .35em; font-weight: 500; letter-spacing: -.02em; vertical-align: top; }
.app-header p { margin-top: 12px; color: #9da5b2; font-size: 14px; }
.header-actions { display: flex; gap: 10px; }
.icon-button, .theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #8d96a3; font-weight: 800; transition: .18s ease; }
.icon-button:hover, .theme-toggle:hover { color: var(--ink); border-color: #cbd1da; transform: translateY(-1px); }
.theme-toggle { padding: 0; }
.theme-icon { display: block; width: 20px; height: 20px; }
.theme-icon-on { display: none; color: var(--orange); }
body:not(.dark-mode) .theme-icon-off { display: none; }
body:not(.dark-mode) .theme-icon-on { display: block; }

.kit-tabs { padding: 6px; border-radius: 30px; background: #f1f3f5; box-shadow: inset 0 -4px 0 rgba(229, 232, 237, .6); transition: border-radius .18s ease; }
.kit-tabs.has-many { border-radius: 28px; }
.kit-tabs-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px; }
.kit-tab { min-height: 58px; padding: 10px 18px; border: 0; border-radius: 24px; background: transparent; color: #a1a9b6; font-size: 16px; font-weight: 800; transition: .2s ease; }
.kit-tab span { display: block; max-width: 260px; margin: 4px auto 0; overflow: hidden; color: #c0c6cf; font-size: 10px; font-weight: 600; opacity: 0; text-overflow: ellipsis; white-space: nowrap; transition: opacity .2s ease; }
.kit-tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 4px 10px rgba(27, 33, 40, .06); }
.kit-tab.is-active span { opacity: 1; }

.sequencer-card, .performance-card, .transport-section, .mixer-section { margin-top: 28px; }
.sequencer-card { padding: 0 0 22px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-top: 7px; font-size: 21px; letter-spacing: -.045em; }
.grid-status { display: inline-flex; align-items: center; gap: 9px; color: #a3abb7; font: 11px "DM Mono", ui-monospace, monospace; }
.step-header-wrap, .track-row { display: grid; grid-template-columns: 164px minmax(0, 1fr); column-gap: 16px; }
.lane-wrap { display: block; }
.step-header, .step-grid, .performance-lane { display: grid; grid-template-columns: repeat(var(--step-count, 16), minmax(0, 1fr)); gap: 8px; }
.step-header { align-items: center; height: 28px; }
.step-number { color: #ced3da; font: 11px "DM Mono", ui-monospace, monospace; text-align: center; }
.step-number.measure-number { color: #818b9b; font-weight: 700; font-size: 14px; }
.step-count-picker { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.step-count-picker select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.step-count-arrow { color: currentColor; font-size: 15px; font-weight: 900; line-height: 1; transform: translateY(-2px); }
.sequencer-rows { display: grid; gap: 11px; }
.track-row { align-items: center; }
.track-meta { display: flex; min-width: 0; align-items: center; gap: 10px; }
.track-color-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: var(--track-color); }
.track-preview-button { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; padding: 0 0 0 1px; border: 0; border-radius: 50%; background: var(--preview-color); color: #fff; font-size: 8px; line-height: 1; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.track-preview-button:hover, .track-preview-button.is-previewing { filter: brightness(1.08); transform: scale(1.08); box-shadow: 0 0 0 4px color-mix(in srgb, var(--preview-color) 20%, transparent); }
.track-sound-control { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 4px; }
.track-label { min-width: 0; flex: 1 1 auto; overflow: hidden; padding: 0; border: 0; background: none; color: #737d8d; font-size: 14px; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.track-label:hover { color: var(--ink); }
.track-sound-picker { position: relative; display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 24px; color: #a5aeba; cursor: pointer; }
.track-sound-picker select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.track-sound-arrow { pointer-events: none; font-size: 17px; font-weight: 900; line-height: 1; transform: translateY(-2px); }
.randomize-track { flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: #c4cbd4; font-size: 13px; filter: grayscale(1); transition: .18s ease; }
.randomize-track:hover { color: var(--ink); filter: none; transform: rotate(18deg); }
.step { position: relative; min-width: 0; height: clamp(43px, 4.3vw, 66px); border: 2px solid #e4e7eb; border-radius: 12px; background: #f7f8f9; transition: border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease; }
.step:nth-child(4n + 1) { background: #f1f3f5; }
.step:hover { border-color: var(--track-color); transform: translateY(-1px); }
.step.is-on { border-color: var(--track-color); background: var(--track-color); box-shadow: 0 4px 12px color-mix(in srgb, var(--track-color) 22%, transparent); }
.step.is-playing { outline: 3px solid rgba(17, 18, 21, .15); outline-offset: 2px; }
.step.is-on.is-playing { outline-color: color-mix(in srgb, var(--track-color) 68%, white); }

.performance-card { padding: 17px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid #eff1f3; }
.performance-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.lane-modes { display: flex; gap: 7px; }
.lane-mode { padding: 7px 13px; border: 1px solid #d8dde5; border-radius: 999px; background: #fff; color: #aab2be; font: 10px "DM Mono", ui-monospace, monospace; letter-spacing: .09em; transition: .18s ease; }
.lane-mode:hover, .lane-mode.is-active { border-color: var(--orange); color: var(--orange); background: #fffaf1; }
.lane-label { color: var(--orange); font: 11px "DM Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.performance-lane { align-items: end; min-height: 114px; gap: 8px; }
.lane-gutter { display: none; }
.lane-bar { position: relative; min-width: 0; height: 114px; padding: 0; border: 0; border-radius: 3px 3px 0 0; background: #f3f4f5; overflow: hidden; touch-action: none; transition: .16s ease; }
.lane-bar span { position: absolute; inset: auto 0 0; height: calc(var(--bar-value) * 100%); min-height: 7px; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--track-color) 75%, white); opacity: .4; transition: height .14s ease, opacity .14s ease; }
.lane-repeat-count, .lane-shift-label, .lane-tune-label { position: absolute; z-index: 1; left: 6px; bottom: 4px; color: #929aa7; font: 10px "DM Mono", ui-monospace, monospace; font-style: normal; font-weight: 700; }
.lane-bar.has-step span { opacity: .92; }
.lane-bar:hover span, .lane-bar.is-playing span { opacity: 1; }
.lane-bar.is-playing { box-shadow: inset 0 0 0 2px rgba(17, 18, 21, .14); }

.transport-section { padding: 20px 0 23px; border-bottom: 1px solid var(--line); }
.transport-row { display: flex; align-items: center; gap: 14px; }
.utility-controls { justify-content: space-between; margin-top: 13px; }
.button, .round-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; font-weight: 800; white-space: nowrap; transition: .18s ease; }
.button:hover, .round-button:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(27, 33, 40, .08); }
.button-dark { background: #050505; color: white; }
.button-dark:hover { background: #1b1b1b; }
.button-outline { border-color: #20c460; background: #fff; color: #21a94f; }
.button-outline:hover { background: #f0fff5; }
.button-light { border-color: #eef0f3; background: #f7f8fa; color: #586274; }
.button-warm { border-color: #fff2c9; background: #fff9e9; color: #8f542a; }
.button-danger { border-color: #f1dcdc; background: #fff8f8; color: #c65b5b; }
.button-danger:hover { border-color: #e8a7a7; background: #fff0f0; color: #b33f3f; }
.save-pattern-button.is-busy { cursor: progress; opacity: .65; }
.play-button { min-width: 138px; border-radius: 22px; }
.play-icon { font-size: 12px; }
.play-button.is-playing { background: #232323; }
.browse-button { min-width: 136px; font-size: 15px; }
.midi-cluster { min-width: 160px; }
.bpm-cluster { flex: 1 1 420px; min-width: 350px; }
.swing-cluster { flex: 1 1 320px; min-width: 260px; }
.control-cluster { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 0 17px; border-radius: 999px; background: #f8f9fa; color: #9fa7b3; }
.control-label { font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.control-cluster strong { color: #26303c; font-size: 15px; white-space: nowrap; }
.stepper-button, .mini-toggle { padding: 0 3px; border: 0; background: transparent; color: #aab2be; font-size: 18px; font-weight: 700; }
.mini-toggle { margin-left: auto; color: #8d96a4; font-size: 16px; }
.sync-button { margin-left: auto; padding: 8px 14px; border: 0; border-radius: 999px; background: #050505; color: white; font-size: 11px; letter-spacing: .08em; }
.sync-button.is-off { background: #dfe3e8; color: #7b8491; }
.control-cluster input[type="range"] { min-width: 76px; width: 100%; }
.pattern-pages, .history-controls { display: flex; align-items: center; gap: 10px; }
.ab-pattern-controls { display: flex; align-items: center; gap: 5px; }
.ab-pattern-picker { position: relative; display: inline-flex; min-height: 43px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid #e5e8ec; border-radius: 999px; background: #fff; color: #3f4855; cursor: pointer; }
.ab-pattern-picker select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ab-pattern-letter { font: 12px "DM Mono", ui-monospace, monospace; font-weight: 800; letter-spacing: .08em; }
.ab-pattern-value { color: #8e97a3; font: 10px "DM Mono", ui-monospace, monospace; }
.ab-pattern-arrow { color: #8e97a3; font-size: 14px; font-weight: 900; line-height: 1; transform: translateY(-2px); }
.ab-pattern-divider { color: #aeb6c0; font-size: 15px; }
.page-button { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #eef0f3; border-radius: 50%; background: #fff; color: #b1b8c3; font-size: 14px; font-weight: 700; }
.page-button.is-active { border-color: #050505; background: #050505; color: #fff; }
.page-button.is-pending { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 158, 18, .12); }
.duplicate-button { min-height: 43px; padding: 0 18px; background: #fff; }
.round-button { min-height: 43px; border-color: #e5e8ec; background: #fff; color: #3f4855; }
.round-button.is-disabled { color: #c6ccd4; }
.generate-button, .steal-button, .clear-button { min-height: 43px; }

.mixer-section { min-width: 0; padding: 0 0 28px; }
.mixer-heading { margin-top: 29px; margin-bottom: 19px; }
.mixer-hint { color: #aeb5bf; font-size: 12px; }
.mixer-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.mixer-grid { display: grid; width: 100%; min-width: var(--mixer-min-width, 574px); grid-template-columns: repeat(var(--mixer-channel-count, 7), minmax(82px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mixer-channel { display: flex; min-width: 0; min-height: 220px; align-items: center; flex-direction: column; padding: 12px 6px 9px; border-right: 1px solid var(--line); }
.mixer-channel:last-child { border-right: 0; }
.mixer-label { color: #a6adb7; font: 11px "DM Mono", ui-monospace, monospace; letter-spacing: .11em; }
.fader-shell { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 37px; height: 140px; margin-top: 10px; overflow: hidden; border: 1px solid #dfe3e8; border-radius: 4px; background: #f0f2f4; }
.fader-fill { position: absolute; inset: auto 0 0; min-height: 0; border-radius: 3px; background: var(--track-color); opacity: .96; pointer-events: none; }
.fader-cap { position: absolute; z-index: 1; left: -7px; right: -7px; height: 7px; border-radius: 4px; background: #27292e; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); pointer-events: none; transform: translateY(50%); }
.vertical-fader { position: absolute; z-index: 2; width: 140px; height: 37px; margin: 0; opacity: 0; transform: rotate(-90deg); transform-origin: center; cursor: ns-resize; }
.mixer-value { margin-top: 9px; color: #9da4ad; font: 11px "DM Mono", ui-monospace, monospace; }

input[type="range"] { appearance: none; align-self: center; height: 23px; background: transparent; accent-color: #9299a2; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background: #b0b3b6; }
input[type="range"]::-webkit-slider-thumb { width: 23px; height: 23px; margin-top: -9.5px; border: 1px solid #cbd0d4; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.14); appearance: none; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 3px; background: #b0b3b6; }
input[type="range"]::-moz-range-thumb { width: 23px; height: 23px; border: 1px solid #cbd0d4; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.14); }

.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0 0; color: #b1b7c0; font-size: 11px; }
.app-footer button, .app-footer a { padding: 0; border: 0; background: transparent; color: #8f98a4; font: inherit; font-weight: 700; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(17, 20, 24, .52); backdrop-filter: blur(7px); }
.modal-backdrop.is-hidden { display: none; }
.modal-card { position: relative; width: min(100%, 460px); padding: 32px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .2); }
.modal-close { position: absolute; top: 16px; right: 17px; width: 30px; height: 30px; border: 0; background: transparent; color: #a9b0ba; font-size: 25px; line-height: 1; }
.modal-card h2 { margin: 10px 0 8px; font-size: 27px; letter-spacing: -.055em; }
.modal-copy { color: #929ba6; font-size: 13px; }
.preset-list { display: grid; gap: 8px; margin-top: 22px; }
.save-beat-form { display: flex; gap: 8px; margin-top: 19px; }
.save-beat-form input { flex: 1; min-width: 0; padding: 0 12px; border: 1px solid #e1e5e9; border-radius: 999px; outline: none; background: #fbfcfc; color: var(--ink); font-size: 12px; }
.save-beat-form input:focus { border-color: #aab2bd; box-shadow: 0 0 0 3px rgba(153, 162, 173, .12); }
.save-beat-form .button { min-height: 38px; padding: 0 16px; font-size: 12px; }
.saved-beats-heading { margin-top: 21px; color: #abb2bd; font: 9px "DM Mono", ui-monospace, monospace; letter-spacing: .16em; }
.saved-beat-list { display: grid; gap: 7px; margin-top: 8px; }
.saved-beat-item { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #edf0f2; border-radius: 10px; background: #fcfcfd; }
.saved-beat-load { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.saved-beat-load strong, .saved-beat-load small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-beat-load strong { color: #586170; font-size: 12px; }
.saved-beat-load small { margin-top: 3px; color: #a1a9b3; font-size: 10px; }
.saved-beat-delete { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #b2b9c1; font-size: 18px; }
.saved-beat-delete:hover { background: #f4f5f6; color: #e05a5a; }
.saved-empty { padding: 8px 0 1px; color: #b2bac4; font-size: 11px; }
.preset-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 16px; border: 1px solid #edf0f2; border-radius: 13px; background: #fafbfb; color: #3e4753; text-align: left; transition: .18s ease; }
.preset-item:hover { border-color: #cfd5db; background: #fff; transform: translateX(2px); }
.preset-item strong, .preset-item small { display: block; }
.preset-item small { margin-top: 4px; color: #a2aab5; font-size: 11px; }
.preset-arrow { color: var(--orange); font-size: 18px; }
.shortcut-card { max-width: 400px; }
.loop-modal-card { width: min(100%, 500px); }
.save-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 20px; }
.save-mode-button { min-height: 36px; border: 1px solid #e5e8ec; border-radius: 10px; background: #fafbfb; color: #929ba7; font-size: 11px; font-weight: 800; }
.save-mode-button.is-active { border-color: var(--orange); background: #fffaf1; color: var(--orange); }
.save-mode-button:disabled { cursor: not-allowed; opacity: .45; }
.save-export-panel { margin-top: 17px; }
.mini-song-rows { display: grid; gap: 8px; margin-top: 18px; }
.mini-song-row { display: grid; grid-template-columns: minmax(0, 1fr) 125px 76px; gap: 8px; align-items: center; }
.mini-song-change-label { color: #677181; font-size: 11px; font-weight: 800; }
.mini-song-row select, .mini-song-row input { width: 100%; min-height: 36px; padding: 0 9px; border: 1px solid #e2e6ea; border-radius: 9px; outline: none; background: #fafbfb; color: #5c6674; font-size: 11px; font-weight: 700; }
.mini-song-row select:focus, .mini-song-row input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 158, 18, .12); }
.mini-song-repeat { display: flex; align-items: center; gap: 5px; color: #9aa3ae; font: 10px "DM Mono", ui-monospace, monospace; }
.mini-song-total { margin-top: 16px; color: #8f98a5; font: 11px "DM Mono", ui-monospace, monospace; text-align: right; }
.mini-song-export-button { width: 100%; margin-top: 14px; }
.mini-song-note { min-height: 16px; margin-top: 12px; color: #b16e24; font-size: 11px; line-height: 1.4; }
.loop-choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 22px; }
.loop-choice { display: grid; min-height: 75px; place-items: center; align-content: center; gap: 3px; border: 1px solid #e6e9ed; border-radius: 13px; background: #fafbfb; color: #677181; transition: .18s ease; }
.loop-choice:hover { border-color: var(--orange); background: #fffaf1; color: var(--orange); transform: translateY(-1px); }
.loop-choice strong { font-size: 21px; }
.loop-choice span { color: #a3abb6; font: 10px "DM Mono", ui-monospace, monospace; text-transform: uppercase; }
.shortcut-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eef0f2; color: #697382; font-size: 13px; }
.shortcut-row:last-child { border-bottom: 0; }
kbd { min-width: 62px; padding: 5px 7px; border: 1px solid #dce1e6; border-bottom-width: 2px; border-radius: 6px; background: #f7f8f9; color: #343b46; font: 11px "DM Mono", ui-monospace, monospace; text-align: center; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 22px; max-width: calc(100% - 48px); padding: 12px 16px; border-radius: 999px; background: #111; color: #fff; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.admin-auth-gate { display: grid; min-height: calc(100vh - 68px); place-items: center; padding: 48px 0 72px; }
.admin-page.is-admin-authenticated .admin-auth-gate { display: none; }
.admin-page:not(.is-admin-authenticated) .admin-shell { display: none; }
.admin-auth-card { width: min(100%, 420px); padding: 32px; border: 1px solid #e8ebef; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.admin-auth-card h1 { margin-top: 10px; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.07em; }
.admin-auth-card p { margin-top: 13px; color: #929aa6; font-size: 13px; line-height: 1.6; }
.admin-auth-form { display: grid; gap: 9px; margin-top: 24px; }
.admin-auth-form label { color: #7e8794; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-auth-form input { min-height: 45px; padding: 0 13px; border: 1px solid #e1e5e9; border-radius: 10px; outline: none; background: #fbfcfc; color: var(--ink); font-size: 16px; letter-spacing: .16em; }
.admin-auth-form input:focus { border-color: #aab2bd; box-shadow: 0 0 0 3px rgba(153, 162, 173, .12); }
.admin-auth-form .button { margin-top: 8px; }
.admin-auth-form small { min-height: 16px; color: #cc5555; font-size: 11px; }
.admin-logout-button { display: none; }
.admin-page.is-admin-authenticated .admin-logout-button { display: inline-block; }

/* Admin */
.admin-page { background: #f7f8fa; }
.admin-page .topbar { border-bottom: 1px solid #e8ebef; }
.admin-shell { padding: 48px 0 72px; }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 32px; }
.admin-header h1 { margin-top: 10px; font-size: clamp(2.2rem, 4.5vw, 4.1rem); letter-spacing: -.08em; }
.admin-header p { max-width: 490px; margin-top: 14px; color: #929aa6; font-size: 14px; line-height: 1.6; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr); gap: 20px; align-items: start; }
.admin-card { padding: 25px; border: 1px solid #e8ebef; border-radius: 20px; background: #fff; box-shadow: 0 12px 35px rgba(33,39,49,.035); }
.admin-card-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.admin-card h2 { margin-top: 7px; font-size: 22px; letter-spacing: -.05em; }
.admin-card-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: #f2f4f5; color: #a2aab4; }
.form-stack { display: grid; gap: 15px; }
.form-stack label, .kit-editor-fields label, .upload-fields label { display: grid; gap: 7px; color: #7e8794; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.form-stack input, .kit-editor-fields input, .upload-fields select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #e1e5e9; border-radius: 10px; outline: none; background: #fbfcfc; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.form-stack input:focus, .kit-editor-fields input:focus, .upload-fields select:focus { border-color: #aab2bd; box-shadow: 0 0 0 3px rgba(153, 162, 173, .12); }
.form-stack .button { margin-top: 8px; }
.toggle-row { display: flex !important; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #eef0f2; border-radius: 11px; background: #fcfcfd; cursor: pointer; }
.toggle-row > input { flex: 0 0 auto; width: 17px; height: 17px; accent-color: #111; }
.toggle-row > span { display: grid; gap: 3px; color: #596474; font-size: 12px; letter-spacing: 0; text-transform: none; }
.toggle-row strong { font-size: 12px; }
.toggle-row small { color: #a0a8b3; font-size: 10px; font-weight: 500; }
.small-button { min-height: 34px; padding: 0 13px; font-size: 11px; }
.kit-editor-list { display: grid; gap: 12px; }
.kit-editor-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid #eef0f2; border-radius: 13px; background: #fcfcfd; }
.kit-swatch { width: 8px; height: 42px; border-radius: 5px; background: linear-gradient(#202328 0 20%, hsl(calc(var(--kit-index) * 42 + 28) 88% 62%) 20%); }
.kit-editor-fields { display: grid; grid-template-columns: 1.1fr .6fr; gap: 8px; }
.kit-editor-fields label:last-child { grid-column: 1 / -1; }
.kit-editor-fields input { min-height: 35px; font-size: 12px; }
.kit-editor-actions { display: flex; align-items: center; gap: 7px; }
.form-note { margin-top: 15px; color: #a7aeb8; font-size: 11px; line-height: 1.5; }
.track-style-intro, .assignment-intro, .sound-library-intro { margin: -9px 0 16px; }
.track-style-list { display: grid; gap: 8px; }
.track-style-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 11px; align-items: center; padding: 9px 11px; border: 1px solid #eef0f2; border-radius: 11px; }
.track-style-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--track-color); }
.track-style-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, .42fr); gap: 8px; min-width: 0; }
.track-style-fields label { display: grid; gap: 5px; color: #a0a8b3; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.track-style-fields input { width: 100%; min-height: 32px; padding: 0 9px; border: 1px solid #e1e5e9; border-radius: 8px; outline: none; background: #fbfcfc; color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.track-style-fields input:focus { border-color: #aab2bd; box-shadow: 0 0 0 3px rgba(153, 162, 173, .12); }
.track-style-row input[type="color"] { width: 34px; height: 27px; padding: 2px; border: 1px solid #dfe3e7; border-radius: 7px; background: #fff; cursor: pointer; }
.optional-808-tools { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #eef0f2; }
.optional-808-heading { display: grid; gap: 4px; }
.optional-808-heading strong { color: #5f6977; font-size: 12px; }
.optional-808-heading small { color: #a0a8b3; font-size: 10px; line-height: 1.45; }
.optional-808-list { display: grid; gap: 7px; }
.optional-808-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid #eef0f2; border-radius: 11px; background: #fcfcfd; }
.optional-808-row > div { min-width: 0; }
.optional-808-row strong, .optional-808-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optional-808-row strong { color: #596474; font-size: 11px; }
.optional-808-row small { margin-top: 3px; color: #a0a8b3; font-size: 9px; }
.optional-808-row .button { flex: 0 0 auto; }
.optional-808-row .button:disabled { cursor: default; opacity: .65; }
.sound-card { grid-column: 1 / -1; }
.sound-assignments-card { grid-column: 1 / -1; }
.upload-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.dropzone { display: flex; min-height: 116px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border: 1.5px dashed #cdd4dc; border-radius: 14px; background: #fbfcfc; color: #5f6977; text-align: center; cursor: pointer; transition: .18s ease; }
.dropzone:hover { border-color: var(--green); background: #f5fff8; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.dropzone-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #e9f9ef; color: #20a84e; font-size: 18px; }
.dropzone strong { font-size: 13px; }
.dropzone small { color: #a0a8b2; font-size: 10px; }
.upload-fields { display: grid; gap: 9px; }
.upload-fields select { min-height: 36px; }
.sound-upload-scope-note { display: block; max-width: 270px; color: #929ba7; font-size: 9px; line-height: 1.45; }
.upload-form > .button { min-height: 36px; }
.upload-form > .button.is-busy { cursor: progress; opacity: .62; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; color: #9da5b0; font: 11px "DM Mono", ui-monospace, monospace; }
.text-button { padding: 0; border: 0; background: transparent; color: #8c95a1; font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--ink); }
.danger-text:hover { color: #dc4848; }
.sound-list { display: grid; gap: 8px; margin-top: 10px; }
.sound-row { display: grid; grid-template-columns: 33px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #eef0f2; border-radius: 11px; }
.sound-play { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #111; color: #fff; font-size: 10px; }
.sound-info { display: grid; min-width: 0; gap: 4px; }
.sound-info strong, .sound-info > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-info strong { color: #4f5966; font-size: 12px; }
.sound-info > span, .sound-size { color: #a0a8b3; font-size: 10px; }
.sound-name-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.sound-name-label { display: grid; min-width: 0; gap: 4px; }
.sound-name-label > span { color: #9aa3ae; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sound-name-input { width: 100%; min-height: 34px; padding: 0 10px; border: 1px solid #dfe3e7; border-radius: 8px; outline: none; background: #fbfcfc; color: #4f5966; font-size: 12px; font-weight: 700; }
.sound-name-input:focus { border-color: #aab2bd; box-shadow: 0 0 0 3px rgba(153, 162, 173, .12); }
.sound-name-save { min-height: 34px; white-space: nowrap; }
.sound-file-name { font-family: "DM Mono", ui-monospace, monospace; }
.sound-compressor { margin-top: 5px; border: 1px solid #e5e8ec; border-radius: 10px; background: #f9fafb; }
.sound-compressor summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; color: #697483; font-size: 10px; font-weight: 800; cursor: pointer; list-style: none; }
.sound-compressor summary::-webkit-details-marker { display: none; }
.sound-compressor summary::before { content: "+"; color: #9aa3ae; font: 13px "DM Mono", ui-monospace, monospace; }
.sound-compressor[open] summary::before { content: "−"; }
.sound-compressor summary > span { flex: 1; letter-spacing: .07em; text-transform: uppercase; }
.sound-compressor summary strong { color: #9aa3ae; font: 9px "DM Mono", ui-monospace, monospace; text-transform: uppercase; }
.sound-compressor[open] summary { border-bottom: 1px solid #e5e8ec; }
.sound-compressor[open] summary strong { color: #20a84e; }
.compressor-form { display: grid; gap: 12px; padding: 12px; }
.compressor-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.compressor-presets > span { margin-right: 2px; color: #9aa3ae; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.compressor-presets button { min-height: 25px; padding: 0 9px; border: 1px solid #dfe3e7; border-radius: 7px; background: #fff; color: #697483; font-size: 9px; font-weight: 800; }
.compressor-presets button:hover { border-color: #aeb6c0; color: #222a34; }
.compressor-enable { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #e7eaed; border-radius: 9px; background: #fff; }
.compressor-enable input { width: 16px; height: 16px; accent-color: #20a84e; }
.compressor-enable > span { min-width: 0; }
.compressor-enable strong, .compressor-enable small { display: block; }
.compressor-enable strong { color: #596474; font-size: 10px; }
.compressor-enable small { margin-top: 2px; color: #9da6b1; font-size: 8px; line-height: 1.4; }
.compressor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.compressor-control { display: grid; min-width: 0; gap: 3px; }
.compressor-control > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: #8e98a5; font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.compressor-control output { color: #596474; font: 8px "DM Mono", ui-monospace, monospace; letter-spacing: 0; text-transform: none; }
.compressor-control input[type="range"] { width: 100%; min-width: 0; height: 18px; }
.compressor-control input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: #c9ced4; }
.compressor-control input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -6.5px; }
.compressor-control input[type="range"]::-moz-range-track { height: 3px; background: #c9ced4; }
.compressor-control input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; }
.compressor-save { justify-self: start; }
.sound-size { font-family: "DM Mono", ui-monospace, monospace; }
.empty-state { display: grid; justify-items: center; gap: 5px; padding: 26px 16px; border: 1px dashed #e0e4e9; border-radius: 12px; color: #a4acb5; text-align: center; }
.empty-state > span { font-size: 23px; }
.empty-state p { color: #748090; font-size: 12px; font-weight: 800; }
.empty-state small { max-width: 310px; font-size: 10px; line-height: 1.5; }
.sound-assignments { display: grid; gap: 8px; }
.sound-assignment-row { display: grid; grid-template-columns: 95px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #eef0f2; border-radius: 11px; }
.assignment-kit { color: #a1a9b3; font: 10px "DM Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.assignment-source strong, .assignment-source span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assignment-source strong { color: #596474; font-size: 12px; }
.assignment-source span { margin-top: 3px; color: #a2aab4; font-size: 10px; }
.assignment-actions { display: flex; align-items: center; gap: 8px; }
.sound-assignment-play { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #111; color: #fff; font-size: 10px; }
.sound-assignment-play:hover { background: #31353a; transform: translateY(-1px); }
.replace-sound-button { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid #dfe4e8; border-radius: 999px; background: #fff; color: #747e8c; font-size: 10px; font-weight: 800; cursor: pointer; }
.replace-sound-button:hover { border-color: #20c460; color: #20994a; }
.replace-sound-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.guide-card { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 20px; align-items: center; }
.guide-card .admin-card-header { margin: 0; }
.guide-card > p { color: #8b95a3; font-size: 12px; line-height: 1.6; }
.guide-stat { display: grid; gap: 7px; padding-left: 17px; border-left: 1px solid #e9ecef; }
.guide-stat span { color: #a7afb9; font: 10px "DM Mono", ui-monospace, monospace; text-transform: uppercase; }
.guide-stat strong { color: #4d5865; font-size: 12px; }

@media (max-width: 1040px) {
  .transport-row.primary-controls { flex-wrap: wrap; }
  .transport-row.utility-controls { flex-wrap: wrap; }
  .utility-controls .pattern-pages,
  .utility-controls .history-controls { flex: 1 1 100%; min-width: 0; }
  .utility-controls .history-controls { justify-content: flex-end; }
  .midi-cluster { order: 5; }
  .bpm-cluster { flex: 1 1 420px; }
  .swing-cluster { flex: 1 1 300px; }
  .guide-card { grid-template-columns: 1fr 1fr; }
  .guide-card .admin-card-header, .guide-card > p { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .site-shell { width: min(100% - 28px, 1576px); }
  .topbar { min-height: 58px; }
  .status-pill { display: none; }
  .ios-audio-notice { align-items: flex-start; margin-top: 10px; padding: 11px 11px 11px 12px; font-size: 11px; }
  .ios-audio-notice-copy { align-items: flex-start; }
  .ios-audio-notice-icon { margin-top: 1px; }
  .app-shell { padding-top: 25px; }
  .app-header { align-items: flex-start; padding-bottom: 22px; }
  .header-actions { padding-top: 4px; }
  .app-header p { max-width: 220px; line-height: 1.45; }
  .kit-tabs-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .kit-tabs.has-many { border-radius: 22px; }
  .kit-tabs.has-many .kit-tabs-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit-tab { min-height: 52px; padding: 9px 7px; font-size: 13px; }
  .kit-tab span { display: none; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .step-header-wrap, .track-row { grid-template-columns: 92px minmax(500px, 1fr); column-gap: 9px; }
  .lane-wrap { min-width: 592px; }
  .sequencer-card, .performance-card { overflow-x: auto; padding-bottom: 19px; }
  .sequencer-card .section-heading, .performance-card .performance-topline { min-width: 592px; }
  .track-label { font-size: 11px; }
  .track-meta { gap: 6px; }
  .track-preview-button { width: 19px; height: 19px; font-size: 7px; }
  .track-sound-picker { flex-basis: 18px; width: 18px; }
  .randomize-track { font-size: 11px; }
  .step-grid, .step-header, .performance-lane { gap: 6px; }
  .step { height: 48px; border-radius: 8px; }
  .performance-lane, .lane-bar { min-height: 88px; height: 88px; }
  .transport-row { align-items: stretch; flex-wrap: wrap; }
  .primary-controls > * { flex: 1 1 auto; }
  .bpm-cluster, .swing-cluster { min-width: 100%; }
  .midi-cluster { min-width: 100%; }
  .utility-controls { align-items: flex-start; flex-direction: column; }
  .history-controls { width: 100%; flex-wrap: wrap; }
  .history-controls .button { flex: 1 1 auto; }
  .pattern-pages { width: 100%; }
  .page-button { width: 39px; height: 39px; }
  .duplicate-button { flex: 1; }
  .mixer-grid { grid-template-columns: repeat(var(--mixer-channel-count, 7), minmax(78px, 1fr)); }
  .app-footer { align-items: start; flex-direction: column; }
  .admin-shell { padding-top: 33px; }
  .admin-header { align-items: start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .sound-card, .guide-card { grid-column: auto; }
  .upload-form { grid-template-columns: 1fr; }
  .sound-row { grid-template-columns: 33px minmax(0, 1fr) auto; align-items: start; }
  .sound-row > .sound-size { grid-column: 2; }
  .sound-row > [data-sound-delete] { grid-column: 3; grid-row: 2; }
  .sound-name-form { grid-template-columns: 1fr; }
  .sound-name-save { justify-self: start; }
  .compressor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-card { display: grid; grid-template-columns: 1fr 1fr; }
  .guide-card .admin-card-header, .guide-card > p { grid-column: 1 / -1; }
  .guide-stat { padding-left: 10px; }
  .guide-stat strong { font-size: 11px; }
  .sound-assignment-row { grid-template-columns: 77px minmax(0, 1fr) auto; gap: 8px; }
  .track-style-row { grid-template-columns: 9px minmax(0, 1fr) auto; gap: 8px; }
  .track-style-fields { grid-template-columns: 1fr; gap: 5px; }
  .track-style-row > .text-button { grid-column: 2 / -1; justify-self: end; }
  .modal-card { padding: 26px 20px; }
  .loop-choice-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .loop-choice { min-height: 63px; }
  .mini-song-row { grid-template-columns: minmax(0, 1fr) 108px 70px; gap: 6px; }
  .mini-song-row select, .mini-song-row input { padding: 0 7px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Main page dark mode */
body.dark-mode {
  --ink: #f2f5f9;
  --muted: #9ba6b5;
  --muted-2: #758090;
  --line: #303742;
  --panel: #1a1f26;
  --panel-2: #242a32;
  --warm: #302719;
  --shadow: 0 24px 60px rgba(0, 0, 0, .28);
  background: #11151a;
  color: var(--ink);
}
body.dark-mode .eyebrow,
body.dark-mode .section-kicker,
body.dark-mode .grid-status,
body.dark-mode .mixer-hint,
body.dark-mode .mixer-value,
body.dark-mode .app-footer,
body.dark-mode .app-footer a,
body.dark-mode .app-footer button { color: #8e99a8; }
body.dark-mode .app-header h1 small { color: #8994a4; }
body.dark-mode .app-header p { color: #9aa5b4; }
body.dark-mode .admin-link { color: #aab4c1; }
body.dark-mode .icon-button { border-color: #343c47; background: #1b2027; color: #aeb8c5; }
body.dark-mode .theme-toggle { background: #f3f5f8; border-color: #f3f5f8; color: #11151a; }
body.dark-mode .kit-tabs { background: #1c2229; box-shadow: inset 0 -4px 0 rgba(54, 62, 73, .55); }
body.dark-mode .kit-tab { color: #9da8b7; }
body.dark-mode .kit-tab span { color: #727e8e; }
body.dark-mode .kit-tab.is-active { background: #303741; color: #f5f7fa; box-shadow: 0 5px 13px rgba(0, 0, 0, .2); }
body.dark-mode .play-button,
body.dark-mode .play-button.is-playing { background: #f3f5f8; color: #11151a; }
body.dark-mode .play-button:hover { background: #ffffff; }
body.dark-mode .step-number { color: #5f6a79; }
body.dark-mode .step-number.measure-number { color: #a8b2c0; }
body.dark-mode .step-count-picker { color: #a8b2c0; }
body.dark-mode .track-label { color: #adb7c4; }
body.dark-mode .track-label:hover { color: #fff; }
body.dark-mode .randomize-track { color: #657181; }
body.dark-mode .step { border-color: #39424e; background: #1d232a; }
body.dark-mode .step:nth-child(4n + 1) { background: #252c34; }
body.dark-mode .step.is-on { background: var(--track-color); }
body.dark-mode .performance-card,
body.dark-mode .transport-section { border-color: #303742; }
body.dark-mode .lane-mode { border-color: #3a4450; background: #1a2027; color: #9ca8b6; }
body.dark-mode .lane-mode:hover,
body.dark-mode .lane-mode.is-active { background: #302719; border-color: var(--orange); color: var(--orange); }
body.dark-mode .lane-bar { background: #272e36; }
body.dark-mode .lane-repeat-count { color: #9da9b7; }
body.dark-mode .lane-tune-label { color: #9da9b7; }
body.dark-mode .lane-bar.is-playing { box-shadow: inset 0 0 0 2px rgba(235, 240, 245, .18); }
body.dark-mode .control-cluster { background: #1c2229; color: #9ba6b4; }
body.dark-mode .control-cluster strong { color: #f1f4f7; }
body.dark-mode .stepper-button,
body.dark-mode .mini-toggle { color: #9ca8b7; }
body.dark-mode .sync-button { background: #f1f4f7; color: #11151a; }
body.dark-mode .sync-button.is-off { background: #3a424d; color: #aeb7c4; }
body.dark-mode .button-outline { border-color: #2fd36c; background: transparent; color: #62e692; }
body.dark-mode .button-outline:hover { background: #172b20; }
body.dark-mode .button-light,
body.dark-mode .round-button,
body.dark-mode .duplicate-button,
body.dark-mode .page-button { border-color: #343d49; background: #1c2229; color: #b3bdc9; }
body.dark-mode .ab-pattern-picker { border-color: #343d49; background: #1c2229; color: #e7ecf1; }
body.dark-mode .ab-pattern-value,
body.dark-mode .ab-pattern-arrow,
body.dark-mode .ab-pattern-divider { color: #9ca8b7; }
body.dark-mode .page-button.is-active { border-color: #f2f5f8; background: #f2f5f8; color: #11151a; }
body.dark-mode .page-button.is-pending { border-color: var(--orange); color: var(--orange); background: #302719; }
body.dark-mode .button-warm { border-color: #5b4526; background: #302719; color: #ffd28a; }
body.dark-mode .fader-shell { border-color: #414b57; background: #303841; }
body.dark-mode .fader-cap { background: #07090b; }
body.dark-mode .modal-card { background: #1b2128; color: #f2f5f9; }
body.dark-mode .modal-copy,
body.dark-mode .saved-beats-heading,
body.dark-mode .saved-empty { color: #96a1af; }
body.dark-mode .save-beat-form input { border-color: #3b4551; background: #151a20; color: #f2f5f9; }
body.dark-mode .preset-item,
body.dark-mode .saved-beat-item { border-color: #343d49; background: #20262e; color: #e8edf2; }
body.dark-mode .preset-item small,
body.dark-mode .saved-beat-load small { color: #96a1af; }
body.dark-mode .shortcut-row { border-color: #343d49; color: #b1bcc8; }
body.dark-mode kbd { border-color: #3a4450; background: #252c34; color: #e7ecf1; }
body.dark-mode .save-mode-button { border-color: #3a4450; background: #20262e; color: #9da8b7; }
body.dark-mode .save-mode-button.is-active { border-color: var(--orange); background: #302719; color: var(--orange); }
body.dark-mode .mini-song-change-label { color: #c1cad4; }
body.dark-mode .mini-song-row select,
body.dark-mode .mini-song-row input { border-color: #3a4450; background: #151a20; color: #d5dce4; }
body.dark-mode .mini-song-total { color: #9da8b7; }
body.dark-mode .mini-song-note { color: #d79a55; }
body.dark-mode .mixer-label { color: #9ca7b5; }
