@font-face {
  font-family: 'Assistant';
  src: url('fonts/assistant-hebrew-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant';
  src: url('fonts/assistant-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #141518;
  --ink-soft: #4a4648;
  --gray: #8b8f96;
  --rose: #CB9A92;
  --rose-d: #a9776f;
  --rose-t: #8c5a52;
  --blush: #F5EBE9;
  --paper: #fffdfc;
  --line: #e6d9d6;
  --dark: #141518;
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: 'Assistant', system-ui, sans-serif;
  background: var(--blush);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body.is-dark { background: var(--dark); }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 0; max-width: 620px; margin: 0 auto;
}
.top .logo { height: 26px; width: auto; }
.top .bsd { font-size: 13px; color: var(--ink-soft); }
body.is-dark .top .logo { filter: invert(1); }
body.is-dark .top .bsd { color: #bfb5b2; }

main { max-width: 620px; margin: 0 auto; padding: 8px 20px 40px; }
.screen { display: none; padding-top: 24px; }
.screen.on { display: block; animation: enter .45s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

h1 { font-size: clamp(34px, 9vw, 46px); line-height: 1.1; font-weight: 800; margin: 18px 0 18px; letter-spacing: -.01em; }
h2 { font-size: 30px; line-height: 1.15; font-weight: 800; margin: 8px 0 10px; }
h3 { font-size: 20px; margin: 0 0 10px; }
.lead { font-size: 20px; margin: 0 0 16px; }
.note { color: var(--ink-soft); margin: 0 0 22px; }
.hint { color: var(--ink-soft); margin: 0 0 18px; }
.hint.small { font-size: 15px; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 22px; font-size: 15px; line-height: 1.5; cursor: pointer;
}
.consent input { width: 24px; height: 24px; flex: none; margin: 2px 0 0; accent-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 700 18px/1 'Assistant', sans-serif; cursor: pointer; text-decoration: none;
  transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.light { background: #2a2b30; color: #fff; }
.btn.link { background: none; color: var(--ink-soft); text-decoration: underline; min-height: 44px; padding: 0 8px; font-weight: 500; font-size: 16px; }
.btn.big { width: 100%; min-height: 60px; font-size: 20px; }
.btn:focus-visible, textarea:focus-visible, .rec-btn:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

/* שאלות */
.qhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.qhead .layer { color: var(--rose-t); font-weight: 700; letter-spacing: .02em; }
.qhead .count { color: var(--ink-soft); }
.progress { height: 6px; background: #ead9d5; border-radius: 6px; overflow: hidden; margin: 8px 0 26px; }
.progress i { display: block; height: 100%; width: 0; background: var(--rose); border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.2,1); margin-inline-start: 0; }
.progress.big { height: 10px; margin: 26px 0 10px; }
.question { display: block; font-size: 23px; line-height: 1.4; font-weight: 700; margin: 0 0 10px; white-space: pre-line; }
.example { color: var(--gray); font-style: italic; margin: 0 0 16px; font-size: 17px; }
textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 14px 16px; font: 400 19px/1.6 'Assistant', sans-serif;
  color: var(--ink); resize: vertical; min-height: 180px;
}
textarea:focus { border-color: var(--rose); outline: none; }
.senses { background: var(--paper); border-inline-start: 4px solid var(--rose); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 17px; color: var(--ink-soft); }
.senses b { color: var(--rose-t); }
.howto { background: #24252a; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; text-align: center; color: #e9e2e0; font-size: 17px; line-height: 1.6; }
.howto p { margin: 0 0 8px; }
.howto-title { font-weight: 800; color: var(--rose); font-size: 18px; }
.howto-small { font-size: 15px; color: #bfb5b2; margin: 0 !important; }
.nudge { color: var(--rose-t); font-weight: 600; margin: 10px 0 0; }
.nav { display: flex; gap: 12px; margin-top: 22px; }
.nav .btn { flex: 1; }

/* המתנה */
.wait { text-align: center; padding: 60px 0 20px; }
.wait p { font-size: 20px; }
.wait .btn { margin: 8px 4px; }
.pct { font-weight: 800; font-size: 22px; margin: 0 0 4px; }
.dot-pulse { width: 22px; height: 22px; border-radius: 50%; background: var(--rose); margin: 0 auto 22px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(.7); opacity: .6; } 50% { transform: scale(1.25); opacity: 1; } }

/* החזון */
.vsec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; }
.vsec .vlabel { font-size: 14px; color: var(--rose-t); font-weight: 700; margin: 0 0 6px; display: block; }
.vsec.fixed { background: transparent; border-style: dashed; }
.vsec.fixed p { margin: 0; font-weight: 700; white-space: pre-line; font-size: 19px; }
.vsec textarea { border: 0; padding: 0; background: transparent; min-height: 0; font-size: 19px; line-height: 1.65; resize: none; overflow: hidden; }
#v-done { margin-top: 10px; }
#v-rewrite { display: block; margin: 10px auto 0; }

/* הקלטה */
.dark { color: #f4f1f0; }
.dark .btn.primary { background: var(--rose); color: var(--ink); }
.tip { text-align: center; color: #d9cfcc; font-size: 16px; margin: 0 0 14px; }
.steps { display: flex; gap: 8px; justify-content: center; margin: 0 0 18px; }
.steps button {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #5a5658; background: none;
  color: #bfb5b2; font: 700 14px 'Assistant'; cursor: pointer;
}
.steps button.done { background: var(--rose); border-color: var(--rose); color: var(--ink); }
.steps button.cur { border-color: #fff; color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.prompter {
  font-size: clamp(26px, 7vw, 34px); line-height: 1.75; font-weight: 600; text-align: center;
  min-height: 40vh; max-height: 52vh; overflow-y: auto; padding: 12px 6px 18px;
  white-space: pre-line; color: #fff;
}
.prompter .seg-name { display: block; font-size: 15px; font-weight: 700; color: var(--rose); letter-spacing: .05em; margin-bottom: 10px; }
.rec-zone { text-align: center; padding: 12px 0 8px; }
.rec-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 4px solid #fff; background: transparent;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.rec-btn span { width: 60px; height: 60px; border-radius: 50%; background: #e0574a; transition: all .2s; }
.rec-btn.on span { width: 30px; height: 30px; border-radius: 7px; }
.rec-label { color: #bfb5b2; font-size: 15px; margin: 8px 0 0; }
.rec-live { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.red-dot { width: 12px; height: 12px; border-radius: 50%; background: #e0574a; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; direction: ltr; min-width: 44px; }
#r-wave { width: 160px; height: 32px; }
.after { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.after .btn { min-height: 48px; padding: 0 18px; font-size: 17px; }
.mic-ask { background: #24252a; border-radius: var(--radius); padding: 16px; text-align: center; margin: 0 0 12px; }
.err { color: #ffb4a8; text-align: center; }
.music-pick { background: #24252a; border-radius: var(--radius); padding: 16px; margin: 18px 0 14px; }
.track { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #34353b; }
.track:first-of-type { border-top: 0; }
.track label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.track input { width: 20px; height: 20px; accent-color: var(--rose); }
.track .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }

/* תוצאה */
.player { background: var(--ink); border-radius: var(--radius); overflow: hidden; margin: 6px auto 18px; max-width: 360px; aspect-ratio: 9/16; }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.downloads { display: grid; gap: 12px; margin-bottom: 18px; }
.reco { text-align: center; font-weight: 700; font-size: 19px; margin: 6px 0 8px; }
#res-redo { display: block; margin: 0 auto; }
.credit { text-align: center; font-size: 13px; color: var(--gray); margin: 18px 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
