:root {
  color-scheme: dark;
  --bg: #041413;
  --card: rgba(255,255,255,.06);
  --surface: #0B2220;
  --ink: #EFFBF9;
  --muted: #9CC4BE;
  --line: rgba(255,255,255,.1);
  --teal: #3FE0C5;
  --teal-s: rgba(63,224,197,.14);
  --warn: #FFC76B;
  --bad: #FF9A9A;
  --r: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: Heebo, -apple-system, system-ui, "Segoe UI", Arial, sans-serif;
  font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 34% at 12% 0%, rgba(31,209,184,.24), transparent 70%),
    radial-gradient(120% 60% at 85% -5%, #0F5F59 0%, #062624 46%, #031514 100%); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.wrap { max-width: 480px; margin: 0 auto; padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 96px); min-height: 100vh; }
.wrap.plain { padding-bottom: calc(var(--safe-b) + 24px); display: flex; flex-direction: column; justify-content: center; }

/* כותרת */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brand { font-size: 24px; font-weight: 800; }
.logo { direction: ltr; unicode-bidi: isolate; letter-spacing: 3px; }
.date { color: var(--muted); font-size: 15px; }
.icon-btn { width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.icon-btn svg { width: 24px; height: 24px; }

/* שלושה מספרים */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }

/* כרטיס */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; margin-bottom: 12px; }
.card.main { border-color: rgba(63,224,197,.35); background: linear-gradient(180deg, rgba(63,224,197,.12), rgba(255,255,255,.05)); }
.card.warn { border-color: rgba(255,199,107,.45); background: rgba(255,199,107,.1); }
.eyebrow { font-size: 14px; color: var(--teal); font-weight: 700; margin-bottom: 4px; }
.card h2 { font-size: 25px; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.sub { color: var(--muted); font-size: 16px; }
.q { font-size: 19px; font-weight: 700; margin: 16px 0 10px; }
.big-time { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 8px 0 2px; }

/* כפתורים */
.btn { display: block; width: 100%; min-height: 56px; border: 0; border-radius: 16px; background: var(--teal); color: #04211E; font-size: 19px; font-weight: 800; padding: 12px 16px; }
.btn:disabled { opacity: .45; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; }
.link { background: none; border: 0; color: var(--teal); font-size: 16px; font-weight: 700; padding: 12px 6px; min-height: 48px; text-decoration: underline; text-underline-offset: 3px; }
.gap { height: 10px; }

/* בחירת שעה */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.04); font-size: 18px; font-weight: 700; }
.chip.on { background: var(--teal); color: #04211E; border-color: var(--teal); }
.other { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.other label { color: var(--muted); font-size: 16px; }
.other input { flex: 1; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(0,0,0,.25); padding: 0 12px; font-size: 18px; text-align: center; }
.other button { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--teal-s); color: var(--teal); font-weight: 800; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 14px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* בוצע */
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: #04211E; display: grid; place-items: center; margin-bottom: 10px; }
.done-mark svg { width: 30px; height: 30px; }

/* מפת הרמות */
.levels { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 12px; }
.lv { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--muted); }
.lv.cur { background: var(--teal); color: #04211E; border-color: var(--teal); }
.lv.past { background: var(--teal-s); color: var(--teal); border-color: transparent; }

/* סרגל תחתון */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: rgba(4,20,19,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 8px 16px calc(var(--safe-b) + 8px); }
.tabbar > div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tab { min-height: 54px; border-radius: 16px; border: 0; background: transparent; color: var(--muted); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tab svg { width: 22px; height: 22px; }
.tab.on { background: var(--teal-s); color: var(--teal); }

/* לוח */
.cal-month { font-size: 20px; font-weight: 800; margin: 6px 2px 10px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 18px; }
.cal .hd { text-align: center; font-size: 13px; color: var(--muted); padding-bottom: 2px; }
.cd { aspect-ratio: 1; min-height: 44px; border-radius: 12px; border: 1.5px solid transparent; background: rgba(255,255,255,.05); font-size: 16px; font-weight: 700; display: grid; place-items: center; padding: 0; position: relative; color: var(--ink); }
.cd:disabled { opacity: 1; cursor: default; }
.cd.out, .cd.past { color: rgba(239,251,249,.35); background: transparent; }
.cd.shabbat, .cd.holiday { background: transparent; color: rgba(239,251,249,.45); }
.cd.today { border-color: var(--teal); }
.cd.done { background: var(--teal); color: #04211E; }
.cd.missed { background: rgba(255,107,107,.2); color: var(--bad); }
.cd.off { background: rgba(255,199,107,.18); color: var(--warn); text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-inline-end: 6px; }

/* כניסה והתקנה */
.hero { text-align: center; margin-bottom: 22px; }
.hero img { width: 92px; height: 92px; border-radius: 22px; margin-bottom: 12px; }
.hero h1 { font-size: 32px; font-weight: 800; }
.hero p { color: var(--muted); margin-top: 6px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(0,0,0,.28); padding: 12px 14px; font-size: 18px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: var(--teal); outline: none; }
.opt { color: var(--muted); font-weight: 400; font-size: 14px; }
.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: 18px; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #04211E; font-weight: 800; display: grid; place-items: center; }
.steps svg { width: 22px; height: 22px; vertical-align: -5px; color: var(--teal); }

/* מפגש */
.sess-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 26px; height: 5px; border-radius: 3px; background: var(--line); }
.dots i.on { background: var(--teal); }
.sess h2 { font-size: 26px; font-weight: 800; line-height: 1.2; margin: 14px 0 12px; }
.sess p { font-size: 19px; margin-bottom: 12px; }
.topic { font-size: 28px; font-weight: 800; line-height: 1.25; padding: 22px 16px; border-radius: var(--r); background: var(--teal-s); border: 1.5px solid rgba(63,224,197,.4); margin-bottom: 14px; text-align: center; }
.clock { font-size: 56px; font-weight: 800; text-align: center; direction: ltr; margin: 6px 0 10px; }
.foot { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: rgba(4,20,19,.94); border-top: 1px solid var(--line); padding: 12px 16px calc(var(--safe-b) + 12px); }
.foot > div { max-width: 480px; margin: 0 auto; }

/* חלון */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-width: 480px; margin: 0 auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 20px 16px calc(var(--safe-b) + 18px); border-top: 1px solid var(--line); }
.sheet h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.sheet .sub { margin-bottom: 14px; }

.toast { position: fixed; top: calc(var(--safe-t) + 12px); left: 50%; transform: translate(-50%, -160%); background: #E9FFFB; color: #05211E; padding: 12px 18px; border-radius: 14px; font-size: 16px; font-weight: 700; z-index: 80; transition: transform .25s, visibility .25s; visibility: hidden; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
