/* קריוקי אביתר — שפה עיצובית "מאחורי הקלעים": כהה וחמים, ענבר כצבע מבטא, אייקוני קו. */
:root {
  --bg: #111010;
  --surface: #1A1918;
  --surface2: #24211E;
  --line: #2E2B28;
  --line2: #3A3632;
  --text: #F2EEE8;
  --text2: #A39C93;
  --soft: #CFC8BF;
  --dim: #7D766E;
  --accent: #FFB547;
  --accent-hi: #FFD08A;
  --accent-ink: #1A1206;
  --ok: #8FD694;
  --err: #FF7A6B;
  --display: 'Karantina', 'IBM Plex Sans Hebrew', sans-serif;
  --sans: 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'IBM Plex Sans Hebrew', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); min-height: 100vh; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-hi); }
.ic { flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 1240px; margin: 0 auto; padding: 0 32px 140px; }
#app.home { max-width: 1120px; }

/* ---------- טיפוגרפיה ---------- */
.display { font-family: var(--display); font-weight: 700; line-height: 1; }
h1, h2, h3 { margin: 0; }
h2.d, .d-h { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; }
.mono { font-family: var(--mono); }
.muted { color: var(--text2); }
.hint { font-size: 14px; color: var(--text2); line-height: 1.55; }
.hint b { color: var(--text); font-weight: 600; }
.ltr { direction: ltr; text-align: left; }
.kbd, kbd { display: inline-block; font-family: var(--mono); font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--bg); color: var(--soft); direction: ltr; }

/* ---------- כפתורים ---------- */
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: transparent;
  color: var(--text); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--surface2); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: default; transform: none; }
.btn:focus-visible, .tab:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--accent-ink); }
.btn.big { min-height: 56px; padding: 0 26px; border-radius: 14px; font-size: 17px; }
.btn.filled { background: var(--surface); }
.btn.ghost { border-color: transparent; color: var(--soft); }
.btn.ghost:hover { background: var(--surface2); }
.btn.small { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.btn.danger:hover { border-color: var(--err); color: var(--err); background: rgba(255, 122, 107, .08); }
.iconbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 10px; }
.iconbtn.small { width: 36px; height: 36px; min-height: 36px; }
.iconbtn.round { border-radius: 50%; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--soft); cursor: pointer; font-size: 15px; }
.pill:hover { background: var(--surface2); }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.card.tight { padding: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 2px; }

input[type=text], input[type=url], input[type=search], input[type=password], input[type=number], select, textarea {
  background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 14px; outline: none; width: 100%; color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); white-space: nowrap; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.badge.ok .dot { background: var(--accent); }
.badge.run .dot { background: var(--accent); animation: blink 1s ease-in-out infinite; }
.badge.err { color: var(--err); }
.badge.err .dot { background: var(--err); }
@keyframes blink { 50% { opacity: .25; } }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--soft); white-space: nowrap; }

/* ---------- בית ---------- */
.topnav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand .ic { color: var(--accent); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.brand:hover { color: var(--text); }
.navlinks { display: flex; align-items: center; gap: 8px; }
.navlinks a { color: var(--soft); text-decoration: none; font-size: 16px; padding: 12px 4px; }
.hero { padding: 64px 0 40px; }
.eyebrow { margin: 0 0 20px; font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: var(--accent); }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(72px, 10vw, 136px); line-height: .88; letter-spacing: -.01em; }
.hero .lead { margin: 24px 0 0; max-width: 580px; font-size: 19px; line-height: 1.6; color: #B5ADA3; }
.newbox { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; transition: border-color .15s; }
.newbox.over { border-color: var(--accent); }
.newbox .field { flex: 1 1 420px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; background: var(--bg); border-radius: 14px; min-height: 64px; color: var(--dim); }
.newbox .field input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0; font-family: var(--mono); font-size: 16px; text-align: left; direction: ltr; border-radius: 0; }
.newbox .field .file { flex: 1; min-width: 0; color: var(--text); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newbox .go { min-height: 64px; padding: 0 32px; border-radius: 14px; font-size: 18px; }
.newopts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { min-height: 44px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--text2); font-size: 15px; cursor: pointer; }
.seg button[aria-checked=true] { background: #2C2926; color: var(--text); }
.steps4 { list-style: none; margin: 72px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps4 li { flex: 1 1 220px; border-top: 1px solid var(--line); padding-top: 18px; }
.steps4 .n { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.steps4 .t { margin-top: 8px; font-weight: 600; font-size: 18px; }
.steps4 .d { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--text2); }
.libhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 96px 0 20px; }
.libhead h2 { font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1; }
.searchbox { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex: 0 1 280px; color: var(--dim); }
.searchbox input { border: 0; background: transparent; padding: 10px 0; border-radius: 0; font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pcard { position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; cursor: pointer; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--line2); transform: translateY(-2px); color: var(--text); }
.pcard .thumb { position: relative; aspect-ratio: 16 / 9; background: #0B0A09 center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px 18px; text-align: center; }
.pcard .thumb .tt { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, .75); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pcard .playdot { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 50%; background: rgba(11, 10, 9, .72); color: var(--text); display: flex; align-items: center; justify-content: center; }
.pcard .del { position: absolute; top: 10px; inset-inline-start: 10px; width: 32px; height: 32px; min-height: 32px; border-radius: 50%; background: rgba(11, 10, 9, .72); border: 0; opacity: 0; transition: opacity .15s; }
.pcard:hover .del, .pcard .del:focus-visible { opacity: 1; }
.pcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.pcard .t { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .a { margin-top: 2px; font-size: 14px; color: var(--text2); min-height: 21px; }
.pcard .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.emptylib { color: var(--text2); padding: 24px 0; }

/* ---------- כותרת שיר ושלבים ---------- */
.phead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 20px; }
.phead .who { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 400px; }
.phead .names { min-width: 0; flex: 1; }
.phead input.title { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; padding: 2px 8px; margin: 0 -9px; border: 1px solid transparent; border-radius: 10px; background: transparent; width: 100%; max-width: 760px; }
.phead .sub { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 15px; color: var(--text2); }
.phead input.artist { font-size: 15px; color: var(--text2); padding: 2px 8px; margin: 0 -9px; border: 1px solid transparent; border-radius: 8px; background: transparent; width: auto; min-width: 60px; max-width: 320px; field-sizing: content; }
.phead input.title:hover, .phead input.artist:hover { border-color: var(--line2); }
.phead input.title:focus, .phead input.artist:focus { border-color: var(--accent); background: var(--bg); }
.phead .acts { display: flex; align-items: center; gap: 12px; }
.stepnav { display: flex; flex-wrap: wrap; gap: 4px 32px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.stepnav .tab { display: flex; align-items: center; gap: 10px; padding: 14px 0 12px; color: var(--text2); font-size: 16px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.stepnav .tab .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; }
.stepnav .tab.done { color: var(--soft); }
.stepnav .tab.done .n { border: 0; background: #2A2724; color: var(--accent); }
.stepnav .tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.stepnav .tab.on .n { border: 0; background: var(--accent); color: var(--accent-ink); }
.stepnav .tab:disabled { opacity: .4; cursor: default; }

/* התקדמות */
.progress-wrap { max-width: 680px; margin: 40px auto; text-align: center; }
.progress-wrap .bigicon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.progress-wrap .bigicon.spin .ic { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.progress-wrap h2 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.05; }
.bar { position: relative; height: 10px; background: #2A2724; border-radius: 99px; overflow: hidden; margin: 18px 0 10px; }
.bar > i { position: absolute; top: 0; bottom: 0; right: 0; width: 0; background: var(--accent); border-radius: 99px; transition: width .4s; }
.big-pct { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--accent); }
pre.err { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 12px; max-height: 200px; overflow: auto; text-align: left; direction: ltr; font-family: var(--mono); font-size: 12px; color: var(--soft); }
.jobcard { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line2); border-radius: 16px; }
.jobcard.err { border-color: var(--err); }
.jobcard .bar { margin: 2px 0; height: 6px; }

/* ---------- שלב 1 ---------- */
.mixwrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.mixwrap > .mix { flex: 999 1 600px; min-width: 0; }
.mixwrap > .key { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; }
.sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.mixgrid { display: flex; flex-wrap: wrap; gap: 16px; }
.stem { flex: 1 1 180px; background: var(--bg); border: 1px solid #262320; border-radius: 16px; padding: 22px 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.stem .name { font-weight: 600; font-size: 18px; }
.stem .desc { margin-top: 2px; font-size: 14px; color: var(--text2); }
.stem .val { font-family: var(--display); font-weight: 700; font-size: 56px; line-height: .9; color: var(--text); }
.stem.off .val { color: #6E675F; }
.stem .btns { display: flex; gap: 8px; }
.stem .btns .on { border-color: var(--accent); color: var(--accent); }
/* פיידר אנכי: 0% למטה, 150% למעלה, קו סימון ב-100% */
.fader { position: relative; width: 44px; height: 200px; display: flex; justify-content: center; touch-action: none; cursor: ns-resize; }
.fader .track { position: relative; width: 8px; height: 100%; border-radius: 4px; background: #2A2724; overflow: hidden; }
.fader .fill { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); }
.fader .unity { position: absolute; left: 0; right: 0; height: 2px; background: var(--dim); opacity: .7; }
.fader .unity::after { content: '100'; position: absolute; inset-inline-start: 50px; top: -8px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.fader .thumb { position: absolute; left: 4px; width: 36px; height: 20px; border-radius: 6px; background: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.fader input { position: absolute; inset: 0; opacity: 0; cursor: ns-resize; writing-mode: vertical-lr; direction: rtl; width: 100%; height: 100%; margin: 0; }
.fader:focus-within .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.pitchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; direction: ltr; }
.pitchrow .iconbtn { width: 56px; height: 56px; background: var(--bg); }
.pitchval { font-family: var(--display); font-weight: 700; font-size: 128px; line-height: .85; color: var(--accent); text-align: center; min-width: 120px; direction: ltr; }
.pitchval.live { color: var(--accent-hi); }
.pdesc { text-align: center; margin-top: 10px; font-size: 15px; color: var(--soft); }
.pstate { text-align: center; margin-top: 2px; font-size: 13px; color: var(--text2); min-height: 20px; }
.ticks { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 24px; padding: 0 4px; direction: ltr; }
.ticks button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.ticks i { display: block; width: 2px; height: 12px; border-radius: 2px; background: #4A4540; }
.ticks button.zero i { height: 22px; background: var(--soft); }
.ticks button.cur i { width: 4px; height: 30px; background: var(--accent); }
.ticks button.act:not(.cur) i { background: var(--accent-hi); opacity: .6; height: 18px; }
.ticks span { font-family: var(--mono); font-size: 11px; color: #8A837A; height: 14px; }
.ticks button:hover i { background: var(--soft); }
.keyfoot { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dlrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0; }
.dlrow .lbl { font-size: 14px; color: var(--text2); margin-inline-end: 4px; }
.infocard { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 24px; }
.infocard .q { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.infocard .q .ic { color: var(--accent); }

/* ---------- שלב 2 ---------- */
.twocol { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.twocol > .imgcol { flex: 1.2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.twocol > .lyrcol { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.twocol h2 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.imgprev, .preview { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.imgprev { border: 1px dashed #4A4540; }
.imgprev.over { border-color: var(--accent); }
.imgprev canvas, .preview canvas { width: 100%; height: 100%; display: block; }
textarea.lyrics { height: 400px; min-height: 260px; resize: vertical; padding: 16px 18px; border-radius: 14px; font-size: 17px; line-height: 1.9; }
.rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: #B5ADA3; }
.rules li { display: flex; gap: 10px; }
.rules .n { color: var(--accent); font-family: var(--mono); flex: none; }
.rules b { color: var(--text); font-weight: 600; }
.warnline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-hi); }

/* ---------- שלב 3 ---------- */
.editor-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.editor-top > .linescard { flex: 1 1 520px; min-width: 0; padding: 20px; display: flex; flex-direction: column; }
.editor-top > .prevcard { flex: 1 1 480px; min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.linescard .sechead { padding: 0 4px 12px; align-items: center; }
.linescard h2, .prevcard h2 { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1; }
.warnbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 181, 71, .45); background: rgba(255, 181, 71, .08); color: var(--accent-hi); font-size: 14px; cursor: pointer; }
.warnbtn:hover { background: rgba(255, 181, 71, .16); }
.warnbtn .go { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); padding-inline-start: 8px; border-inline-start: 1px solid rgba(255, 181, 71, .3); }
.saved { font-size: 13px; color: var(--text2); font-family: var(--mono); }
.lines { max-height: 440px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.lrow { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.lrow:hover { background: #1F1D1B; }
.lrow.now { background: var(--surface2); }
.lrow.now .num b { color: var(--accent); }
.lrow.break { margin-top: 10px; }
.lrow .num { min-width: 64px; font-family: var(--mono); font-size: 12px; color: var(--text2); }
.lrow .num b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--soft); font-weight: 500; }
.lrow .num .ic { color: var(--accent); }
.lrow .words { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 8px; background: var(--surface2); color: #E4DED6; cursor: pointer; font-size: 15px; border: 1px solid transparent; }
.chip:hover { border-color: var(--line2); }
.chip.sung { background: #3A3225; color: var(--accent-hi); }
.chip.sel { background: var(--accent); color: var(--accent-ink); }
.chip.vocal { font-style: italic; }
.chip.lock { box-shadow: inset 0 0 0 1px var(--accent-hi); }
.chip.lock::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; vertical-align: middle; }
.lrow .acts { display: flex; gap: 4px; opacity: .45; transition: opacity .15s; }
.lrow:hover .acts, .lrow.now .acts { opacity: 1; }
.prevcard .sechead { align-items: center; }
.prevcard .where { font-family: var(--mono); font-size: 13px; color: var(--text2); }
.tl-wrap { margin-top: 24px; padding: 16px 20px 20px; }
.tl-wrap canvas { width: 100%; display: block; border-radius: 12px; touch-action: none; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .help { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-weight: 700; font-family: var(--mono); }
.helpwrap { position: relative; }
.helppop { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 30; width: min(480px, calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; padding: 22px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.helppop .hh { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.helppop h2 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; }
.helppop .grp { margin: 14px 0 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); }
.helppop .hr { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.helppop .hr .how { display: flex; align-items: center; gap: 6px; color: var(--soft); white-space: nowrap; }
.inspector { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 14px; }
.inspector .lbl { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.inspector input.wtext { width: 160px; padding: 8px 12px; font-size: 16px; }
.tbox { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.tbox .k { font-size: 13px; color: var(--text2); padding: 0 6px; }
.tbox .tv { min-width: 60px; text-align: center; font-family: var(--mono); font-size: 14px; direction: ltr; }
.tbox .btn { min-height: 30px; width: 30px; padding: 0; border: 0; }
.tapping { outline: 2px solid var(--accent); box-shadow: 0 0 40px rgba(255, 181, 71, .18); }
.tapbanner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .45); padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 15px; }
.tapbanner b { color: var(--accent); font-size: 18px; }

/* ---------- שלב 4 ---------- */
.export-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.export-grid > .left { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.export-grid > .right { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.export-grid h2 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.preview .pplay { position: absolute; left: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(11, 10, 9, .72); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview .pplay:hover { background: var(--accent); color: var(--accent-ink); }
.preview .pfs { position: absolute; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 12px; border: 0; background: rgba(11, 10, 9, .72); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview .pfs:hover { background: var(--accent); color: var(--accent-ink); }
.preview .pplay, .preview .pfs { opacity: .85; transition: opacity .2s, background .15s; }
/* מסך מלא: הסרטון במרכז על שחור; הכפתורים עמומים עד שמצביעים עליהם */
.preview.fs { position: fixed; inset: 0; z-index: 100; aspect-ratio: auto; border-radius: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.preview.fs canvas { width: 100%; height: 100%; object-fit: contain; }
.preview.fs .pplay, .preview.fs .pfs { opacity: .25; }
.preview.fs .pplay:hover, .preview.fs .pfs:hover, .preview.fs .pplay:focus-visible, .preview.fs .pfs:focus-visible { opacity: 1; }
body.fs-open { overflow: hidden; }
body.fs-open .playerbar { display: none; }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
.style { text-align: right; padding: 0; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.style:hover:not(:disabled) { border-color: var(--line2); }
.style[aria-checked=true] { border-color: var(--accent); }
.style:disabled { opacity: .5; cursor: not-allowed; }
.style .sw { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; }
.style .sw .ln { position: absolute; left: 18%; right: 18%; height: 5px; border-radius: 3px; background: var(--text); opacity: .9; }
.style .sw .ln.a { bottom: 30%; background: linear-gradient(to left, var(--accent) 55%, var(--text) 55%); }
.style .sw .ln.b { bottom: 17%; }
.style .sw .ok { position: absolute; top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: none; align-items: center; justify-content: center; }
.style[aria-checked=true] .sw .ok { display: flex; }
.style .nm { padding: 10px 12px 0; font-weight: 600; font-size: 15px; }
.style .ds { padding: 2px 12px 12px; font-size: 13px; color: var(--text2); }
.setgroup + .setgroup { margin-top: 10px; }
.setgroup .gt { margin: 18px 0 2px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setgroup .setting:last-child { border-bottom: 0; }
.setting .lb { font-weight: 500; }
.setting .hint { font-size: 13px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; right: 3px; background: var(--text); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { right: 23px; background: var(--accent-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.numbox { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: 14px; }
.num-in { width: 76px !important; text-align: center; padding: 8px !important; direction: ltr; font-family: var(--mono); }
.rangebox { display: flex; align-items: center; gap: 12px; }
.rangebox input[type=range] { width: 150px; accent-color: var(--accent); cursor: pointer; }
.rangebox .v { font-family: var(--mono); font-size: 13px; color: var(--soft); min-width: 40px; }
.formats { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.fmt { display: flex; align-items: center; gap: 14px; text-align: right; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.fmt[aria-checked=true] { border-color: var(--accent); background: #211D17; }
.fmt .rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #5A544D; flex: none; display: flex; align-items: center; justify-content: center; }
.fmt[aria-checked=true] .rd { border-color: var(--accent); }
.fmt[aria-checked=true] .rd::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.fmt .fn { display: block; font-weight: 600; }
.fmt .fd { display: block; font-size: 13px; color: var(--text2); margin-top: 2px; }
.specline { margin: 12px 0 0; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--text2); }
.donecard { margin-top: 16px; padding: 16px; border-radius: 14px; border: 1px solid var(--accent); background: #211D17; display: flex; flex-direction: column; gap: 10px; }
.donecard .fname { font-family: var(--mono); font-size: 13px; color: var(--soft); word-break: break-all; }

/* ---------- נגן תחתון: צורת גל ---------- */
.playerbar {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(1176px, calc(100% - 32px)); z-index: 20;
  display: flex; align-items: center; gap: 20px; padding: 12px 20px; background: rgba(26, 25, 24, .94); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.playbtn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.playbtn:hover { background: var(--accent-hi); }
.ptime { font-family: var(--mono); font-size: 15px; min-width: 44px; text-align: center; direction: ltr; }
.ptime.dur { color: var(--text2); }
.wave { position: relative; flex: 1; min-width: 0; height: 44px; cursor: pointer; touch-action: none; }
.wave canvas { width: 100%; height: 100%; display: block; }
.wave:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.pinfo { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); color: var(--soft); flex: none; white-space: nowrap; }
.pinfo:empty { display: none; }

/* ---------- גישה מרחוק ---------- */
.remote { margin-top: 72px; }
.remote h2 { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.remote h2 .ic { color: var(--accent); }
.remote .setting:last-child { border-bottom: 0; }
.remote .setting { flex-wrap: wrap; }
.remote .pwrow input { width: 150px; flex: 1 1 120px; }
.remote code { font-family: var(--mono); background: var(--bg); border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; }

/* ---------- הודעות ---------- */
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-140px); background: var(--surface2); border: 1px solid var(--line2); padding: 12px 20px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: transform .3s; z-index: 70; font-weight: 500; max-width: calc(100vw - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--err); color: #FFD3CC; }
#updbar { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 10px 12px 10px 18px; border-radius: 14px; }

@media (max-width: 700px) {
  #app { padding: 0 16px 140px; }
  .phead input.title { font-size: 34px; }
  .playerbar { gap: 10px; padding: 10px 12px; width: calc(100% - 16px); bottom: 8px; }
  .ptime { display: none; }
  .pitchval { font-size: 96px; }
}

/* hidden תמיד מנצח — אחרת display של .btn גובר עליו והכפתור מופיע */
[hidden] { display: none !important; }
