/* ============================================================
   VEQTRION — Future Performance Lab
   מכשיר אחד: הלוח הכחול-לילה הוא ראש המכשיר, הדף שמתחתיו הוא משטח רציף ושקט,
   וסימון הסט הוא אח קטן של טבעת הלוח — טבעת שנסגרת כשהסט בוצע.
   כל צבע מוגדר כאן כטוקן (ערכי הערכה הבהירה) ומוחלף תחת html[data-theme="dark"].
   צורות: שלושה רדיוסים (8 · 12 · 20) ועיגול מלא — העיגול שמור לטבעות המכשיר ולפקדים העגולים.
   ============================================================ */

:root {
  color-scheme: light;

  /* ---- תפקידים: משטחים ודיו ---- */
  --color-bg: #EEF3FB;          /* הדף — משטח רציף אחד */
  --color-surface: #FFFFFF;     /* מורם: הסט הפעיל, כרטיסים, גיליונות */
  --color-sunken: #E3EAF6;      /* שקוע בטון: שדות, מסילות בחירה, תגים */
  --color-text: #0F1F38;
  --color-text-2: #55627A;      /* טקסט משני — 5.5:1 על הדף */
  --color-text-3: #7C8AA4;      /* סימנים שאינם טקסט (מסלול טבעת) — 3:1 */
  --color-divider: rgba(15, 31, 56, 0.09);
  --color-accent: #2A6FE8;      /* הכחול היחיד: "בוצע" והפעולה הראשית */
  --color-accent-2: #0F1F38;
  --on-accent: #FFFFFF;
  --accent-ink: #1849A6;        /* כחול כטקסט */
  --accent-wash: #DCE8FD;       /* כחול כגוון רקע */
  --accent-veil: #F2F6FE;
  --press: rgba(15, 31, 56, 0.07);
  --tab-thumb: #FFFFFF;         /* הלשונית הפעילה */
  --sel-bg: #0F1F38; --sel-ink: #EEF4FF; --sel-tag: rgba(238, 244, 255, 0.16);
  --ring-track: #7C8AA4;        /* טבעת סט שעוד לא בוצע — גבול פקד, 3:1 */
  --ring-track-soft: rgba(15, 31, 56, 0.15);
  --amber-ink: #8A5800; --amber-wash: #FBEFD9;      /* ענבר — דרופ סט בלבד */
  --danger-ink: #9E3D27; --danger-wash: #FDEEE9; --danger-solid: #B4452D;
  --water: #2A6FE8; --water-2: #5B93F2; --water-track: #DCE8FD;
  --scrim: rgba(8, 18, 36, 0.72);

  /* ---- הלוח: כחול-לילה בשתי הערכות ---- */
  --board: #0F1F38; --board-2: #17305A;
  --board-ink: #EEF4FF; --board-muted: #9DB0CF;
  --board-lit: #5B93F2; --board-lit-soft: #9DBEF8;
  --board-track: rgba(238, 244, 255, 0.13); --board-tick: rgba(238, 244, 255, 0.2);
  --board-well: rgba(238, 244, 255, 0.09);
  --board-warn: #FFCE91;
  --console-shadow: 0 -12px 28px -14px rgba(15, 31, 56, 0.4);

  /* ---- סולמות (השמות הקיימים — שאר המסכים נשענים עליהם) ---- */
  --accent-100: #EAF1FE; --accent-200: #CFE0FD; --accent-300: #9DBEF8;
  --accent-400: #5B93F2; --accent-500: #2A6FE8; --accent-600: #1E5BCC;
  --accent-700: #1849A6; --accent-800: #143A82; --accent-900: #0D2758;
  --forest-100: #E9EFF8; --forest-300: #AFC0DA; --forest-500: #5B7396;
  --forest-700: #23395E; --forest-800: #172A47; --forest-900: #0F1F38;
  --neutral-100: #F5F7FB; --neutral-200: #E8EDF5; --neutral-300: #D5DDEA;
  --neutral-400: #B3BFD1; --neutral-500: #8F9BB0; --neutral-700: #556178; --neutral-900: #1D2A40;
  --warning-300: #FFCE91; --warning-500: #F2A635; --warning-700: #8A5800;
  --danger-100: #FDEEE9; --danger-300: #FBC1B3; --danger-500: #DE6B51; --danger-600: #B4452D; --danger-700: #9E3D27;

  /* ---- טיפוגרפיה ---- */
  --font-heading: "Suez One", "Rubik", serif;
  --font-body: "Rubik", system-ui, sans-serif;

  /* ---- רדיוס · גובה ---- */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px; --radius-pill: var(--radius-sm);
  --shadow-sm: 0 1px 1px rgba(15, 31, 56, 0.05), 0 3px 8px -3px rgba(15, 31, 56, 0.14);
  --shadow-md: 0 1px 2px rgba(15, 31, 56, 0.04), 0 10px 26px -14px rgba(15, 31, 56, 0.24);
  --shadow-lg: 0 2px 6px rgba(15, 31, 56, 0.06), 0 26px 56px -24px rgba(15, 31, 56, 0.4);
  --glow-accent: 0 0 0 0 transparent; /* בלי הילות */

  /* ---- תנועה ---- */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-press: cubic-bezier(0.23, 1, 0.32, 1);

  /* ---- אייקונים (מסכות SVG; הטקסט ב-DOM נשאר כפי שהוא) ---- */
  --i-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.4 4.1a2.05 2.05 0 0 1 2.9 2.9L8 18.3l-3.9 1 1-3.9L16.4 4.1z'/%3E%3Cpath d='M14.4 6.1l2.9 2.9'/%3E%3C/svg%3E");
  --i-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5.5M6 11.2l6-6 6 6'/%3E%3C/svg%3E");
  --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v13.5M18 12.8l-6 6-6-6'/%3E%3C/svg%3E");
  --i-grip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='8.5' cy='5.5' r='1.6'/%3E%3Ccircle cx='15.5' cy='5.5' r='1.6'/%3E%3Ccircle cx='8.5' cy='12' r='1.6'/%3E%3Ccircle cx='15.5' cy='12' r='1.6'/%3E%3Ccircle cx='8.5' cy='18.5' r='1.6'/%3E%3Ccircle cx='15.5' cy='18.5' r='1.6'/%3E%3C/svg%3E");
  --i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --i-drop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 8.5v9h-9'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
  --i-fwd: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5.5M11.5 5.5L5 12l6.5 6.5'/%3E%3C/svg%3E");
  --i-check-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.6l4.3 4.3L18.5 8'/%3E%3C/svg%3E");

  /* ---- תאימות לשמות הקודמים בקוד ---- */
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --ink: var(--color-text);
  --muted: var(--color-text-2);
  --line: var(--neutral-200);
  --line-strong: var(--neutral-300);
  --accent: var(--accent-600);
  --accent-deep: var(--accent-800);
  --accent-soft: var(--accent-100);
  --accent-bright: var(--accent-500);
  --amber: var(--warning-700);
  --amber-soft: var(--amber-wash);
  --red: var(--danger-600);
  --red-soft: var(--danger-100);
  --radius-lg-c: var(--radius-md);
  --font-display: var(--font-heading);
}

/* ---- ערכה כהה: הקרקע היא כחול-הלילה של האפליקציה (לא שחור), הלוח מורם ממנה בטון אחד ---- */
html[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #0F1F38;
  --color-surface: #1A2F52;
  --color-sunken: #16294A;
  --color-text: #EEF4FF;
  --color-text-2: #A3B5D2;
  --color-text-3: #6A80A6;
  --color-divider: rgba(238, 244, 255, 0.09);
  --color-accent-2: #EEF4FF;
  --accent-ink: #9DBEF8;
  --accent-wash: rgba(42, 111, 232, 0.24);
  --accent-veil: rgba(42, 111, 232, 0.1);
  --press: rgba(238, 244, 255, 0.09);
  --tab-thumb: #2D4874;
  --sel-bg: #2D4874; --sel-ink: #FFFFFF; --sel-tag: rgba(238, 244, 255, 0.16);
  --ring-track: #6A80A6;
  --ring-track-soft: rgba(238, 244, 255, 0.17);
  --amber-ink: #F2B45A; --amber-wash: rgba(242, 166, 53, 0.15);
  --danger-ink: #F6A592; --danger-wash: rgba(222, 107, 81, 0.17); --danger-solid: #B4452D;
  --water-track: rgba(42, 111, 232, 0.24);

  --board: #152A4D; --board-2: #1D3864;
  --console-shadow: 0 -14px 30px -14px rgba(3, 9, 22, 0.75);

  --accent-100: #15305C; --accent-200: #1C3F78; --accent-300: #3F6BB4;
  --accent-700: #9DBEF8; --accent-800: #CFE0FD; --accent-900: #EAF1FE;
  --neutral-100: #16294A; --neutral-200: #213A63; --neutral-300: #2D4874;
  --neutral-400: #5E7499; --neutral-500: #8296B8; --neutral-700: #A3B5D2; --neutral-900: #EEF4FF;
  --warning-300: #7A5A1E; --warning-700: #F2B45A;
  --danger-100: rgba(222, 107, 81, 0.17); --danger-300: #7E3A2B; --danger-600: #F08A72; --danger-700: #F6A592;

  --shadow-sm: 0 0 0 0 transparent;
  --shadow-md: 0 12px 26px -16px rgba(3, 9, 22, 0.7);
  --shadow-lg: 0 26px 52px -22px rgba(3, 9, 22, 0.8);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
}
/* גודל הבסיס יושב על html; body וטקסטי המפתח (כותרות כרטיס, שם תרגיל, שדות סט, טאבים, מאקרו) ב-rem —
   כך "טקסט גדול" של המערכת (Dynamic Type דרך -apple-system-body) מגדיל אותם בלי לשכתב את כל ה-px */
html { font-size: 16px; }
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; font-family: var(--font-body); line-height: 1.55; }
}
body { font-size: 1rem; }

/* dvh — המקלדת וסרגלי Split View משנים את הגובה בזמן ריצה; 100vh נשאר כ-fallback */
body { min-height: 100vh; min-height: 100dvh; }

::selection { background: var(--accent-200); }
:focus-visible { outline: 2px solid var(--accent-400); outline-offset: 2px; }
/* פינות עגולות לטבעת רק לאלמנט בלי רדיוס משלו — :where = ספציפיות 0, כך שכל רדיוס של רכיב (עיגול ✓, שדה) גובר */
:where(:focus-visible) { border-radius: var(--radius-sm); }
/* מקלדת/עכבר (iPad, Android): טבעת מיקוד ברורה על כל הפקדים — הגלובלי למעלה מעגל פינות, כאן שומרים את הצורה */
.btn:focus-visible, .tab:focus-visible, .set-pill:focus-visible, .stepper-btn:focus-visible, .day-chip:focus-visible,
.sr-step:focus-visible, .sr-check:focus-visible, .icon-btn:focus-visible, .add-set:focus-visible, .option:focus-visible,
.qe-chip:focus-visible, .mini-stepper button:focus-visible, .option-qty button:focus-visible, .board-cta:focus-visible,
.cal-cell:focus-visible, .session-head:focus-visible, .drag-handle:focus-visible, .input:focus-visible {
  outline: 3px solid var(--accent-400); outline-offset: 2px; /* בלי border-radius — כל רכיב שומר על הצורה שלו */
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

h1, h2, h3 { margin: 0; font-weight: 600; }
/* ב-iOS כפתור מקבל צבע מערכת כחול — כאן הוא יורש את צבע הטקסט כמו בשאר הדפדפנים */
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* מגע: בלי השהיית double-tap ובלי ההבהוב האפור של הדפדפן — לכל פקד יש מצב לחוץ משלו */
button, a, input, select, textarea, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* אי בידוד LTR למספרים ומונחים לטיניים בתוך עברית */
.ltr { direction: ltr; unicode-bidi: isolate; }

#app > * { max-width: 1080px; margin-inline: auto; }

/* ---------- מסך טעינה ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--board); z-index: 50; }
.boot-card { text-align: center; color: var(--board-ink); }
.boot-brand { font-family: var(--font-heading); font-size: 36px; letter-spacing: 0.22em; color: var(--board-lit-soft); direction: ltr; }
.boot-tag { color: var(--board-muted); font-size: 11.5px; letter-spacing: 0.24em; margin-top: 8px; direction: ltr; }
.boot-sub { color: var(--board-muted); margin-top: 16px; }

/* ============================================================
   ראש המכשיר — הלוח בכחול-לילה; הלשוניות בסרגל משלהן מתחתיו
   ============================================================ */
.board {
  position: relative;
  overflow: hidden;
  background: var(--board);
  color: var(--board-ink);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.board .board-video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; opacity: 0.55; }
.board .board-video[data-mode="intro"] { opacity: 0.35; }

.board-inner {
  position: relative; z-index: 2;
  padding: 22px 30px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 40px;
  align-items: center;
}

.board-id { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.board-brandline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand { font-family: var(--font-heading); font-size: 14px; letter-spacing: 0.28em; color: var(--board-lit-soft); direction: ltr; }
.board-name { font-weight: 500; letter-spacing: 0.01em; }
.board-date { color: var(--board-muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.board-next { min-width: 0; }
.board-next-label { display: block; color: var(--board-muted); font-size: 13.5px; font-weight: 500; margin-bottom: 4px; }
.board-next-name {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.1; letter-spacing: -0.01em;
  text-wrap: balance;
}
.board-next-meta { color: var(--board-muted); font-size: 14px; margin-top: 8px; text-wrap: balance; }
.board-next-meta b { color: var(--board-ink); font-weight: 500; }

/* מד הסטים של אימון היום */
.board-meter { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.board-meter-label { color: var(--board-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
/* ביום עם הרבה סטים המקטעים מתכווצים לרוחב הלוח במקום לחרוג ממנו */
.set-meter { display: flex; gap: 3px; align-items: center; min-width: 0; max-width: 100%; }
.set-meter i {
  width: 16px; height: 6px; border-radius: var(--radius-sm);
  flex: 0 1 16px; min-width: 2px;
  background: var(--board-track);
}
.set-meter i.on { background: var(--board-lit); }
.set-meter .gap { width: 4px; flex-basis: 4px; background: none; }

.board-cta {
  margin-top: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px;
  background: var(--color-accent);
  color: var(--on-accent); font-weight: 600; font-size: 1rem;
  border: 0; border-radius: var(--radius-md);
  transition: background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .board-cta:hover { background: var(--accent-600); } }
.board-cta small { position: relative; width: 18px; height: 18px; font-size: 0; color: var(--on-accent); }
.board-cta small::before {
  content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--i-fwd) center / contain no-repeat; mask: var(--i-fwd) center / contain no-repeat;
}
html[dir="ltr"] .board-cta small::before { transform: scaleX(-1); }

/* המכשיר — טבעת כפולה עם שנתות, ולידה הקריאות */
.board-cal { display: flex; align-items: center; gap: 22px; }
.instrument { position: relative; width: 200px; height: 200px; flex-shrink: 0; }
.instrument svg { width: 100%; height: 100%; display: block; }
.instrument .tick { stroke: var(--board-tick); }
.instrument .tick.lit { stroke: var(--board-lit); }
.instrument .ring-bg { stroke: var(--board-track); fill: none; }
.instrument .ring-kcal {
  stroke: var(--board-lit); fill: none; stroke-linecap: round;
  transition: stroke-dashoffset 1150ms var(--ease-inout);
}
.instrument .ring-kcal.over { stroke: var(--warning-500); }
.instrument .ring-protein {
  stroke: var(--board-lit-soft); fill: none; stroke-linecap: round; opacity: 0.9;
  transition: stroke-dashoffset 1150ms var(--ease-inout) 130ms;
}
.instrument .head-dot { fill: #FFFFFF; }
.instrument-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.instrument-center .val { font-family: var(--font-heading); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.instrument-center .of { color: var(--board-muted); font-size: 13px; margin-top: 5px; font-variant-numeric: tabular-nums; }

/* קריאה = שורה: השם בצד ההתחלה, המספר (Suez One) בצד הסוף, ומה שנותר מתחת */
.board-readouts { display: flex; flex-direction: column; gap: 12px; min-width: 170px; }
.readout { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
.readout .ro-label { grid-column: 1; grid-row: 1; color: var(--board-ink); font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.readout .ro-val { grid-column: 2; grid-row: 1; font-family: var(--font-heading); font-size: 21px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.readout .ro-sub { grid-column: 1 / -1; grid-row: 2; color: var(--board-muted); font-size: 12.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.readout.warn .ro-val { color: var(--board-warn); }

@media (prefers-reduced-motion: reduce) {
  .instrument .ring-kcal, .instrument .ring-protein, .instrument .head-dot { transition: none; }
}

/* ---------- לשוניות: סרגל משלהן על קרקע הדף, מתחת ללוח; נדבק לראש המסך. הלשונית הפעילה — גלולה רכה ---------- */
.tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px;
  /* לרוחב בטלפון (וב-Duo): לא מתחת ל-notch — שולי הבטיחות הצדדיים */
  padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
  position: sticky; top: 0; z-index: 10;
  background: var(--color-bg);
}
.tab {
  border: 0; background: none;
  height: 44px; padding: 0 20px;
  font-size: 1rem; color: var(--color-text-2);
  border-radius: var(--radius-md);
  transition: color 160ms ease, background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--color-text); background: var(--press); } }
/* באנגלית התוויות ארוכות יותר: במסך צר מקטינים את הריפוד כדי שארבע הלשוניות ייכנסו */
@media (max-width: 380px) { html[dir="ltr"] .tab { padding: 0 11px; } }
@media (max-width: 360px) { html[dir="ltr"] .tabs { gap: 2px; } html[dir="ltr"] .tab { padding: 0 6px; font-size: 0.84rem; } }
.tab.active { color: var(--color-text); font-weight: 600; background: var(--tab-thumb); box-shadow: var(--shadow-sm); }
.tabs-mini {
  margin-inline-start: auto;
  display: flex; align-items: center; gap: 8px; padding-inline-end: 8px;
  color: var(--color-text-2); font-size: 14px; font-variant-numeric: tabular-nums;
}
.tabs-mini b { color: var(--color-text); }
.tabs-mini svg { display: block; }
.tabs-mini svg circle:first-child { stroke: var(--ring-track-soft); }
@media (max-width: 719px) { .tabs-mini { display: none; } .tab { flex: 1; text-align: center; padding: 0 6px; } }

/* ---------- מבנה כללי ---------- */
.view { padding: 22px 16px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.card {
  background: var(--color-surface);
  border: 0;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.card-title { font-size: 1.0625rem; font-weight: 600; margin-bottom: 4px; }
.card-sub { color: var(--color-text-2); font-size: 14px; }
.view h2 { font-family: var(--font-heading); font-weight: 400; letter-spacing: 0; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

.notice {
  background: var(--amber-wash);
  border: 0;
  color: var(--amber-ink);
  border-radius: var(--radius-md);
  padding: 12px 16px; margin-bottom: 16px;
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
}
.notice p { margin: 0; font-size: 15px; }

/* ---------- כפתורים: שקט בטון, והכחול רק לפעולה הראשית ---------- */
.btn {
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--radius-md);
  background: var(--color-sunken);
  color: var(--color-text); font-weight: 500;
  transition: background-color 160ms ease, color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--accent-wash); } }
.btn.primary { background: var(--color-accent); color: var(--on-accent); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: var(--accent-600); } }
.btn.danger { color: var(--danger-ink); }
@media (hover: hover) and (pointer: fine) { .btn.danger:hover { background: var(--danger-wash); } }
.btn.small { padding: 0 14px; font-size: 14px; }
.btn.ghost { background: none; color: var(--color-text-2); }
@media (hover: hover) and (pointer: fine) { .btn.ghost:hover { color: var(--color-text); background: var(--press); } }

/* בחירה מקוטעת: מסילה שקועה, המקטע הנבחר בכחול-לילה. גובה המגע 44, המילוי הנראה פנימי ב-4 */
.seg { display: inline-flex; background: var(--color-sunken); border: 0; border-radius: var(--radius-md); padding: 0; }
.seg button {
  min-height: 44px; padding: 0 12px;
  border: 4px solid transparent; background: transparent; background-clip: padding-box;
  color: var(--color-text-2); font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: background-color 160ms ease, color 160ms ease;
}
.seg button.on { background-color: var(--sel-bg); color: var(--sel-ink); font-weight: 500; }
/* בורר התוכנית עם תוכנית אחת בלבד — אין במה לבחור: השם נקרא ככותרת הדף, לא כמתג (עדיין כפתור) */
#program-seg:has(> button:only-child) { background: none; }
#program-seg > button:only-child.on { background-color: transparent; color: var(--color-text); border-inline-width: 0; padding-inline: 0; font-family: var(--font-heading); font-weight: 400; font-size: 1.1875rem; }

/* בורר מקום האימון — מוצג רק כשהוגדר חדר כושר ביתי */
.where-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.where-bar .seg button { padding: 0 16px; font-weight: 500; }
@media (max-width: 479px) {
  .where-bar .seg { display: flex; width: 100%; }
  .where-bar .seg button { flex: 1; padding: 0 8px; }
}

/* מתג */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; border: 0; border-radius: var(--radius-md);
  background: var(--color-sunken); cursor: pointer; }
.switch-row .sw-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row .sw-text b { font-weight: 600; }
.switch { position: relative; flex: 0 0 auto; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: var(--radius-lg); background: var(--color-text-3);
  transition: background-color 180ms var(--ease-out); pointer-events: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm);
  transition: inset-inline-start 180ms var(--ease-out); }
.switch input:checked + .track { background: var(--color-accent); }
.switch input:checked + .track::after { inset-inline-start: 23px; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-200); }

/* ---------- טפסים: שדה = באר שקועה, בלי מסגרת ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13.5px; color: var(--color-text-2); }
.input, input.input, select.input, textarea.input {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 9px 12px;
  background: var(--color-sunken);
  min-width: 0;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}
textarea.input { resize: vertical; min-height: 56px; }
.input::placeholder { color: var(--color-text-2); opacity: 1; }
.input:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; }
.input.num { width: 76px; text-align: center; font-variant-numeric: tabular-nums; direction: ltr; }
.card .input, .ex-edit .input { background: var(--color-bg); }

/* ============================================================
   אימונים
   ============================================================ */
.day-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.day-chip {
  position: relative;
  border: 0;
  background: var(--color-sunken);
  border-radius: var(--radius-md);
  min-height: 46px; padding: 0 16px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background-color 160ms ease, color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .day-chip:hover { background: var(--accent-wash); } }
.day-chip.on { background: var(--sel-bg); color: var(--sel-ink); font-weight: 500; }
.day-chip .next-tag {
  font-size: 11px; font-weight: 600;
  background: var(--color-surface); color: var(--color-text-2);
  border-radius: var(--radius-sm); padding: 1px 7px;
}
.day-chip.on .next-tag { background: var(--sel-tag); color: var(--sel-ink); }
.day-chip .done-mark { color: var(--color-accent); }

.day-progress {
  display: flex; align-items: baseline; justify-content: space-between; gap: 2px 12px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.day-progress .dp-title { font-weight: 600; font-size: 1rem; }
.day-progress .dp-sub { color: var(--color-text-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---- תרגיל: לא כרטיס — מקטע על הדף. שורת הכותרת: חוגה · שם · ידית; מתחתיה תגים וכלים ---- */
.exercise-grid { display: flex; flex-direction: column; gap: 14px; }
.exercise {
  position: relative;
  padding: 12px 0;
  border-radius: var(--radius-lg);
  scroll-margin-top: 76px; /* ה-CTA בלוח גולל לכאן — מתחת ללשוניות הדביקות */
  --n: 1; --k: 0;
}
.exercise:focus { outline: none; } /* מיקוד תכנותי אחרי הגלילה */
.exercise:not(.superset), .ss-member {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px 44px; align-items: center;
}
.exercise:not(.superset) > *, .ss-member > * { grid-column: 1 / -1; min-width: 0; }
.ex-top, .ex-details, .ex-ctrl { display: contents; }

/* מספר סידורי: דיסקה שקטה (בונה האימונים). בתוך תרגיל — החוגה: טבעת מקוטעת, מקטע לכל סט, והסטים שבוצעו דולקים */
.idx-dot {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%; border: 0; background: var(--color-sunken);
  display: grid; place-items: center;
  font-family: var(--font-heading); font-size: 13.5px; font-weight: 400; line-height: 1; color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.exercise .idx-dot { grid-column: 1; grid-row: 1; align-self: start; position: relative; isolation: isolate; width: 44px; height: 44px; font-size: 15px; }
.exercise .idx-dot:not(.ss) { background: none; }
.exercise .idx-dot:not(.ss)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  --seg: calc(360deg / var(--n));
  --gap: min(13deg, calc(var(--seg) * 0.28));
  background: conic-gradient(var(--color-accent) calc(var(--seg) * var(--k)), var(--ring-track-soft) 0);
  -webkit-mask-image:
    radial-gradient(farthest-side, transparent calc(100% - 4.4px), #000 calc(100% - 3.6px)),
    repeating-conic-gradient(from calc(var(--gap) / 2), #000 0 calc(var(--seg) - var(--gap)), transparent calc(var(--seg) - var(--gap) + 0.6deg) calc(var(--seg) - 0.6deg), #000 var(--seg));
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(farthest-side, transparent calc(100% - 4.4px), #000 calc(100% - 3.6px)),
    repeating-conic-gradient(from calc(var(--gap) / 2), #000 0 calc(var(--seg) - var(--gap)), transparent calc(var(--seg) - var(--gap) + 0.6deg) calc(var(--seg) - 0.6deg), #000 var(--seg));
  mask-composite: intersect;
}
/* תרגיל שהושלם: החוגה נסגרת — דיסקה כחולה עם ✓, כמו סימון הסט */
.exercise.completed .idx-dot:not(.ss) { font-size: 0; }
.exercise.completed .idx-dot:not(.ss)::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--color-accent) var(--i-check-white) center / 16px 16px no-repeat;
}

/* ליד החוגה: שם התרגיל (Suez One), ומתחתיו הסטים והחזרות */
.ex-title-wrap { grid-column: 2 / 5; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-inline: 12px 6px; }
.ss-member .ex-title-wrap { grid-column: 2 / -1; padding-inline-end: 0; }
.exercise-name { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400; line-height: 1.15; overflow-wrap: anywhere; text-wrap: balance; }
.ex-target { font-size: 0.875rem; font-weight: 400; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.ex-target bdi { font-weight: 600; color: var(--color-text); }
.ex-target .tx { margin-inline: 1px; }
.ex-progress { color: var(--color-text-2); font-weight: 400; white-space: nowrap; }
.ex-progress bdi { font-family: var(--font-heading); font-weight: 400; font-size: 0.9375rem; }
.ex-target .tag-done { margin-inline-start: 6px; }

.ex-ctrl > .drag-handle { grid-column: 5; grid-row: 1; align-self: start; }
.ex-ctrl > [data-ex-edit] { grid-column: 3; grid-row: 2; align-self: start; }
.ex-ctrl > [data-ex-move$=":-1"] { grid-column: 4; grid-row: 2; align-self: start; }
.ex-ctrl > [data-ex-move$=":1"] { grid-column: 5; grid-row: 2; align-self: start; }
/* כלי הכותרת: גליף שקט בתוך שטח מגע של 44 */
.ex-ctrl > .icon-btn, .drag-handle {
  position: relative; flex: 0 0 auto;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  color: var(--color-text-2); font-size: 0; line-height: 0;
  transition: background-color 140ms ease, color 140ms ease;
}
.ex-ctrl > .icon-btn::before, .drag-handle::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.ex-ctrl > [data-ex-edit] { --icon: var(--i-edit); }
.ex-ctrl > [data-ex-move$=":-1"] { --icon: var(--i-up); }
.ex-ctrl > [data-ex-move$=":1"] { --icon: var(--i-down); }
.drag-handle { --icon: var(--i-grip); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.ex-ctrl > .icon-btn:active:not(:disabled), .drag-handle:active { background: var(--press); color: var(--color-text); }
@media (hover: hover) and (pointer: fine) {
  .ex-ctrl > .icon-btn:hover:not(:disabled), .drag-handle:hover { background: var(--press); color: var(--color-text); }
}
.ex-ctrl > .ex-edit-btn.on { background: var(--color-sunken); color: var(--color-text); }

/* מה שמתחת לכותרת: תגים (סוג, מנוחה, ציוד) בצד ההתחלה, הכלים בצד הסוף, ואז הפעם הקודמת */
.ex-details > .meta-chips { grid-column: 1 / 3; grid-row: 2; margin: 0; padding-block: 9px; align-self: start; }
.ex-details > .prev-line { grid-column: 1 / -1; grid-row: 3; }
.ex-status { font-family: var(--font-heading); font-size: 0.9375rem; color: var(--color-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-done {
  display: inline-block;
  background: var(--accent-wash); color: var(--accent-ink);
  font-family: var(--font-body); font-weight: 600; font-size: 12px; line-height: 1.5;
  border-radius: var(--radius-sm); padding: 1px 8px;
}

.meta-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.meta-chip {
  min-height: 26px; display: inline-flex; align-items: center;
  background: var(--color-sunken);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 2px 9px; font-size: 13px; color: var(--color-text-2);
}
.meta-chip b { color: var(--color-text); font-weight: 600; margin-inline: 3px; }

.prev-line { display: flex; align-items: flex-start; gap: 4px 8px; margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--color-text-2); }
/* השעון: האימוג׳י נשאר בטקסט, מוסתר, ובמקומו אייקון קו בצבע הטקסט */
.prev-line::before {
  content: ""; flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2.5px;
  background: currentColor;
  -webkit-mask: var(--i-clock) center / contain no-repeat; mask: var(--i-clock) center / contain no-repeat;
}
.prev-line > span:first-of-type::first-letter { font-size: 0; }
.prev-line > span:first-of-type { flex: 1 1 0; min-width: 0; margin-inline-start: -4px; }
.prev-line .trend {
  flex: 0 0 auto; font-size: 12px; font-weight: 600;
  border-radius: var(--radius-sm); padding: 1px 7px;
  background: var(--color-sunken); color: var(--color-text);
}
.prev-line .trend.down { color: var(--color-text-2); }
.prev-sets { display: inline-block; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-text); }

/* ---- רכיבי רישום מהגרסה הקודמת (נשארים זמינים, בטוקנים של הערכה) ---- */
.steppers { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.stepper { flex: 1; min-width: 180px; background: var(--color-sunken); border: 0; border-radius: var(--radius-md); padding: 10px 14px; }
.stepper-label { font-size: 12.5px; color: var(--color-text-2); margin-bottom: 6px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; direction: ltr; }
.stepper-btn { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--color-surface); font-size: 20px; line-height: 1; box-shadow: var(--shadow-sm); transition: background-color 120ms ease; }
.stepper-val { flex: 0 1 72px; min-width: 40px; width: 72px; height: 44px; border: 0; background: none; text-align: center; font-family: var(--font-heading); font-weight: 400; font-size: 24px; font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }
.stepper-val:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; }
.stepper-val::placeholder { color: var(--color-text-2); font-weight: 400; }
.sets-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sets-row .sets-label { font-size: 13.5px; color: var(--color-text-2); }
.set-pill { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--color-sunken); font-size: 15px; font-weight: 600; color: var(--color-text-2); font-variant-numeric: tabular-nums; display: grid; place-items: center; transition: background-color 200ms ease, color 200ms ease; }
.set-pill.done { background: var(--color-accent); color: var(--on-accent); }
.set-pill.extra { background: var(--color-bg); box-shadow: inset 0 0 0 1.5px var(--color-text-3); }
.set-pill.editing { box-shadow: 0 0 0 3px var(--accent-200); background: var(--accent-wash); color: var(--accent-ink); }
.set-slot { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 44px; }
.set-cap { font-size: 10.5px; color: var(--color-text-2); font-variant-numeric: tabular-nums; min-height: 14px; }
.set-log { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.set-log-row { display: flex; align-items: center; gap: 10px; background: var(--color-sunken); border: 0; border-radius: var(--radius-sm); padding: 5px 12px; font-size: 14px; }
.set-log-row b { font-variant-numeric: tabular-nums; }
.set-log-row .slr-idx { color: var(--color-text-2); font-size: 13px; min-width: 38px; }
.set-log-row.editing { background: var(--accent-wash); }

/* ---- טבלת הסטים: שורה לכל סט — מספר · משקל · חזרות · טבעת. בלי מסגרות: רק הסט הפעיל מורם ---- */
.set-table { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sr-head, .set-row { display: grid; grid-template-columns: 22px minmax(0, 1.12fr) minmax(0, 1fr) 44px; column-gap: 4px; align-items: center; }
.sr-head { font-size: 12px; color: var(--color-text-2); min-height: 22px; }
.sr-head span { text-align: center; }
.sr-head span:first-child { text-align: start; white-space: nowrap; }
.set-row { min-height: 48px; padding: 2px 0; }
.sr-idx { text-align: center; font-family: var(--font-heading); font-size: 15px; font-weight: 400; line-height: 1; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.set-row.done .sr-idx { color: var(--accent-ink); }

/* שדה = קפסולה אחת: − ערך +. המספר (Suez One) הוא הקריאה; ה-− וה-+ שקטים, עם שטח מגע של 44 */
.sr-field {
  display: flex; align-items: center; direction: ltr; min-width: 0;
  border-radius: var(--radius-md);
  background: var(--field-bg, transparent); box-shadow: var(--field-shadow, none);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.sr-step {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--step-ink, var(--color-text-2)); font-size: 20px; font-weight: var(--step-weight, 300); line-height: 1;
  transition: background-color 140ms ease, color 140ms ease;
}
.sr-step:active { background: var(--press); color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .sr-step:hover { background: var(--press); color: var(--color-text); } }
.sr-val {
  flex: 1 1 0; min-width: 0; width: 0; height: 44px; text-align: center; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--val-ink, var(--color-text));
  font-family: var(--font-heading); font-size: 1.3125rem; font-weight: 400; font-variant-numeric: tabular-nums;
}
.sr-val:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; color: var(--color-text); }
.sr-val::placeholder { color: var(--color-text-2); font-family: var(--font-body); font-weight: 400; font-size: 14px; opacity: 1; }

/* שלושה מצבים: בוצע — נרשם, טבעת סגורה · פעיל — קפסולות מורמות · בהמשך — שקט */
.set-table > :is(.set-row, .set-block):not(.done),
.ss-round:not(.done) > :is(.set-row, .set-block):not(.done) {
  --field-bg: var(--color-surface); --field-shadow: var(--shadow-sm); --step-weight: 400; --step-ink: var(--color-text);
}
.set-table > :is(.set-row, .set-block):not(.done) ~ :is(.set-row, .set-block):not(.done),
.ss-round:not(.done) ~ .ss-round > :is(.set-row, .set-block):not(.done) {
  --field-bg: transparent; --field-shadow: none; --val-ink: var(--color-text-2); --step-weight: 300; --step-ink: var(--color-text-2);
}

/* סימון הסט — אח קטן של טבעת הלוח. לפני: מסלול ריק, בלי ✓. אחרי: הטבעת נסגרת בכחול סביב דיסקה עם ✓ */
.sr-check {
  justify-self: center; position: relative;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  color: var(--color-text); font-size: 0; line-height: 0;
}
.sr-check::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: conic-gradient(var(--color-accent) var(--sweep, 0deg), var(--ring-track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.1px), #000 calc(100% - 2.4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3.1px), #000 calc(100% - 2.4px));
}
.sr-check::after {
  content: ""; position: absolute; inset: 10.5px; border-radius: 50%;
  background: var(--color-accent) var(--i-check-white) center / 14px 14px no-repeat;
  opacity: 0; transform: scale(0.9);
}
.sr-check[aria-pressed="true"]::before { --sweep: 360deg; }
.sr-check[aria-pressed="true"]::after { opacity: 1; transform: none; }

/* דרופ סט: הירידות הן שורות-בת של הסט — מוזחות בטיפוגרפיה (קטנות יותר, סימן ↘ בענבר), בלי פס צד */
.set-block { display: flex; flex-direction: column; gap: 2px; }
.set-row.drop { min-height: 44px; padding: 0; }
.set-row.drop .sr-idx { position: relative; color: var(--amber-ink); font-size: 0; display: flex; align-items: center; justify-content: center; gap: 1px; direction: ltr; }
.set-row.drop .sr-idx::before {
  content: ""; width: 11px; height: 11px; flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--i-drop) center / contain no-repeat; mask: var(--i-drop) center / contain no-repeat;
}
.set-row.drop .sr-idx small { font-family: var(--font-body); font-size: 11px; font-weight: 600; line-height: 1; }
.set-row.drop .sr-val { font-size: 1.125rem; }
.sr-check-gap { width: 44px; }
/* ירידה ספונטנית: "+ ירידה" מתחת לסט, × להסרת ירידה */
.sr-add-drop {
  align-self: flex-start; margin: -2px 0 0; margin-inline-start: 14px; min-height: 44px; padding: 5px 12px 0;
  display: flex; align-items: flex-start;
  border: 0; border-radius: var(--radius-md); background: none;
  color: var(--amber-ink); font: inherit; font-size: 13.5px; line-height: 1.4; font-weight: 500; cursor: pointer;
  transition: background-color 140ms ease;
}
.sr-add-drop:active { background: var(--amber-wash); }
@media (hover: hover) and (pointer: fine) { .sr-add-drop:hover { background: var(--amber-wash); } }
.sr-drop-warn { font-size: 12.5px; color: var(--danger-ink); background: var(--danger-wash); border-radius: var(--radius-sm); padding: 5px 10px; margin: 0 0 2px; margin-inline-start: 26px; }
.sr-drop-del {
  justify-self: center; position: relative; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  color: var(--color-text-2); font-size: 0; line-height: 0;
  transition: background-color 140ms ease, color 140ms ease;
}
.sr-drop-del::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px;
  background: currentColor;
  -webkit-mask: var(--i-x) center / contain no-repeat; mask: var(--i-x) center / contain no-repeat;
}
.sr-drop-del:active { background: var(--danger-wash); color: var(--danger-ink); }
@media (hover: hover) and (pointer: fine) { .sr-drop-del:hover { color: var(--danger-ink); background: var(--danger-wash); } }
/* ירידות של סט שבוצע ומולא: שורת סיכום מתקפלת במקום שורות הקלט (הסט הפעיל וסטים עם ⚠ תמיד פרוסים) */
.sr-drops { display: flex; flex-direction: column; gap: 2px; }
.sr-drops[hidden] { display: none; }
.sr-drops-toggle {
  display: flex; align-items: center; gap: 8px; min-height: 44px; margin-inline: 14px 48px; padding: 0 12px;
  border: 0; border-radius: var(--radius-md); background: transparent;
  color: var(--color-text-2); font: inherit; font-size: 13.5px; text-align: start; cursor: pointer;
  transition: background-color 140ms ease;
}
.sr-drops-toggle:active { background: var(--press); }
@media (hover: hover) and (pointer: fine) { .sr-drops-toggle:hover { background: var(--press); } }
.sr-drops-toggle:focus-visible { box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; }
.sr-drops-toggle .chev { /* חץ אנכי — זהה ב-RTL */
  display: inline-block; position: relative; width: 14px; height: 14px; font-size: 0; color: var(--amber-ink);
  transition: transform 160ms var(--ease-out);
}
.sr-drops-toggle .chev::before {
  content: ""; position: absolute; inset: 0; background: currentColor;
  -webkit-mask: var(--i-drop) center / 11px 11px no-repeat; mask: var(--i-drop) center / 11px 11px no-repeat;
}
.sr-drops-toggle[aria-expanded="true"] .chev { color: var(--color-text-2); transform: rotate(180deg); }
.sr-drops-toggle[aria-expanded="true"] .chev::before { -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; }
.sr-drops-sum { margin-inline-start: auto; font-family: var(--font-heading); font-size: 0.9375rem; font-variant-numeric: tabular-nums; font-weight: 400; color: var(--color-text); }

/* עריכה מתוך מסך הרישום */
.ex-edit {
  margin-top: 6px; padding: 14px; border-radius: var(--radius-lg); background: var(--color-surface); border: 0;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.ex-edit .seg { display: flex; flex-wrap: wrap; background: var(--color-bg); }
.ex-edit .seg button { flex: 1; padding: 0 8px; }
.ex-edit .seg button:disabled { opacity: .45; }
.ex-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-edit-row .input { width: 100%; }
html[dir="rtl"] .ex-edit-row .input { unicode-bidi: plaintext; text-align: right; }
.ex-edit-note { margin: 0; font-size: 12.5px; color: var(--color-text-2); }

/* + סט / − סט: כפתורי טקסט שקטים; התווית מיושרת לקצה התוכן */
.sets-actions { display: flex; gap: 4px; margin-top: 2px; }
.sets-actions > .add-set:first-child { padding-inline-start: 0; }
.add-set {
  min-height: 44px; min-width: 44px; border-radius: var(--radius-md);
  border: 0; background: none;
  padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--color-text-2);
  transition: background-color 140ms ease, color 140ms ease;
}
.add-set:active { background: var(--press); color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .add-set:hover { color: var(--color-text); background: var(--press); } }
.add-set.del-set { color: var(--danger-ink); }
@media (hover: hover) and (pointer: fine) { .add-set.del-set:hover { background: var(--danger-wash); color: var(--danger-ink); } }

.mode-badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.mode-badge.superset { background: var(--sel-bg); color: var(--sel-ink); }
.mode-badge.drop { background: var(--amber-wash); color: var(--amber-ink); }
.meta-chip.mode.drop { background: var(--amber-wash); color: var(--amber-ink); font-weight: 500; }
.meta-chip.mode.drop b { color: var(--amber-ink); }

.exercise-notes { margin-top: 2px; display: flex; flex-direction: column; gap: 6px; }
.exercise-notes input { width: 100%; }

/* שמירת תרגיל: סטטוס + כפתור בתחתית כל תרגיל. הכחול המלא שמור ל"שמירת האימון" — כאן הוא בגוון */
.ex-save {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; min-height: 44px;
}
.ex-save-status { font-size: 13px; color: var(--color-text-2); min-width: 0; }
.ex-save.saved .ex-save-status { color: var(--accent-ink); font-weight: 500; }
.ex-save.dirty .ex-save-status { color: var(--color-text); font-weight: 500; }
.ex-save.error { background: var(--danger-wash); border-radius: var(--radius-md); padding: 8px 12px; }
.ex-save.error .ex-save-status { color: var(--danger-ink); }
.ex-save .btn { flex-shrink: 0; margin-inline-start: auto; }
.ex-save .btn.primary { background: var(--accent-wash); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .ex-save .btn.primary:hover { background: var(--accent-200); } }
.ex-save .btn.ghost { padding-inline-end: 0; }

.finish-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.finish-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.finish-text b { font-family: var(--font-heading); font-weight: 400; font-size: 1.1875rem; }
.finish-btn { min-height: 50px; padding: 0 26px; font-size: 1rem; }
@media (max-width: 600px) { .finish-btn { width: 100%; } }

/* ---- סופר סט: מקטע אחד — התרגילים למעלה (מסילה מחברת ביניהם), והסטים בסבבים ---- */
.exercise.superset { display: flex; flex-direction: column; }
.ss-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.ss-head .card-sub { flex: 1 1 0; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.ss-head .grow { display: none; }
.ss-member { padding: 14px 0 0; }
.idx-dot.ss { font-size: 14px; }
.ss-round { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.ss-round-label { font-size: 13px; font-weight: 600; color: var(--color-text); min-height: 24px; display: flex; align-items: center; gap: 4px; }
.ss-round-label small { font-size: 12.5px; font-weight: 400; color: var(--color-text-2); }
.ss-round.done .ss-round-label { color: var(--accent-ink); }
.ss-round .sr-idx { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }

/* ---- גרירה לשינוי סדר ---- */
.dragging { position: relative; z-index: 40; cursor: grabbing; box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent-400) !important; transition: none !important; opacity: .97; }
html.drag-active, html.drag-active * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.bx-ss-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* בזמן גרירה: רק שורת הכותרת של כל תרגיל — והיא מקבלת גוף, כדי שיהיה מה לאחוז */
html.drag-active .exercise .set-table, html.drag-active .exercise .sets-actions, html.drag-active .exercise .exercise-notes,
html.drag-active .exercise .ex-save, html.drag-active .exercise .prev-line, html.drag-active .exercise .meta-chips,
html.drag-active .bx-card .bx-grid, html.drag-active .bx-card .bx-targets, html.drag-active .bx-card .bx-note,
html.drag-active .bx-card .bx-hint, html.drag-active .bx-ss-head span, html.drag-active .exercise .ex-details { display: none !important; }
html.drag-active .exercise { padding: 12px 10px; margin-inline: -10px; background: var(--color-surface); box-shadow: var(--shadow-sm); }
html.drag-active .exercise-grid { display: flex; flex-direction: column; gap: 10px; }
html.drag-active .exercise-grid .exercise { margin-bottom: 0; }

/* ---------- בונה האימונים (הגדרות) ---------- */
.bx-program-name { font-weight: 600; font-size: 17px; flex: 1 1 200px; min-width: 0; }
.bx-list { display: flex; flex-direction: column; gap: 10px; }
.bx-card {
  border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
}
.bx-card.mode-drop { border-inline-start: 4px solid var(--warning-500); }
.bx-head { display: flex; align-items: center; gap: 10px; }
.bx-name { flex: 1 1 0; width: 0; min-width: 0; font-weight: 600; font-size: 16px; }
.bx-tools { display: flex; gap: 2px; flex-shrink: 0; }
.bx-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -6px; padding-inline-start: 44px; }
.bx-muscle { font-size: 12.5px; color: var(--color-text-2); font-weight: 400; }
.bx-summary { min-width: 0; }
.bx-summary .ex-target { font-size: 13.5px; }
.bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.bx-grid .field .input { width: 100%; }
.mini-stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; direction: ltr; height: 40px;
  border: 1px solid var(--neutral-300); border-radius: var(--radius-pill); padding: 0 4px; background: var(--color-surface); }
.mini-stepper button { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--neutral-300); background: var(--neutral-100); font-size: 16px; line-height: 1; }
@media (hover: hover) and (pointer: fine) { .mini-stepper button:hover { border-color: var(--accent-500); background: var(--accent-100); } }
.mini-stepper b { font-size: 17px; font-variant-numeric: tabular-nums; }
.bx-hint { margin: 0; font-size: 13px; color: var(--color-text-2); }
.bx-hint.warn { color: var(--warning-700); }
.bx-targets summary { cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.bx-targets summary::-webkit-details-marker { display: none; }
.bx-targets summary::before { content: "▸"; color: var(--color-text-2); transition: transform 160ms; display: inline-block; }
.bx-targets[open] summary::before { transform: rotate(90deg); }
.bx-targets summary small { color: var(--color-text-2); font-weight: 400; font-size: 12.5px; }
.bx-trows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bx-trow { display: flex; align-items: center; gap: 8px; }
.bx-tidx { min-width: 44px; font-size: 13px; color: var(--color-text-2); }
.bx-trow .input.num { width: 84px; }
.bx-x { color: var(--color-text-2); }
/* ירידה בדרופ סט: מוזחת פנימה, בצבע הדרופ */
.bx-trow.drop { padding-inline-start: 14px; border-inline-start: 3px solid var(--warning-300); margin-top: -2px; }
.bx-trow.drop .bx-tidx { color: var(--warning-700); min-width: 58px; }
.bx-tcopy { margin-top: 8px; }
.bx-drops .seg { display: flex; }
.bx-drops .seg button { flex: 1; padding: 0 8px; }
.bx-note { width: 100%; }
.bx-ss { border: 1.5px solid var(--color-text-3); border-radius: var(--radius-lg); padding: 8px; display: flex; flex-direction: column; gap: 8px; background: var(--press); }
.bx-ss-head { font-size: 13.5px; color: var(--color-text-2); padding: 2px 6px; }
.bx-ss-head b { color: var(--color-text); }
.bx-ss .idx-dot { background: var(--sel-bg); color: var(--sel-ink); }
.bx-actions { margin-top: 12px; }
.lib-panel { margin-top: 12px; border: 1.5px solid var(--accent-300); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--color-surface); box-shadow: var(--shadow-md); }
.lib-panel input[type="search"] { width: 100%; height: 44px; border-radius: var(--radius-pill); padding-inline: 16px; font-size: 16px; }
.lib-muscles { margin: 0; }
.lib-add { color: var(--accent-700); font-weight: 500; }
@media (max-width: 600px) {
  .bx-grid { grid-template-columns: 1fr 1fr; }
  .bx-grid .bx-mode { grid-column: 1 / -1; }
  .bx-sub { padding-inline-start: 0; margin-top: -4px; }
  /* בטלפון: פחות שכבות של ריפוד — שם התרגיל מקבל את רוב השורה */
  .bx-day > .block-body { padding-inline: 0; }
  .bx-day > summary { padding-inline: 10px; }
  .bx-ss { padding: 5px; }
  .bx-card { padding: 10px; }
  .bx-head { gap: 6px; }
  .bx-tools .icon-btn { padding: 4px 5px; }
}

/* היסטוריה */
.session {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  margin-bottom: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.session-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; background: none; border: none; text-align: start; }
@media (hover: hover) and (pointer: fine) { .session-head:hover { background: var(--accent-100); } }
.session-title { font-weight: 600; }
.session-meta { color: var(--color-text-2); font-size: 14px; }
.session-body { padding: 0 18px 14px; }
.session-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.session-table th { text-align: start; color: var(--color-text-2); font-weight: 400; padding: 5px 8px; border-bottom: 1px solid var(--color-divider); font-size: 13.5px; }
.session-table td { padding: 6px 8px; border-bottom: 1px solid var(--neutral-100); font-variant-numeric: tabular-nums; }

/* ============================================================
   תזונה
   ============================================================ */
.date-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.date-nav .today-label { font-family: var(--font-heading); font-size: 21px; }
.date-nav input[type="date"] { border: 1px solid var(--neutral-300); border-radius: var(--radius-pill); padding: 6px 14px; background: var(--color-surface); }

.macros { display: flex; gap: 18px 26px; flex-wrap: wrap; align-items: center; }
.macro { min-width: 110px; }
.macro-label { font-size: 13.5px; color: var(--color-text-2); }
.macro-val { font-size: 1.25rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.macro-val small { color: var(--color-text-2); font-size: 14px; font-weight: 400; }
.kcal-bar { height: 12px; border-radius: var(--radius-pill); background: var(--accent-100); overflow: hidden; margin-top: 12px; box-shadow: inset 0 1px 2px rgba(15, 31, 56, 0.08); }
.kcal-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-600), var(--accent-400));
  border-radius: var(--radius-pill);
  transition: width 600ms var(--ease-out), background 350ms linear;
}
/* אנגלית (LTR): הפס מתמלא משמאל לימין — הגרדיאנט מתהפך איתו */
html[dir="ltr"] .kcal-bar > div { background: linear-gradient(270deg, var(--accent-600), var(--accent-400)); }
.kcal-bar > div.over { background: linear-gradient(90deg, var(--warning-700), var(--warning-500)); }
html[dir="ltr"] .kcal-bar > div.over { background: linear-gradient(270deg, var(--warning-700), var(--warning-500)); }
.kcal-bar.water { background: var(--water-track); }
.kcal-bar.water > div { background: linear-gradient(90deg, var(--water), var(--water-2)); }
html[dir="ltr"] .kcal-bar.water > div { background: linear-gradient(270deg, var(--water), var(--water-2)); }

.meal { margin-bottom: 22px; }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.meal-name { font-family: var(--font-heading); font-weight: 400; font-size: 1.3rem; overflow-wrap: anywhere; }
.meal-kcal { color: var(--color-text-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.alloc-chip {
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  background: var(--neutral-100); border: 1px solid var(--color-divider);
  border-radius: var(--radius-pill); padding: 2px 11px; color: var(--color-text-2);
}
.alloc-chip b { color: var(--color-text); }
.meal-note { color: var(--color-text-2); font-size: 14px; margin: 0 0 10px; max-width: 70em; }

.base-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-100); border: 1px solid var(--accent-300);
  border-radius: var(--radius-pill); padding: 5px 14px;
  font-size: 13.5px; color: var(--accent-800);
  margin-bottom: 10px;
}

.group { margin-bottom: 14px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.group-label { font-size: 14.5px; font-weight: 600; }
.pick-count {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  border-radius: var(--radius-pill); padding: 1px 9px;
  background: var(--neutral-100); color: var(--color-text-2);
  border: 1px solid var(--color-divider);
}
.pick-count.full { background: var(--accent-200); color: var(--accent-800); border-color: var(--accent-300); }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.option {
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  padding-inline-end: 44px;
  min-height: 86px;
  text-align: start;
  display: flex; flex-direction: column; gap: 4px; justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out), background 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .option:hover { border-color: var(--accent-400); transform: translateY(-1px); box-shadow: var(--shadow-md); } }
.option.on {
  background: var(--accent-100);
  border: 1.5px solid var(--accent-500);
  outline: 1px solid var(--accent-200); outline-offset: 3px;
}
.option::before {
  content: "";
  position: absolute; top: 50%; inset-inline-end: 13px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--neutral-300);
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.option.on::before { background: var(--accent-500); border-color: var(--accent-500); }
.option.on::after {
  content: "✓";
  position: absolute; top: 50%; inset-inline-end: 13px; transform: translateY(-50%);
  width: 22px; height: 22px;
  color: var(--on-accent); font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.option-name { font-size: 0.95rem; font-weight: 500; overflow-wrap: anywhere; }
.option-kcal { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.option-macros { color: var(--color-text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.option-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.option-qty button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--neutral-300); background: var(--color-surface); line-height: 1;
}
@media (hover: hover) and (pointer: fine) { .option-qty button:hover { border-color: var(--accent-500); background: var(--accent-100); } }
.option-qty span { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }

.custom-item { border-style: solid; color: var(--color-text-2); align-items: center; justify-content: center; }
.custom-item::before, .custom-item::after { display: none; }
@media (hover: hover) and (pointer: fine) { .custom-item:hover { color: var(--accent-700); } }
.custom-form {
  grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
  background: var(--color-surface); border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md); padding: 14px;
}

/* יומן מזונות לפי כמות */
.food-log { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.fl-row { display: flex; align-items: center; border-top: 1px solid var(--color-divider); }
.fl-row:first-child { border-top: none; }
.fl-row.editing { display: block; padding: 4px; background: var(--accent-veil); }
.fl-main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  background: none; border: none; text-align: start; padding: 11px 14px; color: inherit; font: inherit; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .fl-main:hover { background: var(--accent-100); } }
.fl-main:disabled { cursor: default; background: none; }
.fl-amt { font-size: 13.5px; color: var(--color-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-kcal { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 72px; text-align: end; }
.fl-row > .icon-btn { margin-inline-end: 6px; }

.fr-main { display: flex; flex-direction: column; min-width: 0; }
.fr-main b { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-main small { color: var(--color-text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.add-food {
  width: 100%; min-height: 48px; border: 1px solid var(--neutral-400); border-radius: var(--radius-md);
  background: transparent; color: var(--accent-700); font: inherit; font-weight: 500; font-size: 15px; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .add-food:hover { border-color: var(--accent-500); background: var(--accent-100); } }

.food-panel {
  display: flex; flex-direction: column; gap: 12px;
  border: 1.5px solid var(--accent-300); border-radius: var(--radius-md); background: var(--color-surface);
  padding: 14px; box-shadow: var(--shadow-md);
}
.fp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-search { display: flex; flex-direction: column; gap: 8px; }
.fp-search input[type="search"] { width: 100%; height: 46px; font-size: 16px; border-radius: var(--radius-pill); padding-inline: 18px; }
.fp-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg.seg-sm button { height: 32px; padding: 0 13px; font-size: 13.5px; }
.cat-select { max-width: 230px; height: 38px; }
.fr-list { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; border: 1px solid var(--color-divider); border-radius: var(--radius-sm); }
.fr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--color-surface); border: none; border-top: 1px solid var(--color-divider);
  padding: 10px 14px; text-align: start; font: inherit; color: inherit; cursor: pointer; min-height: 52px;
}
.fr-row:first-child { border-top: none; }
.fr-list > * { flex-shrink: 0; } /* ברשימה עם גובה מרבי שורות לא מתכווצות (אחרת השורה השנייה נחתכת) */
.fr-row:focus-visible { background: var(--accent-100); }
@media (hover: hover) and (pointer: fine) { .fr-row:hover { background: var(--accent-100); } }
.fr-meta { display: flex; align-items: center; gap: 6px; color: var(--color-text-2); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fr-star { font-style: normal; color: var(--warning-500); }
.fr-mine { font-style: normal; font-size: 11.5px; background: var(--accent-100); color: var(--accent-800); border-radius: var(--radius-pill); padding: 0 8px; }
.fr-empty { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fr-empty p { margin: 0; }
.fr-more { margin: 6px auto; }

/* עורך הכמות */
.qe { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--accent-veil); border: 1px solid var(--accent-200); }
.qe-head { display: flex; align-items: center; gap: 10px; }
.qe-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qe-name b { font-size: 17px; font-weight: 600; }
.qe-name small { color: var(--color-text-2); font-size: 13px; }
.src-tag { font-size: 11.5px; color: var(--color-text-2); border: 1px solid var(--color-divider); border-radius: var(--radius-pill); padding: 1px 9px; white-space: nowrap; background: var(--color-surface); }
.src-tag.mine { color: var(--accent-800); border-color: var(--accent-300); background: var(--accent-100); }
.fav-btn { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--neutral-300); background: var(--color-surface); color: var(--neutral-400); font-size: 18px; line-height: 1; cursor: pointer; }
.fav-btn.on { color: var(--warning-500); border-color: var(--warning-300); background: var(--amber-wash); }
.fav-btn.wide { width: auto; border-radius: var(--radius-pill); padding: 0 14px; font-size: 14px; height: 34px; }
.qe-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qe-amount { display: flex; align-items: center; gap: 6px; }
.qe-step {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--neutral-300); background: var(--color-surface); font-size: 20px; line-height: 1; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .qe-step:hover { border-color: var(--accent-500); background: var(--accent-100); } }
.qe-input {
  width: 92px; height: 52px; text-align: center; direction: ltr; font: inherit; font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums; border: 1px solid var(--neutral-300); border-radius: var(--radius-sm); background: var(--color-surface);
}
.qe-input:focus { border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(42, 111, 232, 0.18); outline: none; }
.qe-unit { height: 46px; min-width: 170px; flex: 1; max-width: 320px; }
.qe-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.qe-chip {
  height: 32px; padding: 0 13px; border-radius: var(--radius-pill); border: 1px solid var(--color-divider);
  background: var(--color-surface); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .qe-chip:hover { border-color: var(--accent-500); } }
.qe-chip.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.qe-result { font-size: 14.5px; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.qe-result b { color: var(--color-text); font-size: 17px; }
.qe-grams { display: inline-block; min-width: 64px; color: var(--color-text); }
.qe-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.danger { color: var(--danger-600); }
@media (hover: hover) and (pointer: fine) { .btn.danger:hover { background: var(--danger-100); border-color: var(--danger-300); } }

/* מנה מכמה רכיבים */
.dish { display: flex; flex-direction: column; gap: 10px; }
.dish-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-divider); border-radius: var(--radius-sm); }
.dish-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--color-divider); }
.dish-row:first-child { border-top: none; }
.dish-amt { font-size: 13px; color: var(--color-text-2); white-space: nowrap; }
.dish-kcal { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish-total { margin: 0; font-size: 14.5px; color: var(--color-text-2); }
.dish-total b { color: var(--color-text); }
.dish-save { width: 100%; }
.row.check { gap: 6px; font-size: 13.5px; color: var(--color-text-2); }
.free-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }

/* מאגר המזונות */
.db-card.open { display: flex; flex-direction: column; gap: 12px; }
.db-head { gap: 12px; }
.db-list { max-height: 520px; }
.db-count { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--color-divider); font-size: 13px; }
.db-item.open { background: var(--accent-veil); }
.db-item.open .fr-row { background: transparent; }
.db-detail { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.db-detail h4, .food-form h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.db-detail-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.nut-table { border-collapse: collapse; width: 100%; max-width: 320px; font-variant-numeric: tabular-nums; }
.nut-table th { text-align: start; font-weight: 400; color: var(--color-text-2); padding: 4px 0; font-size: 14px; }
.nut-table td { text-align: end; padding: 4px 0; font-size: 14px; border-bottom: 1px solid var(--color-divider); }
.nut-table tr.sub th { padding-inline-start: 14px; font-size: 13px; }
.unit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.unit-list li { display: flex; justify-content: space-between; gap: 12px; max-width: 320px; border-bottom: 1px solid var(--color-divider); padding: 3px 0; }
.db-source { margin: 0; font-size: 13px; }

.food-form { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 16px; background: var(--color-surface); }
.ff-grid { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ff-grid .field.grow { flex: 1 1 240px; }
.ff-grid.nums .field { flex: 0 0 auto; }
.field > span i { font-style: normal; color: var(--neutral-500); font-size: 12.5px; }
.unit-input { display: inline-flex; align-items: center; gap: 6px; }
.unit-input small { color: var(--color-text-2); font-size: 13px; min-width: 26px; }
.ff-basis { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.ff-check { margin: 0; font-size: 13.5px; color: var(--warning-700); background: var(--amber-wash); border-radius: var(--radius-sm); padding: 8px 12px; }
.ff-units { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ff-unit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ff-unit > .input { width: 200px; }

@media (max-width: 600px) {
  .food-panel { padding: 10px; margin-inline: -6px; }
  .fp-top .seg { display: flex; width: 100%; }
  .fp-top .seg button { flex: 1; padding: 0 6px; font-size: 13.5px; }
  .fp-top > .btn { margin-inline-start: auto; }
  .fp-filters .seg { display: flex; width: 100%; }
  .fp-filters .seg button { flex: 1; padding: 0 4px; }
  .cat-select { max-width: none; flex: 1 1 100%; }
  .fl-main { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 12px; }
  .fl-amt { grid-column: 1; grid-row: 2; }
  .fl-kcal { grid-row: 1 / span 2; grid-column: 2; }
  .fr-row { flex-direction: column; align-items: stretch; gap: 2px; }
  .fr-meta { justify-content: flex-start; }
  .qe { padding: 12px; }
  .qe-unit { min-width: 0; max-width: none; flex: 1 1 100%; }
  .dish-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .dish-amt { grid-column: 1; grid-row: 2; }
  .ff-unit > .input { width: 100%; flex: 1 1 160px; }
}

.food-results { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; align-items: center; }
.food-hit { border: 1px solid var(--color-divider); border-radius: var(--radius-pill); padding: 4px 13px; background: var(--color-surface); font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .food-hit:hover { border-color: var(--accent-500); background: var(--accent-100); } }
.food-hit small { color: var(--color-text-2); margin-inline-start: 4px; }

.tpl-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   התקדמות
   ============================================================ */
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { display: block; direction: ltr; }
.chart-empty { color: var(--color-text-2); padding: 28px 0; text-align: center; }
.stat-line { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.stat { font-size: 14.5px; color: var(--color-text-2); }
.stat b { color: var(--color-text); font-variant-numeric: tabular-nums; font-weight: 600; }
.report { white-space: pre-wrap; background: var(--neutral-100); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; line-height: 1.7; }

/* ============================================================
   הגדרות
   ============================================================ */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.edit-table { width: 100%; min-width: 660px; border-collapse: collapse; }
.edit-table select { min-width: 120px; }
.edit-table input { min-width: 70px; }
.edit-table th { text-align: start; font-size: 13px; color: var(--color-text-2); font-weight: 400; padding: 4px 6px; }
.edit-table td { padding: 3px 4px; }
.edit-table input { width: 100%; }
.edit-table .input.mini { width: 58px; text-align: center; }
.icon-btn { border: none; background: none; color: var(--color-text-2); padding: 4px 7px; border-radius: var(--radius-sm); font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--color-text); background: var(--accent-100); } }
@media (hover: hover) and (pointer: fine) { .icon-btn.del:hover { color: var(--danger-600); background: var(--danger-100); } }

details.block { border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface); margin-bottom: 10px; box-shadow: var(--shadow-sm); }
details.block > summary { cursor: pointer; padding: 13px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.block > summary::-webkit-details-marker { display: none; }
details.block > summary::after { content: "⌄"; color: var(--color-text-2); transition: transform 160ms var(--ease-out); }
details.block[open] > summary::after { transform: rotate(180deg); }
details.block > .block-body { padding: 0 18px 16px; overflow-x: auto; }
details.block > summary .input { min-width: 140px; }

/* לוח שנה */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
/* אנגלית: עמודות שוות שלא מתרחבות לפי התוכן (בעברית הפריסה נשארת כפי שהייתה) */
html[dir="ltr"] .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
html[dir="ltr"] .cal-cell { min-width: 0; }
.cal-dow { text-align: center; font-size: 12.5px; color: var(--color-text-2); padding: 2px 0; }
.cal-blank { min-height: 74px; }
.cal-cell {
  min-height: 74px;
  background: var(--neutral-100);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 6px 7px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: start;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out), background 140ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .cal-cell:hover { border-color: var(--accent-400); background: var(--color-surface); } }
.cal-cell.today { border-color: var(--accent-500); box-shadow: 0 0 0 2px var(--accent-200); background: var(--color-surface); }
.cal-cell.sel { border-color: var(--accent-600); background: var(--accent-100); }
.cal-num { font-size: 12.5px; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.cal-chip {
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--accent-300); color: var(--accent-700);
  border-radius: var(--radius-pill); padding: 1px 8px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-chip.done { background: var(--accent-500); border-color: var(--accent-500); color: var(--on-accent); }
@media (max-width: 640px) {
  .cal-cell, .cal-blank { min-height: 56px; padding: 4px 5px; }
  .cal-chip { font-size: 9.5px; padding: 1px 5px; }
}
/* אנגלית במסך צר: העמודות שוות ולא מתרחבות, אז מפנים מקום כדי ששבב «✓ A» יוצג במלואו */
@media (max-width: 380px) {
  html[dir="ltr"] .cal-grid { gap: 4px; }
  html[dir="ltr"] .cal-cell { padding: 4px 3px; }
  html[dir="ltr"] .cal-chip { padding: 1px 3px; }
}

.gym-cfg { border-top: 1px solid var(--neutral-300); margin-top: 14px; padding-top: 4px; }
.gym-cfg-title { font-size: 15px; margin: 10px 0 8px; font-weight: 600; }

/* ---------- שונות ---------- */
.foot { padding: 10px 16px 30px; color: var(--color-text-2); font-size: 13px; }
.save-indicator { transition: opacity 300ms; }

.toast[hidden] { display: none; }
/* כשסרגל השמירה פתוח (בטלפון הוא בשתי שורות) — ההודעה עולה מעליו */
.toast {
  position: fixed; bottom: 92px; inset-inline-start: 50%; transform: translateX(50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--sel-bg);
  color: var(--board-ink);
  border: 0;
  padding: 9px 22px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  z-index: 60; font-size: 15px;
  animation: toast-in 240ms var(--ease-out);
  /* צר (Split View 320) ולרוחב עם notch: ההודעה נשברת לשורות במקום לחרוג */
  max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  box-sizing: border-box; text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(50%) translateY(8px); } to { opacity: 1; transform: translateX(50%); } }
/* אנגלית (LTR): inset-inline-start הוא left, ולכן המרכוז בכיוון ההפוך */
html[dir="ltr"] .toast { transform: translateX(-50%); animation-name: toast-in-ltr; }
@keyframes toast-in-ltr { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%); } }

.empty { text-align: center; color: var(--color-text-2); padding: 34px 16px; border: 1px solid var(--neutral-300); border-radius: var(--radius-md); }
/* כרטיס "הנתונים לא נטענו" — במקום מסך ריק כשקובץ שמור פגום או כשמסך נפל */
.invalid-card { display: flex; flex-direction: column; gap: 10px; border-color: var(--danger-300); }
.invalid-card p { margin: 0; }

/* מצב דמו (מוקאפ מכשיר): מפנה מקום לשורת הסטטוס ול-Dynamic Island */
/* --demo-safe נמדד מהמוקאפ (תחתית ה-Dynamic Island) ומוזרק ע״י עמוד ההקלטה */
.demo { --demo-safe: 50px; }
.demo body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--demo-safe); z-index: 11;
  background: var(--board); pointer-events: none; }
.demo .board-inner { padding-top: calc(var(--demo-safe) + 14px) !important; }
.demo .tabs { top: var(--demo-safe); }
.demo .view * { scroll-margin-top: calc(var(--demo-safe) + 70px); }

/* אפליקציית iOS / מסך הבית: התוכן נמתח עד הקצוות — פס כהה מתחת לשורת הסטטוס וה-Dynamic Island,
   הטאבים נדבקים מתחתיו, ומה שצמוד לתחתית מפנה מקום לפס הבית */
.native { --top-safe: env(safe-area-inset-top, 0px); --bottom-safe: env(safe-area-inset-bottom, 0px); -webkit-text-size-adjust: 100%; }
.native body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; background: var(--color-bg); }
.native body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--top-safe); z-index: 11;
  background: var(--board); pointer-events: none; }
/* באפליקציה שורת הסטטוס מתחלפת לטקסט כהה מעל מסך ההרשמה הלבן; ממסך הבית היא תמיד לבנה — הפס נשאר כהה */
.native-app body:has(#gate:not([hidden]))::before { background: var(--color-surface); }
.native .board-inner { padding-top: calc(var(--top-safe) + 14px); }
.native .tabs { top: var(--top-safe); }
.native .view * { scroll-margin-top: calc(var(--top-safe) + 70px); }
.native .savebar { bottom: 0; }
/* התחברות עם Google / Facebook / Apple דורשת זרימה נפרדת באפליקציה — בינתיים אימייל וסיסמה */
.native-app:not(.native-oauth) .gx-social, .native-app:not(.native-oauth) .gx-or { display: none; }
.native .toast { bottom: calc(92px + var(--bottom-safe)); }
.native .foot { padding-bottom: calc(30px + var(--bottom-safe)); }
.native .gate { padding-top: var(--top-safe); }
.native .boot { padding-top: var(--top-safe); }
.native .tab, .native .fr-row, .native .option, .native .add-food, .native .btn { -webkit-user-select: none; user-select: none; }
@media (max-width: 899px) {
  .native .gx-topbar { top: var(--top-safe); }
  .native .gx-main { padding-bottom: calc(96px + var(--bottom-safe)); }
}
/* בטלפון הלוח מתחיל צמוד לפס העליון — בלי הרווח והפינות של גרסת הדפדפן */
@media (max-width: 719px) {
  .native .board { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

.split-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.split-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--neutral-100); }
.split-row .grow { display: flex; flex-direction: column; min-width: 0; }
.split-row small { color: var(--color-text-2); font-size: 12.5px; }
.split-badge { flex-shrink: 0; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; direction: ltr; padding: 6px 10px; border-radius: var(--radius-pill);
  background: var(--sel-bg); color: var(--sel-ink); }
.split-badge.fullbody { background: var(--accent-600); color: var(--on-accent); }
.pw-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }

.split-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--accent-100); color: var(--accent-800); font-size: 13px; white-space: nowrap; }
.split-chip b { direction: ltr; letter-spacing: 0.04em; }
.split-chip small { font-size: 12px; color: var(--accent-700); }
@media (max-width: 479px) { .split-chip small { display: none; } }

/* ---------- כניסה ושאלון: דף ביומן האימונים ----------
   הצד הכחול הוא דף רשום: קו כל 44px, וקו שוליים 56px מהקצה. כל שורה יושבת על קו,
   ועיגול הסט שלה בשוליים. בצד הלבן — כל שדה הוא "סט" שהעיגול שלו מתמלא. */
:root { --set-sm: 36px; --set-lg: 56px; --rule: 44px; --margin: 56px; }
.gate { min-height: 100vh; min-height: 100dvh; background: var(--color-surface); }
.gx { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 40%); }

/* ---- דף היומן ---- */
.gx-page {
  background-color: var(--forest-900);
  background-image:
    linear-gradient(to left, transparent calc(var(--margin) - 1px), rgba(91, 147, 242, 0.45) calc(var(--margin) - 1px), rgba(91, 147, 242, 0.45) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(238, 244, 255, 0.075) calc(var(--rule) - 1px) var(--rule));
  color: var(--board-ink);
  padding: var(--rule) 32px var(--rule) 0;
  padding-inline-start: 0;
  display: flex; flex-direction: column; min-width: 0;
}
.gx-page > * { margin-inline-start: calc(var(--margin) + 16px); }
.gx-page-head { display: flex; flex-direction: column; }
.gx-page-date { display: block; height: var(--rule); line-height: var(--rule); font-size: 13px; color: var(--board-muted); font-variant-numeric: tabular-nums; }
.gx-page-title { font-family: var(--font-heading); font-weight: 400; font-size: 28px; line-height: var(--rule); margin: 0 0 var(--rule); color: #FFFFFF; }

/* כרטיס תרגיל — אטום, ברוחב הדף, ארבע שורות גובה */
.gx-spec { background: #13284A; border-radius: var(--radius-md); height: calc(var(--rule) * 4); padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: var(--rule); }
.gx-spec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gx-spec-head b { font-size: 16px; font-weight: 600; }
.gx-spec-head span { font-size: 13px; color: var(--board-muted); }
.gx-spec-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gx-spec-read { display: flex; align-items: baseline; gap: 6px; font-size: 52px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.gx-spec-read small { font-size: 14px; font-weight: 400; color: var(--board-muted); margin-inline-end: 6px; }
.gx-x { font-size: 26px; color: var(--board-muted); font-weight: 400; margin-inline: 2px 8px; }
.gx-spec-sets { display: flex; gap: 8px; }
.gx-spec-sets i { width: var(--set-sm); height: var(--set-sm); border-radius: 50%; border: 1.5px solid rgba(238, 244, 255, 0.3); display: grid; place-items: center; color: transparent; }
.gx-spec-sets i svg { width: 17px; height: 17px; }
.gx-spec-sets i { animation: gx-set 420ms var(--ease-out) forwards; animation-delay: calc(700ms + var(--i) * 520ms); }
.gx-spec-sets i:nth-child(4) { animation: none; }
@keyframes gx-set { to { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; } }
@media (prefers-reduced-motion: reduce) {
  .gx-spec-sets i { animation: none; }
  .gx-spec-sets i:not(:nth-child(4)) { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; }
}

/* שורות ביומן — עיגול בשוליים, כותרת, ערך */
.gx-entries { list-style: none; margin: 0; padding: 0; margin-inline-start: 0 !important; }
.gx-entries li { height: var(--rule); display: grid; grid-template-columns: var(--margin) 96px minmax(0, 1fr); align-items: center; gap: 0 12px; padding-inline-end: 0; }
.gx-entries li .gx-ring { justify-self: center; }
.gx-entries b { font-size: 13.5px; font-weight: 600; color: var(--board-muted); }
.gx-entries span { font-size: 15px; color: rgba(238, 244, 255, 0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-entries li.filled b { color: var(--board-lit-soft); }
.gx-entries li.filled span { color: #FFFFFF; }
.gx-log-title { height: var(--rule); line-height: var(--rule); font-size: 13px; font-weight: 600; color: var(--board-muted); }

/* עיגול סט קטן — ריק או מסומן */
.gx-ring { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(238, 244, 255, 0.35); display: grid; place-items: center; color: transparent; flex: 0 0 auto;
  transition: background 220ms var(--ease-out), border-color 220ms var(--ease-out), color 220ms var(--ease-out); }
.gx-ring svg { width: 12px; height: 12px; }
.gx-ring.done { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; }

/* שלבי השאלון — עיגולי סטים ממוספרים */
.gx-steps { list-style: none; display: flex; gap: 14px; margin: 0 0 var(--rule); padding: 0; height: calc(var(--rule) * 2); align-items: flex-start; }
.gx-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gx-steps span { width: var(--set-sm); height: var(--set-sm); border-radius: 50%; border: 1.5px solid rgba(238, 244, 255, 0.3); display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--board-muted); font-variant-numeric: tabular-nums; }
.gx-steps span svg { width: 17px; height: 17px; }
.gx-steps small { font-size: 12px; color: var(--board-muted); }
.gx-steps li.done span { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; }
.gx-steps li.now span { border-color: var(--board-lit-soft); color: #FFFFFF; box-shadow: 0 0 0 3px rgba(157, 190, 248, 0.25); }
.gx-steps li.now small { color: #FFFFFF; }
.gx-steps.compact { display: none; }

.gx-week ol { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); margin: 0; padding: 0; height: calc(var(--rule) * 2); }
.gx-week li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gx-week small { font-size: 12px; color: var(--board-muted); height: 18px; }
.gx-week b { width: var(--set-sm); height: var(--set-sm); border-radius: 50%; border: 1px solid rgba(238, 244, 255, 0.18); display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 400; font-size: 17px; direction: ltr; }
.gx-week li.on b { background: var(--accent-500); border: none; color: #FFFFFF; }

/* ---- הצד הלבן ---- */
.gx-main { display: grid; justify-items: center; align-items: start; padding: 56px clamp(20px, 5vw, 72px) 72px; min-width: 0; background: var(--color-surface); }
.gx-col { width: 100%; max-width: 520px; }
.gx-logo { font-family: var(--font-heading); font-size: 24px; letter-spacing: 0.04em; color: var(--color-text); direction: ltr; text-align: end; margin-bottom: 40px; }
.gx-title { font-family: var(--font-heading); font-weight: 400; font-size: 34px; line-height: 1.15; margin: 0 0 8px; color: var(--color-text); text-wrap: balance; }
.gx-sub { color: var(--color-text-2); margin: 0 0 28px; font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.gx-spec.mini { display: none; }

/* שדה = סט: עיגול ממוספר שמתמלא כשהערך תקין */
.gx-form { display: flex; flex-direction: column; gap: 18px; }
.gx-set { display: grid; grid-template-columns: var(--set-sm) minmax(0, 1fr); column-gap: 14px; row-gap: 6px; align-items: center; }
.gx-set-label { display: contents; }
.gx-set .gx-ring { grid-column: 1; grid-row: 2; width: var(--set-sm); height: var(--set-sm); border-color: var(--neutral-300); color: var(--color-text-2); position: relative; }
.gx-set .gx-ring svg { width: 17px; height: 17px; opacity: 0; transition: opacity 160ms; }
.gx-set .gx-ring::after { content: attr(data-n); }
.gx-set .gx-ring.done { color: #FFFFFF; }
.gx-set .gx-ring.done svg { opacity: 1; }
.gx-set-no { grid-column: 1; grid-row: 1; font-size: 11px; color: var(--color-text-2); text-align: center; }
.gx-set-label b { grid-column: 2; grid-row: 1; font-size: 14.5px; font-weight: 700; color: var(--color-text); }
.gx-set > input, .gx-set > .gx-pw { grid-column: 2; grid-row: 2; }
.gx-set > .gx-hint { grid-column: 2; grid-row: 3; }
.gx-set input, .gx-input, .gx-claim input {
  height: 48px; width: 100%; border: 1.5px solid var(--neutral-300); border-radius: 12px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--color-text); background: var(--color-surface);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.gx-set input[dir="ltr"], .gx-claim input { text-align: left; }
.gx-set input:focus, .gx-input:focus, .gx-claim input:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(42, 111, 232, 0.16); }
.gx-pw { position: relative; display: block; }
/* השדה עצמו LTR, הכפתור בצד שמאל של עמוד RTL — ריווח פיזי משמאל */
.gx-pw input { padding-left: 80px; }
/* אנגלית (LTR): הכפתור בצד ימין — הריווח הפיזי עובר לימין */
html[dir="ltr"] .gx-pw input { padding-left: 14px; padding-right: 80px; }
.gx-pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: none; background: none;
  color: var(--accent-700); font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.gx-pw-toggle:focus-visible { outline: 2px solid var(--accent-400); }
.gx-hint { display: block; font-size: 13px; color: var(--color-text-2); line-height: 1.5; }
.gx-claim { display: flex; flex-direction: column; gap: 6px; padding-inline-start: calc(var(--set-sm) + 14px); }
.gx-claim label { font-size: 14px; }
.gx-claim label small { color: var(--color-text-2); font-weight: 400; }
.gx-claim bdi { white-space: nowrap; }

.gx-error { background: var(--danger-100); color: var(--danger-700); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.gx-cta { height: 54px; width: 100%; border: none; border-radius: 14px; background: var(--accent-500); color: var(--on-accent);
  font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 140ms var(--ease-out), transform 100ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .gx-cta:hover:not(:disabled) { background: var(--accent-600); } }
.gx-cta:active:not(:disabled) { transform: scale(0.99); }
.gx-cta:focus-visible { outline: 3px solid var(--accent-300); outline-offset: 2px; }
.gx-cta:disabled { background: var(--neutral-200); color: var(--color-text-2); cursor: default; }
.gx-count { font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }
.gx-cta:disabled .gx-count { background: var(--neutral-300); }
.gx-ghost { border: none; background: none; color: var(--color-text-2); font: inherit; font-size: 15px; font-weight: 500; padding: 12px; cursor: pointer; align-self: center; }
@media (hover: hover) and (pointer: fine) { .gx-ghost:hover { color: var(--color-text); } }
.gx-actions { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; }

.gx-or { display: flex; align-items: center; gap: 12px; color: var(--color-text-2); font-size: 13px; margin: 22px 0 14px; }
.gx-or::before, .gx-or::after { content: ""; flex: 1; height: 1px; background: var(--color-divider); }
.gx-social { display: flex; flex-direction: column; gap: 10px; }
.gx-social-btn { height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px solid var(--neutral-300);
  border-radius: 12px; color: var(--color-text); text-decoration: none; font-weight: 600; font-size: 15px; background: var(--color-surface); }
@media (hover: hover) and (pointer: fine) { .gx-social-btn:hover { border-color: var(--neutral-500); } }
.gx-ico, .gx-ico svg { width: 19px; height: 19px; display: block; }
.gx-switch { margin: 24px 0 0; font-size: 14.5px; color: var(--color-text-2); }
.gx-link { border: none; background: none; color: var(--accent-700); font: inherit; font-weight: 700; padding: 4px 2px; cursor: pointer; }
.gx-link.small { font-size: 14px; font-weight: 600; align-self: flex-start; margin-inline-start: calc(var(--set-sm) + 14px); }
@media (hover: hover) and (pointer: fine) { .gx-link:hover { text-decoration: underline; } }

/* ---- שאלון ---- */
.gx-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.gx-topbar .gx-logo { margin: 0; }
.gx-h { font-size: 17px; font-weight: 700; margin: 28px 0 10px; color: var(--color-text); }
.gx-radios { display: flex; flex-direction: column; border-top: 1px solid var(--color-divider); }
.gx-radio-row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 4px; border: none; border-bottom: 1px solid var(--color-divider);
  background: none; font: inherit; color: var(--color-text); cursor: pointer; text-align: start; }
@media (hover: hover) and (pointer: fine) { .gx-radio-row:hover { background: var(--neutral-100); } }
.gx-radio-row:focus-visible { outline: 2px solid var(--accent-400); outline-offset: -2px; }
.gx-dot { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--neutral-400); display: grid; place-items: center; }
.gx-radio-row.on .gx-dot { border-color: var(--accent-500); }
.gx-radio-row.on .gx-dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-500); }
.gx-radio-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gx-radio-text b { font-size: 15.5px; font-weight: 600; }
.gx-radio-text small { font-size: 13px; color: var(--color-text-2); }
.gx-tag { font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent-800); background: var(--accent-100); padding: 2px 8px; border-radius: 999px; margin-inline-start: 6px; vertical-align: 1px; }

.gx-circles { display: flex; gap: 10px; flex-wrap: wrap; }
.gx-circle { width: var(--set-lg); height: var(--set-lg); border-radius: 50%; border: 1.5px solid var(--neutral-300); background: var(--color-surface); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; font: inherit; color: var(--color-text);
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out); }
.gx-circle b { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-circle small { font-size: 10.5px; color: var(--color-text-2); }
@media (hover: hover) and (pointer: fine) { .gx-circle:hover { border-color: var(--accent-400); } }
.gx-circle.on { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; }
.gx-circle.on small { color: rgba(255, 255, 255, 0.85); }
.gx-circle:focus-visible { outline: 3px solid var(--accent-300); outline-offset: 2px; }

.gx-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-toggle { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--neutral-300);
  background: var(--color-surface); font: inherit; font-size: 14px; color: var(--color-text); cursor: pointer; }
.gx-toggle svg { width: 15px; height: 15px; }
.gx-toggle.on { border-color: var(--accent-500); color: var(--accent-800); font-weight: 600; }

/* שורות סטפר — תווית בהתחלה, − ערך + בסוף */
.gx-rows { border-top: 1px solid var(--color-divider); }
.gx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--color-divider); }
.gx-row-label { font-size: 15.5px; font-weight: 600; }
.gx-stepper { display: flex; align-items: center; gap: 8px; direction: ltr; }
.gx-step-btn { width: var(--set-sm); height: var(--set-sm); border-radius: 50%; border: 1.5px solid var(--neutral-300); background: var(--color-surface);
  font-size: 19px; line-height: 1; color: var(--color-text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .gx-step-btn:hover { border-color: var(--accent-500); color: var(--accent-700); } }
.gx-stepper-val { display: flex; align-items: baseline; gap: 4px; direction: rtl; min-width: 120px; justify-content: center; }
/* אנגלית (LTR): מספר ואחריו היחידה */
html[dir="ltr"] .gx-stepper-val { direction: ltr; }
.gx-stepper-val input { width: 4.8ch; border: none; background: none; text-align: center; font: inherit; font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--color-text); padding: 0; direction: ltr; }
.gx-stepper-val input:focus { outline: 2px solid var(--accent-400); border-radius: 6px; }
.gx-stepper-val small { font-size: 13px; color: var(--color-text-2); }

/* תצוגת התוכנית — כמו כרטיס תרגיל: שם, טווח חזרות, ועיגול ריק לכל סט */
.gx-day { border-top: 1px solid var(--color-divider); padding-top: 18px; margin-top: 22px; }
.gx-day-title { font-family: var(--font-heading); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.gx-day ol { list-style: none; margin: 0; padding: 0; }
.gx-day li { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--color-divider); }
.gx-ex { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gx-ex b { font-size: 15px; font-weight: 600; }
.gx-ex small { font-size: 12.5px; color: var(--color-text-2); }
.gx-ex-sets { display: flex; gap: 5px; flex: 0 0 auto; }
.gx-ex-sets i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--accent-300); }

/* גיליון היומן בטלפון */
.gx-sheet { display: none; }

@media (max-width: 899px) {
  .gx { grid-template-columns: 1fr; }
  .gx-page { display: none; }
  .gx-main { padding: 0 max(20px, env(safe-area-inset-left, 0px)) 96px max(20px, env(safe-area-inset-right, 0px)); }
  .gx-col { max-width: 520px; }
  .gx-logo { height: 56px; line-height: 56px; margin: 0 0 8px; font-size: 21px; }
  .gx-topbar { height: 56px; margin-bottom: 12px; position: sticky; top: 0; background: var(--color-surface); z-index: 5; }
  .gx-steps.compact { display: flex; height: auto; margin: 0; gap: 8px; }
  .gx-steps.compact small { display: none; }
  .gx-steps.compact span { width: 28px; height: 28px; font-size: 12.5px; border-color: var(--neutral-300); color: var(--color-text-2); }
  .gx-steps.compact li.done span { background: var(--accent-500); border-color: var(--accent-500); color: #FFFFFF; }
  .gx-steps.compact li.now span { border-color: var(--accent-500); color: var(--accent-700); box-shadow: 0 0 0 3px rgba(42, 111, 232, 0.16); }
  .gx-steps.compact span svg { width: 14px; height: 14px; }
  /* כרטיס התרגיל נשאר גם בטלפון — בגרסה קומפקטית מעל הטופס */
  .gx-spec.mini { display: flex; height: auto; gap: 10px; padding: 12px 14px; margin: 0 0 22px; background: var(--sel-bg); color: var(--sel-ink); }
  .gx-spec.mini .gx-spec-read { font-size: 26px; }
  .gx-spec.mini .gx-spec-read small { font-size: 12px; }
  .gx-spec.mini .gx-x { font-size: 16px; }
  .gx-spec.mini .gx-spec-sets i { width: 28px; height: 28px; }
  .gx-spec.mini .gx-spec-sets i svg { width: 14px; height: 14px; }
  .gx-spec.mini .gx-spec-body { flex-wrap: nowrap; align-items: center; }
  .gx-title { font-size: 28px; }
  .gx-sub { margin-bottom: 20px; }
  .gx-form { gap: 14px; }
  .gx-sheet { display: block; position: fixed; inset: auto 0 0; z-index: 20; background: var(--sel-bg); color: var(--sel-ink);
    border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px -12px rgba(8, 18, 36, 0.5); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .gx-sheet summary { list-style: none; height: 52px; display: grid; grid-template-columns: 40px auto minmax(0, 1fr) 20px; align-items: center; gap: 10px;
    padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); cursor: pointer; }
  .gx-sheet summary::-webkit-details-marker { display: none; }
  .gx-sheet summary::after { content: "⌃"; color: var(--board-muted); font-size: 16px; transition: transform 200ms; }
  .gx-sheet[open] summary::after { transform: rotate(180deg); }
  .gx-sheet summary .gx-ring { justify-self: center; }
  .gx-sheet summary b { font-size: 13px; color: var(--board-lit-soft); }
  .gx-sheet summary span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gx-sheet .gx-entries { padding-bottom: 12px; }
  .gx-sheet .gx-entries li { grid-template-columns: 40px 84px minmax(0, 1fr); border-top: 1px solid rgba(238, 244, 255, 0.08); }
  .gx-stepper-val { min-width: 96px; }
  .gx-ex-sets i { width: 14px; height: 14px; }
}
.gx-set .gx-ring svg { position: absolute; inset: 0; margin: auto; }
.gx-set .gx-ring::after { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gx-set .gx-ring.done::after { content: ""; }
.gx-page { padding-inline-end: 40px; }
.gx-page { background-image:
    linear-gradient(to left, transparent calc(var(--margin) - 1px), rgba(91, 147, 242, 0.6) calc(var(--margin) - 1px), rgba(91, 147, 242, 0.6) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(238, 244, 255, 0.075) calc(var(--rule) - 1px) var(--rule)); }
/* אנגלית (LTR): קו השוליים בצד שמאל */
html[dir="ltr"] .gx-page { background-image:
    linear-gradient(to right, transparent calc(var(--margin) - 1px), rgba(91, 147, 242, 0.6) calc(var(--margin) - 1px), rgba(91, 147, 242, 0.6) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(238, 244, 255, 0.075) calc(var(--rule) - 1px) var(--rule)); }
.gx-logo { text-align: start; }
.gx-logo { text-align: right; }
/* אנגלית (LTR): הלוגו בצד ההתחלה (שמאל) */
html[dir="ltr"] .gx-logo { text-align: left; }
.gx-entries .gx-ring, .gx-sheet summary .gx-ring { color: transparent; overflow: visible; }
.gx-entries .gx-ring.done, .gx-sheet summary .gx-ring.done { color: #FFFFFF; }
.gx-page > .gx-steps { margin: 0 0 var(--rule); margin-inline-start: calc(var(--margin) + 16px); }
/* דף היומן נשאר במקום בזמן שהטופס נגלל */
@media (min-width: 900px) {
  .gx-page { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; align-self: start; }
}
/* iPad mini לאורך (744pt) וטאבלטים צרים: עמודה אחת, הטופס ממורכז עד 560px וגם אנכית — בלי שליש ריק */
@media (min-width: 700px) and (max-width: 899px) {
  .gx-main { align-content: center; padding-top: 48px; padding-bottom: 72px; }
  .gx-col { max-width: 560px; }
}

/* ---- סבב 2: גם הטופס הוא דף ביומן ----
   באותה רשת של 44px, עם קו שוליים. כל שדה יושב על קו, והעיגול שלו בשוליים. */
.gx-num { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-spec-cap { font-size: 11.5px; color: var(--board-muted); margin: -6px 0 -4px; }
.gx-page .gx-steps { display: none; }
.gx-spec.mini { display: none !important; }

.gx:not(.gx-wizard) .gx-col {
  position: relative;
  padding-inline-start: calc(var(--margin) + 16px);
  background-image:
    linear-gradient(to left, transparent calc(var(--margin) - 1px), rgba(42, 111, 232, 0.32) calc(var(--margin) - 1px), rgba(42, 111, 232, 0.32) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(15, 31, 56, 0.075) calc(var(--rule) - 1px) var(--rule));
}
html[dir="ltr"] .gx:not(.gx-wizard) .gx-col {
  background-image:
    linear-gradient(to right, transparent calc(var(--margin) - 1px), rgba(42, 111, 232, 0.32) calc(var(--margin) - 1px), rgba(42, 111, 232, 0.32) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(15, 31, 56, 0.075) calc(var(--rule) - 1px) var(--rule));
}
.gx:not(.gx-wizard) .gx-logo { height: var(--rule); line-height: var(--rule); margin: 0 0 var(--rule); }
.gx:not(.gx-wizard) .gx-title { line-height: var(--rule); margin: 0; }
.gx:not(.gx-wizard) .gx-sub { line-height: 22px; min-height: var(--rule); margin: 0 0 var(--rule); }
.gx:not(.gx-wizard) .gx-form { gap: 0; }
.gx:not(.gx-wizard) .gx-set {
  margin-inline-start: calc(-1 * (var(--margin) + 16px));
  grid-template-columns: var(--margin) minmax(0, 1fr); column-gap: 16px; row-gap: 0;
  grid-template-rows: var(--rule) var(--rule);
}
.gx:not(.gx-wizard) .gx-set .gx-ring { justify-self: center; }
.gx:not(.gx-wizard) .gx-set-label b { align-self: end; padding-bottom: 4px; display: flex; align-items: baseline; gap: 8px; }
.gx:not(.gx-wizard) .gx-set-label b small { font-size: 12.5px; font-weight: 400; color: var(--color-text-2); }
.gx:not(.gx-wizard) .gx-set > input, .gx:not(.gx-wizard) .gx-set .gx-pw input {
  height: var(--rule); border: none; border-bottom: 1.5px solid var(--neutral-400); border-radius: 0; background: transparent; padding: 0 2px;
}
.gx:not(.gx-wizard) .gx-set > input:focus, .gx:not(.gx-wizard) .gx-set .gx-pw input:focus {
  box-shadow: none; border-bottom: 2px solid var(--accent-500);
}
.gx:not(.gx-wizard) .gx-set .gx-pw input { padding-left: 72px; } /* אחרי ה-padding הכללי של השדות — אותה ספציפיות */
html[dir="ltr"] .gx:not(.gx-wizard) .gx-set .gx-pw input { padding-left: 2px; padding-right: 72px; }
.gx:not(.gx-wizard) .gx-claim { padding-inline-start: 0; margin-top: var(--rule); }
.gx:not(.gx-wizard) .gx-claim input { height: var(--rule); border: none; border-bottom: 1.5px solid var(--neutral-400); border-radius: 0; background: transparent; }
.gx:not(.gx-wizard) .gx-error { margin-top: 22px; }

/* כפתור נעול — עדיין כפתור: מסגרת כחול-לילה וכמה סטים נשארו */
.gx-cta { margin-top: var(--rule); }
.gx-cta:disabled { background: transparent; border: 1.5px solid var(--color-text); color: var(--color-text); }
.gx-cta.ready { background: var(--accent-500); border: none; color: var(--on-accent); }
.gx-wizard .gx-cta { margin-top: 0; }
.gx-switch { margin: 16px 0 0; }
.gx-switch + .gx-switch { margin-top: 4px; }

/* סימוני סטים בתוכנית — ריבועים קטנים כמו ביומן נייר, ליד שם התרגיל */
.gx-ex small { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gx-ex-sets { display: inline-flex; gap: 4px; }
.gx-ex-sets i { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--accent-400); }
.gx-entries span { white-space: nowrap; overflow: hidden; text-overflow: clip; }

@media (max-width: 899px) {
  :root { --margin: 48px; }
  .gx:not(.gx-wizard) .gx-col { padding-top: 0; }
  .gx:not(.gx-wizard) .gx-logo { height: 56px; line-height: 56px; margin: 0 0 var(--rule); }
  .gx:not(.gx-wizard) .gx-set .gx-ring { width: 32px; height: 32px; }
  .gx:not(.gx-wizard) .gx-title { font-size: 28px; }
}
.gx-cta:disabled { opacity: 1; }
.gx:not(.gx-wizard) .gx-logo { margin-bottom: 0; }
@media (max-width: 899px) {
  .gx:not(.gx-wizard) .gx-logo { height: var(--rule); line-height: var(--rule); margin: 8px 0 0; }
  .gx:not(.gx-wizard) .gx-col { background-position: 0 8px; }
}

/* ---------- רחב (iPad לרוחב, ≥1180): התוכן שממילא בנוי משתי קבוצות נפרש לשתי עמודות ---------- */
@media (min-width: 1180px) {
  .view[data-tab="progress"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .view[data-tab="progress"] > .card { margin-bottom: 0; }
  .view[data-tab="nutrition"] > [data-nutrition-root] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
  .view[data-tab="nutrition"] > [data-nutrition-root] > :not(.meal) { grid-column: 1 / -1; } /* ניווט תאריך, סיכום, הערות — לרוחב מלא; הארוחות — בשתי עמודות */
}

/* ---------- מחיקת חשבון: אזור מופרד בתחתית ההגדרות, נבדל מכרטיס הגיבוי ---------- */
.card-danger { margin-top: 34px; border: 1.5px solid var(--danger-300); background: linear-gradient(180deg, var(--danger-100), var(--color-surface)); }
.card-danger .card-title { color: var(--danger-700); }
.delete-list { margin: 0 0 10px; padding-inline-start: 20px; color: var(--color-text-2); font-size: 14.5px; line-height: 1.7; }
.delete-info-link { color: var(--accent-700); font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.delete-panel { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--danger-100); border: 1px solid var(--danger-300); display: flex; flex-direction: column; gap: 12px; }
.delete-panel[hidden] { display: none; }
.delete-warn { margin: 0; color: var(--danger-700); font-weight: 600; overflow-wrap: anywhere; }
.delete-email { display: block; margin-top: 4px; font-weight: 500; text-align: end; overflow-wrap: anywhere; } /* כתובת בשורה משלה — לא נשברת באמצע בתוך משפט RTL */
html[dir="ltr"] .delete-email { text-align: left; }
.delete-error { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--danger-300); background: var(--color-surface); color: var(--danger-700); font-weight: 500; }
.delete-error[hidden] { display: none; }
.btn.danger-solid { background: var(--danger-solid); border-color: var(--danger-solid); color: #FFFFFF; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .btn.danger-solid:hover:not(:disabled) { background: var(--danger-700); border-color: var(--danger-700); } }
.btn.danger-solid:focus-visible { outline: 3px solid var(--danger-300); outline-offset: 2px; }

/* ---------- סוג המכונה (ערימה מובנית / טעינת פלטות) — רדיו אמיתי בעיצוב .seg ---------- */
.ml-field { grid-column: 1 / -1; gap: 6px; }
.ml-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ml-where { min-width: 64px; font-size: 13.5px; color: var(--color-text-2); }
.ml-seg { max-width: 100%; }
.ml-seg label {
  position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 4px 13px;
  border-radius: var(--radius-pill); color: var(--color-text-2); font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.ml-seg label.on { background: var(--sel-bg); color: var(--sel-ink); font-weight: 500; box-shadow: var(--shadow-md); }
.ml-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; } /* נגיש למקלדת ולקורא מסך, מוסתר ויזואלית */
.ml-seg label:has(input:focus-visible) { outline: 3px solid var(--accent-400); outline-offset: 2px; }
.ex-edit .ml-field { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .ml-seg label { transition: none; } }
@media (max-width: 600px) { .ml-seg label { min-height: 40px; } }

/* ---------- החשבון הוחלף בלשונית אחרת: שכבה חוסמת (הלשונית לא שומרת יותר) ---------- */
.account-lock { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.account-lock-card { max-width: 420px; width: 100%; background: var(--color-surface); border-radius: var(--radius-md);
  padding: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; text-align: start; }
.account-lock-card h2 { font-size: 1.25rem; }
.account-lock-card p { margin: 0; color: var(--color-text-2); line-height: 1.6; }
.account-lock-card .btn { align-self: flex-start; }

/* התנתקות עם טיוטות שלא נשמרו — בחירה מפורשת בתוך כרטיס החשבון */
.logout-panel { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-wash);
  border: 1px solid var(--warning-300); display: flex; flex-direction: column; gap: 10px; }
.logout-panel[hidden], .legacy-confirm[hidden] { display: none; }
.logout-panel-title { margin: 0; font-weight: 600; color: var(--warning-700); }
.legacy-drafts { border-top: 1px solid var(--color-divider); margin-top: 12px; }

/* ============================================================
   השלמות לשכבת העיצוב: רשת רחבה, קונסולת השמירה, רספונסיביות, מגע ותנועה
   ============================================================ */

/* רשת תרגילים ברוחב מלא */
@media (min-width: 960px) {
  .exercise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; align-items: start; }
  .exercise-grid .exercise { margin-bottom: 0; }
}

/* קונסולת השמירה — הקצה התחתון של המכשיר, באותו כחול-לילה של הלוח. אטומה (לא זכוכית), בשורה אחת.
   נכנסת רק אחרי הסט הראשון שסומן ✓ (בכל סביבה); לפני כן לא נראית ולא מגיבה */
.savebar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 20; pointer-events: none;
  left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); /* לרוחב בטלפון — לא מתחת ל-notch */
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.savebar.idle { opacity: 0; transform: translateY(24px); }
/* הפנימי מקבל לחיצות בעצמו — מוסתר חייב גם לא להגיב, אחרת "ניקוי" שקוף מוחק את הטיוטה */
.savebar.idle .savebar-inner { pointer-events: none; visibility: hidden; transition-delay: 320ms; }
/* כשהקונסולה מוצגת — התוכן מפנה לה מקום, וגלילה אל שדה (הערות, שמירת תרגיל) עוצרת מעליה: שום דבר לא נלכד מתחתיה */
body:has(.savebar:not(.idle)) .view { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
html:has(.savebar:not(.idle)) { scroll-padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) {
  .savebar { transition: opacity 160ms linear; }
  .savebar.idle { transform: none; }
  .savebar.idle .savebar-inner { transition-delay: 160ms; }
  .sr-drops-toggle .chev { transition: none; }
}
.savebar-inner {
  pointer-events: auto;
  transition: visibility 0s;
  max-width: 1080px; margin-inline: auto;
  background: var(--board); color: var(--board-ink);
  border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--console-shadow);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
/* התאריך כקריאה: התווית הקטנה מעל הערך, בתוך אותה באר — כמו קריאות הלוח */
.savebar .field { position: relative; display: block !important; flex: 0 0 138px; min-width: 0; }
.savebar .field > span { position: absolute; top: 5px; inset-inline-start: 10px; z-index: 1; font-size: 12px; line-height: 1.25; color: var(--board-muted); pointer-events: none; }
.savebar .field .input {
  display: block; width: 100%; height: 48px; min-height: 48px; padding: 21px 10px 5px;
  background: var(--board-well); color: var(--board-ink); color-scheme: dark;
  font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.savebar .field .input::-webkit-datetime-edit { padding: 0; }
.savebar .field .input::-webkit-calendar-picker-indicator { margin: 0; margin-inline-start: 6px; padding: 0; width: 15px; height: 15px; opacity: 0.75; }
.savebar .field .input:focus { background: var(--board-well); box-shadow: inset 0 0 0 2px var(--board-lit); }
.savebar-summary { color: var(--board-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.savebar .btn.ghost { color: var(--board-muted); padding: 0 8px; min-width: 48px; }
.savebar .btn.ghost:active { background: var(--board-well); color: var(--board-ink); }
@media (hover: hover) and (pointer: fine) { .savebar .btn.ghost:hover { background: var(--board-well); color: var(--board-ink); } }
.savebar .btn.primary { flex: 1 1 auto; min-height: 48px; padding: 0 12px; font-size: 1rem; }

/* תג החלוקה (ABC…) — ניטרלי: הכחול שמור ל"בוצע" ולפעולה הראשית */
.split-chip { background: var(--color-sunken); color: var(--color-text); }
.split-chip small { color: var(--color-text-2); }

/* ריק / הודעה צפה — בטון, בלי קווים מקווקווים ובלי הילה */
.empty { border: 0; background: var(--color-sunken); border-radius: var(--radius-lg); }
.toast { border-radius: var(--radius-md); }
/* כשהקונסולה פתוחה (בטלפון צר היא בשתי שורות) — ההודעה עולה מעליה */
body:has(.savebar:not(.idle)) .toast { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }

/* ---------- רספונסיבי ---------- */
@media (max-width: 959px) {
  .board-inner { grid-template-columns: minmax(0, 1fr); } /* minmax(0) — שורת הקלוריות לא דוחפת את הרשת מעבר לקופסה בטקסט מוגדל */
  .board-cal { justify-content: flex-start; }
}
@media (max-width: 719px) {
  .board-inner { padding: 14px 16px 22px; gap: 8px; }
  .board-next-name { font-size: 36px; }
  .board-cal { margin-top: 14px; gap: 20px; }
  .instrument { width: 148px; height: 148px; }
  .instrument-center .val { font-size: 27px; }
  .instrument-center .of { font-size: 11.5px; }
  .board-readouts { flex: 1 1 0; min-width: 0; gap: 9px; }
  .board-cta { width: 100%; }
  .view { padding: 18px 16px 110px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .card { padding: 16px; }
  .options { grid-template-columns: 1fr; }
  .savebar-summary { display: none; }
  .stepper-btn { width: 52px; height: 52px; }
  .stepper { min-width: 200px; } /* סטפר אחד בשורה — הכפתורים נשארים עיגולים מלאים */
  .tabs { overflow-x: auto; }
  /* בורר המצב (רישום · לוח שנה · היסטוריה) ברוחב מלא — קצוות שווים לשאר הדף */
  #mode-seg { display: flex; width: 100%; }
  #mode-seg button { flex: 1; padding: 0 4px; }
}
/* עד 374 נק׳ שבעת הפקדים של שורת הסט עדיין ברוחב 44 (המספרים קטנים בצעד אחד); מתחת לזה אין מקום — ה-− וה-+ מצטמצמים */
@media (max-width: 384px) {
  .board-next-name { font-size: 32px; }
  .sr-head, .set-row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .sr-val { font-size: 1.1875rem; }
}
@media (max-width: 373px) { .sr-step { flex-basis: 40px; width: 40px; } }
/* צר מאוד (Split View 320 / טקסט 130%): הקריאות יורדות מתחת למכשיר, ושורת הסט מצטמצמת בלי לחרוג */
@media (max-width: 359px) {
  .board-cal { flex-wrap: wrap; }
  .view { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .sr-head, .set-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 44px; column-gap: 3px; }
  .sr-add-drop { margin-inline-start: 11px; }
  .exercise-name { font-size: 1.3125rem; }
}
@media (max-width: 339px) {
  .sr-step { flex-basis: 35px; width: 35px; }
  .sr-val { font-size: 1.125rem; }
}
@media (min-width: 720px) {
  .savebar .btn.primary { flex: 0 0 auto; min-width: 200px; }
  .view { padding-inline: 24px; }
  .sr-head, .set-row { grid-template-columns: 28px minmax(0, 1.12fr) minmax(0, 1fr) 44px; column-gap: 10px; }
  .sr-add-drop { margin-inline-start: 26px; }
}

/* ---------- מגע ותנועה: משוב לחיצה קצר (קנה מידה 0.97) רק כשאין העדפה לתנועה מופחתת ---------- */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  :is(.btn, .board-cta, .tab, .day-chip, .seg button, .sr-step, .sr-check, .sr-add-drop, .add-set, .sr-drop-del, .sr-drops-toggle, .ex-ctrl > .icon-btn, .drag-handle) {
    transition: transform 140ms var(--ease-press), background-color 160ms ease, color 160ms ease;
  }
  :is(.btn, .board-cta, .tab, .day-chip, .seg button, .sr-add-drop, .add-set, .sr-drops-toggle):active:not(:disabled) { transform: scale(0.97); }
  :is(.sr-step, .sr-check, .sr-drop-del, .ex-ctrl > .icon-btn, .drag-handle):active:not(:disabled) { transform: scale(0.96); }
  /* הסט בוצע: הטבעת נסגרת סביב הדיסקה, והדיסקה מתמלאת אחריה (רק על הסימון שנלחץ עכשיו) */
  .sr-check.just-done::before { animation: ring-close 380ms var(--ease-out) both; }
  .sr-check.just-done::after { animation: core-in 220ms var(--ease-out) 170ms both; }
}
@keyframes ring-close { from { --sweep: 0deg; } to { --sweep: 360deg; } }
@keyframes core-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

/* ---------- החוגה של התרגיל: כמה מקטעים (‎--n, לפי מספר הסטים) וכמה מהם דולקים (‎--k, לפי הסטים שבוצעו) ---------- */
.exercise:has([data-set-row$=":1"]) { --n: 2; }
.exercise:has([data-set-row$=":2"]) { --n: 3; }
.exercise:has([data-set-row$=":3"]) { --n: 4; }
.exercise:has([data-set-row$=":4"]) { --n: 5; }
.exercise:has([data-set-row$=":5"]) { --n: 6; }
.exercise:has([data-set-row$=":6"]) { --n: 7; }
.exercise:has([data-set-row$=":7"]) { --n: 8; }
.exercise:has([data-set-row$=":8"]) { --n: 9; }
.exercise:has([data-set-row$=":9"]) { --n: 10; }
.exercise:has([data-set-row$=":10"]) { --n: 11; }
.exercise:has([data-set-row$=":11"]) { --n: 12; }
.exercise:has([data-set-row$=":12"]) { --n: 13; }
.exercise:has([data-set-row$=":13"]) { --n: 14; }
.exercise:has([data-set-row$=":14"]) { --n: 15; }
.exercise:has([data-set-row$=":15"]) { --n: 16; }
.exercise:has([data-set-row$=":16"]) { --n: 17; }
.exercise:has([data-set-row$=":17"]) { --n: 18; }
.exercise:has([data-set-row$=":18"]) { --n: 19; }
.exercise:has([data-set-row$=":19"]) { --n: 20; }
.exercise:has(.set-table > :is(.set-row, .set-block).done) { --k: 1; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 2; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 3; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 4; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 5; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 6; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 7; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 8; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 9; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 10; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 11; }
.exercise:has(.set-table > :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done ~ :is(.set-row, .set-block).done) { --k: 12; }

/* ============================================================
   הרחבת השפה לשאר האפליקציה: תזונה · התקדמות · לוח שנה והיסטוריה · הגדרות · כניסה (כהה)
   אותם כללים כמו במסך הרישום: משטחים בטון במקום מסגרות, שלושה רדיוסים (8 · 12 · 20),
   הכחול רק ל"נבחר / בוצע" ולפעולה הראשית, ו-Suez One למספרים שקוראים.
   הקובץ נטען אחרי כל השאר ומשנה בעיקר צבע, מסגרת, רדיוס וצל — הפריסה הרספונסיבית שמעליו נשארת.
   ============================================================ */
:root {
  --well: var(--color-bg);            /* שקע בתוך כרטיס: רשימות, בחירות, פאנלים */
  --chart-line: #2A6FE8; --chart-grid: #DDE5F2; --chart-label: #55627A;
  --chart-goal: #8A5800; --chart-target: #0F1F38; --chart-over: #C77A0A;
}
html[data-theme="dark"] {
  --chart-line: #5B93F2; --chart-grid: #2B426E; --chart-label: #A3B5D2;
  --chart-goal: #F2B45A; --chart-target: #EEF4FF; --chart-over: #F2A635;
}

/* תווית או קישור שנראים כמו כפתור — הטקסט ממורכז כמו בכפתור אמיתי */
label.btn, a.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
/* כפתורי גליף כלליים (מחיקת שורה וכד׳): שטח מגע של 44 */
.icon-btn:not(.ex-ctrl > .icon-btn) { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: var(--radius-md); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--press); }
  .icon-btn.del:hover { color: var(--danger-ink); background: var(--danger-wash); }
}
.row.check { min-height: 44px; }
.row.check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--color-accent); }

/* ============================================================
   תזונה
   ============================================================ */
.date-nav { gap: 8px; margin-bottom: 14px; }
.date-nav .today-label { font-size: 1.375rem; line-height: 1.2; margin-inline-start: 4px; }
.date-nav input[type="date"] {
  min-height: 44px; border: 0; border-radius: var(--radius-md); padding: 0 12px;
  background: var(--color-sunken); font-variant-numeric: tabular-nums;
}
.date-nav input[type="date"]:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; }
.tpl-bar { gap: 8px; }
@media (max-width: 719px) {
  .date-nav input[type="date"] { flex: 1 1 150px; min-width: 150px; }
  .date-nav .tpl-bar { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-nav .tpl-bar > .input { grid-column: 1 / -1; width: 100%; }
  .date-nav .tpl-bar > .btn { padding: 0 8px; }
}

/* סיכום היום: המספר ב-Suez One, היעד לידו בשקט */
.macros { gap: 14px 26px; }
.macro-label { font-size: 13px; }
.macro-val { font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem; line-height: 1.25; }
.macro-val small { font-family: var(--font-body); font-size: 13.5px; }
.kcal-bar { height: 8px; margin-top: 14px; border-radius: var(--radius-sm); background: var(--ring-track-soft); box-shadow: none; }
.kcal-bar > div, html[dir="ltr"] .kcal-bar > div { background: var(--color-accent); border-radius: var(--radius-sm); }
.kcal-bar > div.over, html[dir="ltr"] .kcal-bar > div.over { background: var(--chart-over); }
.kcal-bar.water { background: var(--ring-track-soft); }
.kcal-bar.water > div, html[dir="ltr"] .kcal-bar.water > div { background: var(--color-accent); }
/* בטלפון: פקדי המים ברשת של שלוש עמודות שוות */
@media (max-width: 719px) {
  .row:has(> [data-water]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 10px; }
  .row:has(> [data-water]) > .btn { padding: 0 6px; }
  .row:has(> [data-water]) > .input { width: 100%; }
}
/* "−250": המינוס לפני המספר גם בעברית */
[data-water^="-"] { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

.meal { margin-bottom: 16px; }
.meal-head { align-items: baseline; margin-bottom: 8px; }
.meal-name { font-size: 1.375rem; line-height: 1.2; }
.meal-kcal { font-family: var(--font-heading); font-size: 0.9375rem; color: var(--color-text); }
.meal-note { margin-bottom: 12px; }
.alloc-chip { border: 0; border-radius: var(--radius-sm); background: var(--color-sunken); padding: 2px 9px; }
.base-chip {
  display: block; border: 0; border-radius: var(--radius-md);
  background: var(--well); color: var(--color-text-2);
  padding: 9px 12px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.45;
}

.group { margin-bottom: 16px; }
.group-head { gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pick-count { border: 0; border-radius: var(--radius-sm); background: var(--color-sunken); color: var(--color-text-2); padding: 2px 8px; }
.pick-count.full { background: var(--accent-wash); color: var(--accent-ink); }

/* אפשרות = שקע בטון; הנבחרת מתמלאת בגוון כחול והטבעת שלה נסגרת — כמו סימון הסט */
.options { gap: 6px; }
.option {
  border: 0; border-radius: var(--radius-md); background: var(--well); box-shadow: none;
  padding: 12px 14px; padding-inline-end: 54px; min-height: 80px; gap: 2px;
  transition: background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .option:hover { transform: none; box-shadow: none; background: var(--color-sunken); } }
.option.on { background: var(--accent-wash); border: 0; }
.option.on:not(:focus-visible) { outline: 0; }
.option::before {
  inset-inline-end: 14px; width: 26px; height: 26px;
  border: 2.5px solid var(--ring-track); background: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.option.on::before { background: var(--color-accent); border-color: var(--color-accent); }
.option.on::after {
  content: ""; inset-inline-end: 14px; width: 26px; height: 26px;
  background: var(--i-check-white) center / 14px 14px no-repeat;
}
.option-name { font-size: 1rem; font-weight: 500; line-height: 1.35; }
.option-kcal { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 400; line-height: 1.3; }
.option-macros { font-size: 13px; }
.option-qty { gap: 4px; margin-top: 4px; }
.option-qty button { width: 44px; height: 44px; border: 0; background: var(--color-surface); font-size: 18px; }
@media (hover: hover) and (pointer: fine) { .option-qty button:hover { background: var(--color-sunken); } }
.option-qty span { font-family: var(--font-heading); font-size: 1.0625rem; }
.custom-item { min-height: 48px; background: var(--color-sunken); color: var(--color-text); font-weight: 500; padding-inline-end: 14px; }
@media (hover: hover) and (pointer: fine) { .custom-item:hover { color: var(--color-text); background: var(--accent-wash); } }
.custom-form { border: 0; border-radius: var(--radius-md); background: var(--well); }
.custom-form .input, .free-form .input { background: var(--color-surface); }

/* יומן המזונות: רשימה אחת בשקע, שורות מופרדות בקו דק */
.food-log { border: 0; box-shadow: none; background: var(--well); border-radius: var(--radius-md); }
.fl-row.editing { background: transparent; padding: 6px; }
.fl-main { min-height: 52px; }
@media (hover: hover) and (pointer: fine) { .fl-main:hover { background: var(--press); } }
.fl-kcal { font-family: var(--font-heading); font-weight: 400; font-size: 1rem; }
.add-food {
  border: 0; border-radius: var(--radius-md); background: var(--color-sunken);
  color: var(--color-text); font-weight: 500; transition: background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .add-food:hover { background: var(--accent-wash); } }

/* חיפוש מזון: פאנל בשקע, השדות והרשימה מורמים בתוכו */
.food-panel { border: 0; box-shadow: none; background: var(--well); border-radius: var(--radius-md); }
.food-panel .input, .food-form .input, .lib-panel .input { background: var(--color-surface); }
.fp-search input[type="search"], .lib-panel input[type="search"] { height: 48px; border-radius: var(--radius-md); padding-inline: 14px; }
.cat-select { height: 44px; }
.fr-list { border: 0; border-radius: var(--radius-md); background: var(--well); }
.food-panel .fr-list { background: var(--color-surface); }
.fr-row { background: transparent; min-height: 56px; }
.fr-row:focus-visible { background: var(--press); }
@media (hover: hover) and (pointer: fine) { .fr-row:hover { background: var(--press); } }
.fr-main b { font-size: 1rem; }
.fr-mine { background: var(--color-sunken); color: var(--color-text-2); border-radius: var(--radius-sm); padding: 1px 7px; }
.fr-star { color: var(--chart-over); }
.db-item.open { background: var(--color-surface); }
.db-count { color: var(--color-text-2); }

/* עורך הכמות: לא כרטיס נוסף — יושב ישר על השקע (הפאנל או שורת היומן), והפקדים שבו מורמים */
.qe { border: 0; border-radius: 0; background: none; box-shadow: none; padding: 6px 4px; }
.qe .input, .food-log .input { background: var(--color-surface); }
.src-tag, .src-tag.mine { border: 0; background: var(--color-sunken); color: var(--color-text-2); border-radius: var(--radius-sm); padding: 2px 8px; }
.fav-btn { width: 44px; height: 44px; border: 0; background: var(--color-surface); color: var(--color-text-2); }
.fav-btn.on { background: var(--amber-wash); color: var(--amber-ink); border: 0; }
.fav-btn.wide { height: 44px; border-radius: var(--radius-md); }
.qe-step { border: 0; background: var(--color-surface); transition: background-color 140ms ease; }
@media (hover: hover) and (pointer: fine) { .qe-step:hover { background: var(--accent-wash); } }
.qe-input {
  border: 0; border-radius: var(--radius-md); background: var(--color-surface);
  font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem;
}
.qe-input:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); outline: none; }
/* שבבי הכמות: גובה מגע 44, המילוי הנראה פנימי ב-6 */
.qe-quick { gap: 0; margin: -6px; }
.qe-chip {
  height: 44px; min-width: 44px; padding: 0 10px;
  border: 6px solid transparent; border-radius: calc(var(--radius-sm) + 6px);
  background-color: var(--color-surface); background-clip: padding-box;
  transition: background-color 140ms ease, color 140ms ease;
}
@media (hover: hover) and (pointer: fine) { .qe-chip:hover { border-color: transparent; background-color: var(--accent-wash); } }
.qe-chip.on { border-color: transparent; background-color: var(--sel-bg); background-clip: padding-box; color: var(--sel-ink); }
.qe-result b { font-family: var(--font-heading); font-weight: 400; font-size: 1.1875rem; }

.dish-list { border: 0; border-radius: var(--radius-md); background: var(--well); }
.dish-kcal { font-family: var(--font-heading); }
.food-form { border: 0; border-radius: var(--radius-md); background: var(--well); }
.field > span i { color: var(--color-text-2); }
.food-results { gap: 6px; }
.food-hit { border: 0; border-radius: var(--radius-sm); background: var(--color-sunken); min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .food-hit:hover { background: var(--accent-wash); } }
.nut-table td, .unit-list li { font-variant-numeric: tabular-nums; }

/* ============================================================
   התקדמות
   ============================================================ */
.chart-wrap { overflow: visible; margin-top: 14px; }
.chart-wrap svg { overflow: visible; }
.chart-wrap svg text { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.stat-line { gap: 4px 22px; margin-top: 12px; }
.stat b { font-family: var(--font-heading); font-weight: 400; font-size: 1.0625rem; }
.report { background: var(--well); border-radius: var(--radius-md); }
#weighin-form { gap: 8px; }
/* בטלפון: תאריך ומשקל בשורה אחת ברוחב הכרטיס, והכפתור מתחתם */
@media (max-width: 719px) {
  #weighin-form { display: grid; grid-template-columns: minmax(0, 1fr) 96px; width: 100%; margin-top: 10px; }
  #weighin-form .input { width: 100% !important; }
  #weighin-form .btn { grid-column: 1 / -1; min-height: 48px; }
  #exercise-select { width: 100%; margin-top: 10px; }
}

/* ============================================================
   אימונים: לוח שנה והיסטוריה
   ============================================================ */
.cal-head .today-label { font-family: var(--font-heading); font-size: 1.375rem; line-height: 1.2; }
@media (max-width: 719px) {
  .cal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; margin-bottom: 14px; }
  .cal-head .today-label { grid-column: 1 / -1; grid-row: 1; }
  .cal-head > .btn { grid-column: 1; grid-row: 2; justify-self: start; }
  .cal-head > .row { grid-column: 2; grid-row: 2; flex-wrap: nowrap; gap: 4px; }
}
.cal-dow { font-size: 12.5px; padding: 0 0 4px; }
/* תא = שקע בטון. היום — טבעת דיו; היום הנבחר — כחול-לילה; "בוצע" — השבב הכחול */
.cal-cell {
  border: 0; border-radius: var(--radius-sm); background: var(--well);
  transition: background-color 140ms ease;
}
@media (hover: hover) and (pointer: fine) { .cal-cell:hover { background: var(--color-sunken); } }
.cal-cell.today { background: var(--well); box-shadow: inset 0 0 0 2px var(--color-text); }
.cal-cell.today .cal-num { color: var(--color-text); font-weight: 600; }
.cal-cell.sel { background: var(--sel-bg); box-shadow: none; }
.cal-cell.sel .cal-num { color: var(--sel-ink); }
.cal-num { font-size: 13px; }
.cal-chip { border: 1.5px solid var(--color-text-3); color: var(--color-text); border-radius: var(--radius-sm); }
.cal-chip.done { background: var(--color-accent); border-color: var(--color-accent); color: var(--on-accent); }
.cal-cell.sel .cal-chip:not(.done) { border-color: var(--sel-ink); color: var(--sel-ink); }
/* בטלפון: שבע עמודות שוות גם בעברית — ברוחב מגע (44) ב-393; העמודות לא מתרחבות לפי התוכן ולכן הלוח לא חורג מהכרטיס */
@media (max-width: 640px) {
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .cal-cell { min-width: 0; padding: 5px 2px; }
  .cal-num { padding-inline: 3px; }
  .cal-chip { padding: 0 2px; text-overflow: clip; }
}
/* צר מאוד (320): הכרטיס מוותר על ריפוד צדדי כדי שהתאים והשבבים ייכנסו */
@media (max-width: 359px) {
  .card:has(> .cal-grid) { padding-inline: 8px; }
  .cal-grid { gap: 2px; }
  .cal-chip { font-size: 8.5px; padding: 0 1px; border-width: 1px; }
  .cal-head > .btn, .cal-head > .row > .btn { padding: 0 9px; }
}

/* היסטוריה: כל אימון שורה מורמת; הכותרת מעל הפרטים */
.session { border: 0; border-radius: var(--radius-md); }
.session-head { min-height: 56px; flex-wrap: wrap; justify-content: flex-start; gap: 2px 10px; padding: 12px 16px; }
@media (hover: hover) and (pointer: fine) { .session-head:hover { background: var(--press); } }
.session-title { font-size: 1rem; }
.session-meta { flex: 1 1 100%; font-variant-numeric: tabular-nums; }
.session-body { padding: 0 16px 14px; }
.session-table td { border-bottom-color: var(--color-divider); }
.session-table tr:last-child td { border-bottom: 0; }

/* ============================================================
   הגדרות
   ============================================================ */
/* בלוק מתקפל (יום אימון, ארוחה, סיסמה): שקע בטון בתוך הכרטיס */
details.block { border: 0; box-shadow: none; background: var(--well); border-radius: var(--radius-md); margin-bottom: 8px; }
details.block > summary { min-height: 56px; padding-block: 6px; }
details.block > summary::after {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat;
}
details.block .input { background: var(--color-surface); }

/* תרגיל בבונה: לא כרטיס בתוך כרטיס — מקטע בתוך שקע היום, מופרד בקו דק; השדות מורמים */
.bx-list { gap: 0; }
.bx-card { border: 0; border-radius: 0; background: none; box-shadow: none; padding: 16px 14px; }
.bx-card + .bx-card, .bx-ss + .bx-card, .bx-card + .bx-ss { border-top: 1px solid var(--color-divider); }
.bx-card.mode-drop { border-inline-start: 0; }
.bx-card.mode-drop .idx-dot { background: var(--amber-wash); color: var(--amber-ink); }
.bx-card.dragging { background: var(--color-surface); border-radius: var(--radius-md); }
.bx-card .idx-dot { background: var(--color-surface); }
.bx-ss .bx-card .idx-dot { background: var(--sel-bg); color: var(--sel-ink); }
.bx-drops .seg button { min-width: 44px; }
.bx-summary .ex-target bdi { white-space: nowrap; }
@media (max-width: 600px) { .bx-grid { grid-auto-flow: dense; } .bx-grid .bx-drops { grid-column: 1 / -1; } }
details.block .lib-panel .fr-list { background: var(--well); }
@media (max-width: 600px) { .bx-card { padding: 14px 10px; } }
.bx-name { font-size: 1rem; }
.bx-sub { align-items: center; margin-top: -4px; }
/* בטלפון: הסיכום בשורה משלו (לא נשבר לשלוש שורות ליד הכלים), והכלים מתחתיו בקצה */
@media (max-width: 600px) {
  .bx-sub { flex-wrap: wrap; gap: 0; margin-top: 0; }
  .bx-summary { flex: 1 1 100%; }
  .bx-tools { margin-inline-start: auto; margin-block: -2px -6px; }
}
.bx-tools { gap: 0; }
.bx-tools .icon-btn, .bx-tools .drag-handle {
  position: relative; width: 44px; height: 44px; min-width: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--color-text-2); font-size: 0; line-height: 0;
}
.bx-tools .icon-btn::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.bx-tools [data-bx-move$=":-1"] { --icon: var(--i-up); }
.bx-tools [data-bx-move$=":1"] { --icon: var(--i-down); }
.bx-tools .icon-btn.del { --icon: var(--i-x); }
.bx-tools .icon-btn:active:not(:disabled) { background: var(--press); color: var(--color-text); }
.bx-tools .icon-btn.del:active { background: var(--danger-wash); color: var(--danger-ink); }
@media (max-width: 600px) { .bx-tools .icon-btn { padding: 0; } }
.mini-stepper { height: 44px; border: 0; border-radius: var(--radius-md); background: var(--color-surface); padding: 0; gap: 0; }
.mini-stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; font-weight: 400; color: var(--color-text); transition: background-color 140ms ease; }
.mini-stepper button:active { background: var(--press); }
@media (hover: hover) and (pointer: fine) { .mini-stepper button:hover { background: var(--press); } }
.mini-stepper b { font-family: var(--font-heading); font-weight: 400; font-size: 1.1875rem; }
.bx-hint.warn { color: var(--amber-ink); }
.bx-targets summary { min-height: 44px; align-items: center; }
.bx-targets summary::before {
  content: ""; width: 16px; height: 16px; background: currentColor; transform: rotate(90deg);
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat;
}
html[dir="ltr"] .bx-targets summary::before { transform: rotate(-90deg); }
.bx-targets[open] summary::before, html[dir="ltr"] .bx-targets[open] summary::before { transform: none; }
.bx-trow.drop { border-inline-start: 0; padding-inline-start: 12px; }
.bx-trow.drop .bx-tidx { color: var(--amber-ink); }
.bx-ss { border: 0; background: var(--color-sunken); margin-block: 8px; }
.bx-ss .bx-card { padding-inline: 8px; }
.lib-panel { border: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.lib-add { color: var(--color-text); }

.split-row { border: 0; background: var(--well); }
.split-badge { border-radius: var(--radius-sm); }
.split-badge.fullbody { background: var(--sel-bg); color: var(--sel-ink); }
.gym-cfg { border-top-color: var(--color-divider); }
.edit-table .input { background: var(--well); }
#uploads-list a { color: var(--accent-ink) !important; }

/* מחיקת חשבון: משטח בגוון האזהרה, בלי מסגרת ובלי מעבר צבע */
.card-danger { border: 0; background: var(--danger-wash); box-shadow: none; }
.card-danger .card-title { color: var(--danger-ink); }
.delete-info-link { color: var(--color-text); display: inline-flex; align-items: center; min-height: 44px; }
.delete-panel { border: 0; border-radius: var(--radius-md); background: var(--color-surface); }
.delete-panel .input { background: var(--well); }
.delete-warn { color: var(--danger-ink); }
.delete-error { border: 0; background: var(--danger-wash); color: var(--danger-ink); }
@media (hover: hover) and (pointer: fine) { .btn.danger-solid:hover:not(:disabled) { background: #9E3D27; border-color: #9E3D27; } }
.logout-panel { border: 0; border-radius: var(--radius-md); }
.logout-panel-title { color: var(--amber-ink); }
.invalid-card { background: var(--danger-wash); box-shadow: none; }

/* סוג המכונה: אותה מסילה כמו .seg — גובה מגע 44, המילוי הנראה פנימי ב-4 */
.ml-seg label, .ml-seg label.on { box-shadow: none; }
.ml-seg label {
  min-height: 44px; padding: 0 12px; border: 4px solid transparent; border-radius: var(--radius-md);
  background-clip: padding-box;
}
@media (max-width: 600px) { .ml-seg label { min-height: 44px; } .qe { padding: 6px 2px; } }

/* ---------- הודעה צפה · שכבת נעילת החשבון ---------- */
.toast { background: var(--sel-bg); color: var(--sel-ink); padding: 11px 18px; font-weight: 500; }
html[data-theme="dark"] .toast { background: #EEF4FF; color: #0F1F38; }
.account-lock { backdrop-filter: none; -webkit-backdrop-filter: none; }
.account-lock-card { border-radius: var(--radius-lg); }
.account-lock-card h2 { font-family: var(--font-heading); font-weight: 400; }

/* ============================================================
   כניסה ושאלון — ערכה כהה בלבד. בבהיר הדף נשאר בדיוק כפי שהיה.
   אותו יומן: בכהה הדף הוא כחול-הלילה, והקווים והשוליים מצוירים באור על כהה.
   ============================================================ */
/* שטח מגע בלבד (בשתי הערכות): הטקסט והמיקום לא זזים */
.gx-pw-toggle { padding-block: 12px; }
.gx-link { padding-block: 11px; margin-block: -7px; }

html[data-theme="dark"] .gate,
html[data-theme="dark"] .gx-main { background: var(--color-bg); }
html[data-theme="dark"] .gx-page { background-color: var(--board); }
html[data-theme="dark"] .gx-spec { background: var(--board-2); }
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-col {
  background-image:
    linear-gradient(to left, transparent calc(var(--margin) - 1px), rgba(91, 147, 242, 0.5) calc(var(--margin) - 1px), rgba(91, 147, 242, 0.5) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(238, 244, 255, 0.085) calc(var(--rule) - 1px) var(--rule));
}
html[data-theme="dark"][dir="ltr"] .gx:not(.gx-wizard) .gx-col {
  background-image:
    linear-gradient(to right, transparent calc(var(--margin) - 1px), rgba(91, 147, 242, 0.5) calc(var(--margin) - 1px), rgba(91, 147, 242, 0.5) var(--margin), transparent var(--margin)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), rgba(238, 244, 255, 0.085) calc(var(--rule) - 1px) var(--rule));
}
html[data-theme="dark"] .gx-set .gx-ring:not(.done) { border-color: var(--color-text-3); }
html[data-theme="dark"] .gx-set input, html[data-theme="dark"] .gx-input, html[data-theme="dark"] .gx-claim input {
  background: var(--color-sunken); border-color: var(--color-text-3);
}
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-set > input,
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-set .gx-pw input,
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-claim input { background: transparent; border-bottom-color: var(--color-text-3); }
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-set > input:focus,
html[data-theme="dark"] .gx:not(.gx-wizard) .gx-set .gx-pw input:focus { border-bottom-color: var(--board-lit); }
html[data-theme="dark"] .gx-set input:focus, html[data-theme="dark"] .gx-input:focus, html[data-theme="dark"] .gx-claim input:focus { border-color: var(--board-lit); }
html[data-theme="dark"] .gx-error { background: var(--danger-wash); color: var(--danger-ink); }
html[data-theme="dark"] .gx-cta:disabled .gx-count { background: var(--ring-track-soft); }
html[data-theme="dark"] .gx-social-btn { background: var(--color-surface); border-color: transparent; }
html[data-theme="dark"] .gx-dot,
html[data-theme="dark"] .gx-circle,
html[data-theme="dark"] .gx-toggle,
html[data-theme="dark"] .gx-step-btn { border-color: var(--color-text-3); }
html[data-theme="dark"] .gx-circle, html[data-theme="dark"] .gx-toggle, html[data-theme="dark"] .gx-step-btn { background: var(--color-surface); }
html[data-theme="dark"] .gx-radio-row.on .gx-dot { border-color: var(--board-lit); }
html[data-theme="dark"] .gx-radio-row.on .gx-dot::after { background: var(--board-lit); }
html[data-theme="dark"] .gx-circle.on { background: var(--color-accent); border-color: var(--color-accent); color: #FFFFFF; }
html[data-theme="dark"] .gx-toggle.on { border-color: var(--board-lit); color: var(--accent-ink); }
html[data-theme="dark"] .gx-tag { background: var(--accent-wash); color: var(--accent-ink); }
html[data-theme="dark"] .gx-ex-sets i { border-color: var(--board-lit); }
@media (hover: hover) and (pointer: fine) { html[data-theme="dark"] .gx-radio-row:hover { background: var(--press); } }
@media (max-width: 899px) {
  html[data-theme="dark"] .gx-topbar { background: var(--color-bg); }
  html[data-theme="dark"] .gx-steps.compact span { border-color: var(--color-text-3); }
  html[data-theme="dark"] .gx-steps.compact li.now span { border-color: var(--board-lit); color: var(--accent-ink); }
  html[data-theme="dark"] .gx-sheet { background: var(--board-2); box-shadow: 0 -14px 30px -14px rgba(3, 9, 22, 0.75); }
}
html[data-theme="dark"].native-app body:has(#gate:not([hidden]))::before { background: var(--color-bg); }

/* ---------- טיפוגרפיה: שבירת שורות מאוזנת בכותרות ונוחה בפסקאות (במסכים שהורחבו) ---------- */
.view:is([data-tab="nutrition"], [data-tab="progress"], [data-tab="settings"]) :is(.card-title, .meal-name) { text-wrap: balance; }
.view:is([data-tab="nutrition"], [data-tab="progress"], [data-tab="settings"]) :is(.card-sub, .meal-note, .bx-hint) { text-wrap: pretty; }

/* ---------- מגע: מצב לחוץ לכל פקד שנוסף כאן ---------- */
.fr-row:active, .fl-main:active:not(:disabled), .session-head:active, .mini-stepper button:active,
.icon-btn:not(.ex-ctrl > .icon-btn):active:not(:disabled), details.block > summary:active { background: var(--press); }
.cal-cell:active, .add-food:active, .food-hit:active, .custom-item:active, .qe-step:active, .option-qty button:active { background: var(--color-sunken); }
.option:not(.on):active { background: var(--color-sunken); }
@media (prefers-reduced-motion: no-preference) {
  :is(.option, .add-food, .cal-cell, .qe-chip, .qe-step, .fav-btn, .food-hit, .custom-item) {
    transition: transform 140ms var(--ease-press), background-color 160ms ease, color 160ms ease;
  }
  :is(.option, .add-food, .custom-item):active:not(:disabled) { transform: scale(0.985); }
  :is(.cal-cell, .qe-chip, .qe-step, .fav-btn, .food-hit):active:not(:disabled) { transform: scale(0.96); }
}
html[data-theme="dark"] .gx-circle.on small { color: #FFFFFF; }
html[data-theme="dark"] .gx-entries li:not(.filled) span { color: rgba(238, 244, 255, 0.62); }
/* שתי שורות קישור צמודות (כניסה + קוד שחזור): שטחי המגע לא חופפים */
.gx-switch:has(+ .gx-switch) .gx-link { padding-bottom: 4px; margin-bottom: 0; }
.gx-switch + .gx-switch .gx-link { padding-top: 4px; margin-top: 0; }

/* ============================================================
   שכבת "אפל": עגול, רך ונעים — בכל המסכים.
   רדיוסים: קבוצות וכרטיסים 26 · שדות ושקעים 16 · כפתורים, שבבים, בוררים, סטפרים ולשוניות — קפסולה מלאה.
   קיבוץ כמו רשימות inset-grouped של iOS: כל תרגיל בקבוצה מעוגלת אחת, ובתוכה רק שדות קפסולה.
   טיפוגרפיה: פנים עגולות (SF Pro Rounded במכשירי Apple, ‏Fredoka בשאר) למספרים ולכותרות; Suez One נשאר למילת המותג בלבד.
   מסך הכניסה בערכה הבהירה נשאר כפי שהיה (הטוקנים הקודמים מוחזרים תחת ‎.gate‎).
   ============================================================ */
:root {
  --font-brand: "Suez One", "Rubik", serif;
  --font-heading: ui-rounded, "SF Pro Rounded", "Fredoka", "Rubik", system-ui, sans-serif;
  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 26px; --radius-pill: 999px; --radius-cap: 999px;
  --w-num: 600; --w-head: 700;
  --cap: #EEF2FA;                 /* מילוי הקפסולה: גוון רך */
  --cap-on: #DCE8FD;              /* הסט הבא: גוון חזק יותר */
  --dock: #FFFFFF; --dock-well: #EEF2FA;
  --shadow-sm: 0 1px 2px rgba(15, 31, 56, 0.05), 0 4px 12px -6px rgba(15, 31, 56, 0.12);
  --shadow-md: 0 1px 2px rgba(15, 31, 56, 0.04), 0 10px 28px -14px rgba(15, 31, 56, 0.18);
  --shadow-dock: 0 2px 6px rgba(15, 31, 56, 0.06), 0 16px 36px -12px rgba(15, 31, 56, 0.28);
  --console-shadow: var(--shadow-dock);
  /* אייקונים: קו בינוני, קצוות וחיבורים עגולים */
  --i-edit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16.2 4.4a2.1 2.1 0 0 1 3 3L8.3 18.3l-4 1 1-4L16.2 4.4z'/%3E%3Cpath d='M14.2 6.4l3 3'/%3E%3C/svg%3E");
  --i-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5.5M6.2 11.3L12 5.5l5.8 5.8'/%3E%3C/svg%3E");
  --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v13.5M17.8 12.7L12 18.5l-5.8-5.8'/%3E%3C/svg%3E");
  --i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6.8 6.8l10.4 10.4M17.2 6.8L6.8 17.2'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.6V12l2.8 1.9'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 9.5l5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
  --i-check-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.8 12.6l4.2 4.2L18.2 8'/%3E%3C/svg%3E");
}
html[data-theme="dark"] {
  --cap: rgba(238, 244, 255, 0.085);
  --cap-on: #3A5788;
  --dock: #233C66; --dock-well: rgba(238, 244, 255, 0.09);
  --shadow-sm: 0 0 0 0 transparent; --shadow-md: 0 0 0 0 transparent;
  --shadow-dock: 0 14px 30px -12px rgba(3, 9, 22, 0.7);
}

/* ---------- טיפוגרפיה: המותג ב-Suez One; מספרים וכותרות בפנים העגולות, כבדות מהגוף ---------- */
.brand, .boot-brand { font-family: var(--font-brand); }
html :is(.instrument-center .val, .readout .ro-val, .idx-dot, .ex-progress bdi, .ex-status, .stepper-val, .sr-idx, .sr-val,
  .sr-drops-sum, .macro-val, .meal-kcal, .option-kcal, .option-qty span, .fl-kcal, .qe-input, .qe-result b, .dish-kcal,
  .stat b, .mini-stepper b) { font-weight: var(--w-num); }
html :is(.board-next-name, .view h2, #program-seg > button:only-child.on, .exercise-name, .finish-text b,
  .date-nav .today-label, .meal-name, .cal-head .today-label, .account-lock-card h2) { font-weight: var(--w-head); }
.card-title { font-family: var(--font-heading); font-weight: var(--w-head); font-size: 1.125rem; }
.sr-val::placeholder { font-weight: 400; }
.board-next-name { letter-spacing: -0.015em; }
.exercise-name { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.01em; }
.meal-name, .date-nav .today-label, .cal-head .today-label { letter-spacing: -0.01em; }
.sr-val { font-size: 1.3125rem; }
.sr-idx { font-size: 1.0625rem; }
.exercise .idx-dot { font-size: 14px; letter-spacing: 0.01em; }
.tab.active, .seg button.on, .day-chip.on { font-weight: 600; }

/* ---------- קפסולות: כפתורים, שבבים, בוררים, לשוניות ---------- */
.btn, .board-cta, .finish-btn, .add-food, .add-set, .sr-add-drop, .sr-drops-toggle, .day-chip, .tab,
.seg, .seg button, .ml-seg label, .meta-chip, .tag-done, .mode-badge, .prev-line .trend, .day-chip .next-tag,
.pick-count, .alloc-chip, .src-tag, .fr-mine, .split-badge, .split-chip, .food-hit, .custom-item, .toast, .qe-chip,
.mini-stepper, .fav-btn.wide, .cal-chip, .kcal-bar, .kcal-bar > div, .set-meter i { border-radius: var(--radius-cap); }
.btn { padding: 0 20px; min-height: 46px; }
.btn.small { padding: 0 16px; min-height: 44px; }
.tabs { padding: 8px 10px; gap: 2px; }
.tab { height: 46px; }
/* מסך צר (SE, mini — 375 נק׳): ארבע הלשוניות מתחלקות ברוחב שווה כדי שהאחרונה לא תיחתך באנגלית, וסרגל השמירה נשאר בשורה אחת */
@media (max-width: 389px) {
  .tab { flex: 1 1 0; min-width: 0; padding: 0 4px; text-align: center; white-space: nowrap; }
  html[dir="ltr"] .tab { padding: 0 2px; font-size: 0.94rem; }
  html[dir="ltr"] .cal-grid { gap: 2px; } /* תאי לוח השנה באנגלית יצאו 43 נק׳ — מתחת ל-44 */
  .savebar .savebar-inner .field { flex-basis: 130px; }
  .savebar .savebar-inner .field > span { inset-inline-start: 10px; }
  .savebar .savebar-inner .field .input { padding-inline: 10px; font-size: 14px; white-space: nowrap; }
  .savebar .savebar-inner .field .input::-webkit-date-and-time-value { white-space: nowrap; }
  .savebar .savebar-inner .btn.ghost { padding: 0 4px; min-width: 44px; }
  .savebar .savebar-inner .btn.primary { padding: 0 8px; font-size: 1rem; }
}
.seg { padding: 0; }
.meta-chip { min-height: 30px; padding: 3px 12px; font-size: 13.5px; }
.tag-done, .pick-count, .alloc-chip, .src-tag, .fr-mine { padding-inline: 10px; }
.day-chip { min-height: 46px; padding: 0 18px; }
.day-chip .next-tag { padding: 1px 9px; }
.toast { padding: 12px 22px; }
.qe-chip { padding: 0 12px; }
/* שדות ושקעים: 16 */
.input, input.input, select.input, textarea.input, .date-nav input[type="date"], .qe-input,
.fp-search input[type="search"], .lib-panel input[type="search"] { border-radius: var(--radius-md); }
.input, input.input, select.input { min-height: 46px; padding-inline: 14px; }
.option, .food-log, .food-panel, .fr-list, .dish-list, .food-form, .custom-form, .report, .base-chip, .split-row,
details.block, .lib-panel, .delete-panel, .logout-panel, .delete-error, .notice, .switch-row, .stepper, .empty,
.ex-save.error, .sr-drop-warn, .ff-check, .bx-ss { border-radius: var(--radius-md); }
.option { border-radius: 18px; }
.cal-cell { border-radius: 12px; }
.session { border-radius: 20px; }
.card, .account-lock-card { border-radius: var(--radius-lg); }
.board { border-radius: 0 0 30px 30px; }
@media (max-width: 719px) { .native .board { border-radius: 0 0 30px 30px; } }
:where(:focus-visible) { border-radius: 12px; }

/* ---------- ריווח: קצת יותר אוויר בין קבוצות ושורות ---------- */
.card { margin-bottom: 18px; padding: 20px; }
.exercise-grid { gap: 16px; }
.day-picker { gap: 8px; margin-bottom: 20px; }
.options { gap: 8px; }
.group { margin-bottom: 20px; }
.meal { margin-bottom: 18px; }
@media (max-width: 719px) {
  .view { padding: 18px 10px 110px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .card { padding: 18px 16px; }
  .view > .row.between:first-child, .day-progress, .where-bar, .date-nav, .view > .row.between { padding-inline: 6px; }
}
@media (max-width: 359px) {
  .view { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .card { padding: 16px 12px; }
}

/* ============================================================
   אימונים: כל תרגיל — קבוצה מעוגלת אחת (לבן על הקרקע הבהירה; כחול-לילה בהיר יותר על הקרקע הכהה)
   ============================================================ */
.exercise {
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 18px 14px 14px;
}
html.drag-active .exercise { padding: 12px 14px; margin-inline: 0; }
.ex-title-wrap { padding-inline: 12px 4px; gap: 3px; }
.ex-details > .meta-chips { padding-block: 12px 8px; gap: 8px; }
.prev-line { margin-top: 4px; font-size: 14px; }
.ex-ctrl > .icon-btn::before, .drag-handle::before, .bx-tools .icon-btn::before { width: 20px; height: 20px; }

/* החוגה: עבה, עם קצוות עגולים — כמו טבעת פעילות. צורת המקטעים מגיעה ממסכת SVG לפי מספר הסטים (‎--ring‎, נוצר ב-build) */
.exercise .idx-dot:not(.ss)::before {
  background: conic-gradient(var(--color-accent) calc(360deg / var(--n) * var(--k)), var(--ring-track-soft) 0);
  -webkit-mask-image: var(--ring); mask-image: var(--ring);
  -webkit-mask-composite: source-over; mask-composite: add;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.exercise.completed .idx-dot:not(.ss)::after { inset: 6px; background-size: 17px 17px; }

/* טבלת הסטים */
.set-table { margin-top: 14px; gap: 4px; }
.sr-head { min-height: 24px; font-size: 12.5px; }
.sr-head, .set-row { column-gap: 6px; grid-template-columns: 24px minmax(0, 1.14fr) minmax(0, 1fr) 44px; }
.set-row { min-height: 50px; padding: 0; }
.set-row.done .sr-idx { color: var(--color-accent); }
html[data-theme="dark"] .set-row.done .sr-idx { color: var(--board-lit); }
/* שדה = קפסולת סטפר: − ערך + בקפסולה אחת עם מילוי רך. גובה המגע 44, המילוי הנראה 40 */
.sr-field {
  height: 44px; box-sizing: border-box; border-block: 2px solid transparent; background-clip: padding-box;
  border-radius: var(--radius-cap); background-color: var(--field-bg, var(--cap)); box-shadow: none;
}
.sr-step { font-size: 21px; font-weight: 400; color: var(--step-ink, var(--color-text-2)); }
.sr-val { border-radius: var(--radius-cap); }
.sr-val:focus { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-accent); }
/* שלושה מצבים: בוצע — קפסולה רכה וסימון מלא · הסט הבא — גוון חזק · בהמשך — רך ומעומעם מעט */
.set-table > :is(.set-row, .set-block):not(.done),
.ss-round:not(.done) > :is(.set-row, .set-block):not(.done) {
  --field-bg: var(--cap-on); --field-shadow: none; --step-weight: 400; --step-ink: var(--color-text);
}
.set-table > :is(.set-row, .set-block):not(.done) ~ :is(.set-row, .set-block):not(.done),
.ss-round:not(.done) ~ .ss-round > :is(.set-row, .set-block):not(.done) {
  --field-bg: var(--cap); --field-shadow: none; --val-ink: var(--color-text-2); --step-ink: var(--color-text-2);
}
/* סימון הסט: לפני — טבעת ריקה; אחרי — דיסקה כחולה מלאה עם ✓ */
.sr-check::before {
  inset: 6px;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.2px), #000 calc(100% - 2.6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3.2px), #000 calc(100% - 2.6px));
}
.sr-check::after { inset: 6px; background-size: 17px 17px; }
.set-row.drop { min-height: 46px; }
.set-row.drop .sr-val { font-size: 1.125rem; }
.sr-add-drop { margin-inline-start: 20px; padding: 4px 12px 0; font-weight: 600; }
.sr-drops-toggle { margin-inline: 20px 50px; }
.sets-actions { margin-top: 4px; gap: 6px; }
.add-set { font-size: 15px; }
.exercise-notes { margin-top: 6px; }
.exercise-notes .input, .ex-edit .input { background: var(--cap); }
.ex-save { margin-top: 10px; }
.ex-save .btn { min-height: 46px; padding: 0 20px; font-weight: 600; }
/* עריכה מתוך הרישום: לא קופסה בתוך הקבוצה — מקטע מופרד בקו דק */
.ex-edit { margin-top: 10px; padding: 14px 0 4px; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--color-divider); }
.ex-edit .seg { background: var(--cap); }
.ex-ctrl > .ex-edit-btn.on { background: var(--cap); }
.ss-member { padding-top: 16px; }
.finish-card { padding: 20px; }

/* ---------- סרגל השמירה: מזח צף בצורת קפסולה, עם שוליים וצל רך ---------- */
.savebar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-inline: 10px; }
.native .savebar { bottom: calc(10px + var(--bottom-safe)); }
.savebar-inner {
  background: var(--dock); color: var(--color-text);
  border-radius: 34px; box-shadow: var(--shadow-dock);
  padding: 8px; gap: 6px;
}
.savebar .field { flex: 0 0 142px; }
.savebar .field > span { top: 6px; inset-inline-start: 16px; color: var(--color-text-2); }
.savebar .field .input {
  height: 50px; min-height: 50px; padding: 22px 16px 5px; border-radius: var(--radius-cap);
  background: var(--dock-well); color: var(--color-text); color-scheme: light;
  font-family: var(--font-heading); font-weight: 600; font-size: 15px;
}
/* WebKit ב-iOS: שדה תאריך מקורי מתעלם מהרוחב והגובה שנקבעו ומכסה את הכפתור שלידו — מבטלים את המראה המקורי ומגבילים אותו לבאר */
.savebar .field .input { -webkit-appearance: none; appearance: none; box-sizing: border-box; min-width: 0; max-width: 100%; overflow: hidden; }
.savebar .field .input::-webkit-date-and-time-value { margin: 0; min-height: 0; text-align: start; }
/* תאריך באנגלית בתוך דף עברי: הכיוון נקבע לפי הטקסט עצמו, כדי שלא יוצג «Nov 2026 25» */
input[type="date"]::-webkit-date-and-time-value { unicode-bidi: plaintext; margin: 0; }
/* אותו תיקון לכל שדות התאריך (שקילה, ניווט ימים): בלי המראה המקורי השדה מכבד את הרוחב של השורה שלו */
input[type="date"] { -webkit-appearance: none; appearance: none; box-sizing: border-box; min-width: 0; max-width: 100%; }
html[data-theme="dark"] .savebar .field .input { color-scheme: dark; }
.savebar .field .input:focus { background: var(--dock-well); box-shadow: inset 0 0 0 2px var(--color-accent); }
.savebar-summary { color: var(--color-text-2); }
.savebar .btn.ghost { color: var(--color-text-2); }
.savebar .btn.ghost:active { background: var(--press); color: var(--color-text); }
@media (hover: hover) and (pointer: fine) { .savebar .btn.ghost:hover { background: var(--press); color: var(--color-text); } }
.savebar .btn.primary { min-height: 50px; font-size: 1.0625rem; }
body:has(.savebar:not(.idle)) .view { padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }
html:has(.savebar:not(.idle)) { scroll-padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }
body:has(.savebar:not(.idle)) .toast { bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }

/* ---------- שאר המסכים: אותם עיגולים ---------- */
.option { padding: 14px 16px; padding-inline-end: 56px; }
.option::before, .option.on::after { inset-inline-end: 16px; }
.fl-main { padding-inline: 16px; }
.fr-row { padding-inline: 16px; }
details.block > summary { padding-inline: 14px; }
.session-head { padding: 14px 18px; }
.session-body { padding: 0 18px 16px; }
.cal-chip { border-radius: var(--radius-cap); }
.stat b { font-size: 1.125rem; }
.switch .track { border-radius: var(--radius-cap); }
.bx-card { padding-block: 18px; }
.bx-ss { border-radius: 20px; }
.card-danger { border-radius: var(--radius-lg); }

/* ---------- כניסה ושאלון בערכה הכהה: אותם עיגולים ואותן פנים ---------- */
html[data-theme="dark"] .gx-logo { font-family: var(--font-brand); }
html[data-theme="dark"] :is(.gx-title, .gx-page-title, .gx-day-title) { font-weight: var(--w-head); letter-spacing: -0.01em; }
html[data-theme="dark"] :is(.gx-spec-read b, .gx-num) { font-family: var(--font-heading); }
html[data-theme="dark"] :is(.gx-cta, .gx-social-btn, .gx-toggle, .gx-tag, .gx-count, .gx-pw-toggle) { border-radius: var(--radius-cap); }
html[data-theme="dark"] :is(.gx-input, .gx-error) { border-radius: var(--radius-md); }
html[data-theme="dark"] .gx-spec { border-radius: var(--radius-lg); }
html[data-theme="dark"] .gx-ex-sets i { border-radius: 5px; }
@media (max-width: 899px) { html[data-theme="dark"] .gx-sheet { border-radius: 26px 26px 0 0; } }

/* apple-grid-variants: שורת הסט במסכים צרים ורחבים */
@media (max-width: 384px) { .sr-head, .set-row { grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 1fr) 44px; column-gap: 4px; } .sr-val { font-size: 1.1875rem; } }
@media (max-width: 359px) {
  .exercise { padding: 16px 10px 12px; }
  .sr-head, .set-row { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) 44px; column-gap: 3px; }
  .sr-add-drop { margin-inline-start: 12px; }
  .sr-val { font-size: 1.0625rem; }
  .exercise-name { font-size: 1.3125rem; }
}
@media (min-width: 720px) {
  .exercise { padding: 22px 20px 18px; }
  .sr-head, .set-row { grid-template-columns: 28px minmax(0, 1.12fr) minmax(0, 1fr) 44px; column-gap: 10px; }
  .sr-add-drop { margin-inline-start: 28px; }
  .savebar-inner { padding: 10px; }
}

/* round 2 */
@media (max-width: 719px) { .view { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); } .exercise { padding-inline: 10px; } .ex-title-wrap { padding-inline-start: 10px; } }
@media (min-width: 385px) and (max-width: 719px) { .sr-head, .set-row { grid-template-columns: 22px minmax(0, 1.05fr) minmax(0, 1fr) 44px; column-gap: 4px; } }
html[data-theme="dark"] .set-row.done .sr-idx { color: var(--board-lit-soft); }
html[data-theme="dark"] .ex-save .btn.primary { background: #6EA4FA; color: #0A1730; }
.exercise .idx-dot { width: 46px; height: 46px; }
/* round 3 */
html[data-theme="dark"] .gx-cta:disabled { background: var(--cap); border-color: transparent; }
@media (min-width: 385px) { .exercise-name { font-size: 1.625rem; } }
html[data-theme="dark"] :is(.gx-circle, .gx-toggle, .gx-step-btn):not(.on) { border-color: transparent; }
/* round 4: רוחבי iPhone אמיתיים (375) וערכים ארוכים */
@media (max-width: 384px) { .exercise { padding-inline: 8px; } .sr-head, .set-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 44px; column-gap: 3px; } .sr-val { font-size: 1.125rem; } }
@media (max-width: 359px) { .sr-head, .set-row { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr) 44px; } .sr-val { font-size: 1rem; } }
/* תרגיל שהושלם: דיסקה כחולה מלאה עם ✓ — בלי מקטעי הטבעת מסביב */
.exercise.completed .idx-dot:not(.ss)::before { opacity: 0; }
.exercise.completed .idx-dot:not(.ss)::after { inset: 3px; background-size: 20px 20px; }
.exercise { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":1"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='49.862 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":2"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='30.175 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":3"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='20.331 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":4"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='14.425 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":5"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='10.487 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":6"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='7.675 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":7"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='5.565 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":8"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='round' stroke-dasharray='3.925 9.200' stroke-dashoffset='-4.600' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":9"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='8.741 3.071' stroke-dashoffset='-1.536' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":10"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='7.947 2.792' stroke-dashoffset='-1.396' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":11"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='7.284 2.559' stroke-dashoffset='-1.280' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":12"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='6.724 2.362' stroke-dashoffset='-1.181' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":13"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='6.244 2.194' stroke-dashoffset='-1.097' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":14"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='5.827 2.047' stroke-dashoffset='-1.024' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":15"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='5.463 1.920' stroke-dashoffset='-0.960' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":16"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='5.142 1.807' stroke-dashoffset='-0.903' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":17"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='4.856 1.706' stroke-dashoffset='-0.853' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":18"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='4.601 1.616' stroke-dashoffset='-0.808' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }
.exercise:has([data-set-row$=":19"]) { --ring: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='18.8' fill='none' stroke='%23000' stroke-width='5.8' stroke-linecap='butt' stroke-dasharray='4.306 1.600' stroke-dashoffset='-0.800' transform='rotate(-90 22 22)'/%3E%3C/svg%3E"); }

/* ============================================================
   כניסה ושאלון בשפה החלקה (2026-11-25, באישור הבעלים): בלי קווי יומן, בלי קו שוליים ובלי קווי מתאר.
   שדות ובחירות הם בארות ממולאות ומעוגלות על רקע הדף, הכפתור הראשי קפסולה, והכותרות בפנים העגולות.
   הסימון «השדה תקין» נשאר: עיגול כחול קטן עם וי ליד התווית. שום פקד לא הוסר.
   ============================================================ */
html:root .gate, html:root .gate .gx-main { background: var(--color-bg); }
html:root .gate .gx-page { background-image: none; }
html:root .gate .gx:not(.gx-wizard) .gx-col { background-image: none; padding-inline-start: 0; }
html:root .gate .gx-logo { font-family: var(--font-brand); letter-spacing: 0.14em; font-size: 19px; }
html:root .gate .gx:not(.gx-wizard) .gx-logo { height: auto; line-height: 1.2; margin: 22px 0 30px; }
html:root .gate :is(.gx-title, .gx-page-title, .gx-day-title) { font-family: var(--font-heading); font-weight: var(--w-head); letter-spacing: -0.01em; }
html:root .gate .gx:not(.gx-wizard) .gx-title { font-size: 30px; line-height: 1.15; margin: 0 0 8px; }
html:root .gate .gx:not(.gx-wizard) .gx-sub { line-height: 1.5; min-height: 0; margin: 0 0 26px; }
html:root .gate .gx:not(.gx-wizard) .gx-form { gap: 16px; }
html:root .gate .gx:not(.gx-wizard) .gx-set {
  margin-inline-start: 0; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 7px;
}
html:root .gate .gx:not(.gx-wizard) .gx-set-label b { grid-column: 1; grid-row: 1; align-self: center; padding: 0 6px; font-size: 14.5px; font-weight: 600; }
html:root .gate .gx:not(.gx-wizard) .gx-set .gx-ring {
  grid-column: 2; grid-row: 1; justify-self: start; align-self: center; width: 20px; height: 20px; border: 0;
  background: var(--color-accent); color: #FFFFFF; opacity: 0; transform: scale(0.6);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
html:root .gate .gx:not(.gx-wizard) .gx-set .gx-ring::after { content: none; }
html:root .gate .gx:not(.gx-wizard) .gx-set .gx-ring svg { width: 12px; height: 12px; opacity: 1; }
html:root .gate .gx:not(.gx-wizard) .gx-set .gx-ring.done { opacity: 1; transform: none; }
html:root .gate .gx:not(.gx-wizard) .gx-set > input, html:root .gate .gx:not(.gx-wizard) .gx-set > .gx-pw,
html:root .gate .gx:not(.gx-wizard) .gx-set > .gx-hint { grid-column: 1 / -1; }
html:root .gate .gx:not(.gx-wizard) .gx-set > .gx-hint { grid-row: 3; padding: 0 6px; }
html:root .gate .gx:not(.gx-wizard) .gx-set > input, html:root .gate .gx:not(.gx-wizard) .gx-set .gx-pw input,
html:root .gate .gx:not(.gx-wizard) .gx-claim input, html:root .gate .gx-input {
  height: 54px; border: 0; border-radius: var(--radius-md); background: var(--color-surface); padding: 0 16px; box-shadow: var(--shadow-sm);
}
html:root .gate .gx:not(.gx-wizard) .gx-set > input:focus, html:root .gate .gx:not(.gx-wizard) .gx-set .gx-pw input:focus,
html:root .gate .gx:not(.gx-wizard) .gx-claim input:focus, html:root .gate .gx-input:focus {
  border: 0; outline: none; box-shadow: inset 0 0 0 2px var(--color-accent);
}
html:root .gate .gx:not(.gx-wizard) .gx-set .gx-pw input { padding-left: 84px; padding-right: 16px; }
html:root[dir="ltr"] .gate .gx:not(.gx-wizard) .gx-set .gx-pw input { padding-left: 16px; padding-right: 84px; }
html:root .gate .gx-pw-toggle { inset-inline-end: 8px; border-radius: var(--radius-cap); color: var(--accent-ink, var(--accent-700)); }
html:root .gate .gx:not(.gx-wizard) .gx-claim { margin-top: 16px; }
html:root .gate .gx-error { border-radius: var(--radius-md); }
html:root .gate .gx-cta { height: 54px; border: 0; border-radius: var(--radius-cap); margin-top: 26px; font-family: var(--font-heading); font-size: 17px; font-weight: 700; }
html:root .gate .gx-wizard .gx-cta { margin-top: 0; }
html:root .gate .gx-cta:disabled { background: var(--cap-on); border: 0; color: var(--color-text-2); }
html:root .gate .gx-cta.ready { background: var(--color-accent); color: var(--on-accent); }
html:root .gate .gx-cta:active:not(:disabled) { transform: scale(0.98); }
html:root .gate .gx-social-btn { height: 52px; border: 0; border-radius: var(--radius-cap); background: var(--color-surface); box-shadow: var(--shadow-sm); }

/* שאלון */
html:root .gate .gx-topbar { background: var(--color-bg); }
html:root .gate .gx-steps.compact span { border: 0; background: var(--cap-on); color: var(--color-text-2); box-shadow: none; font-family: var(--font-heading); font-weight: 600; }
html:root .gate .gx-steps.compact li.done span { background: var(--color-accent); color: #FFFFFF; }
html:root .gate .gx-steps.compact li.now span { background: var(--color-text); color: var(--color-bg); box-shadow: none; }
html:root .gate .gx-h { font-family: var(--font-heading); font-weight: var(--w-head); margin: 26px 0 10px; padding: 0 4px; }
html:root .gate .gx-radios { border: 0; gap: 8px; }
html:root .gate .gx-radio-row { border: 0; background: var(--color-surface); border-radius: var(--radius-md); padding: 12px 16px; min-height: 60px; box-shadow: var(--shadow-sm);
  transition: background-color 160ms var(--ease-out); }
html:root .gate .gx-radio-row.on { background: var(--cap-on); box-shadow: none; }
html:root .gate .gx-radio-row:active { background: var(--cap-on); }
html:root .gate .gx-dot { width: 24px; height: 24px; border: 0; background: var(--color-bg); }
html:root .gate .gx-radio-row.on .gx-dot { background: var(--color-accent); }
html:root .gate .gx-radio-row.on .gx-dot::after { width: 9px; height: 9px; background: #FFFFFF; }
html:root .gate .gx-tag { border-radius: var(--radius-cap); }
html:root .gate .gx-circle { border: 0; background: var(--color-surface); box-shadow: var(--shadow-sm); font-family: var(--font-heading); }
html:root .gate .gx-circle.on { background: var(--color-accent); color: #FFFFFF; box-shadow: none; }
html:root .gate .gx-toggle { height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius-cap); background: var(--color-surface); box-shadow: var(--shadow-sm); }
html:root .gate .gx-toggle.on { background: var(--cap-on); color: var(--color-text); font-weight: 600; box-shadow: none; }
html:root .gate .gx-rows { border: 0; display: flex; flex-direction: column; gap: 8px; }
html:root .gate .gx-row { border: 0; background: var(--color-surface); border-radius: var(--radius-md); min-height: 60px; padding-block: 8px; padding-inline: 16px 8px; box-shadow: var(--shadow-sm); }
html:root .gate .gx-stepper { gap: 0; padding: 2px; background: var(--cap); border-radius: var(--radius-cap); }
html:root .gate .gx-step-btn { width: 44px; height: 44px; border: 0; background: transparent; font-size: 21px; }
html:root .gate .gx-step-btn:active { background: var(--press); }
html:root .gate .gx-stepper-val { min-width: 84px; }
html:root .gate .gx-stepper-val input { font-family: var(--font-heading); font-weight: var(--w-num); }
html:root .gate .gx-day { border: 0; background: var(--color-surface); border-radius: var(--radius-lg); padding: 16px 18px 6px; margin-top: 14px; box-shadow: var(--shadow-sm); }
html:root .gate .gx-day-title { font-size: 19px; }
html:root .gate .gx-day li:last-child { border-bottom: 0; }
html:root .gate .gx-ex-sets i { border: 0; background: var(--cap-on); border-radius: 4px; }
@media (max-width: 899px) { html:root .gate .gx-sheet { border-radius: 26px 26px 0 0; } }
html:root[data-theme="dark"] .gate .gx-cta:disabled { color: var(--color-text); }
/* הפס שמאחורי שורת הסטטוס באפליקציה: אותו רקע של הדף, לא לבן */
html:root.native-app body:has(#gate:not([hidden]))::before { background: var(--color-bg); }
html:root .gate .gx-wizard .gx-error { margin-top: 16px; }
/* כפתורי ההתחברות החיצונית: Apple ראשון, שחור בבהיר ולבן בכהה (כמו בהנחיות Apple); האחרים על משטח */
html:root .gate .gx-or { margin: 22px 0 14px; }
html:root .gate .gx-social { gap: 10px; }
html:root .gate .gx-social-btn { font-family: var(--font-heading); font-weight: 600; font-size: 16px; }
html:root .gate .gx-social-btn[data-p="apple"] { background: #000000; color: #FFFFFF; box-shadow: none; }
html:root[data-theme="dark"] .gate .gx-social-btn[data-p="apple"] { background: #FFFFFF; color: #000000; }
html:root .gate .gx-social-btn:active { transform: scale(0.98); }
html:root .gate .gx-legal { margin: 18px 0 0; padding: 0 6px; font-size: 13px; line-height: 1.55; color: var(--color-text-2); text-wrap: pretty; }
html:root .gate .gx-legal a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }

/* ============ שיפור שאושר על ידי הבעלים (2026-11-25): היררכיה של שלושה מצבים ברישום האימון, תגית «+ ירידה» קטנה בצבע הענבר, נתוני לוח קריאים ============ */
/* סט שבוצע נסוג: בלי קפסולה, מספרים בגוון משני — הווי הכחול הוא הסימן. העין נוחתת על הסט הבא */
.set-table > :is(.set-row, .set-block).done, .ss-round.done > :is(.set-row, .set-block) { --field-bg: transparent; --val-ink: var(--color-text-2); --step-ink: var(--color-text-2); }
.set-row.done .sr-val { color: var(--color-text-2); font-weight: 500; }
/* הסט הבא: מספר הסט מודגש בכחול, סימני + − כבדים יותר */
.set-table > .set-row:not(.done) .sr-idx, .set-table > .set-block:not(.done) > .set-row:not(.drop) .sr-idx { color: var(--color-accent); font-weight: 700; }
.set-table > :is(.set-row, .set-block):not(.done) ~ .set-row:not(.done) .sr-idx,
.set-table > :is(.set-row, .set-block):not(.done) ~ .set-block:not(.done) > .set-row:not(.drop) .sr-idx { color: var(--color-text-2); font-weight: 400; }
.set-table > :is(.set-row, .set-block):not(.done) .sr-step { font-weight: 500; }
html[data-theme="dark"] .set-table > .set-row:not(.done) .sr-idx, html[data-theme="dark"] .set-table > .set-block:not(.done) > .set-row:not(.drop) .sr-idx { color: var(--accent-ink); }
html[data-theme="dark"] .set-table > :is(.set-row, .set-block):not(.done) ~ .set-row:not(.done) .sr-idx,
html[data-theme="dark"] .set-table > :is(.set-row, .set-block):not(.done) ~ .set-block:not(.done) > .set-row:not(.drop) .sr-idx { color: var(--color-text-2); }
/* «+ ירידה»: תגית שקטה בגובה 30 במקום שורה של 44 בצבע ענבר — הריווח בין הסטים נשאר אחיד. אזור המגע נשאר 44 */
.sr-add-drop { position: relative; align-self: flex-end; min-height: 30px; height: 30px; margin: 0; margin-inline-end: 50px; padding: 0 12px; align-items: center;
  background: var(--amber-wash); color: var(--amber-ink); border-radius: var(--radius-cap); font-size: 13px; font-weight: 600; }
.sr-add-drop::after { content: ""; position: absolute; inset: -7px 0; }
.sr-add-drop:active { filter: brightness(0.94); }
.set-table { gap: 6px; }
/* לוח הבית: תווית קטנה מעל, ומתחתיה המספר הגדול וההסבר באותה שורה — במקום מספר שמרחף בקצה הרחוק מהתווית שלו */
.readout { grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 1px; align-items: baseline; }
.readout .ro-label { grid-column: 1 / -1; grid-row: 1; color: var(--board-muted); font-size: 12.5px; font-weight: 500; }
.readout .ro-val { grid-column: 1; grid-row: 2; text-align: start; font-size: 22px; line-height: 1.15; }
.readout .ro-sub { grid-column: 2; grid-row: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-readouts { gap: 12px; }

/* ============ אושר על ידי הבעלים (2026-11-25): לוח מקוצר בלשוניות שאינן «אימונים» — התוכן של הלשונית עולה למעלה ============ */
/* בתזונה, התקדמות והגדרות הלוח מצטמצם לשורת זיהוי ולשורה אחת: שם האימון המשובץ וכפתור ההתחלה. הטבעת והנתונים נשארים בלשונית אימונים (ובתזונה הם מופיעים ממילא בכרטיס «היום») */
body:has(#view:not([data-tab="workouts"])) .board-cal,
body:has(#view:not([data-tab="workouts"])) .board-next-meta { display: none; }
body:has(#view:not([data-tab="workouts"])) .board-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; margin-top: 10px; }
body:has(#view:not([data-tab="workouts"])) .board-next-label { grid-column: 1; grid-row: 1; }
body:has(#view:not([data-tab="workouts"])) .board-next-name { grid-column: 1; grid-row: 2; font-size: 22px; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:has(#view:not([data-tab="workouts"])) .board-cta { grid-column: 2; grid-row: 1 / span 2; width: auto; min-height: 46px; height: 46px; margin: 0; padding: 0 18px; font-size: 15px; }
body:has(#view:not([data-tab="workouts"])) .board-inner { padding-bottom: 18px; }

/* ============ אושר על ידי הבעלים (2026-11-25): סיכום היום בתזונה, רשימת היסטוריה מקובצת, ניווט ימים בשורה אחת ============ */
/* סיכום היום: הקלוריות הן המספר הראשי, הפס צמוד אליהן, ושלושת המאקרו בשורה אחת מתחת. היעד ליום נשאר, בצד */
.card:has(> .row > .macros) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; row-gap: 14px; align-items: end; }
.card:has(> .row > .macros) > .row, .card:has(> .row > .macros) .macros { display: contents; }
.card:has(> .row > .macros) .macro { min-width: 0; }
.card:has(> .row > .macros) .macro:first-child { grid-column: 1 / span 2; grid-row: 1; }
.card:has(> .row > .macros) .macro:first-child .macro-val { font-size: 2.125rem; line-height: 1.1; font-weight: var(--w-head); }
.card:has(> .row > .macros) .macro:first-child .macro-val small { font-size: 15px; }
.card:has(> .row > .macros) .field { grid-column: 3; grid-row: 1; margin: 0; gap: 4px; align-items: stretch; }
.card:has(> .row > .macros) .field > span { font-size: 12px; line-height: 1.25; }
.card:has(> .row > .macros) .field .input { width: 100% !important; min-height: 44px; }
.card:has(> .row > .macros) > .kcal-bar { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.card:has(> .row > .macros) .macro:not(:first-child) { grid-row: 3; }
.card:has(> .row > .macros) .macro:not(:first-child) .macro-val { font-size: 1.375rem; }
/* ניווט ימים: שלושת הפקדים תמיד בשורה אחת, גם באנגלית — שדה התאריך הוא זה שמתכווץ */
.date-nav > .btn.small { flex: 0 0 auto; }
.date-nav input[type="date"] { flex: 1 1 0; min-width: 116px; white-space: nowrap; }
.date-nav input[type="date"]::-webkit-date-and-time-value { white-space: nowrap; }
.date-nav .today-label { flex: 0 0 100%; }
/* היסטוריה: רשימה מקובצת אחת במקום כרטיס נפרד לכל אימון — קו דק בין שורות, פינות מעוגלות רק בקצוות */
.session { margin-bottom: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--color-divider); }
.row.between + .session, .cal-wrap + .session { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.session:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-bottom: 0; }
.row.between + .session:last-child { border-radius: var(--radius-lg); }

/* ============ אושר על ידי הבעלים (2026-11-25): שבבי לוח השנה בגודל קריא, טופס «פרטים ויעדים» כשורות ============ */
/* לוח שנה במסך צר: השבב מציג «✓ C» במקום «✓ יום C», ולכן אפשר להגדיל את הטקסט מ-9.5 ל-12 */
@media (max-width: 640px) {
  .cal-chip-word { display: none; }
  .cal-chip { font-size: 12px; line-height: 1.35; padding: 1px 7px; font-family: var(--font-heading); font-weight: 600; }
  html[dir="ltr"] .cal-chip { padding: 1px 6px; }
  .cal-num { font-size: 13px; }
}
/* הגדרות: כל שדה הוא שורה אחת — התווית בצד אחד והערך בצד השני — במקום תווית מעל שדה ברוחב מלא */
@media (max-width: 719px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .settings-grid > .field { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
  .settings-grid > .field > span { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.3; color: var(--color-text); }
  .settings-grid > .field > .input { flex: 0 0 44%; width: 44%; min-width: 0; text-align: center; }
  .settings-grid > .field > select.input { flex-basis: 52%; width: 52%; text-align: start; }
}

/* אנגלית במסך צר: כפתורי ניווט החודש בלוח השנה בשורה אחת, בלי ש-«Previous month» יישבר לשלוש שורות */
@media (max-width: 400px) {
  html[dir="ltr"] .cal-head .btn { padding: 0 9px; font-size: 13px; white-space: nowrap; }
  html[dir="ltr"] .cal-head .row { gap: 2px; }
}

/* הלוגו (2026-11-25): בתוך האפליקציה הסמל מופיע עם השם VEQTRION מתחתיו — במסך ההרשמה ובמסך הטעינה */
.boot-mark { display: block; width: 88px; height: 88px; margin: 0 auto 18px; }
html:root .gate .gx-logo.has-mark { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; height: auto; line-height: 1.2; }
html:root[dir="ltr"] .gate .gx-logo.has-mark { align-items: flex-start; }
html:root .gate .gx-logo.has-mark img { display: block; width: 68px; height: 68px; }

/* לוגו קטן ליד השם בסרגל העליון של השאלון */
html:root .gate .gx-topbar .gx-logo.has-mark-row { display: inline-flex; align-items: center; gap: 9px; height: auto; line-height: 1; }
html:root .gate .gx-topbar .gx-logo.has-mark-row img { display: block; width: 30px; height: 30px; flex: none; }

/* איפוס סיסמה: קישור «שכחתי סיסמה» מתחת לשדה הסיסמה, מסך האישור ודף בחירת הסיסמה (reset-password.html) */
html:root .gate .gx-forgot { align-self: flex-end; margin: -10px 0 -8px; }
html:root .gate .gx-sent-to { margin: -14px 0 16px; font-weight: 600; color: var(--color-text); overflow-wrap: anywhere; }
html:root .gate .gx-note { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--color-text-2); text-wrap: pretty; }
html:root .gate a.gx-cta { display: flex; align-items: center; justify-content: center; text-decoration: none; }
html:root .gate .gx.gx-solo { grid-template-columns: minmax(0, 1fr); }

/* טווח חזרות ("8–10") בשדה טקסט: בעברית הדפדפן הפך אותו ל-"10–8". השדה נכתב משמאל לימין, ונשאר מיושר כמו שאר השדות */
.input.input-range { direction: ltr; }
html[dir="rtl"] .input.input-range { text-align: right; }

/* טיימר מנוחה בין סטים: גלולה צפה מעל סרגל השמירה (או מעל תחתית המסך כשאין סרגל). נוצרת פעם אחת ב-rest.js, מחוץ לתוכן שנבנה מחדש */
.rest-pill[hidden] { display: none; }
.rest-pill {
  /* בצד ההתחלה: כפתור «שמירת התרגיל» יושב בצד הסיום, והגלולה לא מכסה אותו */
  position: fixed; z-index: 21; inset-inline-start: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 8px; max-width: calc(100vw - 32px);
  border-radius: 999px; background: var(--board); color: var(--board-ink); box-shadow: 0 12px 28px -10px rgba(8, 17, 34, 0.55), 0 2px 6px rgba(8, 17, 34, 0.18);
  font-size: 15px; white-space: nowrap; animation: rest-in 260ms var(--ease-out, ease-out);
}
body:has(.savebar:not(.idle)) .rest-pill { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
html[data-theme="dark"] .rest-pill { background: color-mix(in srgb, var(--board-lit) 28%, var(--color-surface)); }
.rest-ring { flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(var(--board-lit) calc(var(--p, 0) * 360deg), var(--board-track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); }
.rest-label { color: var(--board-muted); }
.rest-time { font-family: var(--font-heading); font-weight: 600; font-size: 19px; font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: center; }
.rest-pill button { border: 0; height: 36px; padding: 0 14px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--board-well); color: var(--board-ink); }
.rest-pill .rest-bell { background: var(--board-lit); color: #fff; }
.rest-pill.is-done { padding-inline: 10px 18px; }
.rest-pill.is-done .rest-label { color: var(--board-ink); font-weight: 600; }
.rest-pill.is-done .rest-time { display: none; }
@keyframes rest-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .rest-pill { animation: none; } }


/* מתג שפה במסכי הכניסה: בפינה שמול הלוגו, באותו גובה */
.gx-col > .gx-lang { position: absolute; inset-block-start: 0; inset-inline-end: 0; }
.gx.gx-solo .gx-col { position: relative; }
@media (max-width: 720px) { .gx-col > .gx-lang { inset-block-start: 14px; } }

/* בחירת שפה לפני השימוש הראשון: שתי אפשרויות גדולות, שפת המכשיר ראשונה ומודגשת */
.gx-langs { display: grid; gap: 12px; margin-top: 28px; }
.gx-lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 72px; padding: 0 24px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--color-surface); color: var(--color-text); font: inherit; text-align: start;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), background-color 160ms ease;
}
.gx-lang-opt b { font-family: var(--font-heading); font-weight: 400; font-size: 24px; line-height: 1.2; }
.gx-lang-opt.first { background: var(--accent-500); color: var(--on-accent); box-shadow: none; }
.gx-lang-opt:active { transform: scale(0.985); }
.gx-lang-opt:focus-visible { outline: 3px solid var(--accent-300); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .gx-lang-opt.first:hover { background: var(--accent-600); } }
html:root .gate .gx-lang-note { margin-top: 26px; padding: 0 6px; }
@media (prefers-reduced-motion: reduce) { .gx-lang-opt { transition: none; } }



/* מה שזוהה בקובץ PDF, לאישור לפני הוספה לתוכניות */
.pdf-pre { margin-top: 14px; padding: 14px; border-radius: var(--radius-md); background: var(--color-sunken); display: grid; gap: 14px; }
.pdf-pre[hidden] { display: none; }
.pdf-pre-head { display: grid; gap: 2px; }
.pdf-pre-head b { font-family: var(--font-heading); font-weight: 400; font-size: 19px; line-height: 1.25; }
.pdf-pre-prog { font-weight: 600; }
.pdf-pre-day { background: var(--color-surface); border-radius: var(--radius-md); padding: 12px 14px; }
.pdf-pre-day-name { font-weight: 600; margin-bottom: 6px; }
.pdf-pre-day ol { list-style: none; margin: 0; padding: 0; display: grid; }
.pdf-pre-day li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 6px 0; min-width: 0; }
.pdf-pre-ex { min-width: 0; overflow-wrap: anywhere; }
.pdf-pre-ex small, .pdf-pre-num small { display: block; color: var(--color-text-2); font-size: 13px; }
.pdf-pre-num { flex: none; text-align: end; font-variant-numeric: tabular-nums; font-weight: 500; }
.pdf-pre-actions { gap: 8px; flex-wrap: wrap; }

/* ============ לקראת הגשה ל-App Store (2026-11-26): אודות ותמיכה, הערת רופא, שם לא חובה, «המשך עם Apple» במחיקת חשבון ============ */
/* «כדאי להתייעץ עם רופא…» — הערת שוליים שקטה מתחת ליעדים (הגדרות, תזונה, שאלון) */
.medical-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--color-text-2); text-wrap: pretty; }
/* כרטיס «היום» בתזונה הוא רשת של שלוש עמודות: הערת הרופא תופסת את כל הרוחב */
.card:has(> .row > .macros) > .medical-note { grid-column: 1 / -1; margin: 0; }
/* בשאלון: באותו קו עם שורת ההסבר שמעליה (בלי ריפוד צד משלה) */
html:root .gate .gx-medical { margin: 18px 0 0; }
/* «(לא חובה)» ליד כותרת השם בשאלון */
.gx-h-opt { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--color-text-2); }

/* קרדיט מאגר המזונות: שורה משלו מתחת לכותרת הכרטיס, לא בין הכפתורים */
.db-credit { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; text-wrap: pretty; }
.db-card.open > .db-credit { margin: -4px 0 0; }

/* אודות ותמיכה: רשימה מקובצת בשקע, כמו בהגדרות של iOS — כל שורה קישור עם חץ בצד הסוף, ובסוף מספר הגרסה */
.about-list { list-style: none; margin: 12px 0 0; padding: 0; border-radius: var(--radius-md); background: var(--well, var(--color-bg)); overflow: hidden; }
.about-list > li + li { border-top: 1px solid var(--color-divider); }
.about-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 16px; color: var(--color-text); text-decoration: none; font-size: 15px; }
a.about-row { transition: background-color 160ms ease; }
a.about-row:active { background: var(--press); }
@media (hover: hover) and (pointer: fine) { a.about-row:hover { background: var(--press); } }
.about-chev { flex: none; width: 18px; height: 18px; background: var(--color-text-3);
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat; transform: rotate(90deg); }
html[dir="ltr"] .about-chev { transform: rotate(-90deg); }
.about-version bdi { color: var(--color-text-2); font-variant-numeric: tabular-nums; }

/* מחיקת חשבון בלי סיסמה: הסבר + «המשך עם Apple» (שחור בבהיר, לבן בכהה, כמו כפתור הכניסה), ואחרי הכניסה שורת ✓ */
.delete-reauth, .delete-reauth-needed { display: grid; gap: 10px; }
.delete-reauth-needed[hidden], .reauth-ok[hidden], .reauth-expired[hidden] { display: none; }
.reauth-expired { margin: 0; color: var(--danger-ink); }
.reauth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.reauth-btn { gap: 9px; min-height: 48px; padding: 0 22px; text-decoration: none; font-weight: 600; }
.btn.reauth-btn[data-p="apple"] { background: #000000; color: #FFFFFF; }
html[data-theme="dark"] .btn.reauth-btn[data-p="apple"] { background: #FFFFFF; color: #000000; }
.btn.reauth-btn:active { transform: scale(0.98); }
.reauth-ico { display: inline-flex; width: 18px; height: 18px; }
.reauth-ico svg { width: 100%; height: 100%; }
.reauth-ok { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 600; color: var(--color-text); }
.reauth-check { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--color-accent) var(--i-check-white) center / 14px no-repeat; }
