:root {
  color-scheme: light;
  --ink: #11131a;
  --muted: #656873;
  --paper: #f5f2e9;
  --panel: #fffdf7;
  --line: #d9d5ca;
  --blue: #1736d2;
  --blue-dark: #10258f;
  --lime: #d8ff52;
  --shadow: 0 18px 50px rgba(25, 27, 40, 0.1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, a { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 233, 0.94);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -0.04em; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; gap: 2px; background: var(--blue); border-radius: 7px; transform: rotate(-2deg); }
.brand-mark i { display: block; width: 3px; border-radius: 4px; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 8px; }.brand-mark i:nth-child(2) { height: 17px; }.brand-mark i:nth-child(3) { height: 12px; }.brand-mark i:nth-child(4) { height: 21px; }
.account { display: flex; align-items: center; gap: 22px; }
.account > span { display: grid; text-align: right; }
.account strong { font-size: 13px; }.account small { color: var(--muted); font-size: 11px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 700; cursor: pointer; padding: 8px; }

main { min-height: calc(100vh - 136px); }
.login-view { min-height: calc(100vh - 136px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: clamp(48px, 8vw, 120px); padding: 8vh clamp(24px, 7vw, 110px); overflow: hidden; }
.login-copy { max-width: 670px; }
.eyebrow { margin: 0 0 16px; color: var(--blue); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.login-copy h1, .workspace-heading h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.login-copy h1 { font-size: clamp(52px, 6.5vw, 96px); }
.lede { max-width: 610px; margin: 30px 0; color: #41434b; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 54px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--blue); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 7px 0 var(--blue-dark); transition: transform .15s, box-shadow .15s; }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 9px 0 var(--blue-dark); }
.primary-button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 3px 0 var(--blue-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .72; }
.primary-button span { padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.16); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.permission-note { color: var(--muted); font-size: 12px; margin: 17px 0 0; }

.track-visual { position: relative; width: min(100%, 560px); min-height: 430px; justify-self: center; padding: 34px; border: 1px solid #101217; border-radius: 16px; background: #12141a; color: white; box-shadow: 24px 24px 0 var(--blue), var(--shadow); transform: rotate(1.5deg); }
.track-label, .track-footer { display: flex; justify-content: space-between; align-items: baseline; }
.track-label { font-size: 12px; letter-spacing: .16em; color: #b8bbc8; }
.waveform { height: 210px; margin: 38px 0 24px; display: flex; gap: 9px; align-items: center; border-top: 1px solid #30333d; border-bottom: 1px solid #30333d; }
.waveform i { flex: 1; min-width: 6px; border-radius: 3px; background: var(--lime); opacity: .9; }
.waveform i:nth-child(1),.waveform i:nth-child(7){height:23%}.waveform i:nth-child(2),.waveform i:nth-child(10){height:58%}.waveform i:nth-child(3),.waveform i:nth-child(8){height:82%}.waveform i:nth-child(4),.waveform i:nth-child(12){height:44%}.waveform i:nth-child(5){height:95%}.waveform i:nth-child(6),.waveform i:nth-child(11){height:68%}.waveform i:nth-child(9){height:36%}
.beat-grid { display: grid; grid-template-columns: repeat(4,1fr); text-align: center; color: #7d8291; }
.beat-grid > * { padding-top: 14px; border-top: 2px solid #464a58; }
.beat-grid b { color: var(--lime); border-color: var(--lime); }
.track-footer { margin-top: 42px; }.track-footer strong { font-size: 56px; line-height: 1; }.track-footer small { color: #9da1ae; text-transform: uppercase; letter-spacing: .12em; }

.center-state { min-height: calc(100vh - 136px); display: grid; place-content: center; justify-items: center; text-align: center; padding: 32px; }
.center-state h2 { margin: 20px 0 5px; }.center-state p { margin: 0 0 24px; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid #cbc7bc; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.error-icon { display: grid; place-content: center; width: 42px; height: 42px; border-radius: 50%; background: #ffdbd7; color: #a31a13; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

.workspace { max-width: 1540px; margin: 0 auto; padding: 46px clamp(18px, 4vw, 62px) 100px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.workspace-heading .eyebrow { margin-bottom: 8px; }.workspace-heading h1 { font-size: clamp(40px, 5vw, 68px); }
.steps { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; color: #8a8c94; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.steps li { display: flex; align-items: center; gap: 7px; }.steps span { display: grid; place-content: center; width: 23px; height: 23px; border: 1px solid #bbb8af; border-radius: 50%; }
.steps .active { color: var(--blue); }.steps .active span { background: var(--blue); border-color: var(--blue); color: white; }
.steps .completed { color: #3f5a20; }.steps .completed span { background: var(--lime); border-color: #a8ce2d; color: #172000; }
.browser-grid { display: grid; grid-template-columns: .8fr 1fr 1.25fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.browser-panel { min-width: 0; min-height: 520px; border-right: 1px solid var(--line); }.browser-panel:last-child { border-right: 0; }
.panel-heading { min-height: 100px; display: flex; gap: 16px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); background: #f9f7f0; }
.step-number { color: var(--blue); font-family: Georgia, serif; font-size: 21px; font-style: italic; }.panel-heading h2 { margin: 0 0 3px; font-size: 16px; }.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.option-list { max-height: 600px; overflow: auto; padding: 10px; }
.option { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 14px; border: 1px solid transparent; border-bottom-color: #e7e3da; background: transparent; text-align: left; cursor: pointer; }
.option:hover { background: #f0f2ff; }.option.active { border-color: #a8b4ff; border-radius: 8px; background: #e9edff; }
.option > span { display: grid; min-width: 0; gap: 4px; }.option strong { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }.option small { overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; white-space: nowrap; }
.option em { flex: 0 0 auto; color: var(--blue); font-size: 11px; font-style: normal; font-weight: 800; }
.song-group { border-bottom: 1px solid #e7e3da; }.song-group:last-child { border-bottom: 0; }
.song-disclosure { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }.song-disclosure:hover, .song-group.expanded .song-disclosure { background: #f0f2ff; }.song-disclosure > span { display: grid; min-width: 0; gap: 4px; }.song-disclosure strong { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }.song-disclosure small { color: var(--muted); font-size: 11px; }.song-disclosure em { display: grid; place-content: center; width: 24px; height: 24px; border: 1px solid #a8b4ff; border-radius: 50%; color: var(--blue); font-style: normal; font-weight: 800; }
.attachment-list { display: grid; gap: 8px; padding: 8px 10px 12px 26px; background: #f9f8f3; }.attachment-list > p { margin: 8px 0; color: var(--muted); font-size: 12px; }
.attachment-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }.attachment-row .option { min-height: 54px; padding: 11px 12px; border: 1px solid #dedbd2; border-radius: 7px; background: var(--panel); }.attachment-row .option.active { border-color: #8797ff; background: #e9edff; }
.delete-attachment { min-height: 36px; padding: 0 10px; border: 1px solid #d8aaa5; border-radius: 6px; background: #fff7f5; color: #9c231b; font-size: 10px; font-weight: 800; cursor: pointer; }.delete-attachment:disabled { cursor: wait; opacity: .65; }
.empty-panel, .loading-list { min-height: 260px; display: grid; place-content: center; padding: 30px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.preview-studio { margin: 24px auto 0; padding: 22px; border-radius: 14px; background: #12141a; color: white; box-shadow: 0 14px 35px rgba(10,11,16,.28); }
.preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid #343741; }
.preview-heading > div { display: grid; gap: 3px; }.preview-heading small, .preview-result small { color: var(--lime); text-transform: uppercase; letter-spacing: .12em; }.preview-heading span { color: #aeb1bb; font-size: 12px; }
.preview-length { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #484c58; border-radius: 999px; }
.source-player { min-height: 54px; display: flex; align-items: center; gap: 16px; padding-top: 12px; }.source-player .text-button { padding-left: 0; color: var(--lime); }.source-player audio { width: min(100%, 620px); height: 40px; }
.click-controls { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 14px; padding-top: 18px; }
.control { display: grid; gap: 8px; min-width: 0; }.control > span { display: flex; justify-content: space-between; gap: 8px; color: #b8bbc6; font-size: 11px; font-weight: 700; }.control output { color: var(--lime); }
.control select, .control input[type="number"] { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #484c58; border-radius: 7px; background: #20232b; color: white; }
.control input[type="range"] { width: 100%; height: 42px; margin: 0; accent-color: var(--lime); }
.toggle-control { min-height: 42px; display: flex; align-items: center; gap: 9px; cursor: pointer; }.toggle-control input { position: absolute; opacity: 0; pointer-events: none; }.toggle-control > span { position: relative; width: 38px; height: 22px; border-radius: 20px; background: #555967; transition: background .15s; }.toggle-control > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .15s; }.toggle-control input:checked + span { background: var(--lime); }.toggle-control input:checked + span::after { transform: translateX(16px); background: #11131a; }.toggle-control input:focus-visible + span { outline: 2px solid white; outline-offset: 3px; }.toggle-control strong { font-size: 12px; white-space: nowrap; }
.control-wide { grid-column: span 2; }
.preview-button { grid-column: span 2; justify-self: end; min-width: 260px; min-height: 42px; height: 42px; box-shadow: 0 5px 0 var(--blue-dark); white-space: nowrap; }.preview-button:hover:not(:disabled) { box-shadow: 0 7px 0 var(--blue-dark); }
.preview-progress, .preview-result { min-height: 76px; display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 14px 16px; border: 1px solid #3a3e49; border-radius: 9px; background: #1b1e25; }.preview-progress .spinner { flex: 0 0 auto; width: 30px; height: 30px; border-color: #484c58; border-top-color: var(--lime); }.preview-progress > div, .preview-result > div { display: grid; gap: 4px; }.preview-progress span { color: #9fa3af; font-size: 12px; }
.preview-result { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(260px,1.5fr) auto auto; }.preview-result audio { width: 100%; height: 42px; }.preview-result .text-button { color: var(--lime); }
.inline-error { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #4a1f20; color: #ffd8d4; font-size: 13px; }
.analysis-ready, .analysis-result { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 18px; padding: 16px; border: 1px solid #3a3e49; border-radius: 9px; background: #1b1e25; }
.analysis-ready > div, .analysis-result > div { display: grid; gap: 4px; }
.analysis-ready small, .analysis-result small { color: var(--lime); text-transform: uppercase; letter-spacing: .12em; }
.analysis-ready span, .analysis-result span { color: #9fa3af; font-size: 12px; }
.analysis-result .text-button { color: var(--lime); white-space: nowrap; }
.upload-panel { display: grid; grid-template-columns: minmax(240px,1fr) minmax(260px,1fr) auto; align-items: end; gap: 18px; margin-top: 18px; padding: 16px; border: 1px solid #3a3e49; border-radius: 9px; background: #1b1e25; }
.render-review { grid-template-columns: minmax(190px,.8fr) minmax(260px,1.2fr) minmax(240px,1fr) auto; }.render-review audio { width: 100%; height: 42px; }
.upload-panel > div, .upload-success { display: grid; gap: 4px; }
.upload-panel small, .upload-success small { color: var(--lime); text-transform: uppercase; letter-spacing: .12em; }
.upload-panel > div span, .upload-success span { color: #9fa3af; font-size: 12px; }
.upload-success { margin-top: 18px; padding: 18px; border: 1px solid #5e7f29; border-radius: 9px; background: #1d291b; }

footer { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@media (max-width: 1000px) {
  .login-view { grid-template-columns: 1fr; padding-top: 60px; }.track-visual { width: min(88%, 560px); margin-bottom: 40px; }
  .browser-grid { grid-template-columns: 1fr 1fr; }.browser-panel:nth-child(2) { border-right: 0; }.browser-panel-wide { grid-column: 1 / -1; border-top: 1px solid var(--line); }.browser-panel { min-height: 380px; }
  .click-controls { grid-template-columns: repeat(3,minmax(0,1fr)); }.preview-button { grid-column: span 2; }
}
@media (max-width: 680px) {
  .site-header { height: 64px; }.account > span { display: none; }
  .login-view { min-height: calc(100vh - 120px); padding: 48px 22px 70px; }.login-copy h1 { font-size: clamp(46px, 16vw, 68px); }.track-visual { width: calc(100% - 18px); min-height: 340px; padding: 24px; box-shadow: 12px 12px 0 var(--blue); }.waveform { height: 155px; margin-top: 24px; }.track-footer { margin-top: 28px; }
  .workspace { padding: 30px 14px 90px; }.workspace-heading { align-items: start; flex-direction: column; }.steps { width: 100%; justify-content: space-between; gap: 8px; }.steps li { font-size: 9px; }
  .browser-grid { display: block; }.browser-panel { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }.browser-panel-wide { border-top: 0; }.option-list { max-height: 430px; }
  .preview-heading { align-items: stretch; flex-direction: column; }.preview-length { width: fit-content; }.click-controls { grid-template-columns: 1fr 1fr; }.control-wide, .toggle-control, .preview-button { grid-column: 1 / -1; }.preview-result, .upload-panel { grid-template-columns: 1fr; }.preview-result audio { min-width: 0; }.preview-button, .upload-panel .primary-button { width: 100%; }.analysis-ready, .analysis-result { align-items: stretch; flex-direction: column; }.analysis-ready .primary-button { width: 100%; }
  .attachment-list { padding-left: 10px; }.attachment-row { grid-template-columns: 1fr; }.delete-attachment { justify-self: start; }.source-player { align-items: stretch; flex-direction: column; }.source-player audio { width: 100%; }
  footer { min-height: 70px; align-items: start; flex-direction: column; justify-content: center; }
}

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