:root {
  color-scheme: dark;
  --canvas: #11111b;
  --canvas-deep: #0b0b12;
  --surface: #191923;
  --surface-2: #20202c;
  --surface-3: #292936;
  --ink: #f8f6f1;
  --soft: #bbb7bd;
  --muted: #85808b;
  --faint: #5e5a65;
  --line: rgba(238, 230, 246, 0.13);
  --line-strong: rgba(238, 230, 246, 0.23);
  --coral: #ff7564;
  --coral-soft: rgba(255, 117, 100, 0.16);
  --violet: #b59cff;
  --violet-soft: rgba(181, 156, 255, 0.16);
  --mint: #8ce2b5;
  --mint-soft: rgba(140, 226, 181, 0.15);
  --gold: #f2c66d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

[data-theme="light"] {
  color-scheme: light;
  --canvas: #eeeae4;
  --canvas-deep: #e7e2da;
  --surface: #f8f6f1;
  --surface-2: #efebe5;
  --surface-3: #e6e1db;
  --ink: #2a252b;
  --soft: #645d67;
  --muted: #89818a;
  --faint: #aaa2aa;
  --line: rgba(52, 43, 55, 0.13);
  --line-strong: rgba(52, 43, 55, 0.25);
  --coral: #dd5e52;
  --coral-soft: rgba(221, 94, 82, 0.12);
  --violet: #8469cf;
  --violet-soft: rgba(132, 105, 207, 0.12);
  --mint: #4eaa7a;
  --mint-soft: rgba(78, 170, 122, 0.13);
  --gold: #b78027;
  --shadow: 0 22px 70px rgba(57, 44, 30, 0.09);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: radial-gradient(circle at 14% 6%, rgba(255, 117, 100, 0.1), transparent 30rem), radial-gradient(circle at 91% 66%, rgba(181, 156, 255, 0.1), transparent 31rem), var(--canvas-deep); color: var(--ink); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { color: inherit; font: inherit; }
button { border: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--coral) 55%, transparent); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
kbd { display: inline-grid; min-width: 21px; height: 20px; place-items: center; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--soft); font-size: 9px; font-weight: 800; }

.studio-app { width: min(1440px, 100%); margin: 0 auto; padding: 24px clamp(18px, 4vw, 68px) 36px; }
.studio-header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--ink); color: var(--canvas); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 2.2; }
.header-center { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; transition: color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.icon-button:hover { border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); }
.icon-button.small { width: 31px; height: 31px; border-radius: 8px; }
.icon-button svg { width: 18px; height: 18px; }.icon-button.small svg { width: 15px; height: 15px; }
.moon-icon, [data-theme="light"] .sun-icon { display: none; } [data-theme="light"] .moon-icon { display: block; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 800; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-1px); }.button:active { transform: scale(0.98); }
.button svg { width: 17px; height: 17px; }
.button.compact { min-height: 38px; padding: 0 13px; }
.button-primary { background: var(--ink); color: var(--canvas); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); }.button-primary:hover { background: var(--coral); color: #fff8f5; }
.button-secondary { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }.button-secondary:hover { border-color: var(--coral); }
.button-ghost { border-color: var(--line); background: transparent; color: var(--soft); }.button-ghost:hover { background: var(--surface-2); color: var(--ink); }

.hero { display: flex; min-height: 198px; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 52px 0 34px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: 0.15em; line-height: 1.4; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(42px, 6vw, 72px); font-weight: 500; letter-spacing: -0.055em; line-height: 0.95; }.hero h1 em { color: var(--coral); font-style: italic; }
.hero p:not(.eyebrow) { max-width: 500px; margin: 12px 0 0; color: var(--soft); font-size: 14px; }
.hero-note { display: grid; min-width: 190px; align-content: end; gap: 5px; padding-bottom: 3px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }.hero-note strong { color: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 500; }.hero-note i { width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }

.studio-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(292px, 0.8fr); gap: 18px; align-items: start; }
.main-column, .side-column { display: grid; gap: 18px; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: 17px; background: color-mix(in srgb, var(--surface) 95%, transparent); box-shadow: var(--shadow); }
.sequencer-panel { padding: 25px 26px 28px; }.mixer-panel, .project-panel, .feel-panel, .tips-panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.compact-heading { align-items: center; }.panel-heading h2, .melody-heading h3 { margin: 2px 0 0; font-family: var(--display); font-size: 25px; font-weight: 500; letter-spacing: -0.025em; line-height: 1; }.panel-heading h2 { font-size: 28px; }.melody-heading h3 { font-size: 22px; }.panel-heading .eyebrow, .melody-heading .eyebrow { margin-bottom: 5px; }
.transport { display: flex; align-items: center; gap: 7px; }.transport-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-2); color: var(--soft); cursor: pointer; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }.transport-button:hover { background: var(--surface-3); color: var(--ink); transform: translateY(-1px); }.transport-button svg { width: 16px; height: 16px; }.play-button { width: 42px; height: 42px; background: var(--coral); border-color: var(--coral); color: #fff8f3; box-shadow: 0 7px 20px var(--coral-soft); }.play-button:hover { background: var(--coral); color: #fff; }.play-button .stop-icon { display: none; }.play-button.is-playing .play-icon { display: none; }.play-button.is-playing .stop-icon { display: block; }
.bpm-control { display: flex; height: 35px; align-items: center; gap: 5px; margin-left: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }.bpm-control label { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: 0.11em; }.bpm-control input { width: 39px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 750; }
.grid-scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }.step-ruler, .drum-grid, .melody-grid { display: grid; width: max(100%, 720px); grid-template-columns: 86px repeat(16, minmax(28px, 1fr)); gap: 5px; }.step-ruler { margin-top: 30px; }.step-ruler span { display: grid; height: 18px; place-items: center; color: var(--faint); font-size: 8px; font-weight: 800; }.step-ruler span:nth-child(4n + 1) { color: var(--soft); }.step-ruler span.is-current { color: var(--coral); }
.drum-grid { align-items: center; margin-top: 3px; }.track-label { display: flex; min-height: 39px; align-items: center; gap: 8px; color: var(--soft); font-size: 10px; font-weight: 750; }.track-label i { width: 6px; height: 20px; border-radius: 99px; background: var(--track-color); }.track-label small { margin-left: auto; color: var(--faint); font-size: 8px; font-weight: 800; letter-spacing: 0.05em; }.step-cell { position: relative; display: grid; min-height: 39px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); cursor: pointer; transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, box-shadow 130ms ease; }.step-cell::before { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); content: ""; transition: transform 130ms ease, background 130ms ease; }.step-cell:nth-child(4n + 2) { margin-left: 2px; }.step-cell:hover { border-color: var(--line-strong); transform: translateY(-1px); }.step-cell.is-active { border-color: var(--track-color); background: color-mix(in srgb, var(--track-color) 20%, var(--surface-2)); box-shadow: inset 0 0 15px color-mix(in srgb, var(--track-color) 10%, transparent); }.step-cell.is-active::before { background: var(--track-color); box-shadow: 0 0 9px var(--track-color); transform: scale(1.65); }.step-cell.is-current { border-color: var(--ink); }.step-cell.is-active.is-current { border-color: var(--track-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--track-color) 32%, transparent); }
.panel-divider { height: 1px; margin: 26px 0 23px; background: var(--line); }.melody-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }.key-hint { color: var(--muted); font-size: 10px; }.melody-grid { align-items: center; }.note-label { display: flex; height: 31px; align-items: center; color: var(--muted); font-family: var(--display); font-size: 12px; }.note-cell { min-height: 31px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); cursor: pointer; transition: background 130ms ease, border-color 130ms ease; }.note-cell:hover { border-color: var(--line-strong); }.note-cell.is-active { border-color: var(--violet); background: var(--violet-soft); box-shadow: inset 0 -3px 0 var(--violet); }.note-cell.is-current { border-color: var(--ink); }

.mixer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 23px 0 19px; }.mixer-channel { display: grid; gap: 10px; }.mixer-channel > span { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 11px; font-weight: 700; }.channel-dot { width: 7px; height: 7px; border-radius: 50%; }.channel-dot.drums { background: var(--coral); }.channel-dot.synth { background: var(--violet); }.channel-dot.master { background: var(--mint); }.mixer-channel input, .wide-range { width: 100%; height: 4px; accent-color: var(--coral); cursor: pointer; }.mixer-channel small { color: var(--muted); font-size: 10px; }.mixer-details { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }.mixer-details span { display: flex; align-items: center; gap: 8px; }.signal-bars { display: flex; align-items: flex-end; gap: 2px; height: 13px; }.signal-bars b { display: block; width: 3px; border-radius: 2px; background: var(--mint); }.signal-bars b:nth-child(1) { height: 5px; }.signal-bars b:nth-child(2) { height: 8px; }.signal-bars b:nth-child(3) { height: 11px; }.signal-bars b:nth-child(4) { height: 7px; }

.project-panel .panel-heading h2 { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 23px; }.project-actions .button { min-width: 0; padding: 0 8px; }.project-actions svg { width: 15px; height: 15px; }.clear-button { width: 100%; margin-top: 8px; padding: 5px; background: transparent; color: var(--faint); cursor: pointer; font-size: 9px; font-weight: 750; text-align: center; }.clear-button:hover { color: var(--coral); }.saved-projects { display: grid; gap: 6px; margin-top: 17px; }.saved-project { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--soft); font-size: 10px; }.saved-project button { padding: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; }.saved-project button:hover { color: var(--coral); }.saved-empty { padding: 9px 0 2px; color: var(--faint); font-size: 10px; text-align: center; }
.feel-panel .panel-heading { align-items: center; }.feel-value { color: var(--violet); font-size: 11px; font-weight: 800; }.wide-range { margin-top: 20px; accent-color: var(--violet); }.range-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 9px; }.select-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; margin-top: 22px; color: var(--soft); font-size: 11px; font-weight: 700; }.select-field select { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: var(--surface-2); color: var(--ink); font-size: 11px; }
.tips-panel { position: relative; overflow: hidden; min-height: 176px; }.tips-orb { position: absolute; top: -45px; right: -20px; width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 50%; opacity: 0.75; }.tips-orb::before, .tips-orb::after { position: absolute; inset: 20px; border: 1px solid var(--line); border-radius: 50%; content: ""; }.tips-orb::after { inset: 45px; border-color: var(--coral); }.tips-orb span { position: absolute; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }.tips-orb span:nth-child(1) { top: 43px; left: 24px; }.tips-orb span:nth-child(2) { top: 99px; right: 31px; background: var(--violet); }.tips-orb span:nth-child(3) { right: 19px; bottom: 17px; background: var(--mint); }.tips-panel .eyebrow { position: relative; z-index: 1; }.tips-panel > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 245px; margin: 19px 0 16px; color: var(--soft); font-family: var(--display); font-size: 17px; line-height: 1.2; }.tips-panel .text-button { position: relative; z-index: 1; margin: 0; padding: 0; color: var(--coral); font-size: 9px; }.tips-panel .text-button span { padding-left: 4px; font-size: 12px; }

.studio-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 0 5px; color: var(--faint); font-size: 9px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }.studio-footer > span { display: flex; align-items: center; gap: 7px; }.privacy-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.modal { width: min(430px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4); }.modal::backdrop { background: rgba(4, 4, 8, 0.55); backdrop-filter: blur(4px); }.modal form { display: grid; gap: 20px; padding: 25px; }.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.modal-heading h2 { margin: 2px 0 0; font-family: var(--display); font-size: 29px; font-weight: 500; }.field { display: grid; gap: 7px; color: var(--soft); font-size: 10px; font-weight: 750; }.field input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface-2); color: var(--ink); font-size: 13px; }.field input:focus { border-color: var(--coral); }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 300px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ink); color: var(--canvas); font-size: 11px; font-weight: 700; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 180ms ease, transform 180ms ease; }.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 930px) { .studio-layout { grid-template-columns: 1fr; }.side-column { grid-template-columns: repeat(2, 1fr); align-items: start; }.tips-panel { grid-column: 1 / -1; }.studio-footer { margin-bottom: 12px; } }
@media (max-width: 650px) { .studio-app { padding: 15px 12px 25px; }.header-center { display: none; }.header-actions .button span { display: none; }.header-actions .button { width: 38px; padding: 0; }.hero { min-height: 185px; align-items: flex-start; flex-direction: column; justify-content: flex-end; gap: 22px; padding: 45px 0 25px; }.hero h1 { font-size: 47px; }.hero-note { width: 100%; min-width: 0; }.side-column { grid-template-columns: 1fr; }.tips-panel { grid-column: auto; }.sequencer-panel { padding: 21px 17px 22px; }.mixer-panel, .project-panel, .feel-panel, .tips-panel { padding: 19px; }.panel-heading h2 { font-size: 25px; }.mixer-row { gap: 10px; }.mixer-channel > span { font-size: 10px; }.mixer-details { display: grid; grid-template-columns: 1fr 1fr; }.mixer-details span:last-child { grid-column: 1 / -1; }.studio-footer { justify-content: flex-start; }.studio-footer > span:last-child { display: none; }.key-hint { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; } }
