/* ═══════════════════════════════════════════════════════
   MoveFocus — styles.css
   שפה עיצובית: NeuPractix Design System ("Light Clinical
   Therapy") — משותפת לכל אפליקציות התרגול המשפחה.
   accent ייחודי ל-MoveFocus: כתום-אנרגיה (תנועה).
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Clinical Color Palette — עמודים משותפים לכל האפליקציות במשפחה */
  --bg: #F0F4F8;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --circle-bg: #E1E8F0;
  --circle-rim: #B9C6D6;
  --text: #1E293B;
  --muted: #526079;
  --gold: #e8b800;
  --gold-dark: #c09600;
  --green: #14B8A6;
  --yellow-m: #d4a000;
  --orange-m: #e07020;
  --red-m: #F43F5E;

  /* MoveFocus brand accent — כתום-אנרגיה (תנועה) */
  --accent: #F97316;
  --accent-dark: #C2410C;
  --accent-soft: rgba(249,115,22,0.08);

  /* גרסאות טקסט נגישות — WCAG AA, לשימוש כ-color בלבד (לא רקע/מסגרת) */
  --accent-text: #9A3412;
  --green-text: #0F766E;
  --red-text: #BE123C;
  --yellow-text: #8A6000;
  --orange-text: #A04C17;

  --navy: #1E293B;
  --gradient-brand: linear-gradient(135deg, #F97316 0%, #FBBF24 100%);
  --gradient-focus: linear-gradient(90deg, #F97316 0%, #FBBF24 100%);
  --gradient-cta: linear-gradient(135deg, #F97316 0%, #FBBF24 100%);

  --font-body: 'Assistant', sans-serif;
  --font-ui: 'Rubik', sans-serif;

  --glow-primary: 0 0 25px rgba(249,115,22,0.2), 0 4px 12px rgba(249,115,22,0.15);
  --glow-accent: 0 0 25px rgba(251,191,36,0.25), 0 4px 12px rgba(251,191,36,0.15);

  --glass-bg: rgba(255,255,255,0.85);
  --glass-border: rgba(255,255,255,0.6);
}

html, body {
  height: 100%; width: 100%;
  background: #D7DBE3;
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.t-dark { color: var(--text); }
.t-accent { color: var(--accent-text); }

/* ══ SCREENS — fade-in 350ms, calm/premium ══ */
.screen { display: none; position: absolute; inset: 0; flex-direction: column; max-width: 480px; margin: 0 auto; box-shadow: #E2E8F0 0 0 0 1px, rgba(0,15,71,0.16) 0 12px 60px 0; }
.screen.active { display: flex; animation: screenFadeIn 350ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══ AUTH ══ */
#auth { background: var(--bg); align-items: center; justify-content: center; overflow-y: auto; padding: 28px 24px 40px; }
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-logo-img {
  width: 150px; height: 150px; border-radius: 18px; display: block;
  object-fit: contain; background: #fff;
  box-shadow: 0 4px 20px rgba(249,115,22,0.14); flex-shrink: 0;
}
/* לוגו מלבני (איקון + MoveFocus + by NeuPractix) — ללא כרטיס/רקע, יושב ישירות על רקע המסך */
.intro-logo-img { width: auto; height: 52px; max-width: 230px; object-fit: contain; display: block; background: none; box-shadow: none; border-radius: 0; }
.auth-top h1 { font-family: var(--font-ui); font-size: 24px; font-weight: 900; color: var(--text); text-align: center; line-height: 1.2; }
.auth-top h1 em { font-style: normal; color: var(--accent-text); }
.auth-top p { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; max-width: 260px; }
.splash-disclaimer { font-size: 10.5px; color: #8b93a7; text-align: center; line-height: 1.5; max-width: 300px; margin-top: -2px; }

/* ══ WELCOME — מסך בית טרום-כניסה ══
   העיצוב המלא של #welcome חי כעת ב-<style> ייעודי בתוך index.html עצמו
   (אותו דפוס בדיוק כמו ב-EyeFocus החי), ולא כאן.
   הרקע שקוף בכוונה — הרקע הכהה-בהיר (#D7DBE3) של html/body מציץ מבעד לזה,
   בדיוק כמו ב-EyeFocus החי, כדי שלא יהיה תפר צבע בין העמודה הצרה לשוליים. */
#welcome { background: transparent; }

.name-input-row { width: 100%; max-width: 340px; display: flex; gap: 8px; margin-bottom: 20px; }
.auth-input {
  flex: 1; padding: 13px 16px; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 14px; color: var(--text);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-user-select: auto; user-select: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.auth-input::placeholder { color: var(--muted); font-weight: 400; }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.auth-input.err { border-color: var(--red-m); box-shadow: 0 0 0 3px rgba(244,63,94,0.1); }

.auth-btn {
  padding: 13px 18px; background: var(--gradient-cta); color: var(--navy);
  border: none; border-radius: 999px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 900;
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--glow-primary);
  transition: transform .12s, filter .15s; flex-shrink: 0;
}
.auth-btn:active { transform: scale(0.96); }
.auth-btn:hover { filter: brightness(0.95); }

.err-msg { font-size: 12px; color: var(--red-text); margin-top: -14px; margin-bottom: 8px; padding-inline-start: 4px; display: none; width: 100%; max-width: 340px; }
.err-msg.show { display: block; }

.section-label { width: 100%; max-width: 340px; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; padding-inline-start: 2px; }

.users-list { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 8px; }
.user-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--white); border: 1.5px solid var(--border); border-radius: 16px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.user-row:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(249,115,22,0.12); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); border: 1.5px solid rgba(249,115,22,0.2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: var(--accent-text); flex-shrink: 0;
  padding: 0; cursor: pointer; transition: box-shadow .15s;
}
.user-avatar:hover { box-shadow: 0 0 0 3px rgba(249,115,22,0.18); }
.user-avatar img, .ut-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-emoji { font-size: 18px; line-height: 1; }
.ut-avatar .avatar-emoji { font-size: 16px; }
.user-info { flex: 1; }
.user-name { font-size: 14px; font-weight: 700; color: var(--text); }
.user-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.user-arrow { font-size: 18px; color: var(--border); }

.empty-state { width: 100%; max-width: 340px; text-align: center; padding: 28px 16px; background: var(--white); border: 1.5px dashed var(--border); border-radius: 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-state .es-icon { font-size: 26px; margin-bottom: 8px; display: block; }

.auth-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--red-m); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 700; z-index: 999; opacity: 0;
  transition: opacity .25s; white-space: nowrap; pointer-events: none;
}
.auth-toast.show { opacity: 1; }
.auth-toast.success { background: var(--green); }

/* ══ USER TOPBAR ══ */
.user-topbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ut-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gradient-cta); border: none; display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--font-ui); font-size: 14px; font-weight: 900; color: var(--navy); flex-shrink: 0; padding: 0; cursor: pointer; }
.ut-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-icon-btn { font-size: 15px; background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 8px; transition: background .15s; line-height: 1; flex-shrink: 0; }
.ut-icon-btn:hover { background: var(--bg); }
.ut-logout { font-size: 12px; color: var(--muted); background: none; border: none; font-family: var(--font-body); cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background .15s; flex-shrink: 0; }
.ut-logout:hover { background: var(--bg); }

/* ══ מודל: תמונת פרופיל ══ */
.avatar-emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 14px; }
.avatar-emoji-btn { font-size: 22px; padding: 6px 0; background: var(--bg); border: 1.5px solid transparent; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.avatar-emoji-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.avatar-upload-row { display: block; margin-bottom: 10px; }
.avatar-upload-btn { display: block; text-align: center; padding: 11px; background: var(--accent-soft); color: var(--accent-text); border: 1.5px solid rgba(249,115,22,0.25); border-radius: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.avatar-remove-btn { display: block; width: 100%; text-align: center; padding: 10px; background: none; color: var(--muted); border: 1.5px solid var(--border); border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
.avatar-remove-btn:hover { background: var(--bg); }

/* ══ מודל: קוד פרופיל ══ */
.code-modal-value { font-family: var(--font-ui); font-size: 20px; font-weight: 900; letter-spacing: 0.5px; color: var(--accent-text); background: var(--accent-soft); border: 1.5px solid rgba(249,115,22,0.25); border-radius: 12px; padding: 12px 14px; text-align: center; direction: ltr; margin-bottom: 12px; }
.code-copy-btn { display: block; width: 100%; padding: 12px; background: var(--gradient-cta); color: var(--navy); border: none; border-radius: 999px; font-family: var(--font-ui); font-size: 14px; font-weight: 900; cursor: pointer; box-shadow: var(--glow-primary); }

/* ══ INTRO ══ */
#intro { background: var(--bg); }
.intro-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px 28px 36px; overflow-y: auto; }
.intro-explain { text-align: center; font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 300px; }
.intro-warning { font-size: 12px; color: var(--muted); text-align: center; max-width: 280px; }

.glasses-note { width: 100%; max-width: 340px; background: #FFF7ED; border: 1.5px solid #FDBA74; border-radius: 16px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; }
.gn-icon { font-size: 20px; }
.gn-text { font-size: 13px; color: var(--orange-text); line-height: 1.4; }
.gn-text strong { color: #7A3406; }

.touch-note { width: 100%; max-width: 340px; background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 16px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; }
.tn-icon { font-size: 20px; }
.tn-text { font-size: 13px; color: var(--accent-text); line-height: 1.4; font-weight: 700; }

.cd-instruction-body strong.touch-emphasis { display: block; margin-top: 10px; color: var(--accent-text); font-weight: 800; }

.preview-circle { width: 120px; height: 120px; border-radius: 50%; background: var(--circle-bg); border: 5px solid var(--circle-rim); box-shadow: inset 0 2px 6px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.preview-touch-icon { width: 74px; height: 74px; object-fit: contain; }

.start-btn {
  width: 100%; max-width: 340px; padding: 17px;
  background: var(--gradient-cta); color: var(--navy); border: none; border-radius: 999px;
  font-family: var(--font-ui); font-size: 16px; font-weight: 900;
  cursor: pointer; box-shadow: var(--glow-primary);
  transition: transform .12s, filter .15s; flex-shrink: 0;
}
.start-btn:active { transform: scale(0.97); }
.start-btn:hover { filter: brightness(0.96); }
.start-btn:disabled { background: var(--border); color: var(--muted); box-shadow: none; cursor: default; }

.history-badge { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; width: 100%; max-width: 340px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); cursor: pointer; }
.hb-icon { font-size: 18px; }
.hb-text { flex: 1; }
.hb-title { font-size: 12px; font-weight: 700; color: var(--text); }
.hb-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.hb-arrow { font-size: 18px; color: var(--accent-text); margin-inline-start: auto; }

/* ══ TEST (בדיקת ביצועים) ══ */
#test { background: var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 12px; background: var(--white); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.tb-group { text-align: center; }
.tb-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.tb-val { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: var(--text); margin-top: 1px; }
.tb-val.blue { color: var(--accent-text); }
.tb-val.orange { color: var(--orange-text); }

.step-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 20px 4px; flex-shrink: 0; flex-wrap: wrap; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .3s, transform .2s; }
.step-dot.done { background: var(--green); }
.step-dot.active { background: var(--accent); transform: scale(1.3); }

.size-label { text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 0.5px; padding: 2px 20px 6px; flex-shrink: 0; }

/* הזירה מיושרת למעלה, לא ממורכזת אנכית. קודם היא התמרכזה בכל הגובה
   שנשאר, מה שיצר פער גדול בין ההנחיה למשחק *וגם* שטח מת בתחתית. עכשיו
   כל המידע מרוכז בחלק העליון: timeline, הנחיה, ומיד אחריהם המשחק.

   שימו לב: הזירה היא flex-direction:column, ולכן המרכוז האנכי מגיע
   מ-justify-content ולא מ-align-items. align-items שולט על הציר
   האופקי כאן — לכן הוא נשאר center, אחרת המשחק היה נצמד לצד. */
.arena {
  flex: 1; display: flex; flex-direction: column;
  justify-content: flex-start;   /* אנכי — צמוד למעלה */
  align-items: center;           /* אופקי — ממורכז */
  position: relative; gap: 10px;
  /* מרווח נשימה בין ההנחיה למשחק. 4px היה צמוד מדי, וההנחיה נראתה
     כאילו היא חלק מהמשחק. */
  padding-top: 20px;
}

/* ההנחיה של שלב ההערכה — שורה אחת קצרה מתחת ל-timeline.
   לא בתחתית המסך: שם היד מכסה אותה בזמן הביצוע. */
.instruction {
  flex-shrink: 0; text-align: center;
  font-size: 19px; font-weight: 800; color: var(--text);
  padding: 0 16px 14px; line-height: 1.3;
}
.instruction strong { color: var(--accent-text); }

/* ── פס התקדמות רציף למדדי ההערכה (בסגנון EyeFocus) ── */
/* רווח נדיב מתחת ל-timeline לפני ההנחיה (היה 6px, עכשיו 18px = פי 3):
   ההנחיה היא הדבר שצריך למשוך את העין אחרי הפס, ובלי אוויר סביבה היא
   נבלעת בו. */
.diag-progress-wrap { margin: 6px 20px 18px; height: 7px; background: rgba(30,41,59,0.08); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.diag-progress-fill { height: 100%; width: 0%; background: var(--gradient-cta); border-radius: 4px; transition: width .15s linear; }

/* ── מדד 1: הקשה חלופית ── */
.diag-tap-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; }
.diag-tap-target {
  border-radius: 50%; background: var(--circle-bg); border: 4px solid var(--circle-rim);
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.08); transition: transform .08s, background .1s, border-color .1s;
}
.diag-tap-target.hit { background: rgba(20,184,166,0.18); border-color: var(--green); transform: scale(1.08); }
.diag-tap-target.frozen-hint { animation: tapPulse 1.1s infinite; border-color: var(--accent); }
@keyframes tapPulse { 50% { box-shadow: 0 0 0 8px rgba(249,115,22,0.14); } }
.diag-tap-icon { width: 66%; height: 66%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.diag-tap-target.hit .diag-tap-icon { filter: drop-shadow(0 0 4px rgba(20,184,166,0.5)); }
.diag-timer { font-family: var(--font-ui); font-size: 32px; font-weight: 900; color: var(--accent-text); }

/* ── מדד 2: מסלול ── */
.diag-trace-wrap { border-radius: 18px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); background: var(--white); }
.diag-trace-wrap canvas { display: block; touch-action: none; }

/* ── מדד 3: זמן תגובה ── */
.diag-reaction-wrap { display: flex; align-items: center; justify-content: center; }
.diag-reaction-target {
  width: 130px; height: 130px; border-radius: 50%; background: var(--circle-bg);
  border: 5px solid var(--circle-rim); transition: background .1s, border-color .1s;
}
.diag-reaction-target.go   { background: rgba(20,184,166,0.85); border-color: var(--green); }
.diag-reaction-target.nogo { background: rgba(244,63,94,0.85); border-color: var(--red-m); }
.diag-reaction-target.nogo-yellow { background: rgba(250,204,21,0.9); border-color: #CA8A04; }

/* ══ COUNTDOWN ══ */
.countdown-overlay { position: absolute; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.cd-instruction { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 32px; text-align: center; }
.cd-instruction-icon { font-size: 48px; }
.cd-instruction-icon img.icon-inline { width: 56px; height: 56px; object-fit: contain; display: block; }
.cd-instruction-title { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: var(--text); line-height: 1.25; }
.cd-hand-icon { width: 108px; height: 108px; object-fit: contain; transition: transform .25s ease; }
.cd-hand-icon.mirrored { transform: scaleX(-1); }
.cd-touch-hand-emph { font-family: var(--font-ui); font-size: 16px; font-weight: 900; color: var(--accent-text); text-align: center; }
.cd-instruction-body { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 280px; }
.cd-start-btn {
  padding: 16px 48px; background: var(--gradient-cta); color: var(--navy);
  border: none; border-radius: 999px;
  font-family: var(--font-ui); font-size: 18px; font-weight: 900;
  cursor: pointer; box-shadow: var(--glow-primary);
  transition: transform .12s; animation: popIn .4s ease;
}
.cd-start-btn:active { transform: scale(0.95); }
.countdown-num { font-family: var(--font-ui); font-size: 96px; font-weight: 900; color: var(--accent-text); line-height: 1; animation: popIn .35s ease; }
@keyframes popIn { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.countdown-hint { font-size: 14px; color: var(--muted); text-align: center; line-height: 1.5; }
.countdown-go { font-family: var(--font-ui); font-size: 72px; font-weight: 900; color: var(--green-text); animation: popIn .3s ease; cursor: pointer; padding: 12px 32px; border-radius: 20px; background: rgba(20,184,166,0.10); border: 2.5px solid rgba(20,184,166,0.3); user-select: none; }
.countdown-go-hint { font-size: 13px; color: var(--green-text); opacity: .7; animation: fadeIn .5s ease .3s both; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: .7 } }

/* ══ RESULTS ══ */
#results { align-items: stretch; padding: 0; background: var(--bg); overflow-y: auto; }
.res-dash-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 20px 14px; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.rdh-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.rdh-title { font-family: var(--font-ui); font-size: 18px; font-weight: 900; color: var(--text); }
.rdh-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rdh-badge { margin-inline-start: auto; padding: 5px 12px; border-radius: 20px; font-family: var(--font-ui); font-size: 13px; font-weight: 900; flex-shrink: 0; }

.gauge-card { background: var(--glass-bg); border: 1px solid var(--glass-border); margin: 12px 14px 0; border-radius: 20px; padding: 16px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.gauge-card-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.gauge-wrap { position: relative; width: 200px; height: 108px; }
.gauge-wrap canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.gauge-pct { font-family: var(--font-ui); font-size: 30px; font-weight: 900; color: var(--text); line-height: 1; text-align: center; }

/* ── שני Gauge זה-לצד-זה — יד ימין / יד שמאל (מסך התוצאות) ──
   canvas מקבל width/height: 100% (מעל) כדי שיישאר תמיד בתוך גבולות ה-wrapper —
   מונע מצב שבו ה-canvas (ברזולוציית ה-attribute הפנימית) "בורח" חוץ לכרטיס
   כשה-wrapper מצטמצם, ונראה כאילו שני המדדים זזים ימינה/נחתכים. */
.gauge-card-dual { gap: 4px; }
.gauge-dual-row { display: flex; gap: 16px; justify-content: center; width: 100%; direction: ltr; }
.gauge-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; }
.gauge-wrap-mini { width: 148px; height: 81px; max-width: 100%; }
.gauge-mini .gauge-pct { font-size: 22px; }
.gauge-mini-label { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 0.3px; }

/* ── טאבים לבחירת יד לצפייה בפירוט המדדים (מסך התוצאות) ── */
.hand-tabs { display: flex; gap: 8px; margin: 14px 14px 0; direction: ltr; }
.hand-tab { flex: 1; padding: 9px 8px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--white); font-family: var(--font-ui); font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.hand-tab.active { background: var(--accent-soft); border-color: rgba(14,165,233,0.35); color: var(--accent-text); }

/* ── רמות התחלה נפרדות לכל יד (טיזר תוכנית האימונים) ── */
.teaser-levels { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.teaser-levels .level-chip { font-size: 12px; padding: 5px 12px; }

/* ── אזהרת ריבוי-מגע במהלך ההערכה ── */
.mt-warning { display: none; position: absolute; inset: 0; z-index: 25; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 0 32px; }
.mt-warning-icon { font-size: 48px; }
.mt-warning-title { font-family: var(--font-ui); font-size: 18px; font-weight: 900; color: var(--red-text); }
.mt-warning-body { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 280px; }
.mt-retry-btn { padding: 12px 28px; background: var(--gradient-cta); color: var(--navy); border: none; border-radius: 999px; font-family: var(--font-ui); font-weight: 900; cursor: pointer; box-shadow: var(--glow-primary); }

/* ── מסך-ביניים קצר בין שלבי ההערכה (tap/trace/reaction), כדי לתת רגע להבין שהשלב הסתיים ── */
.phase-break {
  display: none; position: absolute; inset: 0; z-index: 22; background: var(--bg);
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 32px;
  animation: screenFadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.phase-break.show { display: flex; }
.phase-break-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--gradient-cta);
  color: var(--navy); font-size: 28px; font-weight: 900; line-height: 56px; text-align: center;
  box-shadow: var(--glow-primary); margin-bottom: 8px;
}
.phase-break-title { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: var(--text); }
.phase-break-next-label { font-size: 13px; color: var(--muted); margin-top: 10px; }
.phase-break-next-name { font-family: var(--font-ui); font-size: 17px; font-weight: 800; color: var(--accent-text); }

/* אייקוני "מה זה?" ליד מדדי התוצאות + ההסבר שנפתח בלחיצה (כמו EyeFocus) */
.info-row { display: flex; align-items: center; justify-content: center; gap: 5px; }
.info-btn { width: 15px; height: 15px; flex-shrink: 0; border-radius: 50%; border: 1.3px solid var(--muted); background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: transform .1s, border-color .15s, color .15s; }
.info-btn:hover, .info-btn:focus-visible { border-color: var(--accent); color: var(--accent-text); }
.info-btn:active { transform: scale(0.9); }
.info-btn img { width: 11px; height: 11px; object-fit: contain; }
.info-pop { font-size: 11.5px; line-height: 1.4; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 7px 10px; margin-top: 4px; text-align: start; }
.info-pop-note { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--accent-text); }

.thresh-card { margin: 12px 14px 0; background: var(--glass-bg); border: 1.5px solid var(--glass-border); border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.thresh-left { display: flex; align-items: center; gap: 10px; }
.thresh-icon { font-size: 22px; }
.thresh-title { font-size: 13px; font-weight: 700; color: var(--text); }
.thresh-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.thresh-val { font-family: var(--font-ui); font-size: 24px; font-weight: 900; color: var(--accent-text); }
.thresh-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.game-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 14px 0; }
.game-kpi { position: relative; min-height: 80px; background: var(--glass-bg); border: 1.5px solid var(--glass-border); border-radius: 16px; padding: 14px 12px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); text-align: center; }
/* גדלי טקסט/כוכבים תואמים ל-EyeFocus */
.gk-stars { font-size: 12px; letter-spacing: 1px; line-height: 1; min-height: 14px; }
.gk-label { font-size: 10px; font-weight: 800; font-family: var(--font-ui); letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.gk-val { font-family: var(--font-ui); font-size: 22px; font-weight: 900; color: var(--text); line-height: 1; }
.gk-val-word { font-size: 15px; font-weight: 800; }
.gk-untested { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.2px; cursor: help; border-bottom: 1px dotted var(--muted); }

.train-card { margin: 10px 14px 0; background: var(--glass-bg); border: 1.5px solid rgba(20,184,166,0.3); border-radius: 18px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(20,184,166,0.08); }
.train-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.train-icon { font-size: 20px; }
.train-title { font-family: var(--font-ui); font-size: 14px; font-weight: 900; color: var(--text); }
.train-teaser-text { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
/* כפתור פעולה ראשי במסך התוצאות — גרדיאנט הכתום של האפליקציה, טקסט כהה (כמו EyeFocus, בקשת לאה) */
.train-cta-btn { width: 100%; padding: 14px; background: var(--gradient-cta); color: var(--navy); border: none; border-radius: 999px; font-family: var(--font-body); font-size: 15px; font-weight: 900; cursor: pointer; box-shadow: var(--glow-primary); transition: transform .12s, filter .15s; }
.train-cta-btn:hover { filter: brightness(0.95); }
.train-cta-btn:active { transform: scale(0.97); }

/* ══ Loading spinner (reused by training-lock's access check — NOT AI-specific) ══ */
.ai-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; }
.ai-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading-txt { font-size: 12px; color: var(--muted); }

.dash-btns { padding: 14px 14px 32px; display: flex; flex-direction: column; gap: 10px; }
/* בועה שקטה יותר מ-.train-cta-btn — "הערכה חוזרת" היא פעולה משנית במסך התוצאות, לא הפעולה הראשית (כמו EyeFocus) */
.replay-btn { width: 100%; padding: 13px; background: rgba(30,27,75,0.07); color: var(--indigo-deep); border: 1.5px solid rgba(30,27,75,0.22); border-radius: 999px; font-size: 14px; font-weight: 800; font-family: var(--font-ui); cursor: pointer; box-shadow: none; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .12s, background .15s; }
.replay-btn:hover { background: rgba(30,27,75,0.12); }
.replay-btn:active { transform: scale(0.97); }
.home-link { font-size: 14px; color: var(--muted); text-align: center; background: none; border: none; font-family: var(--font-body); cursor: pointer; }
.home-link-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--accent-text); background: var(--accent-soft); border: 1.5px solid rgba(249,115,22,0.3); border-radius: 20px; padding: 8px 18px; text-align: center; font-family: var(--font-body); cursor: pointer; transition: transform .1s, background .15s; }
.home-link-cta:hover { background: rgba(249,115,22,0.16); }
.home-link-cta:active { transform: scale(0.96); }
.icon-inline { width: 1em; height: 1em; vertical-align: -0.15em; object-fit: contain; }

/* ══ TRAINING SCREEN ══ */
#training { background: var(--bg); }
.training-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 24px 20px 40px; }
#trainingContent { width: 100%; max-width: 380px; }

.lock-card { background: var(--glass-bg); border: 1.5px solid var(--glass-border); border-radius: 22px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); text-align: center; }
.lock-icon { font-size: 44px; }
.lock-icon .icon-inline { width: 72px; height: 72px; }
.lock-title { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: var(--text); }
.lock-body { font-size: 14px; color: var(--muted); line-height: 1.65; }
.lock-price { font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: var(--green-text); background: rgba(20,184,166,0.08); border: 1.5px solid rgba(20,184,166,0.25); border-radius: 14px; padding: 8px 18px; }
.lock-code-note { font-size: 12px; color: var(--muted); line-height: 1.6; background: var(--bg); border-radius: 12px; padding: 10px 14px; width: 100%; }
.lock-code-note strong { color: var(--text); font-size: 13px; }
.restore-section { width: 100%; border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 4px; }
.restore-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-align: start; }

/* ══ BETA BADGE — auth screen ══ */
.beta-badge { display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--accent-soft); color: var(--accent-text); border: 0.8px solid rgba(249,115,22,0.25); border-radius: 999px; padding: 5px 12px; font-size: 11px; font-weight: 700; width: fit-content; margin: 8px auto 0; }

/* ══ נגישות ══ */
button:focus-visible, input:focus-visible, .user-row:focus-visible { outline: 3px solid rgba(249,115,22,0.45); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ══ CONSENT ══ */
#consent { background: var(--bg); }
.consent-card { background: var(--glass-bg); border: 1.5px solid var(--glass-border); border-radius: 22px; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.consent-title { font-family: var(--font-ui); font-size: 18px; font-weight: 900; color: var(--text); text-align: center; }
.consent-sub { font-size: 13px; color: var(--muted); text-align: center; }
.consent-scroll { max-height: 44vh; overflow-y: auto; font-size: 13px; line-height: 1.65; color: var(--text); background: var(--bg); border-radius: 14px; padding: 14px; border: 1px solid var(--border); }
.consent-scroll p { margin-bottom: 10px; }
.consent-scroll a { color: var(--accent-text); font-weight: 700; }
.consent-danger { background: rgba(244,63,94,0.06); border: 1.5px solid rgba(244,63,94,0.25); border-radius: 12px; padding: 10px 12px; color: var(--red-text); }
.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--text); line-height: 1.55; cursor: pointer; }
.consent-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }

/* ══ TRAINING — רמות, יומן, השוואה ══ */
.level-chip { padding: 7px 18px; border-radius: 999px; font-family: var(--font-ui); font-size: 14px; font-weight: 900; }
.level-chip.lvl-0 { background: rgba(20,184,166,0.1); color: var(--green-text); border: 1.5px solid rgba(20,184,166,0.3); }
.level-chip.lvl-1 { background: rgba(212,160,0,0.1); color: var(--yellow-text); border: 1.5px solid rgba(212,160,0,0.3); }
.level-chip.lvl-2 { background: rgba(249,115,22,0.08); color: var(--accent-text); border: 1.5px solid rgba(249,115,22,0.28); }

.games-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.gp-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; background: var(--bg); border-radius: 12px; padding: 9px 11px; color: var(--text); }

.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; width: 100%; }
.day-cell { aspect-ratio: 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-size: 13px; font-weight: 900; background: var(--bg); color: var(--muted); border: 1.5px solid var(--border); }
.day-cell.done { background: rgba(20,184,166,0.12); color: var(--green-text); border-color: rgba(20,184,166,0.35); cursor: pointer; transition: transform .12s, box-shadow .15s; }
.day-cell.done:hover { transform: scale(1.06); box-shadow: 0 2px 10px rgba(20,184,166,0.25); }
.day-cell.next { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); animation: nextPulse 1.6s infinite; }
@keyframes nextPulse { 50% { box-shadow: 0 0 0 4px rgba(249,115,22,0.12); } }

.done-today { width: 100%; background: rgba(20,184,166,0.08); border: 1.5px solid rgba(20,184,166,0.3); border-radius: 16px; padding: 14px; font-size: 14px; font-weight: 900; color: var(--green-text); line-height: 1.6; }
.done-today span { font-size: 12px; font-weight: 400; color: var(--muted); }

.cmp-headline { font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: var(--green-text); text-align: center; }
.cmp-wrap { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.cmp-row { width: 100%; }
.cmp-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-align: start; }
.cmp-bars { display: flex; flex-direction: column; gap: 5px; }
.cmp-bar { height: 26px; border-radius: 8px; display: flex; align-items: center; padding: 0 10px; min-width: 90px; transition: width 1s ease; }
.cmp-bar span { font-size: 11px; font-weight: 900; white-space: nowrap; }
.cmp-bar.old { background: var(--border); color: var(--muted); }
.cmp-bar.new { background: var(--accent-soft); color: var(--accent-text); border: 1.5px solid rgba(249,115,22,0.3); }
.cmp-bar.new.improved { background: rgba(20,184,166,0.12); color: var(--green-text); border-color: rgba(20,184,166,0.35); }

.sum-rows { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.sum-icon { font-size: 16px; }
.sum-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); text-align: start; }
.sum-acc { font-size: 15px; font-weight: 900; }

/* ══ TRAINING SESSION — מצב כהה (פלטת המשחקים) ══ */
#training.dark-session { background: #070F18; }
#training.dark-session .user-topbar { display: none; }
.tg-session { width: 100%; display: flex; flex-direction: column; gap: 12px; }
#training.dark-session .training-scroll { padding-top: 14px; }

.tg-progress { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: #415A77; text-transform: uppercase; }
.tg-intro { background: rgba(255,255,255,0.02); border: 1px solid rgba(224,225,221,0.1); border-radius: 20px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.tg-intro-icon { font-size: 42px; }
.tg-intro-title { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: #E0E1DD; }
.tg-intro-goal { font-size: 12px; color: #FB923C; font-weight: 700; }
.tg-intro-instr { font-size: 14px; color: #A0A5B5; line-height: 1.7; }
/* נקודות ההסבר של המשחק — קריאות הרבה יותר מפסקה רצופה.
   הן יושבות על לוח בהיר-שקוף משלהן עם טקסט בהיר מלא: הגרסה הקודמת
   השתמשה באפור עמום על רקע כמעט שחור והייתה כמעט בלתי-קריאה. */
.tg-intro-bullets {
  list-style: none; margin: 14px 0 2px; padding: 14px 14px;
  align-self: stretch; width: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 11px;
  text-align: start;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(224,225,221,0.14);
  border-radius: 14px;
}
.tg-intro-bullets li {
  position: relative; font-size: 14.5px; line-height: 1.6;
  color: #EDEFF2; font-weight: 500;
  padding-inline-start: 20px;
}
.tg-intro-bullets li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #FB923C; box-shadow: 0 0 8px rgba(251,146,60,0.6);
}
.tg-rest-count { font-family: var(--font-ui); font-size: 56px; font-weight: 900; color: #FB923C; line-height: 1; }

.tg-hud { display: flex; align-items: center; justify-content: space-between; }
.tg-hud-name { font-size: 13px; font-weight: 900; color: #E0E1DD; }
.tg-hud-score { font-size: 14px; font-weight: 900; color: #A0A5B5; direction: ltr; }
.tg-hud-score .ok { color: #14B8A6; }
.tg-hud-score .err { color: #F43F5E; }
/* ספירה לאחור — כמה זמן נשאר במשחק, כדי לדעת אם אתה בקצב */
.tg-hud-timer { font-size: 14px; font-weight: 900; color: #A0A5B5; direction: ltr;
  font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.tg-hud-timer.low { color: #FBBF24; }
.tg-hud-timer-bar { height: 3px; border-radius: 2px; background: rgba(224,225,221,0.14); overflow: hidden; margin-top: 4px; }
.tg-hud-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg,#2DD4BF,#38BDF8); transition: width .25s linear; }
.tg-hud-timer-fill.low { background: linear-gradient(90deg,#FBBF24,#FB923C); }

/* ── לוח-מחוונים לקצב המשימה ──
   שורה משלו מעל אזור המשחק, כדי שלא יעלה על שום גרפיקה. טבעת רכה
   שמתרוקנת, בגוונים נעימים (מנטה → זהב רך → אפרסק) — בלי אדום ובלי
   הבהוב, כדי ליידע על הקצב מבלי להלחיץ. */
.tg-pace { display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 8px 0 2px; min-height: 52px; }
.tg-pace-ring { position: relative; width: 50px; height: 50px; flex: 0 0 auto; }
.tg-pace-ring svg { width: 50px; height: 50px; transform: rotate(-90deg); }
.tg-pace-track { fill: none; stroke: rgba(224,225,221,0.13); stroke-width: 5; }
.tg-pace-arc { fill: none; stroke: #5EEAD4; stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset .18s linear, stroke .5s ease; }
.tg-pace-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Rubik', sans-serif; font-size: 14px; font-weight: 900; color: #CFE9E4;
  direction: ltr; font-variant-numeric: tabular-nums; }
.tg-pace-meta { display: flex; flex-direction: column; gap: 2px; }
.tg-pace-label { font-size: 11px; font-weight: 800; color: #8FA3AE; }
.tg-pace-sub { font-size: 10.5px; font-weight: 700; color: #6E8390; }

.tg-canvas-wrap { width: 100%; border-radius: 18px; overflow: hidden; border: 1px solid rgba(224,225,221,0.08); }
.tg-canvas-wrap canvas { display: block; touch-action: manipulation; }

.tg-btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.tg-btn { flex: 1; max-width: 150px; padding: 15px 10px; background: rgba(224,225,221,0.06); color: #E0E1DD; border: 1.5px solid rgba(224,225,221,0.2); border-radius: 16px; font-family: var(--font-body); font-size: 15px; font-weight: 900; cursor: pointer; transition: transform .1s, background .15s; -webkit-tap-highlight-color: transparent; }
.tg-btn:active { transform: scale(0.94); }
.tg-btn.hit { background: rgba(20,184,166,0.25); border-color: #14B8A6; }
.tg-btn.miss { background: rgba(244,63,94,0.25); border-color: #F43F5E; }

#training.dark-session .lock-card { background: rgba(255,255,255,0.02); border-color: rgba(224,225,221,0.1); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
#training.dark-session .lock-title { color: #E0E1DD; }
#training.dark-session .lock-body, #training.dark-session .home-link { color: #A0A5B5; }
#training.dark-session .sum-row { background: rgba(224,225,221,0.05); }
#training.dark-session .sum-name { color: #E0E1DD; }

/* ── עזרי משחק ספציפיים ── */
.tg-rhythm-hint { text-align: center; font-size: 12px; color: #A0A5B5; margin-top: 6px; }

/* "קצב מודרך" — סרגל דיוק (±מ״ש מוקדם/מאוחר, מוצג רגע אחרי כל הקשה) */
.tg-precision-bar { text-align: center; margin-top: 2px; min-height: 18px; opacity: 0; transform: translateY(-3px);
  transition: opacity .18s, transform .18s; font-family: var(--font-ui); font-size: 12.5px; font-weight: 900; }
.tg-precision-bar.show { opacity: 1; transform: translateY(0); }
.tg-precision-bar.tier-perfect .tg-precision-text { color: #2DD4BF; }
.tg-precision-bar.tier-good .tg-precision-text { color: #A0A5B5; }
.tg-precision-bar.tier-miss .tg-precision-text { color: #F43F5E; }
.tg-dual-rule { text-align: center; font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: #FB923C; padding: 6px 0; }

.tg-hand-badge { display: inline-block; padding: 5px 14px; border-radius: 999px; font-family: var(--font-ui); font-size: 13px; font-weight: 900; margin: 4px 0 2px; background: rgba(251,146,60,0.16); color: #FDBA74; border: 1.5px solid rgba(251,146,60,0.4); }

/* קסם הפסנתר (Magic Piano Keys) — 4 מקשים גדולים */
.tg-finger-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 0; }
.tg-finger-prompt { font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: #A0A5B5; text-align: center; min-height: 20px; }
.tg-finger-keys { display: flex; gap: 12px; width: 100%; max-width: 380px; }
.tg-finger-key {
  flex: 1; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(224,225,221,0.06); border: 1.5px solid rgba(224,225,221,0.2); border-radius: 18px;
  font-family: var(--font-ui); font-size: 26px; font-weight: 900; color: #E0E1DD;
  transition: transform .1s, background .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.tg-finger-key.lit { background: rgba(251,146,60,0.28); border-color: #FB923C; box-shadow: 0 0 20px rgba(251,146,60,0.35); color: #fff; }
.tg-finger-key.press { transform: scale(0.92); background: rgba(20,184,166,0.3); border-color: #14B8A6; }

/* ══ טיימליין מקטעים בתוך משחק (מצב כהה) ══ */
.tg-segbar { display: flex; gap: 5px; width: 100%; direction: ltr; }
.tg-seg { flex: 1; height: 7px; background: rgba(224,225,221,0.10); border-radius: 4px; overflow: hidden; }
.tg-seg-fill { height: 100%; width: 0%; background: #FB923C; border-radius: 4px; transition: width .2s linear; }
.tg-seg.done .tg-seg-fill { background: #14B8A6; }
.tg-seg.pulse { animation: segPulse .7s ease; }
@keyframes segPulse { 0% { box-shadow: 0 0 0 0 rgba(20,184,166,0.7); } 100% { box-shadow: 0 0 0 9px rgba(20,184,166,0); } }
.tg-seg-flash { align-self: center; font-size: 12px; font-weight: 900; color: #14B8A6; background: rgba(20,184,166,0.12); border: 1px solid rgba(20,184,166,0.35); border-radius: 20px; padding: 4px 14px; opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s; pointer-events: none; min-height: 18px; }
.tg-seg-flash.show { opacity: 1; transform: translateY(0); }
/* תוויות/אייקוני 3 המקטעים (חימום/פוקוס/מאסטר) מתחת לפס ההתקדמות */
.tg-seg-labels { display: flex; gap: 5px; width: 100%; direction: ltr; margin-top: 4px; }
.tg-seg-label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; color: rgba(224,225,221,0.4); letter-spacing: .2px; text-align: center;
  transition: color .2s, opacity .2s; opacity: .55; }
.tg-seg-label-icon { font-size: 12px; filter: grayscale(1); opacity: .6; transition: filter .2s, opacity .2s; }
.tg-seg-label.active { color: #FB923C; opacity: 1; font-weight: 900; }
.tg-seg-label.active .tg-seg-label-icon { filter: none; opacity: 1; }

/* ══ ספירה לאחור בין משחקים (מצב כהה) ══ */
.tg-count-wrap { min-height: 46vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.tg-count { font-family: var(--font-ui); font-size: 96px; font-weight: 900; color: #FB923C; line-height: 1; animation: popIn .35s ease; }
.tg-count.go { color: #14B8A6; animation: popIn .3s ease; }
.tg-count-hint { font-size: 13px; color: #A0A5B5; }

/* ══ מסך סיום יומי — גיימינג בהיר ══ */
.sum-card { gap: 10px; }
.sum-day { font-size: 11px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.sum-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; }
.stars { display: inline-flex; gap: 4px; direction: ltr; }
.star { color: #E1E8F0; transition: color .3s; }
.star.on { color: #FBBF24; text-shadow: 0 2px 10px rgba(251,191,36,0.35); }
.stars.lg .star { font-size: 42px; }
.stars.lg .star.on { animation: starPop .5s ease backwards; }
.stars.lg .star.on:nth-child(2) { animation-delay: .15s; }
.stars.lg .star.on:nth-child(3) { animation-delay: .3s; }
@keyframes starPop { from { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.25); } to { transform: scale(1); } }
.stars.sm .star { font-size: 13px; }
.sum-avg { font-family: var(--font-ui); font-size: 40px; font-weight: 900; color: var(--text); line-height: 1.1; }
.sum-avg-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.sum-praise { font-family: var(--font-ui); font-size: 15px; font-weight: 900; color: var(--accent-text); }
.sum-invite { font-size: 13px; color: var(--muted); line-height: 1.6; background: var(--accent-soft); border: 1px solid rgba(249,115,22,0.18); border-radius: 14px; padding: 10px 14px; width: 100%; }
.reminder-link { color: var(--accent-text); font-weight: 700; }

.day-detail { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; animation: fadeIn .25s ease; }
.dd-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.dd-head strong { color: var(--accent-text); }
.dd-close { margin-inline-start: auto; background: none; border: none; font-size: 14px; color: var(--muted); cursor: pointer; font-family: var(--font-body); }

/* ══ סיכום על רקע כהה ══
   באג: כרטיס הסיכום (וגם מסך תוצאת בדיקת האדמין) מוצג בתוך
   #training.dark-session, אבל .sum-avg השתמש ב-var(--text) שהוא
   #1E293B — כחול-אפור *כהה* שנועד לרקע בהיר. על רקע #070F18 המספר
   היה כמעט בלתי-נראה. כאן נקבעים צבעים ייעודיים למצב הכהה. */
#training.dark-session .sum-avg { color: #F2F4F7; text-shadow: 0 2px 14px rgba(251,146,60,0.25); }
#training.dark-session .sum-avg-label,
#training.dark-session .sum-day { color: #97A0B2; }
#training.dark-session .sum-row {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(224,225,221,0.12);
}
#training.dark-session .sum-name { color: #E6E8EC; }
#training.dark-session .sum-acc { color: #FBBF24; }
#training.dark-session .sum-praise { color: #FB923C; }
#training.dark-session .sum-invite,
#training.dark-session .lock-body { color: #C2C8D4; }
#training.dark-session .lock-card { background: rgba(255,255,255,0.03); border-color: rgba(224,225,221,0.12); }
#training.dark-session .lock-title { color: #F2F4F7; }

/* ══ כרטיס "באיזו יד משחקים" — לפני כל משחק ══
   כל משחק מתבצע פעמיים: פעם ביד ימין ופעם ביד שמאל. ההנחיה חייבת
   להיות הדבר הבולט ביותר במסך ההסבר, אחרת מתאמנים בטעות ביד הלא-נכונה
   ומאבדים את כל ההשוואה בין הידיים. */
.tg-hand-card {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  align-self: stretch; padding: 12px 16px; border-radius: 16px;
  background: rgba(251,146,60,0.12);
  border: 1.5px solid rgba(251,146,60,0.42);
}
/* touch-hand.png הוא סילואט שחור — נכון למסכי ההערכה הבהירים, אבל
   שחור-על-שחור על הכרטיס הכהה הזה. brightness(0) invert(1) הופך כל
   פיקסל אטום ללבן ומשמר את השקיפות, כך שאותו קובץ משרת את שני
   הרקעים ואין נכס נוסף שיכול לצאת מסנכרון. */
.tg-hand-card img {
  width: 46px; height: 46px; object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.tg-hand-card.left img { transform: scaleX(-1); }
.tg-hand-card-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tg-hand-card-lead { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; color: #C2C8D4; }
.tg-hand-card-name { font-family: var(--font-ui); font-size: 22px; font-weight: 900; color: #FB923C; line-height: 1.1; }

/* ══ הנחיה קצרה בתחתית מסך המשחק (מצב כהה) ══ */
.tg-tagline { text-align: center; font-family: var(--font-ui); font-size: 18px; font-weight: 900; color: #FB923C; letter-spacing: 0.3px; padding: 4px 10px 8px; line-height: 1.25; }

/* ══ הפסקה קצרה + הודעה בין 3 מקטעי המשחק (חימום/פוקוס/מאסטר) — בדומה ל-EyeFocus ══ */
.tg-stage-wrap { position: relative; }
.tg-breather {
  display: none; position: absolute; inset: 0; z-index: 8; border-radius: 18px;
  background: #070F18; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 0 28px;
  animation: screenFadeIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tg-breather.show { display: flex; }
.tg-breather-icon { font-size: 40px; margin-bottom: 6px; filter: drop-shadow(0 0 10px rgba(251,146,60,0.35)); }
.tg-breather-icon img { width: 40px; height: 40px; }
.tg-breather-title { font-family: var(--font-ui); font-size: 20px; font-weight: 900; color: #E0E1DD; }
.tg-breather-next-label { font-size: 13px; color: #A0A5B5; margin-top: 10px; }
.tg-breather-next-name { font-family: var(--font-ui); font-size: 17px; font-weight: 800; color: #FB923C; }

/* ══ זכויות יוצרים — כל המסכים ══ */
.app-footer { position: fixed; bottom: 4px; left: 0; right: 0; z-index: 40; text-align: center; font-size: 10px; color: #8b93a7; opacity: .75; pointer-events: none; font-family: var(--font-body); }
.app-footer a.footer-link { pointer-events: auto; color: inherit; text-decoration: underline; }
.app-footer a.footer-link:hover { color: var(--accent-text, #0369A1); }

/* ══ מודאל הסרת אחריות ══ */
.app-modal { position: fixed; inset: 0; z-index: 600; background: rgba(15,23,42,0.85); align-items: center; justify-content: center; padding: 24px; }
.app-modal-inner { position: relative; width: 100%; max-width: 440px; max-height: 80vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 28px 22px 22px; }
.app-modal-close { position: absolute; top: 8px; inset-inline-end: 10px; background: none; border: none; font-size: 24px; line-height: 1; color: var(--muted, #526079); cursor: pointer; padding: 4px 8px; }
.app-modal-title { font-size: 17px; font-weight: 900; margin: 0 0 12px; color: var(--navy, #1E293B); }
.app-modal-body { font-size: 13.5px; line-height: 1.7; color: #475569; margin: 0 0 10px; }

/* ══ בורר שפה ══ */
.lang-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 4px; }
.lang-dd { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lang-dd select { font-family: var(--font-body); font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 10px; cursor: pointer; border: 1.5px solid var(--border); background: var(--white); color: var(--text); }

/* ══ כפתורים צפים — שיתוף / משוב / התקנה ══ */
.share-fab {
  position: fixed; bottom: 64px; inset-inline-end: 16px; z-index: 500;
  width: 48px; height: 48px; border-radius: 50%;
  background: #3B82F6; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(59,130,246,0.35); cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.share-fab:hover { filter: brightness(1.08); }
.share-fab:active { transform: scale(0.94); }

.feedback-fab {
  bottom: 120px;
  background: var(--green);
  box-shadow: 0 4px 14px rgba(20,184,166,0.35);
}

.install-fab {
  bottom: 176px;
  background: #6332DC;
  box-shadow: 0 4px 14px rgba(99,50,220,0.35);
}

/* ══ מודל משוב ══ */
.fb-textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 12px;
  font-family: var(--font-body); font-size: 13.5px; color: var(--text); background: #F8FAFC;
  resize: vertical; outline: none; margin-top: 4px;
}
.fb-textarea:focus { border-color: var(--accent); }
.fb-modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.fb-modal-actions button { flex: 1; }
