/* ===== פונטי המותג ===== */
@font-face {
  font-family: 'Mixtape';
  src: url('../assets/fonts/mixtape-regular-fm.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Almoni';
  src: url('../assets/fonts/almoni-light-aaa.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Almoni';
  src: url('../assets/fonts/almoni-regular-aaa.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Almoni';
  src: url('../assets/fonts/almoni-bold-aaa.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* ===== פלטת המותג ===== */
:root {
  --brown-bg: #544c49;
  --brown-head: #3d3431;
  --white: #fdfff7;
  --peach: #d17f5f;
  --olive: #5f6141;
  --cream: #f4efe7;
  --green-light: #eef1eb;
  --green-mid: #9fa89e;
  --mauve: #c8aea8;
  --muted-text: #c2c8bd; /* טקסט משני קריא (AA) על רקע חום/כרטיס, בגוון שקט */
  --mauve-text: #d6c1bb; /* גרסת מאוב בהירה שעוברת AA לטקסט על רקע חום */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* חובה: [hidden] חייב לגבור על display:flex של קונטיינרים (אחרת מסכי-משנה לא מסתתרים) */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Almoni', system-ui, sans-serif;
  font-weight: 300;
  background: var(--brown-bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2 {
  font-family: 'Mixtape', 'Almoni', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ===== מערכת מסכים ===== */
.screen {
  display: none;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) 22px
    max(28px, env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  animation: fade 0.4s var(--ease);
}
.screen.is-active {
  display: flex;
  flex-direction: column;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== כפתורים ===== */
.btn {
  font-family: 'Almoni', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 15px 26px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.2s, background 0.2s;
  color: var(--white);
}
.btn:active {
  transform: scale(0.97);
}
.btn--primary {
  background: var(--peach);
}
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--mauve);
  color: var(--cream);
}
.btn--ghost {
  background: rgba(253, 255, 247, 0.08);
  color: var(--cream);
  font-weight: 400;
}
.btn--block {
  width: 100%;
  margin-top: auto;
}
.btn--back {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 0.95rem;
}

/* ===== מסך בית — נומי, בהיר פסטל ===== */
::selection { background: var(--peach); color: #fff; }
html { scrollbar-color: #d8c7ba transparent; }

.screen--home {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  background: linear-gradient(180deg, #FBF7F1 0%, #F5EFE6 100%);
}
.home-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) 22px 20px;
}
.home-top .home-top__btn {
  flex: none;
}
.home-hello {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.home-numi {
  width: 50px;
  height: 50px;
  flex: none;
}
.home-top__logo {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.35rem;
  color: #3b322e;
}
.home-top__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ebe2d6;
  background: #fff;
  color: #7c6f66;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(80, 60, 50, 0.05);
}
.home-top__btn svg {
  width: 18px;
  height: 18px;
}
.home-intro {
  padding: 4px 22px 24px;
}
.home-intro h1 {
  font-family: 'Mixtape', sans-serif;
  font-size: clamp(2rem, 9vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #3b322e;
  margin: 0 0 6px;
}
.home-intro p {
  color: #7c6f66;
  font-weight: 300;
  margin: 0;
}
/* ברכה עם המסקוט נומי */
.hello {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 22px 22px;
}
.hello__numi {
  width: 58px;
  height: 58px;
  flex: none;
  filter: saturate(0.72) brightness(1.07);
  animation: numifloat 5s ease-in-out infinite;
}
@keyframes numifloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hello__t h1 {
  font-family: 'Mixtape', sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: #3b322e;
  margin: 0 0 4px;
}
.hello__t p {
  font-weight: 300;
  color: #7c6f66;
  margin: 0;
}
/* כרטיס "ההרגעה של הערב" — תמונת רקע */
.feat {
  margin: 0 22px 30px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 18px 38px -22px rgba(120, 90, 70, 0.5);
  transition: transform 0.15s var(--ease);
}
.feat:active {
  transform: scale(0.99);
}
.feat__img {
  width: 100%;
  height: 212px;
  object-fit: cover;
  display: block;
}
.feat__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(40, 28, 22, 0.82) 2%, rgba(40, 28, 22, 0.08) 52%);
}
.feat__body {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.feat__body h2 {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.6rem;
  color: #fff;
}
.feat__body p {
  font-weight: 300;
  color: #f0e7de;
  margin: 4px 0 14px;
}
.feat__play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #3b322e;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 999px;
  width: max-content;
}
.feat__play svg {
  width: 16px;
  height: 16px;
}
/* כרטיס "באמצע הלילה" (3am) */
.night {
  margin: 0 22px 30px;
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  background: linear-gradient(135deg, #d7dee8, #c3cad9);
  box-shadow: 0 12px 26px -18px rgba(90, 100, 120, 0.5);
  transition: transform 0.15s var(--ease);
}
.night:active {
  transform: scale(0.99);
}
.night__ic {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.55);
  color: #4a5566;
}
.night__ic svg {
  width: 22px;
  height: 22px;
}
.night__t {
  flex: 1;
}
.night__a {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.2rem;
  color: #36404f;
}
.night__b {
  font-weight: 300;
  color: #5a6472;
  font-size: 0.85rem;
}
.night__go {
  width: 18px;
  height: 18px;
  color: #5a6472;
  flex: none;
}
.band {
  margin-bottom: 30px;
}
.band__h {
  padding: 0 22px;
  margin-bottom: 13px;
}
.band__h h2 {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.3rem;
  color: #3b322e;
  font-weight: 400;
  margin: 0;
}
.rail {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  /* מרווח אנכי נדיב — אחרת overflow-x חותך את הצל של הכרטיסים המרחפים */
  padding: 10px 22px 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail > * {
  scroll-snap-align: start;
}
/* כרטיס גיבור (מדיטציות) */
.hcard {
  flex: 0 0 76%;
  max-width: 300px;
  height: 222px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 14px 30px -16px rgba(120, 90, 70, 0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.25s var(--ease);
}
.hcard:active {
  transform: scale(0.986);
}
.hcard--t0 { background: linear-gradient(155deg, #dce6da, #bfd0c2); }
.hcard--t1 { background: linear-gradient(155deg, #f3ded3, #e6c3b4); }
.hcard--t2 { background: linear-gradient(155deg, #dfe0ec, #c6c7dd); }
.hcard--t3 { background: linear-gradient(155deg, #f0dee0, #debfc6); }
.hcard__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(38, 26, 20, 0.72) 0%, rgba(38, 26, 20, 0.12) 42%, transparent 62%);
}
.hcard__veil {
  display: none;
}
.hcard__play {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #4a3d36;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px -6px rgba(90, 60, 40, 0.4);
}
.hcard__play .pp-icon {
  width: 20px;
  height: 20px;
}
.hcard__body {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hcard__title {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.5rem;
  line-height: 1.04;
  color: #fff;
}
.hcard__meta {
  color: #f0e7de;
  font-weight: 300;
  font-size: 0.9rem;
  margin-top: 5px;
}
/* כרטיס ריבועי (נשימה/תבניות) */
.scard {
  flex: 0 0 46%;
  max-width: 164px;
  cursor: pointer;
  position: relative;
}
.scard__art {
  height: 150px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 22px -14px rgba(120, 90, 70, 0.4);
}
.scard__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scard--t0 .scard__art { background: linear-gradient(155deg, #dce6da, #bfd0c2); }
.scard--t1 .scard__art { background: linear-gradient(155deg, #dfe0ec, #c6c7dd); }
.scard--t2 .scard__art { background: linear-gradient(155deg, #f3ded3, #e6c3b4); }
.scard--t3 .scard__art { background: linear-gradient(155deg, #f0dee0, #debfc6); }
.scard__play {
  position: absolute;
  bottom: 11px;
  left: 11px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #4a3d36;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px -4px rgba(90, 60, 40, 0.35);
}
.scard__play .pp-icon {
  width: 16px;
  height: 16px;
}
.scard__edit {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: #4a3d36;
  cursor: pointer;
  font-size: 0.9rem;
}
.scard__t {
  margin-top: 11px;
  font-size: 1rem;
  color: #3b322e;
  line-height: 1.2;
}
.scard__s {
  font-weight: 300;
  color: #7c6f66;
  font-size: 0.8rem;
}
.home-premium {
  padding: 0 22px;
}
.home-premium .course-list {
  margin-top: 0;
}
#screen-home #btn-new {
  width: calc(100% - 44px);
  margin: 0 22px;
  color: #7c6f66;
  border-color: #d8c7ba;
}

/* כרטיס תרגול — מוגבה עם צ'יפ אייקון (סגנון 2) */
.card {
  background: var(--brown-head);
  border-radius: 20px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.26);
  transition: border-color 0.2s, transform 0.15s var(--ease);
}
.card:active {
  transform: scale(0.99);
}
.card:hover {
  border-color: var(--peach);
}
.card__chip {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  background: rgba(209, 127, 95, 0.18);
  color: var(--peach);
}
.card__chip .pp-icon {
  width: 22px;
  height: 22px;
}
.card__main {
  flex: 1;
  min-width: 0;
}
.card__name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  margin: 0 0 2px;
}
.card__meta {
  font-size: 0.92rem;
  color: var(--muted-text);
}
.card__go {
  color: var(--peach);
  flex: none;
  display: grid;
  place-items: center;
}
.chev-icon {
  width: 19px;
  height: 19px;
  display: block;
}
.card__edit {
  background: none;
  border: none;
  color: var(--muted-text);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
}
.card__edit:hover {
  color: var(--cream);
}

/* ===== מסך בנייה ===== */
.build__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.build__title {
  font-size: 1.4rem;
  margin: 0;
  color: var(--cream);
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field__label {
  display: block;
  font-size: 0.9rem;
  color: var(--mauve-text);
  margin-bottom: 6px;
}
.field__input {
  width: 100%;
  background: var(--brown-head);
  border: 1px solid rgba(200, 174, 168, 0.25);
  border-radius: 12px;
  color: var(--white);
  font-family: 'Almoni', sans-serif;
  font-size: 1rem;
  padding: 12px 14px;
}
.field__input:focus {
  outline: none;
  border-color: var(--peach);
}

.segments {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}
.seg {
  background: var(--brown-head);
  border-radius: var(--radius);
  padding: 16px;
}
.seg__row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.seg__num {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--olive);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.seg__label {
  flex: 1;
}
.seg__dur {
  width: 70px;
  flex: none;
  text-align: center;
}
.seg__dur-unit {
  font-size: 0.85rem;
  color: var(--muted-text);
  flex: none;
}
.seg__del {
  background: none;
  border: none;
  color: var(--muted-text);
  cursor: pointer;
  font-size: 1.2rem;
  flex: none;
}
.seg__del:hover {
  color: var(--peach);
}
.seg__guidance {
  width: 100%;
  background: var(--brown-bg);
  border: 1px solid rgba(200, 174, 168, 0.2);
  border-radius: 10px;
  color: var(--cream);
  font-family: 'Almoni', sans-serif;
  font-size: 0.95rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 58px;
}
.seg__guidance:focus {
  outline: none;
  border-color: var(--peach);
}

.build__total {
  text-align: center;
  color: var(--muted-text);
  margin: 18px 0;
  font-size: 1.05rem;
}
.build__total strong {
  color: var(--cream);
  font-family: 'Mixtape', sans-serif;
  font-size: 1.3rem;
}
.build__actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}
.build__actions .btn {
  flex: 1;
}
.build__error {
  color: var(--mauve-text);
  text-align: center;
  margin: 12px 0 0;
}

/* ===== מסך תרגול ===== */
.screen--practice {
  /* אוליב כהה יותר כדי שהטקסט המשני יעבור AA; עדיין גוון ירקרק רגוע */
  background: linear-gradient(170deg, #4d4f3a 0%, var(--brown-bg) 65%);
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}
/* כפתור חזרה בפינה עליונה-ימנית (RTL) — זהה בעיצובו לכפתור החזרה במדיטציות */
.btn--back-abs {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 10;
}

/* תצוגה מקדימה של מקטעי התבנית במסך "מוכן" */
.ready-preview {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(86%, 340px);
  margin: 2px 0 14px;
}
.ready-preview__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.98rem;
  border-bottom: 1px solid rgba(200, 174, 168, 0.15);
  padding-bottom: 6px;
}
.ready-preview__label {
  color: var(--cream);
}
.ready-preview__dur {
  color: var(--muted-text);
  font-variant-numeric: tabular-nums;
}

.practice__ready {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.practice__ready-name {
  font-family: 'Mixtape', sans-serif;
  font-size: 2.2rem;
  color: var(--cream);
  margin: 0;
}
.practice__ready-meta {
  color: var(--muted-text);
  font-size: 1.05rem;
  margin: 0 0 18px;
}
.dur-chooser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0 20px;
}
.dur-chooser__label {
  color: var(--muted-text);
  font-size: 0.9rem;
}
.dur-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.dur-opt {
  min-width: 46px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(200, 174, 168, 0.35);
  background: transparent;
  color: var(--cream);
  font-family: 'Almoni', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.12s var(--ease);
}
.dur-opt:active {
  transform: scale(0.95);
}
.dur-opt.is-selected {
  background: var(--peach);
  border-color: var(--peach);
  color: var(--white);
  font-weight: 700;
}
.dur-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-text);
  font-size: 0.9rem;
}
.dur-custom input {
  width: 58px;
  text-align: center;
  background: var(--brown-head);
  border: 1.5px solid rgba(200, 174, 168, 0.35);
  border-radius: 10px;
  color: var(--white);
  font-family: 'Almoni', sans-serif;
  font-size: 1rem;
  padding: 8px 6px;
}
.dur-custom input:focus {
  outline: none;
  border-color: var(--peach);
}
.dur-custom.is-selected input {
  border-color: var(--peach);
  background: rgba(209, 127, 95, 0.18);
}

.play-btn {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: none;
  background: var(--peach);
  color: var(--white);
  font-size: 2.6rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28); /* הרמה נייטרלית, בלי הילה צבעונית */
  transition: transform 0.15s var(--ease);
}
.play-btn:active {
  transform: scale(0.94);
}
/* אייקוני נגן נקיים (SVG) — משולש Play / שני קווים אנכיים Pause */
.pp-icon {
  display: block;
  width: 42%;
  height: 42%;
}
.ctrl .pp-icon {
  width: 40%;
  height: 40%;
}
.practice__prep {
  position: absolute;
  top: 50%;
  color: var(--cream);
  font-size: 1.2rem;
  opacity: 0.85;
}
.practice__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.practice__segment-label {
  font-size: 1.3rem;
  color: var(--mauve-text);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.practice__clock {
  font-family: 'Mixtape', sans-serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--white);
  margin: 6px 0 20px;
  font-variant-numeric: tabular-nums;
}
.practice__guidance {
  max-width: 34ch;
  color: var(--cream);
  font-size: 1.1rem;
  min-height: 3.2em;
  margin: 0 0 24px;
  opacity: 0.92;
}
.practice__progress {
  width: min(80%, 320px);
  height: 5px;
  background: rgba(253, 255, 247, 0.15);
  border-radius: 999px;
  overflow: hidden;
}
.practice__progress-bar {
  height: 100%;
  width: 100%;
  background: var(--peach);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: right; /* RTL: הפס גדל מימין לשמאל */
  transition: transform 0.5s linear;
}
.practice__meta {
  color: var(--muted-text);
  font-size: 0.9rem;
  margin-top: 12px;
}
.practice__controls {
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
  padding-bottom: 10px;
}
.ctrl {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 255, 247, 0.25);
  background: rgba(61, 52, 49, 0.4);
  color: var(--cream);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s var(--ease), background 0.2s;
}
.ctrl:active {
  transform: scale(0.92);
}
/* כפתור ההשהיה הראשי — גדול ובולט, כמו כפתור ה-Play (מתחלף ▶/⏸ במקום) */
.ctrl--pause {
  width: 96px;
  height: 96px;
  background: var(--peach);
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

/* ===== מראה נשימה ===== */
.breathing-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.breath-visual {
  position: relative;
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
}
/* עיגול מתרחב/מתכווץ */
.breath-circle {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(209, 127, 95, 0.55),
    rgba(95, 97, 65, 0.35)
  );
  border: 2px solid rgba(253, 255, 247, 0.5);
  transform: scale(0.35);
  will-change: transform;
}
/* ריבוע עם נקודה רצה */
.breath-box {
  width: 230px;
  height: 230px;
}
.breath-box__path {
  fill: none;
  stroke: rgba(253, 255, 247, 0.35);
  stroke-width: 2;
}
.breath-box__dot {
  fill: var(--peach);
  stroke: var(--white);
  stroke-width: 1.5;
}
/* שם השלב + ספירה במרכז */
/* נומי נושם — מרכז מראה הנשימה, scale מסונכרן לקצב */
.breath-numi {
  width: 150px;
  height: auto;
  will-change: transform;
  transform-origin: center center;
  transform: scale(0.9);
  filter: drop-shadow(0 12px 22px rgba(120, 90, 70, 0.22));
}
.breath-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 18px;
  min-height: 3.4rem;
  text-align: center;
  line-height: 1.1;
  pointer-events: none;
}
.breath-phase {
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.03em;
}
.breath-count {
  font-family: 'Mixtape', sans-serif;
  font-size: 2.4rem;
  color: var(--cream);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
/* כשאין ספירה (למשל "היכונו") — לא לתפוס שורה ריקה שדוחפת את הטקסט למעלה */
.breath-count:empty {
  display: none;
}

/* בורר פרמטרים לנשימה (קצב / צלע / מרווחי 4-7-8) */
.breath-params {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}
.breath-params__label {
  color: var(--muted-text);
  font-size: 0.9rem;
}
.breath-478 {
  display: flex;
  gap: 12px;
}
.breath-478 label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted-text);
  font-size: 0.82rem;
}
.breath-478 input {
  width: 56px;
  text-align: center;
  background: var(--brown-head);
  border: 1.5px solid rgba(200, 174, 168, 0.35);
  border-radius: 10px;
  color: var(--white);
  font-family: 'Almoni', sans-serif;
  font-size: 1.05rem;
  padding: 8px 4px;
}
.breath-478 input:focus {
  outline: none;
  border-color: var(--peach);
}

/* ===== נגן מדיטציה מונחית ===== */
.screen--meditation {
  background: linear-gradient(170deg, #4d4f3a 0%, var(--brown-bg) 65%);
}
.med-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  width: 100%;
}
.med-player__logo {
  width: 110px;
  max-width: 40%;
  margin-bottom: 8px;
}
.med-player__title {
  font-size: 1.9rem;
  color: var(--cream);
  margin: 0;
}
.med-player__desc {
  color: var(--muted-text);
  font-size: 1.02rem;
  margin: 0 0 18px;
  max-width: 30ch;
}
.med-player .play-btn {
  margin-bottom: 10px;
}
.med-seek {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(86%, 360px);
  color: var(--muted-text);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.med-seek #med-range {
  flex: 1;
  accent-color: var(--peach);
  cursor: pointer;
}
.med-skip {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.med-skip__btn {
  width: 60px;
  height: 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
}

/* בורר מוזיקת רקע (עם/בלי פעמונים) */
.med-music {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 2px 0 20px;
}
.med-music__label {
  color: var(--muted-text);
  font-size: 0.85rem;
}
.seg-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  border: 1.5px solid rgba(200, 174, 168, 0.28);
}
.seg-toggle__opt {
  border: none;
  background: transparent;
  color: var(--cream);
  font-family: 'Almoni', sans-serif;
  font-size: 0.95rem;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s, transform 0.12s var(--ease);
}
.seg-toggle__opt:active {
  transform: scale(0.96);
}
.seg-toggle__opt.is-selected {
  background: var(--peach);
  color: var(--white);
  font-weight: 700;
}

/* ===== פופאפ התקנה ===== */
.install-ov {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(31, 30, 30, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fade 0.3s var(--ease);
}
.install-card {
  position: relative;
  width: min(100%, 400px);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--brown-head);
  border: 1px solid rgba(200, 174, 168, 0.22);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s var(--ease);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.install-close {
  position: absolute;
  top: 12px;
  left: 14px;
  background: none;
  border: none;
  color: var(--muted-text);
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 2;
}
.install-ic {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  margin-bottom: 10px;
}
.install-h {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.5rem;
  color: var(--cream);
  margin: 0 0 6px;
}
.install-sub {
  color: var(--muted-text);
  font-size: 1rem;
  margin: 0 0 16px;
  line-height: 1.5;
}
.install-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  display: block;
}
.install-ios-tip {
  margin-top: 14px;
  color: var(--muted-text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.install-ios-tip b {
  color: var(--cream);
}

/* וריאנט B — אשף תמונות */
.wiz__frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(200, 174, 168, 0.18);
}
.wiz__img {
  width: 100%;
  display: block;
}
.wiz__cap {
  color: var(--cream);
  font-size: 1.05rem;
  margin: 14px 0 12px;
  min-height: 2.6em;
}
.wiz__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.wiz__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 174, 168, 0.35);
  background: transparent;
  color: var(--cream);
  font-size: 1.3rem;
  cursor: pointer;
}
.wiz__btn:disabled {
  opacity: 0.3;
}
.wiz__dots {
  display: flex;
  gap: 7px;
}
.wiz__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(200, 174, 168, 0.3);
}
.wiz__dot.is-on {
  background: var(--peach);
}

/* וריאנט שלבים (ברירת מחדל) — כרטיסים קומפקטיים + תמונה נפתחת לכל שלב */
.gstep {
  background: var(--brown-bg);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.gstep__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  background: none;
  border: none;
  color: var(--cream);
  padding: 14px 16px;
  cursor: pointer;
}
.gstep__num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.gstep__txt {
  flex: 1;
  color: var(--cream);
  font-size: 1.02rem;
  line-height: 1.4;
}
.gstep__txt b {
  color: var(--white);
}
.gstep__chev {
  flex: none;
  color: var(--muted-text);
  font-size: 0.8rem;
  transition: transform 0.25s var(--ease);
}
.gstep.is-open .gstep__chev {
  transform: rotate(180deg);
}
/* אנימציית פתיחה/סגירה חלקה (גובה + שקיפות) */
.gstep__img {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--ease);
}
.gstep.is-open .gstep__img {
  grid-template-rows: 1fr;
}
.gstep__img-in {
  overflow: hidden;
  min-height: 0;
  padding: 0 14px 14px;
}
.gstep__img-in img {
  width: 100%;
  border-radius: 10px;
  display: block;
  border: 1px solid rgba(200, 174, 168, 0.18);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s var(--ease) 0.08s, transform 0.3s var(--ease) 0.08s;
}
.gstep.is-open .gstep__img-in img {
  opacity: 1;
  transform: translateY(0);
}
/* וריאנט C הישן — אייקון גרפי (נשאר לתצוגה מקדימה) */
.gstep--plain {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
  padding: 14px 16px;
}
.gstep__ic {
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--cream);
}

/* ===== מסך סיום ===== */
.screen--done {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.done__logo {
  width: 130px;
  max-width: 50%;
  margin-bottom: 22px;
}
.done__title {
  font-size: 2.4rem;
  color: var(--cream);
  margin: 0 0 14px;
}
.done__text {
  color: var(--green-light);
  font-size: 1.15rem;
  margin: 0 0 36px;
  max-width: 30ch;
}
.screen--done .btn--block {
  margin-top: 0;
  max-width: 320px;
}
.cta {
  margin-top: 22px;
  color: var(--mauve-text);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 174, 168, 0.4);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.cta:hover {
  color: var(--peach);
}

/* ===== כפתורי קורסים (משפך) — בית + סוף מדיטציה/תרגול ===== */
.home__section--courses {
  margin-top: 26px;
}
.course-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.course-list--done {
  width: 100%;
  margin-top: 18px;
}
/* כרטיס בית המלאכה המוצג (תמונת רקע) */
.prem-feat {
  display: block;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 18px 38px -22px rgba(120, 90, 70, 0.5);
  transition: transform 0.15s var(--ease);
}
.prem-feat:active {
  transform: scale(0.99);
}
.prem-feat__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prem-feat__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(58, 40, 30, 0.86) 22%, rgba(58, 40, 30, 0.2));
}
.prem-feat__price {
  align-self: flex-start;
  margin-bottom: 9px;
  font-size: 0.74rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
}
.prem-feat__body {
  position: relative;
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-align: start;
}
.prem-feat__body h3 {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.6rem;
  color: #fff;
}
.prem-feat__sub {
  color: #f0d9cd;
  font-weight: 300;
  font-size: 0.9rem;
  margin: 3px 0 14px;
}
.prem-feat__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--peach);
  color: #fff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  width: max-content;
}
.prem-feat__cta svg {
  width: 15px;
  height: 15px;
}
/* קורסים נוספים — כרטיסים בהירים */
.course-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ebe2d6;
  text-decoration: none;
  box-shadow: 0 8px 20px -14px rgba(120, 90, 70, 0.35);
  transition: transform 0.15s var(--ease), border-color 0.2s;
}
.course-cta:active {
  transform: scale(0.98);
}
.course-cta:hover {
  border-color: var(--peach);
}
.course-cta__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: start;
}
.course-cta__badge {
  align-self: flex-start;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  background: var(--peach);
  color: #fff;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.course-cta__title {
  color: #3b322e;
  font-size: 1.08rem;
  font-weight: 700;
}
.course-cta__sub {
  color: #7c6f66;
  font-size: 0.85rem;
}
.course-cta__go {
  color: var(--peach);
  flex: none;
  display: grid;
  place-items: center;
}

/* מסך סיום מדיטציה */
.med-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(92%, 420px);
  margin: 0 auto;
  text-align: center;
  animation: fade 0.4s var(--ease);
}
.med-end__title {
  font-family: 'Mixtape', sans-serif;
  font-size: 2.2rem;
  color: var(--white);
  margin: 0;
}
.med-end__text {
  color: var(--cream);
  margin: 0 0 4px;
  opacity: 0.92;
}
.med-end .course-list {
  width: 100%;
  margin: 4px 0;
}

@media (min-width: 480px) {
  .practice__clock {
    font-size: 6rem;
  }
}

/* ============================================================
   נומי — תאורה בהירה לכל המסכים הפנימיים (override)
   ============================================================ */
body {
  background: #f5efe6;
}
.screen--practice,
.screen--meditation {
  background: linear-gradient(175deg, #fbf7f1 0%, #f0e8dc 72%);
}
.screen--done {
  background: linear-gradient(180deg, #fbf7f1 0%, #f2eadf 100%);
}

/* טקסט ראשי כהה */
.practice__ready-name,
.practice__clock,
.practice__guidance,
.med-player__title,
.done__title,
.breath-phase,
.breath-count,
.med-end__title,
.install-h,
.install-ios-tip b,
.gstep__head,
.gstep__txt {
  color: #3b322e;
}

/* טקסט משני */
.practice__segment-label,
.practice__ready-meta,
.practice__meta,
.practice__prep,
.ready-preview__label,
.dur-chooser__label,
.ready-preview__dur,
.med-player__desc,
.med-seek,
.med-music__label,
.done__text,
.breath-params__label,
.breath-478 label,
.med-end__text,
.install-sub,
.install-close,
.install-ios-tip,
.build__total,
.field__label,
.seg__num,
.seg__dur-unit,
.seg-toggle__opt,
.dur-opt {
  color: #7c6f66;
}

/* כפתורי טקסט/מתאר על רקע בהיר — רקע לבן נקי כדי שייראו ככפתור (לא טקסט דהוי) */
.btn--ghost,
.btn--back {
  color: #6b5f58;
  background: #fff;
  border: 1px solid #ebe2d6;
  box-shadow: 0 3px 10px rgba(120, 90, 70, 0.06);
}
.btn--ghost:active,
.btn--back:active {
  background: #f7f1e9;
}
.btn--outline {
  color: #6b5f58;
  border-color: #d8c7ba;
}

/* בקרות עגולות */
.ctrl {
  background: #fff;
  border: 1px solid #e3d9cd;
  color: #4a3d36;
  box-shadow: 0 6px 14px -8px rgba(120, 90, 70, 0.3);
}
.ctrl--pause {
  background: var(--peach);
  color: #fff;
  border: none;
}

/* פס התקדמות + מראה נשימה */
.practice__progress {
  background: rgba(120, 90, 70, 0.14);
}
.breath-circle {
  border-color: rgba(120, 90, 70, 0.3);
}
.breath-box__path {
  stroke: rgba(120, 90, 70, 0.3);
}
.breath-box__dot {
  stroke: #fff;
}

/* שדות וכרטיסי בנייה */
.field__input,
.breath-478 input,
.dur-custom input {
  background: #fff;
  border: 1px solid #e3d9cd;
  color: #3b322e;
}
.seg {
  background: #fff;
  border: 1px solid #ebe2d6;
}
.seg__label,
.seg__dur,
.seg__guidance {
  background: #fbf9f5;
  border-color: #e3d9cd;
  color: #3b322e;
}
.dur-opt {
  border-color: #d8c7ba;
}
.seg-toggle {
  background: rgba(120, 90, 70, 0.08);
  border-color: #e0d4c6;
}

/* פופאפ התקנה */
.install-ov {
  background: rgba(60, 48, 40, 0.5);
}
.install-card {
  background: #fbf7f1;
  border: 1px solid #ebe2d6;
  box-shadow: 0 18px 44px rgba(90, 60, 40, 0.3);
}
.install-ic {
  object-fit: contain;
}
.gstep {
  background: #fbf9f5;
  border: 1px solid #ebe2d6;
}
.gstep__txt b {
  color: #3b322e;
}
.gstep__chev {
  color: #a98f84;
}

/* ===== מסך קבלה (Welcome) — הפעלה ראשונה ===== */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #1b1512;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.welcome--out {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.welcome__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1b1512;
}
.welcome__veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(27, 21, 18, 0.5), rgba(27, 21, 18, 0.8));
}
.welcome__veil.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.welcome__numi {
  width: 118px;
  height: auto;
  margin-bottom: 4px;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.42));
}
.welcome__title {
  font-family: 'Mixtape', sans-serif;
  font-size: 1.85rem;
  color: #fbf3e9;
  margin: 0;
}
.welcome__sub {
  font-size: 1rem;
  color: #e7d7c9;
  opacity: 0.85;
  margin: 0 0 12px;
}
.welcome__play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #d17f5f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  box-shadow: 0 16px 36px -8px rgba(209, 127, 95, 0.7);
  transition: transform 0.15s ease;
}
.welcome__play:active {
  transform: scale(0.94);
}
.welcome__skip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 18px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.3);
  color: #fbf3e9;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* בורר משך — אפשרויות חסומות (מתחת למינימום הבטוח) + הערת מינימום */
.dur-opt.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}
.dur-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #9b8a7f;
  text-align: center;
}

/* ===== מסך נומי Pro ===== */
.screen--pro {
  background: linear-gradient(180deg, #fbf7f1 0%, #f5efe6 100%);
}
.pro-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  padding-top: 8px;
}
.pro-numi {
  width: 92px;
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(120, 90, 70, 0.2));
}
.pro-h {
  font-family: 'Mixtape', sans-serif;
  font-size: 2rem;
  color: #3b322e;
  margin: 10px 0 14px;
}
.pro-status {
  margin-bottom: 20px;
}
.pro-badge {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: #efe6da;
  color: #7c6f66;
  font-weight: 700;
  font-size: 0.95rem;
}
.pro-badge--on {
  background: #e4ece0;
  color: #5f6141;
}
.pro-until {
  color: #7c6f66;
  margin: 8px 0 0;
  font-size: 0.9rem;
}
.pro-lead {
  color: #7c6f66;
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.pro-input {
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 10px;
  border: 1px solid #e4d9cc;
  border-radius: 14px;
  background: #fff;
  color: #3b322e;
  font-family: 'Almoni', sans-serif;
  font-size: 1rem;
  text-align: right;
}
.pro-input:focus {
  outline: none;
  border-color: var(--peach);
}
.pro-btn {
  width: 100%;
  margin-top: 4px;
}
.pro-msg {
  color: #7c6f66;
  font-size: 0.9rem;
  margin: 10px 0 0;
  min-height: 1.2em;
}
.pro-feats {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  text-align: right;
}
.pro-feats li {
  position: relative;
  padding: 7px 28px 7px 0;
  color: #3b322e;
}
.pro-feats li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--olive);
  font-weight: 700;
}
.pro-fine {
  color: #9b8a7f;
  font-size: 0.8rem;
  margin: 12px 0 0;
}
.pro-upgrade,
.pro-unlock,
.pro-manage {
  width: 100%;
}
