/* =========================================================
   טאדאם · נייר ונחושת
   הזהות של המיזם (קרם, נחושת, גופן המערכת) בליטוש של אפליקציה: כרטיסי נייר בקו דק,
   זכוכית צפה מעל המודל, קפיצים רכים. השכבה הזו יושבת מעל app.css וחלה על כל המסכים, כולל מצב ההטמעה
   ========================================================= */

/* ---------- טוקנים ---------- */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  /* קפיץ כמעט בלי קפיצה (מעברים), וקפיץ עם קפיצה קטנה (רגעים של הצלחה בלבד) */
  --spring-soft: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.077 22.6%, 1.121 26.5%, 1.149 31.3%, 1.159 36.4%, 1.14 44.3%, 1.079 58.9%, 1.035 69.3%, 1.012 78.5%, 1);
  --ok: #2e7d5b;
  --ok-tint: #e2f0e8;
  --gut: 20px;
  --col: 520px;
  --canvas: #f4efe8;
  --canvas-img: radial-gradient(120% 55% at 50% 0%, #fbf8f3 0%, rgba(251, 248, 243, 0) 70%);
  --surface: #fbf8f3;
  --surface-hi: #ffffff;
  --fill2: #eae3d8;
  --sheet-bg: #f6f1ea;
  --ink: #14110f;
  --ink2: rgba(20, 17, 15, 0.66);
  --ink3: rgba(20, 17, 15, 0.62); /* 4.6 על הקרם: מותר גם בטקסט קטן */
  --ink-mute: rgba(20, 17, 15, 0.5); /* הגוון הבהיר של כותרות דו־גוניות, בגודל 24 ומעלה בלבד */
  --hair: #ddd4c6;
  --acc: #d9692f;
  --acc-deep: #b9531f;
  --acc-ink: #8f3f17;
  --acc-tint: #f3e2d5;
  --cta-bg: linear-gradient(180deg, #db6c34 0%, #c75824 100%);
  --cta-ink: #fff;
  --cta-sh: 0 14px 26px -16px rgba(140, 62, 20, 0.75), 0 2px 5px rgba(140, 62, 20, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 0 rgba(110, 45, 10, 0.22);
  --r-card: 24px;
  --r-tile: 20px;
  --r-sheet: 32px;
  --sh-card: 0 0 0 1px rgba(216, 208, 196, 0.75), 0 18px 36px -28px rgba(60, 40, 20, 0.42);
  --sh-raised: 0 0 0 1px rgba(216, 208, 196, 0.6), 0 26px 54px -26px rgba(60, 40, 20, 0.42);
  --glass: rgba(251, 248, 243, 0.8);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(216, 208, 196, 0.6);
  --w-display: 700;
}
/* המשתנים הישנים מצביעים על החדשים, כדי שגם מסכים שלא נגענו בהם (לוח הבקרה) ילכו עם הכיוון */
:root {
  --bg: var(--canvas); --paper: var(--canvas); --card: var(--surface); --warm: var(--fill2); --line: var(--hair);
  --accent: var(--acc); --accent2: var(--acc); --accent-soft: var(--acc-tint); --shadow: var(--sh-card);
  --r: var(--r-card); --ease: var(--ease-out); --lift: var(--sh-raised);
}

/* ---------- בסיס ---------- */
:root body { background: var(--canvas); color: var(--ink); }
:root body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--canvas-img); pointer-events: none; }
:root button, :root a.btn, :root a.row { touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
:root :focus-visible { outline: 2.5px solid var(--acc-deep); outline-offset: 3px; border-radius: 12px; }
:root .skip { position: fixed; z-index: 99; top: 8px; inset-inline-start: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; transform: translateY(-200%); }
:root .skip:focus { transform: none; }
:root .mark { gap: 8px; font-size: 19px; font-weight: 800; color: var(--ink); text-decoration: none; }
:root .mark svg { width: 28px; height: 28px; }
:root .mark.only .mark-w { display: none; }
:root .mark-w { font-weight: 800; }
:root .mute { color: var(--ink3); font-weight: 500; }
:root .pp-h1 .mute, :root .f-h1 .mute, :root .f-h2 .mute { color: var(--ink-mute); }

/* כפתורים */
:root .btn { height: 56px; border-radius: 999px; font-size: 17px; font-weight: 600; transition: transform 0.4s var(--spring), background 0.2s, box-shadow 0.2s; }
:root .btn:active, :root button:active { transform: scale(0.97); transition-duration: 0.1s; }
:root .row:active { transform: none; }
:root .btn.small { height: 44px; font-size: 15px; }
:root .btn.primary { background: var(--cta-bg); color: var(--cta-ink); box-shadow: var(--cta-sh); font-size: 19px; font-weight: 700; }
:root .btn.primary.small { background: var(--acc-deep); font-size: 15.5px; font-weight: 600; box-shadow: none; }
:root .btn svg { width: 20px; height: 20px; flex: none; }
:root .link, :root .f-alt, :root .h-link { color: var(--ink); font-weight: 600; font-size: 15.5px; min-height: 44px; text-decoration: underline; text-decoration-color: var(--acc); text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* כפתור עגול */
:root .icon-btn { width: 44px; height: 44px; color: var(--ink); background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.4); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); transition: transform 0.4s var(--spring), background 0.2s; }
:root .icon-btn.on { background: var(--acc); color: #fff; }
:root .badge { font-size: 12.5px; padding: 4px 10px; background: var(--fill2); color: var(--ink2); }
:root .badge.green { background: var(--ok-tint); color: #1f6044; }
:root .badge.blue { background: var(--acc-tint); color: var(--acc-ink); }

/* =========================================================
   דף הבית: לשוניות המוצרים למעלה במרכז
   ========================================================= */
:root .home2 { max-width: var(--col); margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; padding: 0 var(--gut); }
:root .h-top { position: sticky; top: 0; z-index: 10; display: grid; align-items: center; gap: 12px 10px; margin: 0 calc(-1 * var(--gut)); padding: calc(var(--top) + 10px) var(--gut) 10px; }
:root .h-top { grid-template-columns: 1fr auto; grid-template-areas: "logo menu" "tabs tabs"; background: linear-gradient(to bottom, rgba(244, 239, 232, 0.94) 70%, rgba(244, 239, 232, 0)); }
:root .h-logo { grid-area: logo; text-decoration: none; justify-self: start; display: flex; align-items: center; min-height: 44px; }
:root #hmenu { grid-area: menu; }
:root .ptabs { grid-area: tabs; justify-self: center; width: 100%; max-width: 320px; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; }
:root .ptabs { background: var(--fill2); box-shadow: inset 0 0 0 1px rgba(20, 17, 15, 0.04); }
:root .ptabs button { position: relative; z-index: 1; height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink2); white-space: nowrap; transition: color 0.25s; }
:root .ptabs button:active { transform: none; }
:root .ptabs button[aria-selected="true"] { color: var(--ink); }
:root .ptabs img { width: 26px; height: 26px; object-fit: contain; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, #e6dccd); transition: transform 0.45s var(--spring-soft); }
:root .ptabs button[aria-selected="true"] img { transform: scale(1.08); }
:root .ptabs-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; transition: transform 0.5s var(--spring-soft); will-change: transform; }
:root .ptabs-thumb { background: var(--surface-hi); box-shadow: 0 1px 2px rgba(60, 40, 20, 0.1), 0 8px 18px -10px rgba(60, 40, 20, 0.4); }

:root .h-body { position: relative; flex: 1; }
:root .pp { display: flex; flex-direction: column; gap: 16px; padding-top: 6px; }
:root .pp > *, :root .pp-info > * { animation: ppin 0.5s var(--ease-out) both; }
:root .pp-info > :nth-child(1) { animation-delay: 0.04s; }
:root .pp-info > :nth-child(2) { animation-delay: 0.08s; }
:root .pp-info > :nth-child(3) { animation-delay: 0.12s; }
:root .pp-info > :nth-child(4) { animation-delay: 0.16s; }
:root .pp.out { position: absolute; inset: 0 0 auto 0; pointer-events: none; }
:root .pp.out > * { animation: ppout 0.18s var(--ease-out) both; }
:root .pp.out .pp-info > * { animation: none; }
@keyframes ppin { from { opacity: 0; transform: translateX(var(--x, 0px)) translateY(6px); } }
@keyframes ppout { to { opacity: 0; transform: translateX(var(--x, 0px)); } }

:root .pp-stage { position: relative; height: clamp(230px, 36svh, 340px); border-radius: 32px; overflow: hidden; }
:root .pp-stage { background: radial-gradient(90% 80% at 50% 35%, #fbf8f3, #e9e1d5); box-shadow: var(--sh-card); }
:root .pp-stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(20, 17, 15, 0.13) 1px, transparent 1.2px); background-size: 14px 14px; -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, transparent 35%, #000 100%); mask-image: radial-gradient(80% 70% at 50% 45%, transparent 35%, #000 100%); opacity: 0.6; }
:root .pp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px 14px 46px; z-index: 1; transition: opacity 0.22s ease, transform 0.45s var(--ease-out); }
:root .pp-img.swap { opacity: 0; transform: scale(0.97); }
:root .ar-chip { z-index: 2; height: 44px; padding: 0 15px; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.5); }
:root .ar-chip svg { color: var(--acc-deep); }
:root .pp-fin { position: absolute; z-index: 2; bottom: 12px; inset-inline-end: 12px; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
:root .pp-fin button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
:root .pp-fin i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(20, 17, 15, 0.18); transition: transform 0.4s var(--spring), box-shadow 0.2s; }
:root .pp-fin button[aria-checked="true"] i { transform: scale(1.12); box-shadow: inset 0 0 0 1px rgba(20, 17, 15, 0.18), 0 0 0 2px var(--surface-hi), 0 0 0 4px var(--acc); }
:root .pp-fin span { font-size: 13.5px; font-weight: 600; color: var(--ink2); min-width: 30px; text-align: center; }

:root .pp-info { display: flex; flex-direction: column; gap: 10px; }
:root .pp-h1 { font-size: clamp(30px, 8.2vw, 38px); line-height: 1.06; font-weight: var(--w-display); letter-spacing: -0.03em; text-wrap: balance; }

/* כרטיס המספרים: צעדים, דקות, אנשים */
:root .pp-ticket { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 14px 0 12px; }
:root .pp-ticket > div { text-align: center; position: relative; }
:root .pp-ticket > div + div::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; border-inline-start: 1px solid var(--hair); }
:root .pp-ticket b { display: block; font-size: 30px; line-height: 1.05; font-weight: var(--w-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
:root .pp-ticket span { font-size: 13.5px; color: var(--ink2); font-weight: 500; }

:root .pp-feats { list-style: none; margin: 6px 0 0; padding: 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; }
:root .pp-feats li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; position: relative; }
:root .pp-feats li + li::before { content: ""; position: absolute; top: 0; inset-inline: 68px 0; height: 1px; background: var(--hair); }
:root .pp-feats i { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--fill2); color: var(--acc-deep); }
:root .pp-feats i svg { width: 22px; height: 22px; }
:root .pp-feats b { display: block; font-size: 16px; font-weight: 600; line-height: 1.25; }
:root .pp-feats span { display: block; font-size: 13.5px; color: var(--ink2); }

/* הפעולה הראשית צמודה לאגודל */
:root .h-foot { position: sticky; bottom: 0; z-index: 9; display: flex; flex-direction: column; align-items: stretch; margin: 0 calc(-1 * var(--gut)); padding: 26px var(--gut) calc(10px + var(--bottom)); }
:root .h-foot { background: linear-gradient(to top, var(--canvas) 72%, rgba(244, 239, 232, 0)); }
:root .h-cta { height: 60px; font-size: 19px; }
:root .h-sure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 13.5px; color: var(--ink2); }
:root .h-sure svg { width: 15px; height: 15px; color: var(--ok); flex: none; }
:root .h-scan { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
:root .h-scan svg { width: 20px; height: 20px; color: var(--acc-deep); flex: none; }
:root .h-scan span { text-decoration: underline; text-decoration-color: var(--acc); text-underline-offset: 4px; text-decoration-thickness: 2px; }
:root .h-alt { align-self: center; }
:root .h-alt[hidden] { display: none; }

/* =========================================================
   המסלול המודרך
   ========================================================= */
:root .flow { padding: calc(var(--top) + 10px) var(--gut) calc(14px + var(--bottom)); }
:root .flow-top { grid-template-columns: 44px 1fr 44px; gap: 12px; }
:root .f-prog { display: grid; place-items: center; }
/* דילוג (איתי 3.12): טקסט שקט בקצה של שורת הנקודות, שטח מגע 44. לא מתחרה בכפתור הראשי */
:root .f-prog:has(.f-skip) { position: relative; }
:root .f-skip { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); height: 44px; padding: 0 10px; border: 0; background: none; color: var(--acc-deep, #b9531f); font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 0.15s; }
:root .f-skip:active { color: var(--acc); }
:root .f-dots i { background: var(--hair); }
:root .f-dots i.done { background: #e6b89c; }
:root .f-dots i.cur { background: var(--acc); }

:root .flow-body { justify-content: flex-start; gap: 12px; padding: 16px 0 14px; animation: none; }
:root .flow-body > * { animation: fin2 0.5s var(--ease-out) both; }
:root .flow-body.back > * { animation-name: fback2; }
:root .flow-body > :nth-child(3) { animation-delay: 0.05s; }
:root .flow-body > :nth-child(n+4) { animation-delay: 0.1s; }
@keyframes fin2 { from { opacity: 0; transform: translateX(-24px); } }
@keyframes fback2 { from { opacity: 0; transform: translateX(24px); } }
:root .flow-0 .flow-body { justify-content: center; }

:root .f-h1, :root .f-h2 { font-weight: var(--w-display); letter-spacing: -0.03em; line-height: 1.06; text-wrap: balance; margin: 0; }
:root .f-h1 { font-size: clamp(30px, 8.4vw, 38px); }
:root .f-h2 { font-size: clamp(30px, 8.4vw, 38px); margin-bottom: 4px; }
:root .f-p { font-size: 17px; font-weight: 400; line-height: 1.5; color: var(--ink2); }
:root .f-brand { margin-top: 8px; }
:root .f-photo { height: min(42svh, 400px); border-radius: 32px; box-shadow: var(--sh-card); }
:root .f-ticket { margin-top: 8px; }


:root .flow-foot { gap: 2px; }
:root .flow-foot { margin: 0 calc(-1 * var(--gut)); padding: 18px var(--gut) 0; background: linear-gradient(to top, var(--canvas) 70%, rgba(244, 239, 232, 0)); bottom: calc(14px + var(--bottom)); }
:root .flow-foot::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: calc(16px + var(--bottom)); background: var(--canvas); }
:root .f-cta { height: 60px; font-size: 19px; }
:root .f-alt { justify-self: center; padding: 0 12px; }

/* אריחי המספרים */
:root .f-tiles { gap: 10px; }
:root .f-tile { border-radius: var(--r-card); box-shadow: var(--sh-card); background: var(--surface); padding: 16px 6px 14px; }
:root .f-tile i { height: 30px; color: var(--acc-deep); }
:root .f-tile i svg { width: 28px; height: 28px; }
:root .f-tile b { font-size: 32px; font-weight: var(--w-display); letter-spacing: -0.03em; margin-top: 4px; line-height: 1.1; font-variant-numeric: tabular-nums; }
:root .f-tile span { font-size: 13.5px; color: var(--ink2); }
/* המסלול: השלבים של ההרכבה, לפי הסדר */
:root .f-phases { list-style: none; margin: 0; padding: 4px 0; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); }
:root .f-phases li { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
:root .f-phases li i { position: relative; z-index: 1; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 13.5px; font-weight: 700; background: var(--acc-tint); color: var(--acc-ink); }
:root .f-phases li + li::before { content: ""; position: absolute; inset-inline-start: 29.5px; top: -10px; height: 20px; border-inline-start: 1.5px dashed #dcc3b0; }
:root .f-phases b { flex: 1; font-size: 16px; font-weight: 600; }
:root .f-phases span { font-size: 13.5px; color: var(--ink2); font-variant-numeric: tabular-nums; }
:root .f-tip { margin-top: 2px; border-radius: var(--r-tile); background: var(--acc-tint); box-shadow: none; color: #5e2c10; font-size: 15px; line-height: 1.45; padding: 13px 14px; }
:root .f-tip > svg { color: var(--acc-deep); }

/* כלים */
:root .f-tools { gap: 10px; }
:root .f-tool { border-radius: var(--r-card); box-shadow: var(--sh-card); background: var(--surface); padding: 10px 10px 14px; gap: 4px; }
:root .f-tool img.pimg { border-radius: 18px; }
:root .f-tool b { font-size: 16px; font-weight: 600; margin-top: 4px; }

/* ספירת חלקים */
:root .f-count { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 10px; font-size: 15px; color: var(--ink2); }
:root .f-count b { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; transition: color 0.3s; }
:root .f-count.full b { color: var(--ok); }
:root .f-count-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(110, 70, 35, 0.13); overflow: hidden; }
:root .f-count-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transform-origin: right; transform: scaleX(var(--p, 0)); transition: transform 0.5s var(--ease-out); }
:root .f-parts { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
:root .f-part { border-radius: var(--r-tile); background: var(--surface); box-shadow: var(--sh-card); padding: 7px 7px 10px; gap: 4px; transition: transform 0.4s var(--spring), box-shadow 0.25s, background 0.25s; }
:root .f-part img.pimg, :root .f-part span.pimg { border-radius: 15px; }
:root .f-part span:not(.pimg) { font-size: 13px; font-weight: 600; line-height: 1.2; min-height: 2.4em; display: grid; place-items: center; }
:root .f-part em { top: 12px; inset-inline-start: 12px; font-size: 12.5px; padding: 2px 8px; background: var(--ink); color: #fff; }
:root .f-part i { top: 11px; inset-inline-end: 11px; width: 26px; height: 26px; border: 2px solid #cfc4b5; background: rgba(255, 255, 255, 0.85); transition: background 0.2s, border-color 0.2s, transform 0.45s var(--spring); }
:root .f-part i svg { transform: scale(0.5); transition: transform 0.45s var(--spring), opacity 0.15s; }
:root .f-part.on { box-shadow: 0 0 0 2px var(--ok), var(--sh-card); background: var(--surface); }
:root .f-part.on i { background: var(--ok); border-color: var(--ok); transform: scale(1.08); }
:root .f-part.on i svg { transform: none; opacity: 1; }

/* =========================================================
   מצב הרכבה
   ========================================================= */
:root #stage { transition: opacity 0.4s ease; background: radial-gradient(90% 70% at 50% 30%, #fbf8f3 0%, var(--canvas) 55%, #eae3d8 100%); }
:root .build-top { padding: calc(var(--top) + 10px) 12px 0; gap: 8px; }
:root .build-top .step-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 14px; margin-inline: auto; font-size: 14.5px; font-weight: 600; color: var(--ink); background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.45); }
:root .pill-n { font-variant-numeric: tabular-nums; color: var(--ink2); direction: ltr; unicode-bidi: isolate; }
:root .pill-n b { color: var(--acc-deep); font-weight: 800; font-size: 16px; }
:root .pill-ph { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root .pill-c { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--fill2); }
:root .pill-c svg { width: 13px; height: 13px; transform: rotate(-90deg); }

/* כרטיס הצעד: זכוכית צפה שנגררת עם האצבע (card.js). הכרטיס עצמו שקוף ובגובה הסגור;
   הזכוכית (.sc-bg) והתוכן (.sc-main) זזים יחד ב-transform בתוך חלונות קבועים, כך שאין פריסה מחדש בזמן הגרירה */
:root .step-card { --d: 0px; --vis: 96px; padding: 0 0 14px; border-radius: 30px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.5); touch-action: pan-x; user-select: none; -webkit-user-select: none; }
:root .sc-clip { position: absolute; inset: calc(-1 * var(--d)) 0 0; border-radius: 30px; overflow: hidden; pointer-events: none; }
:root .sc-bg { position: absolute; inset: 0 0 -120px; border-radius: 30px 30px 0 0; background: rgba(251, 248, 243, 0.86); backdrop-filter: blur(30px) saturate(190%); -webkit-backdrop-filter: blur(30px) saturate(190%); box-shadow: var(--glass-edge); pointer-events: auto; will-change: transform; }
:root .sc-win { position: absolute; inset-inline: 0; top: calc(-1 * var(--d)); height: calc(var(--d) + var(--vis)); overflow: hidden; pointer-events: none; }
:root .sc-main { position: relative; padding: 0 16px; pointer-events: auto; will-change: transform; }
:root .sc-spacer { height: var(--vis); }
:root .sc-main > .grab { display: block; width: 36px; height: 5px; margin: 0 auto; padding: 0; border-radius: 99px; background: rgba(60, 40, 20, 0.2); box-sizing: content-box; border: 8px solid transparent; border-bottom-width: 7px; background-clip: padding-box; cursor: grab; }
:root .step-card.fixed .sc-main > .grab { visibility: hidden; }
:root .step-card.fixed .chev-d { display: none; }
/* סוף השורה השנייה דוהה כשיש עוד טקסט מתחתיה, ורק כשהכרטיס נח סגור */
:root .step-card.clamped.rest .sc-win { -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 22px) no-repeat, linear-gradient(to right, transparent, #000 88px) bottom / 100% 22px no-repeat; mask: linear-gradient(#000, #000) top / 100% calc(100% - 22px) no-repeat, linear-gradient(to right, transparent, #000 88px) bottom / 100% 22px no-repeat; }
:root .sc-body { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
:root .sc-more { display: block; padding-bottom: 2px; }
:root .step-card .parts { margin-inline: -16px; }
:root .chev-d { transition: none; }
:root .step-card.open .chev-d { transform: none; }
:root .progress { margin-bottom: 10px; gap: 6px; }
:root .progress i { height: 5px; background: rgba(110, 70, 35, 0.14); }
:root .progress i::after { background: var(--acc); }
:root .pg-grp .pg-name { font-size: 11px; color: var(--ink2); }
:root .pg-grp.cur span { color: var(--acc-ink); font-weight: 700; }
:root .sc-in.fwd { animation: scin 0.3s var(--ease-out) both; --x: -14px; }
:root .sc-in.back { animation: scin 0.3s var(--ease-out) both; --x: 14px; }
@keyframes scin { from { opacity: 0; transform: translateX(var(--x)); } }
:root .sc-head { gap: 10px; min-height: 44px; }
:root .sc-head .num { width: 34px; height: 34px; font-size: 16px; font-weight: 700; background: var(--acc-deep); box-shadow: 0 6px 12px -8px rgba(140, 62, 20, 0.7); }
:root .step-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
:root .sc-body { color: var(--ink2); }
:root .chev-d { width: 30px; height: 30px; background: var(--fill2); }
:root .mini-p img.pimg, :root .mini-p span.pimg { box-shadow: 0 0 0 2px var(--surface-hi), 0 2px 6px rgba(60, 40, 20, 0.14); }
:root .part-chip { background: var(--surface-hi); box-shadow: 0 0 0 1px var(--hair); }
:root .step-card .note { border-radius: 16px; }
:root .note { background: var(--acc-tint); color: #5e2c10; }
:root .controls { position: relative; grid-template-columns: 50px 50px 1fr; gap: 8px; margin: 12px 16px 0; }
:root .controls .round { width: 50px; height: 50px; background: var(--fill2); transition: transform 0.4s var(--spring); }
:root .controls .btn { height: 50px; font-size: 19px; }

/* =========================================================
   גיליונות ורשימות
   ========================================================= */
:root .scrim { background: rgba(26, 18, 12, 0.38); transition: opacity 0.4s ease; }
:root .sheet { background: var(--sheet-bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 0 var(--gut) calc(22px + var(--bottom)); box-shadow: 0 -16px 44px -10px rgba(60, 38, 18, 0.32); transition: transform 0.55s var(--ease-out); will-change: transform; }
:root .sheet:not(.on) { transition: transform 0.28s var(--ease-drawer); }
:root .sheet .grab { position: sticky; top: 0; z-index: 3; width: auto; height: 26px; margin: 0 calc(-1 * var(--gut)); border-radius: 0; background: linear-gradient(to bottom, var(--sheet-bg) 60%, transparent); cursor: grab; touch-action: none; }
:root .sheet .grab::after { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: #d9cdbf; }
:root .sheet-h { margin: 2px 0 14px; touch-action: none; min-height: 44px; }
:root .sheet-h h3 { font-size: 24px; font-weight: var(--w-display); letter-spacing: -0.025em; }
:root .sheet-h .x { width: 36px; height: 36px; background: var(--fill2); color: var(--ink2); }
:root .lead { font-size: 15.5px; color: var(--ink2); margin: -6px 0 16px; line-height: 1.45; }
:root .list { border-radius: var(--r-card); box-shadow: var(--sh-card); background: var(--surface); }
:root .row { padding: 13px 16px; min-height: 60px; }
:root .row .ic { width: 40px; height: 40px; border-radius: 13px; background: var(--fill2); color: var(--ink); }
:root .row + .row::before { inset-inline-start: 68px; background: var(--hair); }
:root .row .tx b { font-size: 16px; }
:root .row .tx span { font-size: 13.5px; line-height: 1.35; }
:root .ticket, :root .card, :root .tool, :root .inv-i, :root .pdf-card { background: var(--surface); box-shadow: var(--sh-card); border-radius: var(--r-card); }
:root .ticket-h { background: var(--fill2); border-bottom-color: var(--hair); }
:root textarea.field { background: var(--surface); box-shadow: var(--sh-card); border-radius: var(--r-tile); }
:root .photo { border-radius: var(--r-card); background: var(--fill2); }
:root .fix li { background: var(--surface); box-shadow: var(--sh-card); border-radius: var(--r-tile); padding-block: 14px; }
:root .fix li::before { background: var(--acc-tint); color: var(--acc-ink); top: 13px; }
:root .result { border-radius: var(--r-card); background: var(--ok-tint); }
:root .ok-state .tick { background: var(--ok); animation: pop2 0.6s var(--spring) both; }
@keyframes pop2 { from { transform: scale(0.6); opacity: 0; } }
:root .coach-card { border-radius: 30px; background: var(--glass); }

/* רשימת הצעדים */
:root .st-bar { height: 6px; border-radius: 99px; background: rgba(110, 70, 35, 0.13); overflow: hidden; margin: -4px 0 6px; }
:root .st-bar i { display: block; height: 100%; border-radius: 99px; background: var(--acc); transform-origin: right; transform: scaleX(var(--p)); }
:root .st-h { justify-content: space-between; margin: 20px 4px 8px; }
:root .st-h span { display: inline-flex; align-items: center; gap: 10px; }
:root .st-h em { font-style: normal; font-size: 12.5px; letter-spacing: 0; font-weight: 500; color: var(--ink3); }
:root .st-h::before { display: none; }
:root .st-h span::before { content: ""; width: 22px; height: 2px; background: var(--acc); }
:root .st-grp.done .st-h em { color: var(--ok); font-weight: 600; }
:root .st-row .st-n { border-radius: 50%; font-weight: 700; font-size: 15px; background: var(--fill2); color: var(--ink2); font-variant-numeric: tabular-nums; }
:root .st-row .st-n svg { width: 18px; height: 18px; }
:root .st-row.done .st-n { background: var(--ok-tint); color: var(--ok); }
:root .st-row.done .tx b { color: var(--ink2); font-weight: 500; }
:root .st-row.cur { background: var(--acc-tint); }
:root .st-row.cur .st-n { background: var(--acc-deep); color: #fff; }
:root .st-row .tx span { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
:root .st-row.cur .tx span { -webkit-line-clamp: 3; line-clamp: 3; color: #5e2c10; }

/* =========================================================
   עמוד המידע: החוברת, שאלות, תקלות
   ========================================================= */
:root .nav .ttl { background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.45); }
:root .sheet-page { background: var(--sheet-bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 22px var(--gut) calc(120px + var(--bottom)); box-shadow: 0 -16px 44px -14px rgba(60, 38, 18, 0.3); backdrop-filter: none; -webkit-backdrop-filter: none; }
:root .p-photo { border-radius: 22px; background: radial-gradient(90% 80% at 50% 35%, #fff, #e9e1d5); box-shadow: inset 0 0 0 1px var(--hair); }
:root .p-ttl h1 { font-size: 25px; font-weight: var(--w-display); letter-spacing: -0.025em; line-height: 1.1; }
:root .seg { padding: 4px; border-radius: 999px; margin: 18px 0; }
:root .seg button { height: 44px; padding: 0 6px; font-size: 15px; font-weight: 600; color: var(--ink2); transition: color 0.25s; }
:root .seg button[aria-selected="true"] { color: var(--ink); }
:root .seg .thumb { top: 4px; bottom: 4px; transition: transform 0.5s var(--spring-soft); }
:root .seg { background: var(--fill2); }
:root .seg .thumb { background: var(--surface-hi); box-shadow: 0 1px 2px rgba(60, 40, 20, 0.1), 0 8px 18px -10px rgba(60, 40, 20, 0.4); }
:root .pdf-card .pdf-ic { background: var(--ink); color: #fff; border-radius: 10px; }
:root .pg { border-radius: 14px; box-shadow: var(--sh-card); background: #fff; }
:root .chat { gap: 10px; }
:root .msg { font-size: 16px; line-height: 1.45; padding: 11px 15px; border-radius: 22px; max-width: 86%; }
:root .msg.bot { background: var(--surface); box-shadow: var(--sh-card); border-end-end-radius: 8px; }
:root .msg.me { border-end-start-radius: 8px; }
:root .msg.me { background: var(--ink); color: #fbf8f3; }
:root .msg .cite { min-height: 30px; align-items: center; padding: 4px 12px; margin-top: 8px; font-size: 13px; background: var(--acc-tint); color: var(--acc-ink); }
:root .suggest { margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
:root .suggest button { min-height: 44px; padding: 0 14px; font-size: 14.5px; font-weight: 500; background: var(--surface); color: var(--ink); box-shadow: var(--sh-card); }
:root .composer input { height: 50px; border-radius: 25px; background: var(--surface); box-shadow: var(--sh-card); padding: 0 18px; }
:root .composer input:focus { box-shadow: 0 0 0 2px var(--acc); }
:root .composer button { width: 50px; height: 50px; background: var(--cta-bg); box-shadow: var(--cta-sh); }
:root .cta-bar { padding: 22px var(--gut) calc(12px + var(--bottom)); background: linear-gradient(to top, var(--sheet-bg) 62%, transparent); }
:root .cta-bar .btn { height: 58px; font-size: 19px; }
:root .ar-btn { height: 44px; background: var(--glass); box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(60, 40, 20, 0.5); }

/* =========================================================
   סיום
   ========================================================= */
:root .finish { border-radius: 34px; padding: 22px 20px 16px; background: var(--glass); box-shadow: var(--glass-edge), 0 30px 60px -28px rgba(60, 40, 20, 0.5); animation: rise2 0.7s var(--ease-out) both; }
@keyframes rise2 { from { transform: translateY(60px); opacity: 0; } }
:root .fin-badge { width: 52px; height: 52px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; animation: pop2 0.7s var(--spring) 0.25s both; }
:root .fin-badge svg { width: 26px; height: 26px; }
:root .finish h2 { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--acc-deep); background: none; -webkit-text-fill-color: currentColor; }
:root .finish h2 span { display: inline-block; animation: letter 0.6s var(--spring) both; animation-delay: calc(0.35s + var(--k) * 0.05s); }
@keyframes letter { from { opacity: 0; transform: translateY(18px) scale(0.9); } }
:root .finish p { font-size: 16.5px; color: var(--ink2); margin-top: 6px; }
:root .fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 4px; padding: 12px 0 10px; border-radius: var(--r-tile); background: var(--fill2); }
:root .fin-stats > div + div { box-shadow: inset 1px 0 0 var(--hair); }
:root .fin-stats b { display: block; font-size: 26px; line-height: 1.1; font-weight: var(--w-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
:root .fin-stats span { font-size: 13px; color: var(--ink2); }
:root .fin-rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 2px 14px; font-size: 15.5px; font-weight: 600; }
:root .stars { margin: 0; gap: 2px; }
:root .stars button { width: 44px; height: 44px; display: grid; place-items: center; color: #dccfbf; transition: color 0.2s, transform 0.45s var(--spring); }
:root .stars button svg { width: 30px; height: 30px; }
:root .stars button.on { color: var(--acc); transform: scale(1.1); }
:root .finish .btns { gap: 2px; margin-top: 0; }
:root .finish .btns .btn { height: 58px; font-size: 19px; }
:root #toast { background: rgba(34, 23, 15, 0.92); font-size: 15px; padding: 11px 18px; }

/* =========================================================
   מסך רחב
   ========================================================= */
@media (min-width: 900px) {
  :root .home2 { max-width: 1120px; padding: 0 40px; }
  :root .h-top { margin: 0; padding: 22px 0 10px; grid-template-columns: 1fr auto 1fr; grid-template-areas: "logo tabs menu"; background: none; }
  :root .h-top #hmenu { justify-self: end; }
  :root .ptabs { width: 340px; max-width: none; }
  :root .h-body { display: grid; align-items: center; }
  :root .pp { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; padding: 12px 0 0; }
  :root .pp-info { order: 1; padding-bottom: 150px; }
  :root .pp-stage { order: 2; height: min(66vh, 620px); }
  :root .pp-h1 { font-size: 56px; }
  :root .pp-ticket b { font-size: 40px; }
  :root .h-foot { position: static; margin: -150px 0 40px; padding: 0; width: calc((100% - 56px) * 0.4808); background: none; }
  :root .flow { padding-top: 22px; }
  :root .step-card { max-width: 480px; }
}
@media (hover: hover) and (pointer: fine) {
  :root .btn.h-cta:hover, :root .btn.f-cta:hover, :root .controls .btn.primary:hover { filter: brightness(1.06); }
  :root .icon-btn:hover, :root .controls .round:hover { transform: scale(1.05); }
  :root .row:hover { background: rgba(110, 70, 35, 0.045); }
  :root .ptabs button:hover { color: var(--ink); }
  :root .f-part:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  :root .pp > *, :root .pp-info > *, :root .flow-body > *, :root .sc-in, :root .finish h2 span { animation-name: fadeonly !important; animation-duration: 0.2s !important; animation-delay: 0s !important; }
  :root .ptabs-thumb, :root .seg .thumb { transition-duration: 0.01ms; }
}
@keyframes fadeonly { from { opacity: 0; } }
@media (prefers-reduced-transparency: reduce) {
  :root .icon-btn, :root .sc-bg, :root .finish, :root .ar-chip, :root .pp-fin, :root .build-top .step-pill { background: var(--surface-hi); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink2: #3b322b; --ink3: #4a4038; --hair: #9c8f80; }
}

/* ---------- תיקונים אחרי צילום, סבב 1 ---------- */
/* כותרת הגיליון נשארת למעלה כשגוללים בתוכו */
:root .sheet-h { position: sticky; top: 26px; z-index: 3; margin: 0 calc(-1 * var(--gut)) 12px; padding: 0 var(--gut) 8px; background: var(--sheet-bg); }
:root .sheet-h + .st-bar { position: sticky; top: 78px; z-index: 3; margin: -12px 0 6px; box-shadow: 0 0 0 8px var(--sheet-bg); }
:root .iss-card { display: flex; gap: 14px; align-items: center; padding: 16px; }
:root .iss-card .ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--acc-tint); color: var(--acc-ink); }
:root .iss-card .ic svg, :root .row .ic svg { width: 22px; height: 22px; }
:root .iss-card b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
:root .iss-card span { display: block; font-size: 14.5px; color: var(--ink2); margin-top: 2px; }
:root .fine + .pdf-card { margin-top: 24px; }
:root .sheet .grab { background: var(--sheet-bg); }
:root .sheet-h .x { width: 44px; height: 44px; }
:root .pp-fin { height: 44px; }
:root .pp-fin button { width: 44px; height: 44px; margin-inline: -5px; }
/* עמוד המידע: כשגוללים, הסרגל העליון מקבל רקע רך, והתוכן לא מתנגש בו */
:root .nav { transition: background 0.25s; }
:root .nav.solid { background: linear-gradient(to bottom, var(--sheet-bg) 72%, transparent); padding-bottom: 18px; }
:root .home2, :root .h-body { overflow-x: clip; }

/* =========================================================
   מצב הטמעה (embed=1): אותו מראה, בצפיפות של מסגרת טלפון קטנה באתר אחר
   ========================================================= */
html.embed .step-card { inset-inline: 6px; bottom: 6px; padding: 0 0 10px; border-radius: 24px; }
html.embed .sc-clip { border-radius: 24px; }
html.embed .sc-bg { border-radius: 24px 24px 0 0; }
html.embed .sc-main { padding: 0 12px; }
html.embed .sc-main > .grab { border-width: 6px 8px 5px; }
html.embed .step-card .parts { margin-inline: -12px; padding-inline: 12px; }
html.embed .controls { margin: 8px 12px 0; }
html.embed .build-top .step-pill { height: 34px; padding: 0 12px; font-size: 12.5px; }
html.embed .pill-n b { font-size: 14px; }
html.embed .flow { padding: 14px 12px 12px; }
html.embed .flow-foot { bottom: 10px; padding-top: 14px; }
html.embed .f-h2 { font-size: 25px; }
html.embed .f-tools { grid-template-columns: repeat(4, 1fr); gap: 6px; }
html.embed .f-tool { border-radius: 16px; padding: 5px 5px 8px; }
html.embed .f-tool img.pimg { border-radius: 12px; }
html.embed .f-tool b { font-size: 11.5px; }
html.embed .f-parts { gap: 7px; }

/* =========================================================
   נגישות ומגע
   ========================================================= */
/* מרגיש מותקן: בלי משיכה לרענון ובלי גומי של כל הדף; תמונות של מוצר וחלקים הן לא משהו ש"שומרים" בלחיצה ארוכה */
html, body { overscroll-behavior: none; }
:root .pp-img, :root .f-photo img, :root img.pimg, :root .p-photo, :root .ptabs img { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
:root [role="tab"], :root [role="radio"], :root .part-chip, :root .badge, :root .step-pill, :root label.btn { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
/* מצב ההרכבה הוא מעטפת של אפליקציה: הבמה עוקבת אחרי הגובה הגלוי גם כשסרגל הכתובת מתקפל */
body.mode-build #stage { height: 100dvh; }
/* פס ההתקדמות הוא כפתור אחד: לחיצה פותחת את רשימת הצעדים. אזור המגע גבוה מהפס עצמו */
:root .progress { position: relative; width: 100%; padding: 0; text-align: inherit; }
:root .progress::before { content: ""; position: absolute; z-index: -1; inset-inline: 0; top: 50%; height: 44px; margin-top: -24px; }
:root .progress:active { transform: none; }
:root .progress i { display: block; }
:root .pg-grp, :root .pg-bar, :root .pg-name { display: flex; }
:root .pg-grp { flex-direction: column; }
:root .pg-name { display: block; }
/* שבבים קטנים בתוך טקסט: המראה נשאר קומפקטי, אזור המגע גדל */
:root .msg .cite { position: relative; }
:root .msg .cite::after { content: ""; position: absolute; inset: -7px -4px; }
:root .note button { position: relative; min-height: 32px; }
:root .note button::after { content: ""; position: absolute; inset: -8px -10px; }
:root .fine, :root .p-sku { color: var(--ink2); }
:root .photo > div { color: var(--ink2) !important; }

/* =========================================================
   תנועה: לחיצה שמרגישים, קפיץ קטן בשחרור, ורגעים של הצלחה.
   רק transform ו-opacity. תנועה מופחתת: הכלל הכללי ב-app.css מקצר הכל לדהייה
   ========================================================= */
/* לחיצה: יורדים מהר (100 אלפיות), חוזרים בקפיץ. כפתורים עגולים נלחצים עמוק יותר */
:root .icon-btn:active, :root .controls .round:active, :root .sheet-h .x:active, :root .stars button:active { transform: scale(0.88); transition-duration: 0.1s; }
:root .f-part:active { transform: scale(0.95); transition-duration: 0.1s; }
:root .row { transition: background 0.2s; }
:root .row:active { background: rgba(110, 70, 35, 0.08); }
/* סימון חלק: האריח קופץ, וטבעת ירוקה נפתחת מהסימון */
:root .f-part.just { animation: tilepop 0.5s var(--spring) both; }
:root .f-part.just i::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ok); animation: burst 0.55s var(--ease-out) both; pointer-events: none; }
@keyframes tilepop { from { transform: scale(0.93); } }
@keyframes burst { from { transform: scale(0.7); opacity: 0.9; } to { transform: scale(2.3); opacity: 0; } }
/* כל החלקים נמצאו: הכפתור הראשי מזמין ללחוץ, פעם אחת */
:root .f-cta.ready { animation: ctaready 0.7s var(--spring) both; }
@keyframes ctaready { 0% { transform: scale(1); } 35% { transform: scale(1.045); } 100% { transform: scale(1); } }
/* מעבר צעד: המספר קופץ למקומו */
:root .sc-in.fwd .num, :root .sc-in.back .num { animation: numpop 0.55s var(--spring) both; }
@keyframes numpop { from { transform: scale(0.55); } }
/* דף הבית: המוצר נכנס עם קפיץ רך */
:root .pp-img { animation: imgpop 0.7s var(--spring-soft) 0.04s both; }
@keyframes imgpop { from { opacity: 0; transform: scale(0.93) translateY(8px); } }
/* הודעה צפה: נכנסת בקפיצה קטנה מלמעלה */
:root #toast { transform: translate(-50%, -14px) scale(0.92); transition: transform 0.45s var(--spring-soft), opacity 0.22s ease; }
:root #toast.on { transform: translate(-50%, 0) scale(1); }
:root .check, :root .check svg { transition: transform 0.35s var(--spring), opacity 0.2s, background 0.2s, border-color 0.2s; }
:root .f-dots i { transition: none; }
/* סיום: טבעת נפתחת סביב הסימון, והכוכבים נדלקים אחד אחרי השני */
:root .fin-badge { position: relative; }
:root .fin-badge::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok); animation: burst 0.9s var(--ease-out) 0.5s both; pointer-events: none; }
:root .stars button.on { transition-delay: calc((var(--k) - 1) * 45ms); }
/* קווי הסריקה זזים ב-transform, לא ב-top */
:root .scan::after { top: -36%; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(380%); } }
:root .scan-line { inset: 0 6%; height: auto; border-radius: 0; background: none; box-shadow: none; }
:root .scan-line::before { content: ""; position: absolute; inset-inline: 0; top: 6%; height: 3px; border-radius: 3px; background: var(--acc); box-shadow: 0 0 14px var(--acc); }
@keyframes sline { from { transform: translateY(0); } to { transform: translateY(86%); } }
@keyframes pop { from { transform: scale(0.5); opacity: 0; } }
:root .sheet:focus { outline: none; }
/* גיליון שנסגר לא בולע לחיצות בזמן שהוא דוהה: הלחיצה הבאה מגיעה מיד למה שמתחתיו */
:root .scrim:not(.on), :root .sheet:not(.on) { pointer-events: none; }

/* ---------- סבב תיקונים אחרי הביקורת העצמאית ---------- */
/* כותרת צעד ארוכה: עד שלוש שורות כשהכרטיס סגור, ובלי הגבלה כשהוא פתוח. לא נחתכת בשלוש נקודות */
html:not(.embed) .step-card h2 { -webkit-line-clamp: 3; line-clamp: 3; }
html:not(.embed) .step-card.open h2 { -webkit-line-clamp: unset; line-clamp: unset; display: block; overflow: visible; }
/* שם השלב מתחת לסרגל ההתקדמות: שלב קצר ("דלתות") לא נחתך */
:root .pg-grp .pg-name { overflow: visible; text-overflow: clip; white-space: nowrap; }
:root .pg-grp:last-child .pg-name { text-align: end; }
/* אחרי מסך הסיום הכדור הוא תווית, לא כפתור */
:root .build-top .step-pill:disabled { opacity: 1; cursor: default; padding-inline: 16px; }
/* הצ'אט: שדה השאלה וההודעה האחרונה נעצרים מעל הסרגל הדביק "חזרה להרכבה" */
:root .composer, :root .chat .msg { scroll-margin-bottom: calc(108px + var(--bottom)); }
/* "בדקו את עצמכם" בכרטיס הצעד: ירוק רך, נפרד מהאזהרה הכתומה */
:root .note.selfcheck { background: #e5efe1; color: #22401f; }
:root .note.selfcheck svg { color: #2f7a3a; }

/* טלפון: כרטיס הצעד קומפקטי יותר (איתי, 19.11: "תקטין עוד טיפה את הכרטיסייה"). מטרות מגע נשארות 44px ומעלה */
@media (max-width: 639px) {
  :root .sc-main > .grab { border-top-width: 6px; border-bottom-width: 4px; }
  :root .progress { margin-bottom: 7px; }
  :root .sc-head { gap: 9px; }
  :root .sc-head .num { width: 32px; height: 32px; font-size: 15px; }
  :root .step-card h2 { font-size: 18.5px; line-height: 1.15; }
  :root .step-card .note { margin-top: 6px; padding: 6px 10px; line-height: 1.35; font-size: 13.5px; }
  :root .sc-body { margin-top: 4px !important; }
  :root .step-card { padding-bottom: 10px; }
  :root .controls { margin-top: 10px; grid-template-columns: 46px 46px 1fr; }
  :root .controls .round { width: 46px; height: 46px; }
  :root .controls .btn { height: 46px; font-size: 18px; }
  :root .step-card .controls.has-bk { grid-template-columns: 46px 46px 1fr 60px; }
  :root .step-card .controls .bk-thumb { width: 60px; height: 46px; }
}

/* ---------- סבב עזרי (19.11): פחות פרשנות בכל צעד ---------- */
/* הצד הנכון: גלולה כהה עם רגל שמצביעה על המקום, לפני שהחלק מתחבר. כמו תווית המידה של הסרט */
.otag { position: absolute; top: 0; left: 0; width: 0; height: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .28s ease; }
.otag.on { opacity: 1; }
.otag i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(20,17,15,.88), 0 2px 6px rgba(0,0,0,.25); }
.otag i::before { content: ""; position: absolute; left: 3px; bottom: 8px; width: 2px; height: 22px; background: rgba(20,17,15,.75); border-radius: 1px; }
.otag span { position: absolute; bottom: 30px; left: 0; transform: translateX(-50%); white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: rgba(20,17,15,.88); color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
.otag.flipL span { transform: translateX(-14px); }
.otag.flipR span { transform: translateX(calc(-100% + 14px)); }
/* "ככה זה צריך להיראות": שורה ירוקה רכה מעל הכרטיס, בזמן שהמצב הסופי עומד */
.stage-check { position: fixed; left: 50%; bottom: 260px; z-index: 6; display: flex; gap: 8px; align-items: flex-start; width: max-content; max-width: min(420px, calc(100vw - 32px)); box-sizing: border-box; padding: 9px 13px; border-radius: 16px; background: rgba(233,242,229,.94); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); color: #22401f; font-size: 13.5px; line-height: 1.35; box-shadow: 0 0 0 1px rgba(47,122,58,.14), 0 6px 20px rgba(30,40,20,.14); pointer-events: none; opacity: 0; transform: translate(-50%, 6px); transition: opacity .3s ease, transform .3s ease; }
.stage-check.on { opacity: 1; transform: translate(-50%, 0); }
.stage-check svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: #2f7a3a; }
.stage-check b { font-weight: 650; }
/* חזרה לזווית המומלצת: מופיע רק אחרי שסובבו או הגדילו, כמו המצפן במפות. מעל הכרטיס, ליד האגודל, רחוק מהתקריב העגול שלמעלה */
.recenter { position: fixed; bottom: 260px; left: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 15px 0 13px; border-radius: 999px; background: var(--glass, rgba(255,253,249,.82)); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%); box-shadow: var(--glass-edge, 0 0 0 1px rgba(0,0,0,.06)), var(--lift, 0 6px 18px rgba(0,0,0,.12)); color: var(--ink, #14110f); font-size: 14.5px; font-weight: 600; opacity: 0; visibility: hidden; transform: scale(.92); pointer-events: none; transition: opacity .22s ease, transform .3s cubic-bezier(.2,.9,.3,1.2), visibility 0s .22s; }
.recenter.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.recenter:active { transform: scale(.96); }
.recenter svg { width: 18px; height: 18px; color: var(--acc-deep, #b9531f); }
/* בכרטיס הפתוח: "אם זה כבר קרה" צמוד לאזהרה בצבע שלה, והבדיקה העצמית עם כפתור "להראות" */
:root .note.fix { background: #fbefd9; color: #6f4300; }
:root .note.fix svg { color: #b86a00; }
:root .note.selfcheck button { color: #22401f; }
@media (prefers-reduced-motion: reduce) {
  .stage-check, .stage-check.on { transform: translate(-50%, 0); transition: opacity .2s ease; }
  .recenter, .recenter.on { transform: none; transition: opacity .2s ease; }
}

/* ---------- ממשק BILT (קולמן, שלב ה2): המוצר ממלא את המסך ----------
   למעלה: ✕, שורת כותרת אחת (לחיצה = ההסבר המלא), הקראה ותפריט. למטה: טבעת התקדמות מימין, קודם/הפעל שוב/הבא משמאל.
   בלי כרטיס, בלי פס שלבים ובלי טבעת על החלק. הכל תחת .ui-bilt, כך ששאר המוצרים לא משתנים */
.ui-bilt .ring, .ui-bilt .axis-gizmo, .ui-bilt .stage-check { display: none !important; }
.ui-bilt .bb-top { align-items: center; gap: 8px; padding: calc(var(--top) + 10px) 12px 0; }
.ui-bilt .bb-btn {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: var(--glass-bg); backdrop-filter: var(--glass-bf); -webkit-backdrop-filter: var(--glass-bf);
  box-shadow: var(--glass-edge);
  transition: transform 0.4s var(--spring), background 0.2s;
}
.ui-bilt .bb-btn::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; } /* 46 נקודות למגע */
.ui-bilt .bb-btn svg { width: 19px; height: 19px; }
.ui-bilt .bb-btn.on { color: #1d1d1f; } /* מצב הקראה: האייקון מספיק, הכתום נשאר רק לפעולה הראשית */
.ui-bilt .bb-btn:active, .ui-bilt .bb-nav:active, .ui-bilt .bb-play:active, .ui-bilt .bb-ring:active { transform: scale(0.92); transition-duration: 0.1s; }
.ui-bilt .bb-title {
  flex: 0 1 auto; min-width: 0; margin-inline: auto; height: 40px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center;
  background: var(--glass-bg); backdrop-filter: var(--glass-bf); -webkit-backdrop-filter: var(--glass-bf);
  box-shadow: var(--glass-edge); color: #1d1d1f;
}
.ui-bilt .bb-title[hidden] { display: flex; visibility: hidden; } /* מוסתרת אבל שומרת על המקום, כדי שהכפתורים לא יזוזו */
.ui-bilt .bb-title b { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ui-bilt .bb-title b.in { animation: bb-in 0.32s var(--ease-out) both; }
@keyframes bb-in { from { opacity: 0; transform: translateY(4px); } }
.ui-bilt .bb-bar {
  position: fixed; z-index: 20; inset-inline: 0; bottom: 0; padding: 0 16px calc(14px + var(--bottom));
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.ui-bilt .bb-bar > * { pointer-events: auto; }
/* ז3: פס התקדמות דק בראש המסך, במקום הטבעת עם המספר. לחיצה עליו פותחת את רשימת הצעדים */
.ui-bilt .bb-prog { position: fixed; z-index: 22; top: 0; inset-inline: 0; height: calc(var(--top) + 10px); padding: var(--top) 0 0; background: none; border: 0; display: block; -webkit-tap-highlight-color: transparent; }
.ui-bilt .bb-prog::before { content: ''; position: absolute; inset-inline: 0; top: var(--top); height: 3px; background: rgba(20, 17, 15, 0.08); }
.ui-bilt .bb-prog i { position: absolute; inset-inline: 0; top: var(--top); height: 3px; background: #d9622b; transform-origin: right center; transform: scaleX(var(--p, 0)); transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.5, 1); border-radius: 0 0 2px 2px; }
@media (prefers-reduced-motion: reduce) { .ui-bilt .bb-prog i { transition: none; } }
.ui-bilt .bb-ctl { display: flex; align-items: center; gap: 12px; }
.ui-bilt .bb-nav, .ui-bilt .bb-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--acc-deep);
  background: var(--glass-bg); backdrop-filter: var(--glass-bf); -webkit-backdrop-filter: var(--glass-bf);
  box-shadow: var(--glass-edge); transition: transform 0.4s var(--spring), opacity 0.2s;
}
.ui-bilt .bb-nav svg { width: 22px; height: 22px; }
.ui-bilt .bb-play svg { width: 21px; height: 21px; }
.ui-bilt .bb-nav.next { width: 56px; height: 56px; background: var(--cta-bg); color: #fff; box-shadow: var(--cta-sh); }
.ui-bilt .bb-nav.next svg { width: 24px; height: 24px; }
.ui-bilt .bb-nav:disabled { opacity: 0.35; }
/* הצעד נגמר: "הפעל שוב" מקבל תשומת לב עדינה פעם אחת */
.ui-bilt .bb-play.ended svg { animation: bb-spin 0.7s var(--ease-out) both; }
@keyframes bb-spin { from { transform: rotate(160deg); opacity: 0.4; } }
.ui-bilt .bb-info h4 { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.ui-bilt .bb-info p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.ui-bilt .bb-info .note { margin-bottom: 10px; border-radius: 16px; }
.ui-bilt .bb-info .parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
/* התקריב: עיגול לבן עם קו כהה דק, כמו ב-BILT (105-127 נקודות) */
.ui-bilt .inset { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(20, 17, 15, 0.85), 0 12px 28px -8px rgba(40, 30, 20, 0.35); }
.ui-bilt .inset b { background: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .ui-bilt .bb-title b.in, .ui-bilt .bb-play.ended svg { animation: none; }
}
/* עיגולי ההסבר: נעוצים בנקודה בתלת־ממד (נקודה לבנה ורגל קצרה), העיגול 30 נקודות מעליה ושטח מגע של 44. פעימה עדינה בצבע הסוג */
.co-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.co { position: absolute; top: 0; left: 0; width: 0; height: 0; will-change: transform; }
.co-pin { position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--co, #14110f), 0 1px 4px rgba(0, 0, 0, 0.3); opacity: 0; transition: opacity 0.25s; }
.co-pin::before { content: ""; position: absolute; left: 2.75px; bottom: 6px; width: 1.5px; height: 20px; border-radius: 1px; background: var(--co, #14110f); opacity: 0.85; }
.co.down .co-pin::before { bottom: auto; top: 6px; }
.co.on .co-pin { opacity: 1; }
.co-dot {
  position: absolute; left: -22px; top: -62px; width: 44px; height: 44px; display: grid; place-items: center; pointer-events: none;
  opacity: 0; transform: scale(0.4); transition: opacity 0.22s ease, transform 0.45s var(--spring); -webkit-tap-highlight-color: transparent;
}
.co.down .co-dot { top: 18px; }
/* coSide: העיגול בצד המוצר (--ox/--oy מהנקודה), הרגל הקצרה מוחלפת בקו דק באורך המרחק */
.co-lead { position: absolute; left: 0; top: -0.75px; height: 1.5px; width: 0; border-radius: 1px; background: var(--co, #14110f); opacity: 0; transform-origin: 0 50%; transition: opacity 0.25s; pointer-events: none; }
.co.side .co-pin::before { display: none; }
.co.side.on .co-lead { opacity: 0.8; }
.co.side .co-dot { left: calc(var(--ox, 0px) - 22px); top: calc(var(--oy, 0px) - 22px); }
.co-dot.on { pointer-events: auto; opacity: 1; transform: none; }
.co-dot::before { /* העיגול עצמו */
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1.5px var(--co, #14110f), 0 6px 14px -4px rgba(20, 17, 15, 0.45);
}
.co-dot::after { /* הפעימה */
  content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid var(--co, #14110f); opacity: 0;
  animation: co-pulse 2.2s var(--ease-out) infinite;
}
.co-dot svg { position: relative; width: 17px; height: 17px; color: var(--co, #14110f); }
.co-dot:active { transform: scale(0.88); transition-duration: 0.1s; }
@keyframes co-pulse { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.75); opacity: 0; } }
.k-ok { --co: #2e7d5b; } .k-no { --co: #d23b2f; } .k-warn { --co: #c2410c; } .k-two { --co: #14110f; }
.k-zoom { --co: #14110f; } .k-tool { --co: #b9531f; } .k-info { --co: #2f5f8a; }
/* הפופאפ: גיליון קטן. אייקון וכותרת, משפט או שניים, ותמונה אם יש */
:root .sheet:has(.co-pop) { padding-bottom: calc(20px + var(--bottom)); }
.co-pop { padding: 2px 2px 4px; }
.co-pop .co-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.co-pop .co-h h3 { margin: 0; flex: 1; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.co-pop .co-h .x { flex: none; }
.co-pop .co-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--co); box-shadow: 0 0 0 1.5px var(--co); }
.co-pop .co-ic svg { width: 18px; height: 18px; }
.co-pop p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
.co-pics { display: flex; gap: 12px; margin-top: 14px; }
.co-pics figure { position: relative; margin: 0; flex: 1; aspect-ratio: 1; max-width: 180px; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--hair); }
.co-pics.one figure { max-width: 200px; margin-inline: auto; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(20, 17, 15, 0.85); }
.co-pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-pics figure i { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.co-pics.one figure i { top: 14%; inset-inline-end: 14%; border-radius: 50%; }
.co-pics figure.ok i { color: #2e7d5b; } .co-pics figure.no i { color: #d23b2f; }
.co-pics figure i svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
  .co-dot::after { animation: none; }
  .co-dot { transition: opacity 0.2s ease; transform: none; }
}
.co-pop .co-h .x { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill2); color: var(--ink2); }
.co-pop .co-h .x::before { content: ""; position: absolute; inset: -4px; }
.co-pop .co-h .x svg { width: 16px; height: 16px; }
/* סבב 2: התגים של BILT. למעלה מימין, מתחת ל-✕: שני אנשים (עיגול שחור גדול, נכנס מאפור לשחור) ותג כלי (עיגול לבן, כלי כתום) */
.ui-bilt .bb-badges { position: fixed; z-index: 19; top: calc(var(--top) + 62px); inset-inline-start: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.ui-bilt .bb-badges button { pointer-events: auto; position: relative; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(0.85); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--spring), background-color 0.5s ease; }
.ui-bilt .bb-badges button.in { opacity: 1; transform: none; }
.ui-bilt .bb-badges button:active { transform: scale(0.92); transition-duration: 0.1s; }
.ui-bilt .bb-two { width: 72px; height: 72px; background: #8a8580; color: #fff; box-shadow: 0 10px 24px -10px rgba(20, 17, 15, 0.6); }
.ui-bilt .bb-two.in { background: #14110f; }
.ui-bilt .bb-two svg { width: 36px; height: 36px; }
.ui-bilt .bb-tool { width: 44px; height: 44px; background: #fff; color: #f05d2c; box-shadow: 0 0 0 0.5px rgba(20, 17, 15, 0.08), 0 8px 18px -10px rgba(60, 40, 20, 0.5); }
.ui-bilt .bb-tool svg { width: 22px; height: 22px; }
/* זוג ✓/✗: שני כרטיסים קטנים מעל הכפתורים, כל אחד מרונדר מהמצב שלו */
.ui-bilt .bb-pair { position: fixed; z-index: 19; bottom: calc(14px + var(--bottom) + 70px); inset-inline-end: 16px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.4s var(--ease-out), transform 0.5s var(--spring); }
.ui-bilt .bb-pair.on { opacity: 1; transform: none; pointer-events: auto; }
.ui-bilt .bb-pair button { display: flex; gap: 8px; padding: 0; background: none; }
.ui-bilt .bb-pair figure { position: relative; margin: 0; width: 78px; height: 78px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 0.5px rgba(20, 17, 15, 0.1), 0 10px 22px -12px rgba(40, 30, 20, 0.55); }
.ui-bilt .bb-pair figure.no { box-shadow: 0 0 0 1.5px #d23b2f, 0 10px 22px -12px rgba(40, 30, 20, 0.55); }
.ui-bilt .bb-pair img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-bilt .bb-pair figure i, .co-pics figure i { position: absolute; top: 5px; inset-inline-end: 5px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.ui-bilt .bb-pair figure.ok i { color: #2e7d5b; } .ui-bilt .bb-pair figure.no i { color: #d23b2f; }
.ui-bilt .bb-pair figure i svg { width: 14px; height: 14px; }
.co-pop .co-ok, .co-pop .co-no { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 16px; line-height: 1.45; }
.co-pop .co-ok svg, .co-pop .co-no svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.co-pop .co-ok svg { color: #2e7d5b; } .co-pop .co-no svg { color: #d23b2f; }
.co-pics figure.no { box-shadow: 0 0 0 2px #d23b2f; }
@media (prefers-reduced-motion: reduce) {
  .ui-bilt .bb-badges button, .ui-bilt .bb-pair { transform: none; transition: opacity 0.2s ease; }
}

/* =========================================================
   כל גדלי המסך (ו4): טלפון, טאבלט, מחשב ועד 4K.
   --z מגדיל את כל הממשק במסכים גדולים (zoom רק על הממשק, אף פעם לא על הקנבס)
   ========================================================= */
:root { --z: 1; }
/* זכוכית בהירה (ז5, כיוון א): לבן שקוף + טשטוש, קו דק במקום צל כבד */
:root {
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-bf: blur(22px) saturate(180%);
  --glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.7), 0 0 0 0.5px rgba(20, 17, 15, 0.07), 0 1px 3px rgba(20, 17, 15, 0.05);
}
@media (prefers-reduced-transparency: reduce) { :root { --glass-bg: rgba(255, 255, 255, 0.94); --glass-bf: none; } }
@media (min-width: 1400px) and (min-height: 820px) { :root { --z: 1.12; } }
@media (min-width: 1800px) and (min-height: 960px) { :root { --z: 1.25; } }
@media (min-width: 2400px) and (min-height: 1300px) { :root { --z: 1.6; } }
@media (min-width: 3200px) and (min-height: 1800px) { :root { --z: 2.1; } }
:root .flow { zoom: var(--z); min-height: calc(100svh / var(--z)); }
:root .bb-top, :root .bb-bar, :root .bp-strip, :root .lo-top, :root .lo-bar, :root .finish, :root .gate-card, :root .coach-card, :root .lo-full { zoom: var(--z); }

/* טאבלט לאורך */
@media (min-width: 700px) {
  :root .flow { --col: 640px; }
  :root .f-photo { height: min(calc(48svh / var(--z)), 520px); }
  :root .ct-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
}

/* מחשב וטאבלט לרוחב: המסכים נפרסים לעמודות, הכפתור צמוד לתוכן */
@media (min-width: 1000px) {
  :root .flow-foot { justify-items: center; }
  :root .flow-foot .f-cta { width: min(100%, 440px); }
  :root .flow-2, :root .flow-3 { --col: 1000px; }
  :root .flow-2 .flow-body, :root .flow-3 .flow-body { flex: none; }
  :root .flow-2 .flow-foot, :root .flow-3 .flow-foot { margin-bottom: auto; }
  :root .ct-tools { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  :root .ct-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }

  /* פתיחה: התמונה משמאל, הכותרת, המספרים והכפתור מימין */
  :root .flow-0 { --col: 1140px; display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); grid-template-rows: auto 1fr auto auto auto auto auto 1fr; column-gap: 64px; }
  :root .flow-0 .flow-top { grid-column: 1 / -1; grid-row: 1; }
  :root .flow-0 .flow-body { display: contents; }
  :root .flow-0 .flow-body > * { grid-column: 1; }
  :root .flow-0 .f-photo { grid-column: 2; grid-row: 2 / 9; align-self: center; height: min(calc(74svh / var(--z)), 640px); margin: 12px 0; }
  :root .flow-0 .f-brand { grid-row: 3; text-align: start; }
  :root .flow-0 .f-h1 { grid-row: 4; font-size: 54px; margin: 8px 0 12px; }
  :root .flow-0 .f-p { grid-row: 5; font-size: 19px; }
  :root .flow-0 .f-ticket { grid-row: 6; margin-top: 22px; }
  :root .flow-0 .pp-ticket b { font-size: 40px; }
  :root .flow-0 .flow-foot { grid-column: 1; grid-row: 7; position: static; margin: 22px 0 0; padding: 0; background: none; justify-items: stretch; }
  :root .flow-0 .flow-foot::after { display: none; }
  :root .flow-0 .flow-foot .f-cta { width: 100%; }

  /* לפני שמתחילים: מימין המספרים, הטיפ והבטיחות. משמאל המסלול */
  :root .flow-1 { --col: 1060px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto auto auto minmax(0, 1fr); column-gap: 48px; }
  :root .flow-1 .flow-top { grid-column: 1 / -1; grid-row: 1; }
  :root .flow-1 .flow-body { display: contents; }
  :root .flow-1 .flow-body > * { grid-column: 1; margin-bottom: 12px; }
  :root .flow-1 .f-eyebrow { grid-column: 1 / -1; grid-row: 3; }
  :root .flow-1 .f-h2 { grid-column: 1 / -1; grid-row: 4; margin-bottom: 22px; }
  :root .flow-1 .f-tiles { grid-row: 5; }
  :root .flow-1 .f-tip { grid-row: 6; }
  :root .flow-1 .sec-t:has(+ .f-safety) { grid-row: 7; }
  :root .flow-1 .f-safety { grid-row: 8; align-self: start; }
  :root .flow-1 .sec-t:has(+ .f-phases) { grid-column: 2; grid-row: 5; align-self: start; margin-top: 0; }
  :root .flow-1 .f-phases { grid-column: 2; grid-row: 5 / 9; align-self: start; margin-top: 30px; }
  :root .flow-1 .flow-foot { grid-column: 1 / -1; grid-row: 9; margin-top: 18px; }

  /* מסך ההרכבה והפריסה: הכפתורים בעמודה ממורכזת, לא בפינות של מסך רחב */
  :root .ui-bilt .bb-top, :root .ui-bilt .bb-bar, :root .lo-top { max-width: 880px; margin-inline: auto; }
  :root .ui-bilt .bp-strip { inset-inline-start: max(12px, calc(50vw / var(--z) - 440px + 16px)); }
}

/* מסך צר (360): "איך היה?" בשורה אחת ליד הכוכבים */
@media (max-width: 380px) {
  :root .fin-rate { white-space: nowrap; gap: 4px; }
  :root .stars button { width: 38px; }
}
/* מסך המלאי (ו4, משוב איתי): אזור אחד בכל פעם, מסילה אופקית, רשת קומפקטית, הקוד קטן ושקט ליד הכמות */
:root .inv-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
:root .inv-zone { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; color: var(--ink3); font-variant-numeric: tabular-nums; }
:root .inv-zone b { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); white-space: nowrap; }
:root .inv-dots { display: flex; align-items: center; gap: 6px; flex: none; }
:root .inv-dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--hair); cursor: pointer; transition: width 0.35s var(--ease-out), background 0.25s; }
:root .inv-dot::before { content: ""; position: absolute; inset: -12px -4px; }
:root .inv-dot.done { background: var(--ok); }
:root .inv-dot.cur { width: 22px; background: var(--acc); }
:root .inv-dot.cur.done { background: var(--ok); }
:root .inv-track { display: flex; align-items: flex-start; margin: 4px calc(-1 * var(--gut)) 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; transition: height 0.35s var(--ease-out); }
:root .inv-track::-webkit-scrollbar { display: none; }
:root .inv-track > .ct-sec { flex: 0 0 100%; box-sizing: border-box; margin: 0; padding: 2px var(--gut) 6px; scroll-snap-align: start; scroll-snap-stop: always; }
:root .inv-track .ct-sec-h { margin: 0 0 10px; }
/* ז3: אזור שסומן "סימנתי הכל": נשאר במקום, מקבל מצב גמור ברור, והכפתור לאזור הבא מופיע בתוכו */
:root .ct-done { display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: rgba(52, 199, 89, 0.12); color: #1f7a3a; font-weight: 650; font-size: 15px; }
:root .ct-sec.zdone .ct-done { display: flex; animation: ctdone 0.5s var(--spring) both; }
:root .ct-done-go { border: 0; font: inherit; font-weight: 700; font-size: 14px; color: #fff; background: var(--acc-deep, #d9622b); padding: 8px 14px; border-radius: 99px; cursor: pointer; }
:root .ct-done-go[hidden] { display: none; }
:root .ct-sec.zdone .ct-grid { opacity: 0.55; transition: opacity 0.4s; }
:root .ct-sec.zdone .ct-item.on { transform: none; }
:root .f-cta.nudge { animation: ctanudge 0.9s var(--spring) both; }
@keyframes ctdone { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
@keyframes ctanudge { 0% { transform: scale(1); } 35% { transform: scale(1.04); } 100% { transform: scale(1); } }
:root .ct-n { font-size: 14px; font-weight: 600; color: var(--ink3); }
:root .inv-track .ct-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
:root .inv-track .ct-item { padding: 4px 4px 7px; border-radius: 18px; }
:root .inv-track .ct-pic { margin-bottom: 3px; }
:root .inv-track .ct-pic .ct-img { aspect-ratio: 3 / 2; border-radius: 14px; }
:root .ct-spec2 { display: block; font-size: 10.5px; line-height: 1.2; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 699px) { :root .flow-3 .f-h2 { font-size: 30px; } :root .flow-3 .flow-body { gap: 10px; padding-top: 10px; } }
:root .inv-track .ct-name { font-size: 12.5px; line-height: 1.18; }
:root .inv-track .ct-meta { gap: 6px; margin-top: 1px; }
:root .ct-ref { font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink3); opacity: 0.85; }
@media (min-width: 700px) { :root .inv-track .ct-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; } }
@media (min-width: 1000px) { :root .inv-track .ct-grid { grid-template-columns: repeat(8, 1fr); } }
@media (prefers-reduced-motion: reduce) { :root .inv-track { transition: none; } }
/* השבבים של הפריטים בצעד (ו4, משוב איתי): השם העברי ראשי, הקוד קטן ומשני ולא גלולה שחורה */
:root .bp-row .bp-no { min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: var(--ink3); font-size: 11px; font-weight: 600; letter-spacing: .03em; }


/* =========================================================
   מסך הפתיחה נכנס כולו בגובה המסך (ו4, תיקון חובה מאיתי): טלפון וטאבלט.
   התמונה מתכווצת לפי הגובה, והכפתור והקישור הם חלק מהזרימה ולא צפים מעל המספרים
   ========================================================= */
@media (max-width: 999px) {
  :root .flow-0 { min-height: 100svh; padding-bottom: calc(12px + var(--bottom)); }
  :root .flow-0 .flow-body { flex: 1 1 auto; min-height: 0; justify-content: flex-end; gap: 10px; padding: 8px 0 4px; }
  :root .flow-0 .f-photo { flex: 1 1 0; height: auto; min-height: 120px; max-height: 520px; }
  :root .flow-0 .flow-foot { position: static; margin: 0; padding: 10px 0 0; background: none; }
  :root .flow-0 .flow-foot::after { display: none; }
  :root .flow-0 .f-brand { margin-top: 4px; }
}
/* מסכים נמוכים: הכותרת והמספרים קטנים קצת, כדי שהתמונה תישאר בגודל סביר */
@media (max-width: 999px) and (max-height: 760px) {
  :root .flow-0 .f-h1 { font-size: clamp(26px, 7.4vw, 32px); }
  :root .flow-0 .f-p { font-size: 15.5px; line-height: 1.4; }
  :root .flow-0 .f-ticket { margin-top: 2px; }
  :root .flow-0 .pp-ticket b { font-size: 26px; }
  :root .flow-0 .f-cta { height: 54px; }
  :root .flow-0 .f-alt { min-height: 38px; }
}

/* ---------- טיפוגרפיה (ז5): גופן המערכת. משקלים עד 700 בכותרות (SF כבד יותר מ-Rubik ב-800/900), גוף בלי ריווח ---------- */
body { letter-spacing: 0; }
.mark, .f-h1, .f-h2, .hero h1, .dash h1, .gate h1, .finish h2, .m-banner h3, .m-sec h4, .p-head h1, .pp-h1 { font-weight: 700; }
h1, h2 { letter-spacing: -0.03em; } h3, h4 { letter-spacing: -0.02em; }
:root .ui-bilt .bb-info p, :root .co-pop p, :root .step-card p { line-height: 1.5; letter-spacing: 0; }
small, .bp-q { letter-spacing: 0.005em; }
