.app-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 10px;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
}

/* AI Convenience unified app navigation */
.app-nav {
  justify-content: space-between;
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
}

.app-home-chip,
.app-nav-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
  color: #dce4ef;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.02em;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.app-home-chip {
  color: #ff8a3d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-home-chip:hover,
.app-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 61, .42);
  background: rgba(255, 138, 61, .08);
  color: #ffffff;
}

.app-nav-btn.is-active,
.app-nav-btn[aria-current="page"] {
  pointer-events: none;
  cursor: default;
  border-color: rgba(255, 138, 61, .62);
  background: rgba(255, 138, 61, .1);
  color: #ff8a3d;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 61, .08);
}

.app-brand {
  color: #78ffe7;
  font-weight: 950;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.app-nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.app-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #d9fbff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid rgba(217, 251, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.app-nav-btn:hover {
  background: rgba(94, 234, 212, 0.14);
  border-color: rgba(94, 234, 212, 0.38);
}

.app-nav-btn.is-active,
.app-nav-btn[aria-current="page"] {
  pointer-events: none;
  cursor: default;
  background: rgba(94, 234, 212, 0.18);
  border-color: rgba(94, 234, 212, 0.52);
  color: #ffffff;
}

:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #151619;
  --panel-2: #1b1d22;
  --ink: #eef4ff;
  --muted: #a3a8b2;
  --line: #30333a;
  --accent: #39d0c8;
  --accent-strong: #7ee8dd;
  --gold: #f5c45e;
  --field: #101216;
  --field-strong: #1d2026;
  --shadow: 0 22px 60px rgba(0, 0, 0, .38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(145deg, #07080a 0%, var(--bg) 52%, #101114 100%);
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  height: auto;
  margin: 0 auto;
  padding: 22px 0 30px;
  overflow: visible;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 82px);
  height: auto;
}

.settings-panel,
.output-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 0;
}

.settings-panel {
  padding: 20px;
  background: linear-gradient(180deg, rgba(21, 22, 25, .98), rgba(12, 13, 16, .98));
  overflow-y: auto;
}

.output-panel {
  padding: 22px;
  background: linear-gradient(180deg, rgba(21, 22, 25, .97), rgba(10, 11, 14, .98));
  overflow-y: auto;
}

.settings-panel,
.output-panel {
  scrollbar-color: #4b5565 #111317;
  scrollbar-width: thin;
}

.settings-panel::-webkit-scrollbar,
.output-panel::-webkit-scrollbar {
  width: 10px;
}

.settings-panel::-webkit-scrollbar-track,
.output-panel::-webkit-scrollbar-track {
  background: #111317;
  border-radius: 999px;
}

.settings-panel::-webkit-scrollbar-thumb,
.output-panel::-webkit-scrollbar-thumb {
  background: #4b5565;
  border: 2px solid #111317;
  border-radius: 999px;
}

.brand-row,
.output-toolbar,
.track-head {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #24262d, #0f766e);
  color: #ffcf5a;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .3);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

.brand-row p,
.output-toolbar p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.brand-row .app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  color: #7f8794;
  font-size: 12px;
}

.app-meta a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 800;
}

.app-meta a:hover {
  text-decoration: underline;
}

.app-meta .support-link {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 2px;
  padding: 1px 6px;
  border: 1px solid rgba(245, 196, 94, .32);
  border-radius: 999px;
  background: rgba(245, 196, 94, .06);
  color: #d8bb73;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
}

.app-meta .support-link:hover {
  background: rgba(245, 196, 94, .14);
  border-color: rgba(245, 196, 94, .58);
  color: #ffd977;
  text-decoration: none;
}

.control-grid {
  display: grid;
  gap: 14px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid rgba(57, 208, 200, .14);
  border-radius: 8px;
  background: rgba(16, 18, 22, .58);
}

.settings-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

#settingsStatus {
  min-height: 18px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-switch legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #c8d4e5;
  font-size: 13px;
  font-weight: 800;
}

.mode-switch label {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mode-switch span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--muted);
  font-weight: 900;
}

.mode-switch input:checked + span {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(57, 208, 200, .18), rgba(245, 196, 94, .08));
  color: var(--accent-strong);
}

.is-hidden {
  display: none !important;
}

label,
.range-field {
  display: grid;
  gap: 7px;
  color: #c8d4e5;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 208, 200, .16);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #15171c;
  color: #607086;
  cursor: not-allowed;
}

.genre-picker-button {
  justify-content: space-between;
  width: 100%;
  text-align: left;
}

.genre-picker-button::after {
  content: "선택";
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.55;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.blend-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(57, 208, 200, .16);
  border-radius: 8px;
  background: rgba(16, 18, 22, .72);
}

.range-field span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

output {
  color: var(--gold);
  font-weight: 900;
}

.range-field.is-disabled {
  opacity: .45;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field-strong);
  color: var(--ink);
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

button.copied {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.output-toolbar {
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.output-toolbar h2 {
  font-size: 24px;
}

.results {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.track-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(27, 29, 34, .96), rgba(14, 15, 18, .96));
  overflow: hidden;
}

.track-head {
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(57, 208, 200, .13), rgba(245, 196, 94, .08));
  border-bottom: 1px solid var(--line);
}

.track-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(9, 13, 20, .72);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.track-head h3 {
  margin-top: 7px;
  font-size: 18px;
}

.track-help {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.copy-track {
  flex: 0 0 auto;
}

.prompt-block {
  padding: 16px 18px 18px;
}

.prompt-block h4 {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font: 14px/1.7 "Consolas", "D2Coding", monospace;
  color: #dde8f7;
}

.modal-open {
  overflow: hidden;
}

.genre-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 6, 14, .72);
  backdrop-filter: blur(10px);
}

.genre-modal[hidden] {
  display: none;
}

.genre-modal-panel {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(126, 232, 221, .22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 20, 25, .98), rgba(9, 11, 16, .98));
  box-shadow: var(--shadow);
}

.genre-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.genre-modal-head p {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.genre-modal-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.03em;
}

.genre-modal-head button {
  min-width: 72px;
}

.genre-modal-search input {
  min-height: 46px;
  border-color: rgba(126, 232, 221, .28);
  background: rgba(255, 255, 255, .04);
}

.genre-group-list {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding-right: 6px;
}

.genre-group {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.genre-group h3 {
  margin: 0;
  color: #d7e3ee;
  font-size: 13px;
  font-weight: 900;
}

.genre-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.genre-choice {
  min-height: 38px;
  padding: 7px 10px;
  color: #dce8f6;
  font-size: 13px;
  text-align: left;
  background: rgba(16, 18, 22, .9);
}

.genre-choice.is-selected {
  border-color: var(--accent);
  background: rgba(57, 208, 200, .16);
  color: #ffffff;
}

.genre-choice.is-none {
  width: auto;
  min-height: 38px;
  color: #9fb0be;
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  .app-shell {
    width: min(100% - 22px, 1180px);
    padding: 12px 0;
    height: auto;
    overflow: visible;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .settings-panel,
  .output-panel {
    overflow: visible;
  }

  .output-panel {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .app-nav {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 24px, 1120px);
  }

  .app-nav-links {
    width: 100%;
  }

  .app-nav-links .app-nav-btn {
    flex: 1;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .output-toolbar,
  .track-head {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .settings-actions button,
  .genre-modal-head button,
  .genre-choice.is-none {
    width: auto;
  }

  .genre-modal {
    padding: 12px;
  }

  .genre-choice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Unified AI Convenience app menu */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 12px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  isolation: isolate;
}

.app-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(5, 6, 8, .92), rgba(5, 6, 8, .28) 72%, rgba(5, 6, 8, 0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
}

.app-nav > * {
  position: relative;
  z-index: 1;
}

.app-nav-links {
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.app-home-chip,
.app-nav-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
  color: #dce4ef;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.app-home-chip {
  color: #ff8a3d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.app-home-chip:hover,
.app-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 61, .42);
  background: rgba(255, 138, 61, .08);
  color: #ffffff;
}

.app-nav-btn.is-active,
.app-nav-btn[aria-current="page"] {
  pointer-events: none;
  cursor: default;
  border-color: rgba(255, 138, 61, .62);
  background: rgba(255, 138, 61, .1);
  color: #ff8a3d;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 61, .08);
}

@media (max-width: 700px) {
  .app-nav {
    align-items: stretch;
    flex-direction: column;
    width: min(100% - 22px, 560px);
  }

  .app-home-chip {
    min-height: 34px;
    width: fit-content;
  }

  .app-nav-links {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Wavenox Suno Studio visual system, kept local to the free browser app. */
:root {
  --bg: #101010;
  --panel: #171717;
  --panel-2: #1b1b1b;
  --ink: #f3f3f3;
  --muted: #9299a3;
  --line: #353535;
  --accent: #e56a2e;
  --accent-strong: #f08a55;
  --gold: #e9a06f;
  --field: #141414;
  --field-strong: #1d1d1d;
  --shadow: 0 18px 44px rgba(0, 0, 0, .24);
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    radial-gradient(circle at 16% 4%, rgba(229, 106, 46, .08), transparent 28%),
    #101010;
  background-size: 36px 36px, 36px 36px, auto, auto;
  font-family: "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
}

.app-shell,
.app-nav {
  width: min(1280px, calc(100% - 32px));
}

.workspace {
  grid-template-columns: minmax(350px, .74fr) minmax(0, 1.26fr);
  gap: 16px;
}

.settings-panel,
.output-panel {
  border-color: #353535;
  border-radius: 4px;
  background: rgba(23, 23, 23, .96);
  box-shadow: var(--shadow);
}

.settings-panel,
.output-panel {
  padding: 20px;
}

.brand-row.package-intro {
  display: block;
  padding-bottom: 16px;
  border-bottom-color: #353535;
}

.package-version-label,
.output-label,
.studio-section-heading > span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-row h1 {
  font-size: clamp(24px, 2vw, 30px);
  letter-spacing: -.04em;
}

.brand-row > div > p:not(.app-meta) {
  max-width: 500px;
  margin-top: 8px;
  color: #a4a9b0;
  font-size: 13px;
  line-height: 1.6;
}

.brand-row .app-meta {
  margin-top: 10px;
}

.app-meta a {
  color: var(--accent-strong);
}

.app-meta .support-link {
  min-height: 24px;
  padding: 2px 9px;
  border-color: rgba(229, 106, 46, .42);
  border-radius: 999px;
  color: #f0aa80;
  background: rgba(229, 106, 46, .09);
}

.free-local-notice {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(229, 106, 46, .28);
  border-radius: 4px;
  background: rgba(229, 106, 46, .06);
}

.free-local-notice strong {
  color: #f2f2f2;
  font-size: 13px;
}

.free-local-notice span {
  color: #969da6;
  font-size: 11px;
  line-height: 1.5;
}

.control-grid {
  gap: 12px;
}

.settings-actions,
.blend-panel,
.studio-section {
  border-color: #343434;
  border-radius: 4px;
  background: rgba(20, 20, 20, .76);
}

.studio-section {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.studio-section-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid #303030;
}

.studio-section-heading > span {
  margin-bottom: 4px;
}

.studio-section-heading h2 {
  font-size: 16px;
  letter-spacing: -.02em;
}

.studio-section-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.mode-switch span,
input,
select,
textarea,
button {
  border-radius: 4px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 106, 46, .14);
}

select optgroup {
  color: #f2a274;
  background: #171717;
}

.mode-switch input:checked + span {
  border-color: rgba(229, 106, 46, .68);
  color: #fff;
  background: rgba(229, 106, 46, .11);
}

.genre-picker-button::after,
output {
  color: var(--accent-strong);
}

.output-toolbar {
  display: block;
}

.output-toolbar h2 {
  font-size: clamp(24px, 2.3vw, 32px);
  letter-spacing: -.04em;
}

.track-card {
  border-radius: 4px;
  background: #181818;
}

.track-head {
  background: linear-gradient(135deg, rgba(229, 106, 46, .12), rgba(23, 23, 23, .78));
}

.track-label {
  border-radius: 4px;
  color: #f19a69;
  background: #111;
}

.prompt-block h4 {
  color: #e98550;
}

.copy-track:hover,
.settings-actions button:hover {
  border-color: rgba(229, 106, 46, .7);
  color: #fff;
}

.genre-modal-panel,
.genre-group,
.genre-choice {
  border-radius: 4px;
}

.genre-choice.is-selected {
  border-color: var(--accent);
  color: #fff;
  background: rgba(229, 106, 46, .14);
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell,
  .app-nav {
    width: min(100% - 22px, 560px);
  }

  .settings-panel,
  .output-panel {
    padding: 15px;
  }
}
