/* שקט וקרוב — שכבת העיצוב. טוקנים בראש, רכיבים למטה. בהיר + כהה אוטומטי. גופן: אריאל בלבד (בקשת Elie). */
:root {
  --bg: #F4F5F8;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --ink: #17203A;
  --ink-2: #434D66;
  --muted: #5B6479;
  --control: #CBD2DE;
  --line: #E1E5EE;
  --brand: #1C2740;
  --inner: #3F67A8;
  --inner-soft: #E6EEF9;
  --inner-ink: #2C4F8A;
  --us: #B65A2E;
  --us-soft: #FBEBDF;
  --us-ink: #9A4A24;
  --joy: #8A6512;
  --joy-soft: #FAF1DA;
  --ok: #2B7457;
  --ok-soft: #E2F2EA;
  --warn: #A9432B;
  --warn-soft: #FBE7E1;
  --on-accent: #FFFFFF;
  --shadow: 0 1px 2px rgba(23, 32, 58, .05), 0 8px 24px rgba(23, 32, 58, .06);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --tab-h: 66px;
  --top-h: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1424; --surface: #161F35; --surface-2: #1D2843; --ink: #ECEFF6; --ink-2: #C2C9D8;
    --muted: #949DB2; --line: #27324D; --control: #3A4766; --brand: #ECEFF6;
    --inner: #86AEE8; --inner-soft: #1B2944; --inner-ink: #A9C8EC;
    --us: #EFA06F; --us-soft: #35261F; --us-ink: #F3B68E;
    --joy: #E6C46E; --joy-soft: #33291A; --ok: #7CCBA6; --ok-soft: #17322A; --warn: #F09A86; --warn-soft: #3A2220;
    --on-accent: #0E1424; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1424; --surface: #161F35; --surface-2: #1D2843; --ink: #ECEFF6; --ink-2: #C2C9D8;
  --muted: #949DB2; --line: #27324D; --control: #3A4766; --brand: #ECEFF6;
  --inner: #86AEE8; --inner-soft: #1B2944; --inner-ink: #A9C8EC;
  --us: #EFA06F; --us-soft: #35261F; --us-ink: #F3B68E;
  --joy: #E6C46E; --joy-soft: #33291A; --ok: #7CCBA6; --ok-soft: #17322A; --warn: #F09A86; --warn-soft: #3A2220;
  --on-accent: #0E1424; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Arial, 'Arimo', 'Liberation Sans', Helvetica, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--inner); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── מעטפת ── */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px; min-height: var(--top-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; margin-inline-end: auto; letter-spacing: -.01em; }
.topbar .brand img { width: 28px; height: 28px; border-radius: 8px; }
.topbar .title { font-weight: 700; font-size: 17px; margin-inline-end: auto; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: 12px; color: var(--ink-2);
}
.icon-btn:active { background: var(--surface-2); }
.sos-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 999px; flex: none; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px;
}
.sos-btn svg { color: var(--us); }
.view { padding: 4px 16px calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px); outline: none; }
.view.no-tabs { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 32px); }

.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: 560px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 6px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 400; border-radius: 12px; min-height: 52px;
}
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabbar a[aria-current="page"] svg { color: var(--inner); }
.tabbar a.us[aria-current="page"] svg { color: var(--us); }

/* ── טיפוגרפיה ── */
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.lead { color: var(--ink-2); font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 28px 2px 10px; }
.section-title h2 { font-size: 18px; }
.eyebrow { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: .01em; }

/* ── גיבור עם תמונה ── */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; margin-top: 4px; background: var(--surface-2); min-height: 168px; }
.hero img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 18, 34, 0) 20%, rgba(12, 18, 34, .72) 100%); }
.hero .hero-text { position: relative; z-index: 1; padding: 64px 20px 18px; color: #fff; }
.hero h1 { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.hero p { color: rgba(255, 255, 255, .9); font-size: 15px; margin-top: 4px; }

/* ── כרטיסים ── */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card.soft-inner { background: var(--inner-soft); box-shadow: none; }
.card.soft-us { background: var(--us-soft); box-shadow: none; }
.card.soft-joy { background: var(--joy-soft); box-shadow: none; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head .eyebrow { margin-inline-end: auto; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tag.us { background: var(--us-soft); color: var(--us-ink); }
.tag.inner { background: var(--inner-soft); color: var(--inner-ink); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }

/* כרטיס-כלי (שורה עם אייקון) */
.tool {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; text-decoration: none; color: inherit;
  background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow);
}
.tool + .tool { margin-top: 10px; }
.tool .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--inner-soft); color: var(--inner-ink); }
.tool.us .ic { background: var(--us-soft); color: var(--us-ink); }
.tool.joy .ic { background: var(--joy-soft); color: var(--joy); }
.tool .tx { flex: 1; min-width: 0; }
.tool .tx b { display: block; font-size: 16px; font-weight: 700; }
.tool .tx span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.tool .chev { color: var(--muted); flex: none; }
.tool.featured { background: var(--inner); color: var(--on-accent); }
.tool.featured .ic { background: rgba(255, 255, 255, .16); color: var(--on-accent); }
.tool.featured .tx span, .tool.featured .chev { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }

/* ── כפתורים ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .12s ease, opacity .12s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary { background: var(--inner); color: var(--on-accent); }
.btn.us { background: var(--us); color: var(--on-accent); }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.line { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.quiet { background: transparent; color: var(--ink-2); min-height: 44px; padding: 0 10px; font-weight: 700; }
.btn.danger { background: var(--warn-soft); color: var(--warn); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row > .grow { flex: 1; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }

/* ── שבבים (בחירה) ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--control); background: var(--surface); color: var(--ink); border-radius: 999px;
  padding: 8px 14px; font-size: 15px; min-height: 40px; line-height: 1.3; text-align: start;
}
.chip[aria-pressed="true"] { background: var(--inner); border-color: var(--inner); color: var(--on-accent); }
.chips.us .chip[aria-pressed="true"] { background: var(--us); border-color: var(--us); }
.chip.block { width: 100%; border-radius: 14px; padding: 12px 14px; }

/* סולם 0–10 */
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.scale button {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface);
  font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums;
}
.scale button[aria-pressed="true"] { background: var(--inner); border-color: var(--inner); color: var(--on-accent); }
.scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 8px; }
.scale.mood { grid-template-columns: repeat(5, 1fr); }

/* ── שדות ── */
label.field { display: block; }
label.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.input, textarea.input {
  width: 100%; border: 1px solid var(--control); background: var(--surface); border-radius: 14px; padding: 12px 14px;
  font-size: 16px; line-height: 1.5; outline: none; resize: none;
}
textarea.input { min-height: 96px; }
.input:focus { border-color: var(--inner); box-shadow: 0 0 0 3px color-mix(in srgb, var(--inner) 18%, transparent); }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--inner); }
.switch input:checked + span::after { transform: translateX(-20px); }
.switch input:focus-visible + span { outline: 2px solid var(--inner); outline-offset: 2px; }

/* ── אשף צעדים ── */
.wiz-progress { display: flex; gap: 4px; margin: 6px 0 18px; }
.wiz-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.wiz-progress i.on { background: var(--inner); }
.wiz-progress.us i.on { background: var(--us); }
.wiz h2 { margin-bottom: 6px; }
.wiz .lead { margin-bottom: 16px; }
.wiz-foot { display: flex; gap: 10px; margin-top: 22px; }
.wiz-foot .btn { flex: 1; }
.wiz-foot .btn.quiet { flex: 0 0 auto; }

/* ── ציטוט / משפט לקריאה ── */
.say { font-size: 20px; font-weight: 700; line-height: 1.5; padding: 20px; border-radius: var(--r-lg); background: var(--inner-soft); color: var(--ink); }
.say.us { background: var(--us-soft); }
.quote { border-inline-start: 3px solid var(--inner); padding: 4px 14px; color: var(--ink-2); }
.quote.us { border-color: var(--us); }

/* ── מעגל הדפוס ── */
.cycle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; counter-reset: c; }
.cycle div { counter-increment: c; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 700; position: relative; }
.cycle div::before { content: counter(c); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--inner-soft); color: var(--inner-ink); font-size: 12px; margin-inline-end: 6px; }
.cycle-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* ── טיימר ── */
.timer-wrap { display: grid; place-items: center; margin: 8px 0 4px; }
.ring { width: min(64vw, 240px); aspect-ratio: 1; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--inner); transition: stroke-dashoffset 1s linear; }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .t { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring .s { color: var(--muted); font-size: 14px; }
.surf { min-height: 84px; display: grid; place-items: center; text-align: center; font-size: 18px; font-weight: 400; color: var(--ink-2); padding: 8px 6px; transition: opacity .5s; }
.checkin { background: var(--surface); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }

/* ── נשימה ── */
.breath-stage { display: grid; place-items: center; height: min(78vw, 320px); position: relative; }
.breath-ball {
  width: 44%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inner) 55%, #fff), var(--inner));
  transform: scale(.62); transition-property: transform; transition-timing-function: ease-in-out; box-shadow: 0 10px 40px color-mix(in srgb, var(--inner) 35%, transparent);
}
.breath-label { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.breath-label b { font-size: 22px; font-weight: 700; color: var(--on-accent); text-shadow: 0 1px 8px rgba(0, 0, 0, .15); }
@media (prefers-reduced-motion: reduce) { .breath-ball { transition-duration: 0s !important; } .ring .bar { transition: none; } }

/* ── כרטיס שאלה ── */
.qcard { background: var(--surface); border-radius: 24px; padding: 28px 22px; box-shadow: var(--shadow); min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.qcard .q { font-size: 22px; font-weight: 700; line-height: 1.5; }
.qcard .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* ── כרטיס טיפול ── */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 360px) { .tracks { grid-template-columns: 1fr; } }
.track { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-lg); text-decoration: none; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.track.inner { border-top: 3px solid var(--inner); }
.track.us { border-top: 3px solid var(--us); }
.track.big { padding: 18px; }
.track-top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.track-name { font-size: 13px; font-weight: 700; color: var(--muted); }
.track.inner .track-name { color: var(--inner-ink); }
.track.us .track-name { color: var(--us-ink); }
.track-stage { font-size: 16px; line-height: 1.35; }
.track.big .track-stage { font-size: 20px; }
.track-sub { font-size: 12.5px; color: var(--muted); }
.track-steps { display: flex; gap: 4px; margin: 6px 0 2px; }
.track-steps i { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.track.inner .track-steps i.done { background: var(--inner); }
.track.us .track-steps i.done { background: var(--us); }
.track.inner .track-steps i.now { background: color-mix(in srgb, var(--inner) 45%, var(--line)); }
.track.us .track-steps i.now { background: color-mix(in srgb, var(--us) 45%, var(--line)); }
.meter { display: block; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; border-radius: 8px; background: var(--ok); transition: width .4s ease; }
.meter.sm { height: 6px; margin: 6px 0 2px; }

/* ── הישגים ── */
.ms { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ms:last-child { border-bottom: 0; }
.ms .ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.ms.got .ic { background: var(--inner-soft); color: var(--inner-ink); }
.ms.got.us .ic { background: var(--us-soft); color: var(--us-ink); }
.ms.got > svg { color: var(--ok); flex: none; }
.ms .tx { flex: 1; min-width: 0; }
.ms .tx b { display: block; font-size: 15px; line-height: 1.4; }
.ms .tx > span { display: block; }

/* ── 3 הדברים של היום ── */
.today-item { border-top: 1px solid var(--line); }
.today-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; border: 0; background: transparent; text-align: start; }
.today-head .tx { flex: 1; min-width: 0; }
.today-head .tx b { display: block; font-size: 16px; }
.today-head .tx span { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.today-head .chev { color: var(--muted); transition: transform .2s; flex: none; }
.today-head[aria-expanded="true"] .chev { transform: rotate(-90deg); }
.today-check { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: var(--on-accent); }
.today-item.is-done .today-check { background: var(--ok); border-color: var(--ok); }
.today-item.is-done .today-head .tx b { color: var(--muted); }
.today-body { padding: 0 0 16px; }

/* ── פריסה ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
details.more { border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
details.more + details.more { margin-top: 10px; }
details.more > summary { list-style: none; cursor: pointer; padding: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { margin-inline-start: auto; transition: transform .2s; color: var(--muted); }
details.more[open] > summary .chev { transform: rotate(90deg); }
details.more > .body { padding: 0 16px 16px; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.clean > li:last-child { border-bottom: 0; }
ul.dots { margin: 0; padding-inline-start: 20px; }
ul.dots li + li { margin-top: 6px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.done-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }

/* ── יומן ── */
.entry { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); }
.entry + .entry { margin-top: 8px; }
.entry > button.head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; background: transparent; text-align: start; }
.entry .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--inner-soft); color: var(--inner-ink); }
.entry.us .ic { background: var(--us-soft); color: var(--us-ink); }
.entry .tx { flex: 1; min-width: 0; }
.entry .tx b { display: block; font-size: 15px; }
.entry .tx span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .detail { padding: 0 14px 14px; font-size: 15px; }
.entry .detail dl { margin: 0; }
.entry .detail dt { color: var(--muted); font-size: 13px; margin-top: 10px; }
.entry .detail dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.day-label { margin: 20px 4px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ── גרפים ── */
.chart { width: 100%; height: auto; display: block; direction: ltr; }
.chart .axis { stroke: var(--line); }
.chart .gl { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .ln { stroke: var(--inner); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .ln.us { stroke: var(--us); }
.chart .pt { fill: var(--surface); stroke: var(--inner); stroke-width: 2; }
.chart .lbl { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .bar-a { fill: color-mix(in srgb, var(--inner) 35%, transparent); }
.chart .bar-b { fill: var(--inner); }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }

/* ── מנעול ── */
.lock { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.lock-box { width: 100%; max-width: 340px; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-2); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; direction: ltr; }
.keypad button { height: 64px; border-radius: 18px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 24px; font-weight: 700; }
.keypad button.blank { visibility: hidden; }
.keypad button.fn { background: transparent; box-shadow: none; font-size: 15px; color: var(--ink-2); }

/* ── הודעה צפה ── */
#toast {
  position: fixed; inset-inline: 16px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px); z-index: 90;
  margin: 0 auto; max-width: 420px; background: var(--brand); color: var(--bg); padding: 12px 16px; border-radius: 14px;
  font-weight: 700; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; pointer-events: none;
}
#toast.show { opacity: 1; transform: none; }

/* פס עדכון */
.update-bar {
  position: fixed; inset-inline: 12px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 95; margin: 0 auto; max-width: 536px;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-radius: 16px;
  background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); border: 1px solid var(--line); font-size: 14px; font-weight: 700;
}
.update-bar span { flex: 1; }

/* כניסה עדינה בין מסכים */
.enter { animation: enter .28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } }

@media (min-width: 600px) {
  body { background: color-mix(in srgb, var(--bg) 70%, var(--surface-2)); }
  .app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
}

/* ── תוספות (גרסה 1.1) ── */
a { color: var(--inner-ink); }
.section-title a { color: var(--inner-ink); text-decoration: none; font-size: 14px; padding: 12px 4px; margin: -12px 0; }
input[type="range"] { width: 100%; accent-color: var(--inner); height: 32px; }
body:has(.view :is(input:not([type=checkbox]):not([type=range]), textarea):focus) .tabbar { display: none; }

.hero.compact { min-height: 112px; }
.hero.compact .hero-text { padding: 34px 18px 14px; }
.hero.compact h1 { font-size: 21px; }

/* כלי מודגש של "אנחנו" */
.tool.featured-us { background: var(--us); color: var(--on-accent); }
.tool.featured-us .ic { background: rgba(255, 255, 255, .16); color: var(--on-accent); }
.tool.featured-us .tx span, .tool.featured-us .chev { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }

/* קבוצה אחת עם קווים דקים, במקום הרבה כרטיסים צפים */
.group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.group > .tool { box-shadow: none; border-radius: 0; margin: 0; }
.group > .tool + .tool, .group > .row-item + .row-item { border-top: 1px solid var(--line); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; }
.row-item.col { flex-direction: column; align-items: stretch; gap: 0; }
.row-item .tx { flex: 1; min-width: 0; }
.row-item .tx b { display: block; font-size: 15px; line-height: 1.45; }
.row-item .tx span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-item .chev { color: var(--muted); flex: none; }
.row-item > .tag { flex: none; min-width: 30px; justify-content: center; }

/* המונה */
.tally .tally-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tally-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--control); background: var(--surface); min-height: 84px; }
.tally-btn b { font-size: 26px; line-height: 1.1; }
.tally-btn span { font-size: 14px; color: var(--ink-2); text-align: center; line-height: 1.35; }
.tally-btn.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--control)); }
.tally-btn.ok b { color: var(--ok); }
.tally-btn:active { transform: scale(.98); }
.tally [data-undo] { margin-top: 8px; }

/* באנר הפגישה השבועית */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); text-decoration: none; color: var(--ink); background: var(--inner-soft); }
.banner.us { background: var(--us-soft); }
.banner .tx { flex: 1; min-width: 0; }
.banner .tx b { display: block; font-size: 15px; }
.banner .tx span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }

/* רשימת מספרים בכרטיס אחד */
.stats-list { list-style: none; margin: 0; padding: 4px 16px; }
.stats-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stats-list li:last-child { border-bottom: 0; }
.stats-list li span { color: var(--ink-2); font-size: 15px; }
.stats-list li b { font-size: 18px; }

/* כרטיס טיפול: נקודת צבע במקום פס עליון */
.track.inner, .track.us { border-top: 0; }
.track-name { display: inline-flex; align-items: center; gap: 6px; }
.track .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--inner); flex: none; }
.track.us .dot { background: var(--us); }
.track-goal { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.track .due { align-self: flex-start; margin-top: 6px; }

.plan-dl { margin: 0; }
.plan-dl dt { color: var(--muted); font-size: 13px; margin-top: 10px; }
.plan-dl dd { margin: 2px 0 0; }
.switch-row { cursor: pointer; }
