/* Jingle-Studio */
:root {
  color-scheme: dark;
  --bg: #13232F;
  --panel: #1D3546;
  --line: #36556A;
  --orange: #FF8819;
  --on-orange: #13232F;
  --fg: #EAF2F6;
  --muted: #A9BFCC;
  --err: #FFB4A1;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.5 Bahnschrift, 'DIN Alternate', 'Segoe UI', system-ui, sans-serif;
}
button, input, textarea, summary { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.jg {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 56px;
  grid-template-areas: 'head head' 'steps out';
  max-width: 1120px; margin: 0 auto; padding: 40px 24px 64px;
}
.jg-head { grid-area: head; margin-bottom: 36px; }
.jg-head h1 { margin: 0 0 6px; font-size: 46px; line-height: 1.1; font-weight: 700; color: var(--orange); }
.jg-head p { margin: 0; max-width: 62ch; color: var(--muted); }

/* Die Schritte hängen an einer Linie: erst 1, dann 2, dann 3 */
.jg-steps { grid-area: steps; min-width: 0; }
.jg-step { position: relative; padding: 0 0 36px 52px; }
.jg-step::before { content: ''; position: absolute; left: 16px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.jg-step:last-child::before { display: none; }
.jg-step h2 { margin: 0 0 14px; font-size: 23px; line-height: 34px; font-weight: 600; }
.jg-step h2 span {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--orange); color: var(--on-orange); font-size: 18px; font-weight: 700;
}

.jg-chips, .jg-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.jg-tabs { margin-bottom: 14px; }
.jg-chips button, .jg-tabs button {
  min-height: 42px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 6px;
  background: transparent; cursor: pointer; font-weight: 600;
}
.jg-chips button:hover, .jg-tabs button:hover { border-color: var(--orange); }
.jg-chips button.on, .jg-tabs button.on { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

.jg-text { display: block; margin: 18px 0 6px; font-weight: 600; }
textarea {
  display: block; width: 100%; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
}
.note { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.note:empty { display: none; }
.jg-rights { margin-top: 14px; }

.jg-voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; margin-top: 10px; padding: 2px; }
.jg-voices:empty { display: none; }
.jg-voice { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.jg-voice:hover { border-color: var(--orange); }
.jg-voice.on { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.jg-voice button { border: 0; background: none; cursor: pointer; }
.jg-voice .play { flex: none; width: 44px; color: var(--orange); }
.jg-voice .play:disabled { color: var(--line); cursor: default; }
.jg-voice .pick { flex: 1; min-width: 0; padding: 8px 10px 8px 0; text-align: left; }
.jg-voice b, .jg-voice small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-voice b { font-weight: 600; }
.jg-voice small { color: var(--muted); font-size: 14px; }

.jg-file { display: block; margin-top: 14px; font-size: 15px; }
.jg-file input { display: block; width: 100%; margin-top: 6px; color: var(--muted); }
.jg-fine { margin-top: 16px; }
.jg-fine summary { cursor: pointer; font-weight: 600; }
.jg-range, .check { display: block; margin-top: 10px; }
.jg-range input { display: block; width: min(100%, 320px); margin-top: 4px; accent-color: var(--orange); }
.check input { accent-color: var(--orange); }

/* Rechts bleibt immer der Knopf im Blick, darunter das Ergebnis */
.jg-out {
  grid-area: out; align-self: start; position: sticky; top: 24px;
  padding: 20px; border-radius: 10px; background: var(--panel);
}
.btn {
  display: inline-block; min-height: 44px; padding: 9px 18px; border: 1px solid var(--orange); border-radius: 6px;
  background: transparent; color: var(--fg); font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--orange); color: var(--on-orange); }
.btn.big { display: block; width: 100%; padding: 14px; background: var(--orange); color: var(--on-orange); font-size: 21px; font-weight: 700; }
.btn.big:hover { background: #FF9C40; }
.btn:disabled { opacity: .6; cursor: progress; }
.err { margin: 12px 0 0; color: var(--err); font-size: 15px; }
#jg-wave { display: block; width: 100%; height: 110px; margin-top: 16px; border-radius: 6px; background: var(--bg); }
#jg-empty { text-align: center; }
#jg-audio { display: block; width: 100%; height: 40px; margin-top: 14px; }
.jg-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; margin: 14px 0; }
.jg-stats dt { color: var(--muted); font-size: 14px; }
.jg-stats dd { margin: 0; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
#jg-download { display: block; width: 100%; }

.jg-logout { float: right; }
.jg-logout button { padding: 6px 0; border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; }
.jg-login { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; }
.jg-login h1 { margin: 0 0 24px; font-size: 40px; line-height: 1.1; font-weight: 700; color: var(--orange); }
.jg-login label { display: block; margin-bottom: 6px; font-weight: 600; }
.jg-login input { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.jg-login .btn { margin-top: 16px; }

@media (max-width: 860px) {
  .jg { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'steps' 'out'; padding: 24px 16px 40px; }
  .jg-head { margin-bottom: 24px; }
  .jg-head h1 { font-size: 36px; }
  .jg-out { position: static; }
  .jg-step { padding-left: 46px; }
}
