:root {
  --ink: #f4efe8;
  --muted: rgba(224, 214, 201, 0.78);
  --line: rgba(255, 209, 165, 0.18);
  --line-strong: rgba(255, 209, 165, 0.38);
  --panel: rgba(10, 10, 12, 0.78);
  --panel-soft: rgba(11, 12, 15, 0.62);
  --surface: linear-gradient(160deg, rgba(18, 18, 20, 0.92), rgba(7, 8, 11, 0.96));
  --accent: #ffb97a;
  --accent-strong: #ff9844;
  --accent-soft: rgba(255, 185, 122, 0.16);
  --accent-copper: rgba(181, 104, 58, 0.18);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.44);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --range-track-height: 5px;
  --range-thumb-size: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% -2%, rgba(255, 154, 72, 0.34), transparent 38%),
    radial-gradient(circle at 84% 8%, rgba(255, 201, 148, 0.12), transparent 30%),
    radial-gradient(circle at 50% 96%, rgba(0, 0, 0, 0.52), transparent 58%),
    linear-gradient(150deg, #5e3118 0%, #291811 34%, #11141b 62%, #06080d 100%);
  padding: 24px 16px 36px;
}

body.has-site-footer {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

body.has-site-footer .app {
  flex: 1 0 auto;
}

.app {
  width: min(94vw, 1380px);
  max-width: 1380px;
  margin: 24px auto 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.88fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.hero_copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffc990;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #f8f3ed;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: clamp(1.72rem, 3.8vw, 2.6rem);
  line-height: 1.08;
}

.subtitle {
  max-width: 66ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.58;
}

.workflow_strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workflow_step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 209, 165, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(14, 16, 20, 0.82), rgba(8, 10, 14, 0.92)),
    radial-gradient(circle at 18% 10%, rgba(255, 185, 122, 0.08), transparent 42%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.workflow_step--primary {
  border-color: rgba(255, 209, 165, 0.36);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 185, 122, 0.18), transparent 46%),
    linear-gradient(155deg, rgba(46, 31, 22, 0.92), rgba(11, 14, 19, 0.96));
}

.workflow_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffd39f;
  font-size: 1.28rem;
  flex: 0 0 auto;
}

.workflow_label {
  margin: 0 0 4px;
  color: #ffbe81;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workflow_title {
  margin: 0;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: 0.98rem;
  line-height: 1.25;
}

.studio_workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.94fr) minmax(360px, 1.08fr) minmax(320px, 0.98fr);
  gap: 18px;
  align-items: start;
}

.panel,
.controls_shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(162deg, rgba(10, 11, 14, 0.78), rgba(6, 7, 10, 0.9)),
    radial-gradient(circle at 88% 0%, rgba(255, 185, 122, 0.08), transparent 40%),
    radial-gradient(circle at 10% 120%, rgba(181, 104, 58, 0.08), transparent 46%);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.upload_panel,
.preview_panel,
.controls_shell {
  padding: 18px;
  min-height: 100%;
}

.panel_head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section_head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel_kicker,
.section_kicker {
  margin: 0 0 6px;
  color: #ffbe81;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel_head h2,
.section_head h2,
.section_head h3 {
  margin: 0;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.2;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.panel_head p:last-child,
.section_head p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 52ch;
  font-size: 0.93rem;
  line-height: 1.55;
  font-weight: 400;
}

.upload_panel > .panel_head,
.preview_panel > .panel_head,
.studio_section_head {
  margin-bottom: 0;
}

.active_preset {
  flex: 0 0 auto;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(32, 24, 19, 0.8), rgba(15, 17, 22, 0.78));
  color: #ffe2c2;
  font-size: 0.8rem;
  font-weight: 560;
  white-space: nowrap;
}

.upload_panel,
.preview_panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drop_zone {
  position: relative;
  min-height: 210px;
  border: 1px dashed rgba(255, 196, 142, 0.44);
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(14, 16, 20, 0.94), rgba(8, 9, 13, 0.98)),
    radial-gradient(circle at 20% 10%, rgba(255, 185, 122, 0.1), transparent 50%);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.file_input_proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.drop_zone:hover,
.drop_zone:focus-visible,
.drop_zone.is-dragover {
  border-color: rgba(255, 213, 170, 0.9);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 196, 142, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.34);
}

.drop_inner {
  max-width: 30rem;
}

.drop_kicker {
  margin: 0 0 8px;
  color: #ffbe81;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.drop_inner h2 {
  margin: 0;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.12;
}

.drop_inner p {
  margin: 12px auto 0;
  color: var(--muted);
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.55;
}

.primary_button,
.ghost_button,
.preset_chip {
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.primary_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.88rem 1.18rem;
  border-radius: 999px;
  border-color: rgba(255, 206, 159, 0.54);
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 235, 210, 0.2), transparent 52%),
    linear-gradient(145deg, rgba(48, 32, 23, 0.94), rgba(18, 22, 30, 0.92));
  color: #fff0dd;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 247, 235, 0.08);
}

.drop_inner .primary_button {
  margin-top: 18px;
}

.primary_button:hover,
.ghost_button:hover,
.preset_chip:hover {
  transform: translateY(-1px);
}

.ghost_button {
  padding: 0.76rem 1rem;
  border-radius: 999px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #f1dfcb;
}

.primary_button:disabled,
.ghost_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.asset_meta {
  padding: 16px;
  border: 1px solid rgba(255, 209, 165, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.asset_meta h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.asset_meta p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.preset_section {
  padding: 16px;
  border: 1px solid rgba(255, 209, 165, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.preset_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preset_head h3 {
  margin: 0;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: 1rem;
}

.preset_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset_chip {
  padding: 0.66rem 0.9rem;
  border-radius: 999px;
  border-color: rgba(255, 209, 165, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #f1ddc7;
  font-size: 0.9rem;
  font-weight: 540;
}

.preset_chip.is-active {
  border-color: rgba(255, 209, 165, 0.5);
  background:
    linear-gradient(145deg, rgba(70, 42, 24, 0.86), rgba(21, 19, 21, 0.88));
  color: #fff4e8;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.preview_stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.track_card,
.export_card {
  border: 1px solid rgba(255, 209, 165, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
}

.export_card {
  background:
    linear-gradient(155deg, rgba(19, 14, 14, 0.94), rgba(11, 14, 18, 0.92)),
    radial-gradient(circle at 18% 10%, rgba(255, 185, 122, 0.08), transparent 44%);
  border-color: rgba(255, 209, 165, 0.18);
}

.track_head,
.export_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.track_head h3,
.export_head h3 {
  margin: 0;
  font-family: "Sora", "Outfit", Arial, sans-serif;
  font-size: 1rem;
}

.track_toggle {
  min-width: 102px;
}

.track_surface {
  border: 1px solid rgba(255, 209, 165, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(10, 11, 15, 0.86), rgba(8, 9, 12, 0.96)),
    radial-gradient(circle at 16% 10%, rgba(255, 185, 122, 0.08), transparent 46%);
  padding: 10px;
}

.track_wave {
  min-height: 72px;
}

.track_note,
.render_hint,
.export_text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.track_time,
.render_state,
.render_summary {
  color: #ffe0bc;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.export_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.controls_shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.controls_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.control_section {
  border: 1px solid rgba(255, 209, 165, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014)),
    radial-gradient(circle at 88% 0%, rgba(255, 185, 122, 0.06), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.16);
  padding: 17px 18px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.control_section .section_head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 209, 165, 0.08);
}

.control_section .section_head h3 {
  font-size: clamp(0.98rem, 1.05vw, 1.1rem);
  font-weight: 620;
}

.control_stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control_row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 10px 11px;
  border: 1px solid rgba(255, 209, 165, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at 14% 0%, rgba(255, 185, 122, 0.03), transparent 42%);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.control_row:hover,
.control_row:focus-within {
  border-color: rgba(255, 209, 165, 0.16);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    radial-gradient(circle at 14% 0%, rgba(255, 185, 122, 0.05), transparent 42%);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.control_meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.control_label {
  font-size: 0.88rem;
  color: rgba(244, 239, 232, 0.92);
  font-weight: 430;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.control_value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.18rem 0.56rem;
  border: 1px solid rgba(255, 209, 165, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #ffd0a1;
  font-size: 0.79rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: var(--range-track-height);
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 185, 122, 0.95) 0%,
      rgba(255, 199, 144, 0.9) var(--range-percent, 50%),
      rgba(255, 255, 255, 0.12) var(--range-percent, 50%),
      rgba(255, 255, 255, 0.08) 100%
    );
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--range-thumb-size);
  height: var(--range-thumb-size);
  margin-top: calc((var(--range-track-height) - var(--range-thumb-size)) / 2);
  border-radius: 50%;
  border: 1px solid rgba(255, 233, 208, 0.72);
  background: linear-gradient(145deg, #ffd8b0, #ffab5e);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 245, 232, 0.7);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.03);
}

input[type="range"]::-moz-range-track {
  height: var(--range-track-height);
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

input[type="range"]::-moz-range-progress {
  height: var(--range-track-height);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 185, 122, 0.95), rgba(255, 199, 144, 0.9));
}

input[type="range"]::-moz-range-thumb {
  width: var(--range-thumb-size);
  height: var(--range-thumb-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 233, 208, 0.72);
  background: linear-gradient(145deg, #ffd8b0, #ffab5e);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 245, 232, 0.7);
}

@media (max-width: 1240px) {
  .app {
    width: min(100%, calc(100% - 10px));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .workflow_strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .studio_workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "upload controls"
      "preview controls";
  }

  .upload_panel {
    grid-area: upload;
  }

  .controls_shell {
    grid-area: controls;
    position: sticky;
    top: 92px;
  }

  .preview_panel {
    grid-area: preview;
  }

  .controls_grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .workflow_strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio_workspace {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .upload_panel,
  .controls_shell,
  .preview_panel {
    grid-area: auto;
  }

  .controls_shell {
    position: static;
  }
}

@media (max-width: 1024px) {
  body {
    padding: 18px 8px 24px;
  }

  .app {
    width: min(100%, calc(100% - 10px));
    margin-top: 74px;
    margin-bottom: 20px;
  }

  .studio_workspace {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .upload_panel,
  .controls_shell,
  .preview_panel {
    grid-area: auto;
  }

  .controls_shell {
    position: static;
  }

  .panel_head,
  .section_head,
  .track_head,
  .export_head,
  .preset_head {
    flex-direction: column;
    align-items: flex-start;
  }

  .active_preset,
  .track_toggle,
  .primary_button,
  .ghost_button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  body {
    padding: 18px 4px 22px;
  }

  .app {
    width: min(100%, calc(100% - 8px));
    margin-top: 66px;
  }

  .hero {
    gap: 14px;
  }

  .workflow_strip {
    grid-template-columns: 1fr;
  }

  .upload_panel,
  .preview_panel,
  .controls_shell {
    padding: 14px;
    border-radius: 22px;
  }

  .panel_head,
  .section_head,
  .track_head,
  .export_head,
  .preset_head {
    flex-direction: column;
    align-items: flex-start;
  }

  .control_meta {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .active_preset,
  .track_toggle,
  .primary_button,
  .ghost_button {
    width: 100%;
  }

  .controls_grid {
    grid-template-columns: 1fr;
  }

  .export_actions {
    flex-direction: column;
  }
}
